diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000000000000000000000000000000000000..3e3ab1355db08d0bb04b422aa34f9590dbc7a10a
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,24 @@
+Jean-Philippe Barrette-LaPierre 
+(jean-philippe dot barrette-lapierre at savoirfairelinux dot com)
+	- Autotools support and portions of code
+
+Laurielle LEA (laurielle dot lea at savoirfairelinux dot com)
+	_ Implementation of SFLphone
+
+Jerome Oufella (jerome dot oufella at savoirfairelinux dot com)
+	- Many portions of code and bug fixes
+
+Sherry Yang (syangs04 at yahoo dot com)
+Imran Akbar (imr at stanford dot edu)
+	- Working on Win32 port
+
+Yan Morin
+(yan dot morin at savoifairelinux dot com)
+	- zeroconf integration
+	- sflphoned deamon
+	- add and improve sip core feature
+	- tests and debugging
+
+
+Contributors:
+Mikael Magnusson
diff --git a/CHANGES b/CHANGES
new file mode 100644
index 0000000000000000000000000000000000000000..7549ee37eafc02fad1594d93e323e18cc1891e68
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,80 @@
+SFLphoned (0.6.2) / 2005-11-29
+        * integral mono support
+        * libsamplerate added for macosx
+
+SFLphoned (0.6.1) / 2005-11-26
+	* add speex codec (experimental)
+	* fix for codec handling in sdp and audiortp
+	* new codec class
+        * add portaudio missing file 
+	  (thanks to Pierre POMES)
+	* add samplerate and inChannel/outChannel in AudioLayer
+	  we could use microphone in mono and speaker in stereo
+
+SFLphoned/SFLphone (0.6) / 2005-11-04
+	* improve sip protocol
+	* can now receive text message
+	* accept reinvite call
+	* cleaning headers
+	* improving bash launcher script
+        * select audio input and output device
+	* installation review
+
+SFLphoned/SFLphone (0.5a) / 2005-10-17
+	* sflphoned
+	* bug fixes
+	* sflphone-qt
+	* client/server protocol
+
+SFLphone (0.4.1-pre2) / 2005-09-30
+	* rearranged utilspp use
+        * Bug fix when trying to use more than 6 lines.
+	* Now, we send a final response to reINVITEs 
+	  (thanks to Mikael Magnusson)
+        * We can build in different build directories.
+          (thanks to Mikael Magnusson)
+	* We actualy check if portaudio and eXosip2 libs
+          are installed
+	* zeroconf integration start
+
+
+SFLphone (0.4.1-pre1) / 2005-08-11
+	* Use libeXosip2
+	* Add blink notification for voice-message
+	* Add scrolling text
+
+SFLphone (0.4) / 2005-07-06
+	* Cleanup code
+	* Add autotools support
+	* Handle CANCEL method
+	* PortAudio replace OSS and ALSA devices choice
+	* Add PortAudioCpp to make easy use of RingBuffer object for audio callback 
+	* Add PortAudio library to make easy sound portability
+	* Fix a few memory leak
+	* Reorganisation of SFLphone architecture
+	* Handle error messages on screen
+	* Handle "refused call"
+	* Notification of remote RINGING event added
+	* Call management updated
+
+SFLphone (0.3) / 2005-04-05
+	* ALSA driver support added 
+	* GSM audio codec support added
+	* Ringtones support (just ulaw format) added
+	* Notification incoming call added
+	* Apply skin feature added
+	* Volume control added
+	* Registration manually added
+	* Config-file in home directory changed to ".sflphone"
+
+SFLphone (0.2) / 2005-01-18
+	* Lines management updated
+	* Blocking bug fixed
+	* Configuration tree, made from a config file, added for setup
+	* Dial tone updated
+	* Timer call updated
+	* Apply feature updated
+	* Non-network or request failure cases updated
+
+SFLphone (0.1a) / 2004-12-22
+	* First release
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000000000000000000000000000000000000..8648c8a0eaf2577815bd72bef951d6e72fd8ec34
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,345 @@
+All of the code (except when other copyright is specified) is 
+(c) 2004-2005 Savoir-faire Linux inc.
+and released under the terms of the venerable
+
+		    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) <year>  <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) year 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.
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000000000000000000000000000000000000..c77713e882d0dc92590c0753b67b253090383c8f
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,85 @@
+Jean-Philippe Barette-LaPierre (30 April 2005) version 0.4.1-pre1
+- Changed the order of initialization of modules, in order to
+  removed a race condition.
+- We can build in different build directories.
+  (thanks to Mikael Magnusson)
+- We actualy check if portaudio and eXosip2 libs
+  are installed. (thanks to Mikael Magnusson)
+- zeroconf integration start
+
+Jean-Philippe Barette-LaPierre (30 April 2005) version 0.4.1-pre1
+- Now, we send a final response to reINVITEs
+  (thanks to Mikael Magnusson)
+
+Jean-Philippe Barette-LaPierre (29 April 2005) version 0.4.1-pre1
+- Bug fix when trying to use more than 6 lines.
+
+Jean-Philippe Barette-LaPierre (20 August 2005) version 0.4.1-pre1
+- Manager has now a LifetimeLibrary policy.
+- Utilspp has been rearranged.
+	
+Laurielle LEA (10 August 2005) version 0.4
+- Add blink notification for voice-message
+- Cleanup code
+
+Laurielle LEA (1st August 2005) version 0.4
+- Add comments in header files
+
+Laurielle LEA (29 July 2005) version 0.4
+- Add scrolling message
+
+Laurielle LEA (27 July 2005) version 0.4
+- Migrate from libeXoSIP 0.9.0 to libeXosip2-1.9.1-pre15 
+  (http://www.antisip.com/download/)
+
+Laurielle LEA (21 July 2005) version 0.4
+- Change README.
+
+Laurielle LEA (20 July 2005) version 0.4
+- Fix mute feature.
+- Fix many bugs about line management.
+- Add "Compose" item in trayicon menu.
+
+Jean-Philippe Barette-LaPierre (18 July 2005) version 0.4
+- Bug fix if error was raised before setGUI.
+
+Laurielle LEA (18 July 2005) version 0.4
+- Fix incoming call sound notification.
+- Fix transfer if no busy line.
+
+Laurielle LEA (15 July 2005) version 0.4
+- Fix configuration init.
+
+Jerome OUFELLA (13 July 2005) version 0.4
+- Fix tone.
+
+Jean-Philippe Barette-LaPierre (13 July 2005) version 0.4
+- Change "Manager" to a singleton.
+
+Laurielle LEA (13 July 2005) version 0.4
+- Fix bug if network is not available.
+- Fix apply skin feature.
+
+Laurielle LEA (11 July 2005) version 0.4
+- Check functions return.
+- Remove unused mute functions.
+
+Laurielle LEA (8 July 2005) version 0.4
+- Stop program when error opening skin file.
+- Divide toggle() of qtguimainwindow.cpp in small functions.
+- Add return test.
+
+Laurielle LEA (7 July 2005) version 0.4
+- Cleanup audiortp.cpp.
+- Replace #define by global variable in codecDescriptor.cpp.
+- Set mutex of ringbuffer in the functions of RingBuffer object.
+- Divide run() of audiortp.cpp in 3 small functions.
+- Changed device static function in Manager for configurationpanel.ui.h.
+- Updated README.
+
+Jean-Philippe Barrette-LaPierre (6 July 2005) version 0.4
+- Fixed all autotools problems.
+- Updated all autotools scripts to use PortAudioCpp.
+
+Jean-Philippe Barrette-LaPierre (9 June 2005) version 0.4
+- Added the autotools support.
diff --git a/DEPS b/DEPS
new file mode 100644
index 0000000000000000000000000000000000000000..05aa2b93067e2be969536c925207e846f4c00a33
--- /dev/null
+++ b/DEPS
@@ -0,0 +1,8 @@
+Common C++ 2 1.3.20: http://sourceforge.net/projects/cplusplus/
+ccRTP 1.3.5: http://sourceforge.net/projects/cplusplus/
+libosip 2.2.1: http://savannah.gnu.org/projects/osip/
+
+if you want zeroconf:
+mDNSResponder87: http://developer.apple.com/darwin/projects/bonjour/
+
+See tools/config.sh for more details
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000000000000000000000000000000000000..cf70b8dea6d2408ce3fec0ed0ecb47066d82a6b2
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,1228 @@
+# Doxyfile 1.4.4
+
+# 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 (" ")
+
+#---------------------------------------------------------------------------
+# Project related 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           = "SFLphone Deamon"
+
+# 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       = doc 
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# 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, Korean-en, Norwegian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, 
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# This tag can be used to specify the encoding used in the generated output. 
+# The encoding is not always determined by the language that is chosen, 
+# but also whether or not the output is meant for Windows or non-Windows users. 
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
+# forces the Windows encoding (this is the default for the Windows binary), 
+# whereas setting the tag to NO uses a Unix-style encoding (the default for 
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING   = 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
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# 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        = YES
+
+# 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. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# 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 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 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# 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         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_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
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = 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
+
+# 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                = 
+
+# 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  = NO
+
+# 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 SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# 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            = YES
+
+# 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
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# 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 classes 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
+
+# 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 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# 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 SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = 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 the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# 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
+
+# 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 consists 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 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
+
+# If the sources in your project are distributed over multiple directories 
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# in the documentation. The default is YES.
+
+SHOW_DIRECTORIES       = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from the 
+# version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the progam writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# 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
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# 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. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+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                  = src src/audio src/gui src/gui/server src/config
+
+# 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 *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS          = 
+
+# 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              = NO
+
+# 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. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+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           = 
+
+# 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             = 
+
+# 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.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# is applied to all files.
+
+FILTER_PATTERNS        = *.cpp *.inl
+
+# 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. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+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
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = 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
+
+#---------------------------------------------------------------------------
+# 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    = .html
+
+# 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            = 
+
+# 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            = 
+
+# 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. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+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 directory.
+
+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 1.0+, 
+# 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
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = 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 optimized 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 assignments. 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.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML 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 `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# 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                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# 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        = NO
+
+# 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  = *.h *.hpp 
+
+# 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. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# 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::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+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 superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields 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 the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# 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 CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# 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
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = 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 in 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
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that a graph may be further truncated if the graph's 
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH 
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), 
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# 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 intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions 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
diff --git a/FIXME b/FIXME
new file mode 100644
index 0000000000000000000000000000000000000000..d99e52bf52553c6a33219cd3e25a39820ba0b9ab
--- /dev/null
+++ b/FIXME
@@ -0,0 +1,4 @@
+- sflphoned don't return any result at the second time getcallstatus is called.
+- sflphoned don't return a 206 on getcallstatus when one call is ringing.
+- unhold should not return an error if it's not holded
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000000000000000000000000000000000000..23e5f25d0e5f85798dcfb368ecb2f04f59777f61
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..89e044e06c882cb160b119feffe9ef37554a3861
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,341 @@
+		    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) <year>  <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) year 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.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..ded1004a0eeab5cfc4694c5a85e1684289739d04
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,5 @@
+SUBDIRS = include libs src ringtones m4 
+EXTRA_DIST = tools/*.sh tools/install-sip* debian/* README.cvs CHANGES
+
+ACLOCAL_FLAGS=-I$(top_srcdir)/m4
+
diff --git a/Makefile.cvs b/Makefile.cvs
new file mode 100644
index 0000000000000000000000000000000000000000..63a395bbac52e5a69bbee376450bf7c398e1b6b8
--- /dev/null
+++ b/Makefile.cvs
@@ -0,0 +1,9 @@
+all: autotools 
+
+autotools: 
+	./autogen.sh
+
+qt: 
+	cd src/gui/qt && qmake
+
+
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/README b/README
new file mode 100644
index 0000000000000000000000000000000000000000..0bfdaa214f36eecc709229d69001cd655247abf2
--- /dev/null
+++ b/README
@@ -0,0 +1,174 @@
+This is SFLPhoned-0.6 release.
+
+You need 
+- commoncpp2 >= 1.3.20
+- libxml2, libxml2-devel and pkgconfig
+- ccrtp >= 1.3.4
+- libosip2 >= 2.2.1
+
+See http://www.sflphone.org/#downloads to download required libraries.
+
+Dependencies build instructions:
+--------------------------------
+You can use the builds script in tools directory.
+1. Change the default configuration in config.sh (~/sflphone) is the prefix
+2. ./download.sh
+3. ./install.sh
+ 
+You can also compile each dependencies, one by one:
+
+1/	For commoncpp2-1.3.21
+	./configure [option]
+	make
+	make install
+
+2/	For ccrtp-1.3.5
+	./configure [option]
+	make
+	make install
+
+3/	For libosip2-2.2.1
+	./configure [option]
+	make
+	make install
+
+How to compile SFLphoned ?
+-------------------------
+
+./configure [option]
+make
+make install (as root) 
+  ( Be sure you have the correct permissions).
+
+
+How to use it ?
+---------------
+
+If you have the sflphone 0.3 or 0.4 release, copy the file sflphonerc to sflphonedrc
+cp ~/.sflphone/sflphonerc ~/.sflphone/sflphonedrc
+If you have an older version, remove your sflphonerc file located in $HOME/.sflphone
+
+1. Install a GUI like sflphone-qt
+
+2. Lauch sflphone interface, a setup window appears. 
+
+3. If you do have a SIP account, fill the SIP stuff where related. You can use
+   STUN too.
+
+4. Save your settings, restart it. You're done.
+
+A user's guide will be available on:
+http://www.sflphone.org/doc/
+
+
+Why does it not compile ?
+-------------------------
+
+- You don't have the same library versions as we do.
+  See http://www.sflphone.org in section Downloads.
+
+- You don't have the same compiler (some libraries dislike
+  some compilers). We are using  gcc 4.0.1 on
+  Fedora Core 4 Linux. 
+
+- If error occured while loading shared libraries,
+  you have to export LD_LIBRARY_PATH with your lib directory.
+  ( example: export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH} )
+
+- If you don't install dependencies in classic install directories,
+  you have to export CXXFLAGS. 
+  ( example: export CXXFLAGS="-I/opt/include" )
+
+Why does it not work ?
+- Portaudio don't detect your sound card because :
+  * artsd is running
+  * jackd is running 
+    On 2005/11/22, jack wasn't working with these settings: jackd -d alsa -r 8000
+  * you use alsa with sflphone and another application, but dmixer isn't configurated
+    correctly inside ~/.asoundrc or /etc/alsa/alsa.conf
+- sflphone refuse to start because it's running
+  You could have something like: "Exception: could not bind socket"
+  Try to close sflphone before 
+   - echo "stop sflphone" | nc localhost 3999
+  or
+   - killall sflphone
+  
+
+Short description of content of source tree:
+-------------------------------------------
+
+- ringtones/ contains the different ringtones.
+- stund/ is an implementation of the protocol STUN used when there is a NAT.
+- utilspp/ allows to implement a singleton.
+
+- src/ is the core of SFLphone. It contains the main.cpp, managerimpl.cpp files, 
+  audio and gui directories, and files about signalisation SIP. 
+  Later, it should be better, when IAX will be implemented, that a directory 
+  groups these protocols. 
+  The ManagerImpl class is the intermediaire between all the layer in the tree.
+
+- src/audio/ is the audio layer. It contains all about tones, dtmf, audiodriver,  
+  rtp layer, audio codec ulaw, alaw and gsm.
+- src/audio/gsm/ contains the implementation of gsm audiocodec library.
+- src/audio/pacpp/ implements PortAudioCpp, a native C++ binding of 
+  PortAudio V19.
+
+- src/gui/ is the old directory that contains all about different user interface.
+- src/gui/server is the directory that talk (tcp socket on port 3999) 
+  to sflphone client. The slfphone client can be a console program or a graphical interface
+
+
+How is structured SFLphone (>=0.5)
+----------------------------------
+
+		+------------+
+		|TCPSessionIO|  
+		+------------+
+		       |
+		+------------+
+		| SessionIO  |  
+		+------------+
+		       |
+		+------------+
+		| GUI Server |  
+		+------------+
+  		       |		
+		+---------------------------+	
+		|      GUI Framework        |
+		+---------------------------+
+		             |
+		+---------------------------+
+		|        ManagerImpl        |  
+		+---------------------------+
+		             |
+		+---------------------------+
+		|         VoIPLink          |
+		+---------------------------+
+		      |                |
+		+-----------+       +-------+
+		|    SIP    |       |  IAX  |
+		|    RTP    |       +-------+
+		|   STUN    |
+		+-----------+
+
+It's in ManagerImpl where we declared Call vector and VoIPLink vector.
+VoIPLink vector contains all different VoIP link like SIP, IAX, ...
+Call vector contains all the calls according to the kind of VoIP link.
+
+
+Misc.
+-----
+
+Of course we love patches. And contribution. See http://www.sflphone.org/ .    
+The project infrastructure (CVS, bugtraqer, MLs) is maintained on : 
+http://forge.novell.com/modules/xfmod/project/?sflphone
+
+Don't hesitate to post your comments/suggestions/questions on the 
+forge.novell mailing-list.
+
+
+Jean-Philippe Barette-LaPierre 
+(jean-philippe.barrette-lapierre@savoirfairelinux.com)
+Laurielle Lea (laurielle.lea@savoirfairelinux.com)
+Jerome Oufella (jerome.oufella@savoirfairelinux.com)
+Yan Morin (yan.morin@savoirfairelinux.com)
diff --git a/README.cvs b/README.cvs
new file mode 100644
index 0000000000000000000000000000000000000000..03fa59a1236841ad2e51495d67b8397174e74e1e
--- /dev/null
+++ b/README.cvs
@@ -0,0 +1,10 @@
+Starting from CVS there are a few things that need to be done before
+the normal build procedure. These require autoconf and automake to
+be installed.
+
+Then run the following;
+
+make -f Makefile.cvs
+
+After this the normal build procedure in the README file can be
+followed.
\ No newline at end of file
diff --git a/TODO b/TODO
new file mode 100644
index 0000000000000000000000000000000000000000..4e24abf9c53949822d3076ce66f5b975e5f22737
--- /dev/null
+++ b/TODO
@@ -0,0 +1,15 @@
+For project core:
+----------------
+Management Config like about:config in Mozilla
+Improvement of STUN
+Add IAX support
+Management of account (add, remove, ...)
+Management of exceptions
+Remove all warnings in compilation
+Better handling for an reINVITE request. (done?)
+
+For project dependencies:
+------------------------
+Improve the autotools scripts of PortAudioCpp
+
+
diff --git a/admin/Doxyfile.am b/admin/Doxyfile.am
new file mode 100644
index 0000000000000000000000000000000000000000..3eed7ad1c656e400764bfaf4a8ff28de284a45a1
--- /dev/null
+++ b/admin/Doxyfile.am
@@ -0,0 +1,183 @@
+## generate API documentation with doxygen
+apidox-am-yes:
+	@if test "$(subdir)" != "."; then \
+		$(mkinstalldirs) $(top_builddir)/apidocs/$(subdir) ;\
+		if test ! -x $(top_builddir)/apidocs/common; then \
+			if test -d $(top_srcdir)/doc/common; then \
+			   common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\
+			else \
+	   		   common_dir=$(kde_libs_htmldir)/en/common ;\
+			fi ;\
+			$(LN_S) $$common_dir $(top_builddir)/apidocs/common; \
+		fi ;\
+		cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
+		echo "PROJECT_NAME           = \"$(subdir) Library\"" >> Doxyfile; \
+		echo "PROJECT_NUMBER         = \"Version $(VERSION)\"" >> Doxyfile; \
+		echo "INPUT                  = $(srcdir)" >> Doxyfile; \
+		echo "IMAGE_PATH             = $(top_srcdir)/doc/api" >> Doxyfile ;\
+		echo "OUTPUT_DIRECTORY       = $(top_builddir)/apidocs" >> Doxyfile; \
+		echo "HTML_OUTPUT            = $(subdir)/html" >> Doxyfile; \
+		echo "HTML_HEADER            = $(top_builddir)/apidocs/common/header.html" >> Doxyfile;\
+		echo "HTML_FOOTER            = $(top_builddir)/apidocs/common/footer.html" >> Doxyfile;\
+		echo "HTML_STYLESHEET        = $(top_builddir)/apidocs/common/doxygen.css" >> Doxyfile;\
+		echo "LATEX_OUTPUT           = $(subdir)/latex" >> Doxyfile; \
+		echo "RTF_OUTPUT             = $(subdir)/rtf" >> Doxyfile; \
+		echo "MAN_OUTPUT             = $(subdir)/man" >> Doxyfile; \
+		echo "GENERATE_HTML          = $(GENERATE_FLAG)" >> Doxyfile ;\
+		echo "GENERATE_MAN          = $(GENERATE_FLAG)" >> Doxyfile ;\
+		echo "GENERATE_LATEX          = $(GENERATE_FLAG)" >> Doxyfile ;\
+		if test -n "$(DOXYGEN_EXCLUDE)"; then \
+			patterns= ;\
+			dirs= ;\
+			for item in `echo "$(DOXYGEN_EXCLUDE)"`; do \
+				if test -d "$(srcdir)/$$item"; then \
+					dirs="$$dirs $(srcdir)/$$item/" ;\
+			    	else \
+			        	patterns="$$patterns $$item" ;\
+				fi ;\
+			done ;\
+			echo "EXCLUDE_PATTERNS      += $$patterns" >> Doxyfile; \
+		    	echo "EXCLUDE               += $$dirs" >> Doxyfile ;\
+		fi ;\
+		echo "TAGFILES = \\" >> Doxyfile; \
+		tags='$(DOXYGEN_REFERENCES) qt'; for tag in $$tags; do \
+			tagpath= ;\
+			path="../../$$tag" ;\
+			if test -f $(top_builddir)/apidocs/$$tag/$$tag.tag; then \
+				tagpath="$(top_builddir)/apidocs/$$tag/$$tag.tag" ;\
+			else \
+				tagpath=`ls -1 $(kde_htmldir)/en/*-apidocs/$$tag/$$tag.tag 2> /dev/null` ;\
+				if test -n "$$tagpath"; then \
+					path=`echo $$tagpath | sed -e "s,.*/\([^/]*-apidocs\)/$$tag/$$tag.tag,../../../\1/$$tag,"` ;\
+				fi ;\
+			fi ;\
+			if test "$$tag" = qt; then \
+				echo $$tagpath=$(QTDOCDIR) >> Doxyfile ;\
+			else if test -n "$$tagpath"; then \
+				echo "$$tagpath=$$path/html \\" >> Doxyfile ;\
+			    fi ;\
+			fi ;\
+		done ;\
+		echo "GENERATE_TAGFILE       = $(top_builddir)/apidocs/$(subdir)/`basename $(subdir)`.tag" >> Doxyfile ;\
+		echo "IGNORE_PREFIX          = K" >> Doxyfile ;\
+		echo "HAVE_DOT = $(KDE_HAVE_DOT)" >> Doxyfile ;\
+		$(DOXYGEN) Doxyfile ;\
+	fi
+
+apidox-am-no:
+
+install-data-local: install-apidox
+
+## install API documentation
+install-apidox:
+	@if test "$(subdir)" != "."; then \
+		$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html ; \
+		if test -f $(top_builddir)/apidocs/$(subdir)/$(subdir).tag; then \
+		echo $(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
+		$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/$(subdir).tag $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
+		fi; \
+		if test -d $(top_builddir)/apidocs/$(subdir)/html; then \
+			list=`ls $(top_builddir)/apidocs/$(subdir)/html`; \
+			echo "installing $(top_builddir)/apidocs/$(subdir)/html" ;\
+			for file in $$list; do \
+				$(INSTALL_DATA) $(top_builddir)/apidocs/$(subdir)/html/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir)/html; \
+		done; \
+		fi; \
+		symlink="$(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common"; \
+		if test ! -L "$symlink" -o `readlink "$symlink" 2>/dev/null` != "$(kde_libs_htmldir)/en/common"; then \
+			echo "Creating symlink $(kde_htmldir)/en/$(PACKAGE)-apidocs/common"; \
+			rm -f $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
+			$(LN_S) $(kde_libs_htmldir)/en/common $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/common; \
+		fi; \
+	else\
+		if test -d $(top_builddir)/apidocs; then \
+		$(mkinstalldirs) $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs ;\
+		list=`cd $(top_builddir)/apidocs && ls -1`; \
+		echo "installing $(top_builddir)/apidocs/$$file" ;\
+		for file in $$list; do \
+			if test -f $(top_builddir)/apidocs/$$file; then \
+				$(INSTALL_DATA) $(top_builddir)/apidocs/$$file $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
+			fi; \
+		done ; fi; \
+	fi
+
+uninstall-local: uninstall-apidox
+
+## uninstall API documentation
+uninstall-apidox:
+	@if test "$(subdir)" != "."; then \
+		if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); then \
+			rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs/$(subdir); \
+		fi\
+	else\
+		if test -d $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; then \
+			rm -rfv $(DESTDIR)$(kde_htmldir)/en/$(PACKAGE)-apidocs; \
+		fi\
+	fi
+
+apidox:
+	@if test "$(subdir)" != "."; then \
+		$(MAKE) apidox-am-@KDE_HAS_DOXYGEN@ ;\
+	else \
+		$(MAKE) apidox-am-toplevel-@KDE_HAS_DOXYGEN@ ;\
+	fi
+	@set fnord $(MAKEFLAGS); amf=$$2; if test -n '$(SUBDIRS)'; then \
+	    list='$(SUBDIRS)'; \
+	    for subdir in $$list; do \
+		if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
+		echo "Making apidox in $$subdir"; \
+		if test "$$subdir" != "."; then \
+			(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=no apidox) || exit 1; \
+		fi ; fi ;\
+	    done; \
+	    for subdir in $$list; do \
+		if grep '^include .*Doxyfile.am' $(srcdir)/$$subdir/Makefile.am; then \
+		echo "Making apidox in $$subdir"; \
+		if test "$$subdir" != "."; then \
+			(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) GENERATE_FLAG=yes apidox) || exit 1; \
+		fi ; fi ;\
+	    done; \
+	fi
+
+apidox-am-toplevel-no:
+apidox-am-toplevel-yes:
+	@echo "*** Creating API documentation main page"; \
+	cp $(top_srcdir)/admin/Doxyfile.global Doxyfile; \
+	echo "PROJECT_NAME           = \"$(DOXYGEN_PROJECT_NAME)\"" >> Doxyfile ; \
+	echo "PROJECT_NUMBER         = \"$(DOXYGEN_PROJECT_NUMBER)\"" >> Doxyfile ; \
+	echo "INPUT                  = $(top_srcdir)" >> Doxyfile ; \
+	echo "OUTPUT_DIRECTORY       = $(top_builddir)/apidocs" >> Doxyfile ; \
+	echo "FILE_PATTERNS          = *.dox" >> Doxyfile ; \
+	echo "RECURSIVE              = NO" >> Doxyfile ; \
+	echo "SOURCE_BROWSER         = NO" >> Doxyfile ; \
+	echo "ALPHABETICAL_INDEX     = NO" >> Doxyfile ; \
+	echo "HTML_OUTPUT            = ." >> Doxyfile ; \
+	echo "HTML_HEADER            = apidocs/common/mainheader.html" >> Doxyfile ; \
+	echo "HTML_FOOTER            = apidocs/common/mainfooter.html" >> Doxyfile ; \
+	echo "HTML_STYLESHEET        = apidocs/common/doxygen.css" >> Doxyfile ; \
+	echo "GENERATE_LATEX         = NO" >> Doxyfile ; \
+	echo "GENERATE_RTF           = NO" >> Doxyfile ; \
+	echo "GENERATE_MAN           = NO" >> Doxyfile ; \
+	echo "GENERATE_XML           = NO" >> Doxyfile ; \
+	echo "GENERATE_AUTOGEN_DEF   = NO" >> Doxyfile ; \
+	echo "ENABLE_PREPROCESSING   = NO" >> Doxyfile ; \
+	echo "CLASS_DIAGRAMS         = NO" >> Doxyfile ; \
+	echo "HAVE_DOT               = NO" >> Doxyfile ; \
+	echo "GENERATE_HTML          = YES" >> Doxyfile ;\
+	$(mkinstalldirs) $(top_builddir)/apidocs ; \
+	rm -f $(top_builddir)/apidocs/common ; \
+	if test -d $(top_srcdir)/doc/common; then \
+	   common_dir=`cd $(top_srcdir)/doc/common && pwd` ;\
+	else \
+	   common_dir=$(kde_libs_htmldir)/en/common ;\
+	fi ;\
+	$(LN_S) $$common_dir $(top_builddir)/apidocs/common ;\
+	doxygen Doxyfile; \
+	rm -f Doxyfile
+
+.PHONY: apidox-am-yes apidox-am-no install-data-local install-apidox install-apidox uninstall-local uninstall-apidox uninstall-apidox apidox apidox-am-toplevel-no apidox-am-toplevel-yes
+
+
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/admin/Doxyfile.global b/admin/Doxyfile.global
new file mode 100755
index 0000000000000000000000000000000000000000..be61379e6aa243b65293c3f34efc3072bef6a7e8
--- /dev/null
+++ b/admin/Doxyfile.global
@@ -0,0 +1,1133 @@
+# Doxyfile 1.3.6
+
+# 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 (" ")
+
+#---------------------------------------------------------------------------
+# Project related 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           = 
+
+# 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       = ../apidocs/
+
+# 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, Korean-en, Norwegian, Polish, Portuguese, 
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# This tag can be used to specify the encoding used in the generated output. 
+# The encoding is not always determined by the language that is chosen, 
+# but also whether or not the output is meant for Windows or non-Windows users. 
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES 
+# forces the Windows encoding (this is the default for the Windows binary), 
+# whereas setting the tag to NO uses a Unix-style encoding (the default for 
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING   = 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      = NO
+
+# 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
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is used 
+# as the annotated text. Otherwise, the brief description is used as-is. If left 
+# blank, the following values are used ("$name" is automatically replaced with the 
+# name of the entity): "The $name class" "The $name widget" "The $name file" 
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = 
+
+# 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. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# 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 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 
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = YES
+
+# 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         = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_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               = 4
+
+# 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                = obsolete=@deprecated
+
+# 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  = NO
+
+# 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 SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# 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         = YES
+
+# 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  = NO
+
+# 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 classes 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
+
+# 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 advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# 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 SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = 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 the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# 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      = NO
+
+# 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      = NO
+
+# 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
+
+# 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 consists 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 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                  = YES
+
+# 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               = NO
+
+# 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   = NO
+
+# 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            = 
+
+# 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                  = 
+
+# 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 *.cs *.php *.php3 *.inc
+
+FILE_PATTERNS          = *.h \
+                         *.cpp \
+                         *.cc \
+                         *.hpp \
+                         *.dox \
+                         *.c++ \
+                         *.cxx \
+                         *.h++ \
+                         *.hh
+
+# 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       = *.moc.* \
+                         moc* \
+                         *.all_cpp.* \
+                         *unload.* \
+                         */test/* \
+                         */tests/* \
+                         *_p.h 
+
+# 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      = 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             = 
+
+# 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. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# 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
+
+# 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
+
+#---------------------------------------------------------------------------
+# 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     = YES
+
+# 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    = 3
+
+# 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          = K
+
+#---------------------------------------------------------------------------
+# 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          = NO
+
+# 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            = 
+
+# 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    = .html
+
+# 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            = ../apidocs/common/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            = ../apidocs/common/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. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = ../apidocs/common/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 directory.
+
+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          = YES
+
+# 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 1.0+, 
+# 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           = 
+
+# 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
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = 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 optimized 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             = 
+
+# 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 assignments. 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             = 
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .kde3
+
+# 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              = YES
+
+#---------------------------------------------------------------------------
+# 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.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML 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 `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# 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                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = NO
+
+#---------------------------------------------------------------------------
+# 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        = NO
+
+# 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             = QT_VERSION=320 \
+                         __cplusplus \
+                         Q_WS_X11
+
+# 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::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+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        = NO
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = 
+
+#---------------------------------------------------------------------------
+# 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 superseded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yields 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   = NO
+
+# 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 the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# 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 CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# 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    = 800
+
+# 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
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes that 
+# lay further from the root node will be omitted. Note that setting this option to 
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also 
+# note that a graph may be further truncated if the graph's image dimensions are 
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). 
+# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# 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 intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions 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
diff --git a/admin/Makefile.common b/admin/Makefile.common
new file mode 100644
index 0000000000000000000000000000000000000000..d07b4045237a012de07f38960abc0f9e3de9fac7
--- /dev/null
+++ b/admin/Makefile.common
@@ -0,0 +1,37 @@
+### Makefile.common
+###
+### Copyright (C) 2002 by the KDE developers
+
+### All the real work is done by the shellscript cvs.sh
+
+SHELL=/bin/sh
+
+cvs dist configure configure.in configure.files subdirs package-messages package-merge Makefile.am acinclude.m4 extract-messages:
+	@admindir=$(admindir); \
+	if test "x$$admindir" = x; then \
+	  admindir=.; until test -f $$admindir/admin/cvs.sh; do \
+	    admindir=$$admindir/..; \
+	    if test `cd $$admindir && pwd` = / ; then break; fi; \
+	  done; \
+	  admindir=$$admindir/admin; \
+	  if test -f $$admindir/cvs.sh; then :; else \
+	    echo "Can't find the admin/ directory in any parent of the"; \
+	    echo "current directory.  Please set it with admindir=..."; \
+	    exit 1; \
+	  fi; \
+	fi; \
+	if test "$@" = "package-merge"; then \
+		MAKE="$(MAKE)" POFILES="$(POFILES)" PACKAGE="$(PACKAGE)" \
+	  	$(SHELL) $$admindir/cvs.sh package-merge ;\
+	else \
+		MAKE="$(MAKE)" $(SHELL) $$admindir/cvs.sh $@ ;\
+	fi
+
+configure.in: configure.files subdirs
+configure.files: subdirs
+
+svn: cvs
+
+.SILENT:
+
+.PHONY: svn cvs dist package-merge package-messages
diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in
new file mode 100644
index 0000000000000000000000000000000000000000..ae70a8605ad2f5520055dfa66100dcfc81b6a4cb
--- /dev/null
+++ b/admin/acinclude.m4.in
@@ -0,0 +1,5754 @@
+##   -*- autoconf -*-
+
+dnl    This file is part of the KDE libraries/packages
+dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
+dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
+
+dnl    This file is free software; you can redistribute it and/or
+dnl    modify it under the terms of the GNU Library General Public
+dnl    License as published by the Free Software Foundation; either
+dnl    version 2 of the License, or (at your option) any later version.
+
+dnl    This library is distributed in the hope that it will be useful,
+dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl    Library General Public License for more details.
+
+dnl    You should have received a copy of the GNU Library General Public License
+dnl    along with this library; see the file COPYING.LIB.  If not, write to
+dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl    Boston, MA 02111-1307, USA.
+
+dnl IMPORTANT NOTE:
+dnl Please do not modify this file unless you expect your modifications to be
+dnl carried into every other module in the repository. 
+dnl
+dnl Single-module modifications are best placed in configure.in for kdelibs
+dnl and kdebase or configure.in.in if present.
+
+# KDE_PATH_X_DIRECT
+dnl Internal subroutine of AC_PATH_X.
+dnl Set ac_x_includes and/or ac_x_libraries.
+AC_DEFUN([KDE_PATH_X_DIRECT],
+[
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+if test "$ac_x_includes" = NO; then
+  # Guess where to find include files, by looking for this one X11 .h file.
+  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+  # First, try using that file with no special directory specified.
+AC_TRY_CPP([#include <$x_direct_test_include>],
+[# We can compile using X headers with no special include directory.
+ac_x_includes=],
+[# Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+  for ac_dir in               \
+    /usr/X11/include          \
+    /usr/X11R6/include        \
+    /usr/X11R5/include        \
+    /usr/X11R4/include        \
+                              \
+    /usr/include/X11          \
+    /usr/include/X11R6        \
+    /usr/include/X11R5        \
+    /usr/include/X11R4        \
+                              \
+    /usr/local/X11/include    \
+    /usr/local/X11R6/include  \
+    /usr/local/X11R5/include  \
+    /usr/local/X11R4/include  \
+                              \
+    /usr/local/include/X11    \
+    /usr/local/include/X11R6  \
+    /usr/local/include/X11R5  \
+    /usr/local/include/X11R4  \
+                              \
+    /usr/X386/include         \
+    /usr/x386/include         \
+    /usr/XFree86/include/X11  \
+                              \
+    /usr/include              \
+    /usr/local/include        \
+    /usr/unsupported/include  \
+    /usr/athena/include       \
+    /usr/local/x11r5/include  \
+    /usr/lpp/Xamples/include  \
+                              \
+    /usr/openwin/include      \
+    /usr/openwin/share/include \
+    ; \
+  do
+    if test -r "$ac_dir/$x_direct_test_include"; then
+      ac_x_includes=$ac_dir
+      break
+    fi
+  done])
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+  # Check for the libraries.
+
+  test -z "$x_direct_test_library" && x_direct_test_library=Xt
+  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS="$LIBS"
+  LIBS="-l$x_direct_test_library $LIBS"
+AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
+[LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=],
+[LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib${kdelibsuff}/` \
+    /usr/X11/lib${kdelibsuff}           \
+    /usr/X11R6/lib${kdelibsuff}         \
+    /usr/X11R5/lib${kdelibsuff}         \
+    /usr/X11R4/lib${kdelibsuff}         \
+                                        \
+    /usr/lib${kdelibsuff}/X11           \
+    /usr/lib${kdelibsuff}/X11R6         \
+    /usr/lib${kdelibsuff}/X11R5         \
+    /usr/lib${kdelibsuff}/X11R4         \
+                                        \
+    /usr/local/X11/lib${kdelibsuff}     \
+    /usr/local/X11R6/lib${kdelibsuff}   \
+    /usr/local/X11R5/lib${kdelibsuff}   \
+    /usr/local/X11R4/lib${kdelibsuff}   \
+                                        \
+    /usr/local/lib${kdelibsuff}/X11     \
+    /usr/local/lib${kdelibsuff}/X11R6   \
+    /usr/local/lib${kdelibsuff}/X11R5   \
+    /usr/local/lib${kdelibsuff}/X11R4   \
+                                        \
+    /usr/X386/lib${kdelibsuff}          \
+    /usr/x386/lib${kdelibsuff}          \
+    /usr/XFree86/lib${kdelibsuff}/X11   \
+                                        \
+    /usr/lib${kdelibsuff}               \
+    /usr/local/lib${kdelibsuff}         \
+    /usr/unsupported/lib${kdelibsuff}   \
+    /usr/athena/lib${kdelibsuff}        \
+    /usr/local/x11r5/lib${kdelibsuff}   \
+    /usr/lpp/Xamples/lib${kdelibsuff}   \
+    /lib/usr/lib${kdelibsuff}/X11       \
+                                        \
+    /usr/openwin/lib${kdelibsuff}       \
+    /usr/openwin/share/lib${kdelibsuff} \
+    ; \
+do
+dnl Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done])
+fi # $ac_x_libraries = NO
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find a file (or one of more files in a list of dirs)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_FIND_FILE],
+[
+$3=NO
+for i in $2;
+do
+  for j in $1;
+  do
+    echo "configure: __oline__: $i/$j" >&AC_FD_CC
+    if test -r "$i/$j"; then
+      echo "taking that" >&AC_FD_CC
+      $3=$i
+      break 2
+    fi
+  done
+done
+])
+
+dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
+dnl	if-not-found, test-parameter, prepend-path)
+dnl
+dnl Look for program-name in list-of-dirs+$PATH.
+dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
+dnl If found, $variable-name is set. If not, if-not-found is evaluated.
+dnl test-parameter: if set, the program is executed with this arg,
+dnl                 and only a successful exit code is required.
+AC_DEFUN([KDE_FIND_PATH],
+[
+   AC_MSG_CHECKING([for $1])
+   if test -n "$$2"; then
+        kde_cv_path="$$2";
+   else
+        kde_cache=`echo $1 | sed 'y%./+-%__p_%'`
+
+        AC_CACHE_VAL(kde_cv_path_$kde_cache,
+        [
+        kde_cv_path="NONE"
+	kde_save_IFS=$IFS
+	IFS=':'
+	dirs=""
+	for dir in $PATH; do
+	  dirs="$dirs $dir"
+	done
+	if test -z "$6"; then  dnl Append dirs in PATH (default)
+	  dirs="$3 $dirs"
+        else  dnl Prepend dirs in PATH (if 6th arg is set)
+	  dirs="$dirs $3"
+	fi
+	IFS=$kde_save_IFS
+
+        for dir in $dirs; do
+	  if test -x "$dir/$1"; then
+	    if test -n "$5"
+	    then
+              evalstr="$dir/$1 $5 2>&1 "
+	      if eval $evalstr; then
+                kde_cv_path="$dir/$1"
+                break
+	      fi
+            else
+		kde_cv_path="$dir/$1"
+                break
+	    fi
+          fi
+        done
+
+        eval "kde_cv_path_$kde_cache=$kde_cv_path"
+
+        ])
+
+      eval "kde_cv_path=\"`echo '$kde_cv_path_'$kde_cache`\""
+
+   fi
+
+   if test -z "$kde_cv_path" || test "$kde_cv_path" = NONE; then
+      AC_MSG_RESULT(not found)
+      $4
+   else
+      AC_MSG_RESULT($kde_cv_path)
+      $2=$kde_cv_path
+
+   fi
+])
+
+AC_DEFUN([KDE_MOC_ERROR_MESSAGE],
+[
+    AC_MSG_ERROR([No Qt meta object compiler (moc) found!
+Please check whether you installed Qt correctly.
+You need to have a running moc binary.
+configure tried to run $ac_cv_path_moc and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable MOC to the right one before running
+configure.
+])
+])
+
+AC_DEFUN([KDE_UIC_ERROR_MESSAGE],
+[
+    AC_MSG_WARN([No Qt ui compiler (uic) found!
+Please check whether you installed Qt correctly.
+You need to have a running uic binary.
+configure tried to run $ac_cv_path_uic and the test didn't
+succeed. If configure shouldn't have tried this one, set
+the environment variable UIC to the right one before running
+configure.
+])
+])
+
+
+AC_DEFUN([KDE_CHECK_UIC_FLAG],
+[
+    AC_MSG_CHECKING([whether uic supports -$1 ])
+    kde_cache=`echo $1 | sed 'y% .=/+-%____p_%'`
+    AC_CACHE_VAL(kde_cv_prog_uic_$kde_cache,
+    [
+        cat >conftest.ui <<EOT
+        <!DOCTYPE UI><UI version="3" stdsetdef="1"></UI>
+EOT
+        ac_uic_testrun="$UIC_PATH -$1 $2 conftest.ui >/dev/null"
+        if AC_TRY_EVAL(ac_uic_testrun); then
+            eval "kde_cv_prog_uic_$kde_cache=yes"
+        else
+            eval "kde_cv_prog_uic_$kde_cache=no"
+        fi
+        rm -f conftest*
+    ])
+
+    if eval "test \"`echo '$kde_cv_prog_uic_'$kde_cache`\" = yes"; then
+        AC_MSG_RESULT([yes])
+        :
+        $3
+    else
+        AC_MSG_RESULT([no])
+        :
+        $4
+    fi
+])
+
+
+dnl ------------------------------------------------------------------------
+dnl Find the meta object compiler and the ui compiler in the PATH,
+dnl in $QTDIR/bin, and some more usual places
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_MOC_UIC],
+[
+   AC_REQUIRE([KDE_CHECK_PERL])
+   qt_bindirs=""
+   for dir in $kde_qt_dirs; do
+      qt_bindirs="$qt_bindirs $dir/bin $dir/src/moc"
+   done
+   qt_bindirs="$qt_bindirs /usr/bin /usr/X11R6/bin /usr/local/qt/bin"
+   if test ! "$ac_qt_bindir" = "NO"; then
+      qt_bindirs="$ac_qt_bindir $qt_bindirs"
+   fi
+
+   KDE_FIND_PATH(moc, MOC, [$qt_bindirs], [KDE_MOC_ERROR_MESSAGE])
+   if test -z "$UIC_NOT_NEEDED"; then
+     KDE_FIND_PATH(uic, UIC_PATH, [$qt_bindirs], [UIC_PATH=""])
+     if test -z "$UIC_PATH" ; then
+       KDE_UIC_ERROR_MESSAGE
+       exit 1
+     else
+       UIC=$UIC_PATH
+
+       if test $kde_qtver = 3; then
+         KDE_CHECK_UIC_FLAG(L,[/nonexistent],ac_uic_supports_libpath=yes,ac_uic_supports_libpath=no)
+         KDE_CHECK_UIC_FLAG(nounload,,ac_uic_supports_nounload=yes,ac_uic_supports_nounload=no)
+
+         if test x$ac_uic_supports_libpath = xyes; then
+             UIC="$UIC -L \$(kde_widgetdir)"
+         fi
+         if test x$ac_uic_supports_nounload = xyes; then
+             UIC="$UIC -nounload"
+         fi
+       fi
+     fi
+   else
+     UIC="echo uic not available: "
+   fi
+
+   AC_SUBST(MOC)
+   AC_SUBST(UIC)
+
+   UIC_TR="i18n"
+   if test $kde_qtver = 3; then
+     UIC_TR="tr2i18n"
+   fi
+
+   AC_SUBST(UIC_TR)
+])
+
+AC_DEFUN([KDE_1_CHECK_PATHS],
+[
+  KDE_1_CHECK_PATH_HEADERS
+
+  KDE_TEST_RPATH=
+
+  if test -n "$USE_RPATH"; then
+
+     if test -n "$kde_libraries"; then
+       KDE_TEST_RPATH="-R $kde_libraries"
+     fi
+
+     if test -n "$qt_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $qt_libraries"
+     fi
+
+     if test -n "$x_libraries"; then
+       KDE_TEST_RPATH="$KDE_TEST_RPATH -R $x_libraries"
+     fi
+
+     KDE_TEST_RPATH="$KDE_TEST_RPATH $KDE_EXTRA_RPATH"
+  fi
+
+AC_MSG_CHECKING([for KDE libraries installed])
+ac_link='$LIBTOOL_SHELL --silent --mode=link ${CXX-g++} -o conftest $CXXFLAGS $all_includes $CPPFLAGS $LDFLAGS $all_libraries conftest.$ac_ext $LIBS -lkdecore $LIBQT $KDE_TEST_RPATH 1>&5'
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_ERROR([your system fails at linking a small KDE application!
+Check, if your compiler is installed correctly and if you have used the
+same compiler to compile Qt and kdelibs as you did use now.
+For more details about this problem, look at the end of config.log.])
+fi
+
+if eval `KDEDIR= ./conftest 2>&5`; then
+  kde_result=done
+else
+  kde_result=problems
+fi
+
+KDEDIR= ./conftest 2> /dev/null >&5 # make an echo for config.log
+kde_have_all_paths=yes
+
+KDE_SET_PATHS($kde_result)
+
+])
+
+AC_DEFUN([KDE_SET_PATHS],
+[
+  kde_cv_all_paths="kde_have_all_paths=\"yes\" \
+	kde_htmldir=\"$kde_htmldir\" \
+	kde_appsdir=\"$kde_appsdir\" \
+	kde_icondir=\"$kde_icondir\" \
+	kde_sounddir=\"$kde_sounddir\" \
+	kde_datadir=\"$kde_datadir\" \
+	kde_locale=\"$kde_locale\" \
+	kde_cgidir=\"$kde_cgidir\" \
+	kde_confdir=\"$kde_confdir\" \
+	kde_kcfgdir=\"$kde_kcfgdir\" \
+	kde_mimedir=\"$kde_mimedir\" \
+	kde_toolbardir=\"$kde_toolbardir\" \
+	kde_wallpaperdir=\"$kde_wallpaperdir\" \
+	kde_templatesdir=\"$kde_templatesdir\" \
+	kde_bindir=\"$kde_bindir\" \
+	kde_servicesdir=\"$kde_servicesdir\" \
+	kde_servicetypesdir=\"$kde_servicetypesdir\" \
+	kde_moduledir=\"$kde_moduledir\" \
+	kde_styledir=\"$kde_styledir\" \
+	kde_widgetdir=\"$kde_widgetdir\" \
+	xdg_appsdir=\"$xdg_appsdir\" \
+	xdg_menudir=\"$xdg_menudir\" \
+	xdg_directorydir=\"$xdg_directorydir\" \
+	kde_result=$1"
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_PATHS],
+[
+if test "$1" = "default"; then
+
+  if test -z "$kde_htmldir"; then
+    kde_htmldir='\${datadir}/doc/HTML'
+  fi
+  if test -z "$kde_appsdir"; then
+    kde_appsdir='\${datadir}/applnk'
+  fi
+  if test -z "$kde_icondir"; then
+    kde_icondir='\${datadir}/icons'
+  fi
+  if test -z "$kde_sounddir"; then
+    kde_sounddir='\${datadir}/sounds'
+  fi
+  if test -z "$kde_datadir"; then
+    kde_datadir='\${datadir}/apps'
+  fi
+  if test -z "$kde_locale"; then
+    kde_locale='\${datadir}/locale'
+  fi
+  if test -z "$kde_cgidir"; then
+    kde_cgidir='\${exec_prefix}/cgi-bin'
+  fi
+  if test -z "$kde_confdir"; then
+    kde_confdir='\${datadir}/config'
+  fi
+  if test -z "$kde_kcfgdir"; then
+    kde_kcfgdir='\${datadir}/config.kcfg'
+  fi
+  if test -z "$kde_mimedir"; then
+    kde_mimedir='\${datadir}/mimelnk'
+  fi
+  if test -z "$kde_toolbardir"; then
+    kde_toolbardir='\${datadir}/toolbar'
+  fi
+  if test -z "$kde_wallpaperdir"; then
+    kde_wallpaperdir='\${datadir}/wallpapers'
+  fi
+  if test -z "$kde_templatesdir"; then
+    kde_templatesdir='\${datadir}/templates'
+  fi
+  if test -z "$kde_bindir"; then
+    kde_bindir='\${exec_prefix}/bin'
+  fi
+  if test -z "$kde_servicesdir"; then
+    kde_servicesdir='\${datadir}/services'
+  fi
+  if test -z "$kde_servicetypesdir"; then
+    kde_servicetypesdir='\${datadir}/servicetypes'
+  fi
+  if test -z "$kde_moduledir"; then
+    if test "$kde_qtver" = "2"; then
+      kde_moduledir='\${libdir}/kde2'
+    else
+      kde_moduledir='\${libdir}/kde3'
+    fi
+  fi
+  if test -z "$kde_styledir"; then
+    kde_styledir='\${libdir}/kde3/plugins/styles'
+  fi
+  if test -z "$kde_widgetdir"; then
+    kde_widgetdir='\${libdir}/kde3/plugins/designer'
+  fi
+  if test -z "$xdg_appsdir"; then
+    xdg_appsdir='\${datadir}/applications/kde'
+  fi
+  if test -z "$xdg_menudir"; then
+    xdg_menudir='\${sysconfdir}/xdg/menus'
+  fi
+  if test -z "$xdg_directorydir"; then
+    xdg_directorydir='\${datadir}/desktop-directories'
+  fi
+
+  KDE_SET_PATHS(defaults)
+
+else
+
+  if test $kde_qtver = 1; then
+     AC_MSG_RESULT([compiling])
+     KDE_1_CHECK_PATHS
+  else
+     AC_MSG_ERROR([path checking not yet supported for KDE 2])
+  fi
+
+fi
+])
+
+AC_DEFUN([KDE_CHECK_PATHS_FOR_COMPLETENESS],
+[ if test -z "$kde_htmldir" || test -z "$kde_appsdir" ||
+   test -z "$kde_icondir" || test -z "$kde_sounddir" ||
+   test -z "$kde_datadir" || test -z "$kde_locale"  ||
+   test -z "$kde_cgidir"  || test -z "$kde_confdir" ||
+   test -z "$kde_kcfgdir" ||
+   test -z "$kde_mimedir" || test -z "$kde_toolbardir" ||
+   test -z "$kde_wallpaperdir" || test -z "$kde_templatesdir" ||
+   test -z "$kde_bindir" || test -z "$kde_servicesdir" ||
+   test -z "$kde_servicetypesdir" || test -z "$kde_moduledir" ||
+   test -z "$kde_styledir" || test -z "kde_widgetdir" ||
+   test -z "$xdg_appsdir" || test -z "$xdg_menudir" || test -z "$xdg_directorydir" ||
+   test "x$kde_have_all_paths" != "xyes"; then
+     kde_have_all_paths=no
+  fi
+])
+
+AC_DEFUN([KDE_MISSING_PROG_ERROR],
+[
+    AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed KDE correctly.
+])
+])
+
+AC_DEFUN([KDE_MISSING_ARTS_ERROR],
+[
+    AC_MSG_ERROR([The important program $1 was not found!
+Please check whether you installed aRts correctly or use
+--without-arts to compile without aRts support (this will remove functionality).
+])
+])
+
+AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
+[
+    kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
+    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
+    if test -n "$KDEDIRS"; then
+       kde_save_IFS=$IFS
+       IFS=:
+       for dir in $KDEDIRS; do
+            kde_default_bindirs="$dir/bin $kde_default_bindirs "
+       done
+       IFS=$kde_save_IFS
+    fi
+])
+
+AC_DEFUN([KDE_SUBST_PROGRAMS],
+[
+    AC_ARG_WITH(arts,
+        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
+        [build_arts=$withval],
+        [build_arts=yes]
+    )
+    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
+    if test "$build_arts" = "no"; then
+        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
+    fi
+
+        KDE_SET_DEFAULT_BINDIRS
+        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
+        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
+        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
+        if test "$build_arts" '!=' "no"; then
+          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
+          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
+        fi
+        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
+
+        kde32ornewer=1
+        kde33ornewer=1
+        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
+            kde32ornewer=
+            kde33ornewer=
+        else
+            if test "$kde_qtver" = "3"; then
+              if test "$kde_qtsubver" -le 1; then
+                kde32ornewer=
+              fi
+              if test "$kde_qtsubver" -le 2 -o `kde-config --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` == 3.2; then
+                kde33ornewer=
+              fi
+            fi
+        fi
+
+        if test -n "$kde32ornewer"; then
+            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
+            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
+        fi
+        if test -n "$kde33ornewer"; then
+            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
+            AC_SUBST(MAKEKDEWIDGETS)
+        fi
+        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
+
+        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
+ 	    kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
+            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
+            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
+	    if test "$KDE_XSL_STYLESHEET" = "NO"; then
+		KDE_XSL_STYLESHEET=""
+	    else
+                KDE_XSL_STYLESHEET="$KDE_XSL_STYLESHEET/apps/ksgmltools2/customization/kde-chunk.xsl"
+	    fi
+        fi
+
+        DCOP_DEPENDENCIES='$(DCOPIDL)'
+        if test -n "$kde32ornewer"; then
+            KCFG_DEPENDENCIES='$(KCONFIG_COMPILER)'
+            DCOP_DEPENDENCIES='$(DCOPIDL) $(DCOPIDLNG)'
+            AC_SUBST(KCONFIG_COMPILER)
+            AC_SUBST(KCFG_DEPENDENCIES)
+            AC_SUBST(DCOPIDLNG)
+        fi
+        AC_SUBST(DCOPIDL)
+        AC_SUBST(DCOPIDL2CPP)
+        AC_SUBST(DCOP_DEPENDENCIES)
+        AC_SUBST(MCOPIDL)
+        AC_SUBST(ARTSCCONFIG)
+	AC_SUBST(MEINPROC)
+ 	AC_SUBST(KDE_XSL_STYLESHEET)
+	AC_SUBST(XMLLINT)
+])dnl
+
+AC_DEFUN([AC_CREATE_KFSSTND],
+[
+AC_REQUIRE([AC_CHECK_RPATH])
+
+AC_MSG_CHECKING([for KDE paths])
+kde_result=""
+kde_cached_paths=yes
+AC_CACHE_VAL(kde_cv_all_paths,
+[
+  KDE_SET_DEFAULT_PATHS($1)
+  kde_cached_paths=no
+])
+eval "$kde_cv_all_paths"
+KDE_CHECK_PATHS_FOR_COMPLETENESS
+if test "$kde_have_all_paths" = "no" && test "$kde_cached_paths" = "yes"; then
+  # wrong values were cached, may be, we can set better ones
+  kde_result=
+  kde_htmldir= kde_appsdir= kde_icondir= kde_sounddir=
+  kde_datadir= kde_locale=  kde_cgidir=  kde_confdir= kde_kcfgdir=
+  kde_mimedir= kde_toolbardir= kde_wallpaperdir= kde_templatesdir=
+  kde_bindir= kde_servicesdir= kde_servicetypesdir= kde_moduledir=
+  kde_have_all_paths=
+  kde_styledir=
+  kde_widgetdir=
+  xdg_appsdir = xdg_menudir= xdg_directorydir= 
+  KDE_SET_DEFAULT_PATHS($1)
+  eval "$kde_cv_all_paths"
+  KDE_CHECK_PATHS_FOR_COMPLETENESS
+  kde_result="$kde_result (cache overridden)"
+fi
+if test "$kde_have_all_paths" = "no"; then
+  AC_MSG_ERROR([configure could not run a little KDE program to test the environment.
+Since it had compiled and linked before, it must be a strange problem on your system.
+Look at config.log for details. If you are not able to fix this, look at
+http://www.kde.org/faq/installation.html or any www.kde.org mirror.
+(If you're using an egcs version on Linux, you may update binutils!)
+])
+else
+  rm -f conftest*
+  AC_MSG_RESULT($kde_result)
+fi
+
+bindir=$kde_bindir
+
+KDE_SUBST_PROGRAMS
+
+])
+
+AC_DEFUN([AC_SUBST_KFSSTND],
+[
+AC_SUBST(kde_htmldir)
+AC_SUBST(kde_appsdir)
+AC_SUBST(kde_icondir)
+AC_SUBST(kde_sounddir)
+AC_SUBST(kde_datadir)
+AC_SUBST(kde_locale)
+AC_SUBST(kde_confdir)
+AC_SUBST(kde_kcfgdir)
+AC_SUBST(kde_mimedir)
+AC_SUBST(kde_wallpaperdir)
+AC_SUBST(kde_bindir)
+dnl X Desktop Group standards
+AC_SUBST(xdg_appsdir)
+AC_SUBST(xdg_menudir)
+AC_SUBST(xdg_directorydir)
+dnl for KDE 2
+AC_SUBST(kde_templatesdir)
+AC_SUBST(kde_servicesdir)
+AC_SUBST(kde_servicetypesdir)
+AC_SUBST(kde_moduledir)
+AC_SUBST(kdeinitdir, '$(kde_moduledir)')
+AC_SUBST(kde_styledir)
+AC_SUBST(kde_widgetdir)
+if test "$kde_qtver" = 1; then
+  kde_minidir="$kde_icondir/mini"
+else
+# for KDE 1 - this breaks KDE2 apps using minidir, but
+# that's the plan ;-/
+  kde_minidir="/dev/null"
+fi
+dnl AC_SUBST(kde_minidir)
+dnl AC_SUBST(kde_cgidir)
+dnl AC_SUBST(kde_toolbardir)
+])
+
+AC_DEFUN([KDE_MISC_TESTS],
+[
+   dnl Checks for libraries.
+   AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for *BSD 
+   AC_SUBST(LIBUTIL)
+   AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for *BSD
+   AC_SUBST(LIBCOMPAT)
+   kde_have_crypt=
+   AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"; kde_have_crypt=yes],
+      AC_CHECK_LIB(c, crypt, [kde_have_crypt=yes], [
+        AC_MSG_WARN([you have no crypt in either libcrypt or libc.
+You should install libcrypt from another source or configure with PAM
+support])
+	kde_have_crypt=no
+      ]))
+   AC_SUBST(LIBCRYPT)
+   if test $kde_have_crypt = yes; then
+      AC_DEFINE_UNQUOTED(HAVE_CRYPT, 1, [Defines if your system has the crypt function])
+   fi
+   AC_CHECK_SOCKLEN_T
+   AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+   if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
+        [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
+   fi
+   AC_CHECK_FUNC(inet_ntoa)
+   if test $ac_cv_func_inet_ntoa = no; then
+     AC_CHECK_LIB(nsl, inet_ntoa, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
+   fi
+   AC_CHECK_FUNC(connect)
+   if test $ac_cv_func_connect = no; then
+      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
+        $X_EXTRA_LIBS)
+   fi
+
+   AC_CHECK_FUNC(remove)
+   if test $ac_cv_func_remove = no; then
+      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
+   fi
+
+   # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+   AC_CHECK_FUNC(shmat, ,
+     AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"))
+   
+   # more headers that need to be explicitly included on darwin
+   AC_CHECK_HEADERS(sys/types.h stdint.h)
+
+   # sys/bitypes.h is needed for uint32_t and friends on Tru64
+   AC_CHECK_HEADERS(sys/bitypes.h)
+
+   # darwin requires a poll emulation library
+   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
+
+   # for some image handling on Mac OS X
+   AC_CHECK_HEADERS(Carbon/Carbon.h)
+
+   # CoreAudio framework
+   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
+     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
+     FRAMEWORK_COREAUDIO="-Xlinker -framework -Xlinker CoreAudio"
+   ])
+
+   AC_CHECK_RES_INIT
+   AC_SUBST(LIB_POLL)
+   AC_SUBST(FRAMEWORK_COREAUDIO)
+   LIBSOCKET="$X_EXTRA_LIBS"
+   AC_SUBST(LIBSOCKET)
+   AC_SUBST(X_EXTRA_LIBS)
+   AC_CHECK_LIB(ucb, killpg, [LIBUCB="-lucb"]) dnl for Solaris2.4
+   AC_SUBST(LIBUCB)
+
+   case $host in  dnl this *is* LynxOS specific
+   *-*-lynxos* )
+        AC_MSG_CHECKING([LynxOS header file wrappers])
+        [CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"]
+        AC_MSG_RESULT(disabled)
+        AC_CHECK_LIB(bsd, gethostbyname, [LIBSOCKET="-lbsd"]) dnl for LynxOS
+         ;;
+    esac
+
+   KDE_CHECK_TYPES
+   KDE_CHECK_LIBDL
+   KDE_CHECK_STRLCPY
+
+# darwin needs this to initialize the environment
+AC_CHECK_HEADERS(crt_externs.h)
+AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
+ 
+AH_VERBATIM(_DARWIN_ENVIRON,
+[
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
+# include <sys/time.h>
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+#endif
+])
+
+AH_VERBATIM(_AIX_STRINGS_H_BZERO,
+[
+/*
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
+ * that defines bzero.
+ */
+
+#if defined(_AIX)
+#include <strings.h>
+#endif
+])
+
+AC_CHECK_FUNCS([vsnprintf snprintf])
+
+AH_VERBATIM(_TRU64,[
+/*
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
+ */
+
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
+#if __STDC__
+#include <stdarg.h>
+#include <stdlib.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
+#ifdef __cplusplus
+extern "C"
+#endif
+int snprintf(char *str, size_t n, char const *fmt, ...);
+#endif
+])
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Find the header files and libraries for X-Windows. Extended the
+dnl macro AC_PATH_X
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([K_PATH_X],
+[
+AC_REQUIRE([KDE_MISC_TESTS])dnl
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_ARG_ENABLE(
+  embedded,
+  AC_HELP_STRING([--enable-embedded],[link to Qt-embedded, don't use X]),
+  kde_use_qt_emb=$enableval,
+  kde_use_qt_emb=no
+)
+
+AC_ARG_ENABLE(
+  qtopia,
+  AC_HELP_STRING([--enable-qtopia],[link to Qt-embedded, link to the Qtopia Environment]),
+  kde_use_qt_emb_palm=$enableval,
+  kde_use_qt_emb_palm=no
+)
+
+AC_ARG_ENABLE(
+  mac,
+  AC_HELP_STRING([--enable-mac],[link to Qt/Mac (don't use X)]),
+  kde_use_qt_mac=$enableval,
+  kde_use_qt_mac=no
+)
+
+# used to disable x11-specific stuff on special platforms
+AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
+
+if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
+
+AC_MSG_CHECKING(for X)
+
+AC_CACHE_VAL(kde_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+if test "{$x_includes+set}" = set || test "$x_includes" = NONE; then
+   kde_x_includes=NO
+else
+   kde_x_includes=$x_includes
+fi
+if test "{$x_libraries+set}" = set || test "$x_libraries" = NONE; then
+   kde_x_libraries=NO
+else
+   kde_x_libraries=$x_libraries
+fi
+
+# below we use the standard autoconf calls
+ac_x_libraries=$kde_x_libraries
+ac_x_includes=$kde_x_includes
+
+KDE_PATH_X_DIRECT
+dnl AC_PATH_X_XMKMF picks /usr/lib as the path for the X libraries.
+dnl Unfortunately, if compiling with the N32 ABI, this is not the correct
+dnl location. The correct location is /usr/lib32 or an undefined value
+dnl (the linker is smart enough to pick the correct default library).
+dnl Things work just fine if you use just AC_PATH_X_DIRECT.
+dnl Solaris has a similar problem. AC_PATH_X_XMKMF forces x_includes to
+dnl /usr/openwin/include, which doesn't work. /usr/include does work, so
+dnl x_includes should be left alone.
+case "$host" in
+mips-sgi-irix6*)
+  ;;
+*-*-solaris*)
+  ;;
+*)
+  _AC_PATH_X_XMKMF
+  if test -z "$ac_x_includes"; then
+    ac_x_includes="."
+  fi
+  if test -z "$ac_x_libraries"; then
+    ac_x_libraries="/usr/lib${kdelibsuff}"
+  fi
+esac
+#from now on we use our own again
+
+# when the user already gave --x-includes, we ignore
+# what the standard autoconf macros told us.
+if test "$kde_x_includes" = NO; then
+  kde_x_includes=$ac_x_includes
+fi
+
+# for --x-libraries too
+if test "$kde_x_libraries" = NO; then
+  kde_x_libraries=$ac_x_libraries
+fi
+
+if test "$kde_x_includes" = NO; then
+  AC_MSG_ERROR([Can't find X includes. Please check your installation and add the correct paths!])
+fi
+
+if test "$kde_x_libraries" = NO; then
+  AC_MSG_ERROR([Can't find X libraries. Please check your installation and add the correct paths!])
+fi
+
+# Record where we found X for the cache.
+kde_cv_have_x="have_x=yes \
+         kde_x_includes=$kde_x_includes kde_x_libraries=$kde_x_libraries"
+])dnl
+
+eval "$kde_cv_have_x"
+
+if test "$have_x" != yes; then
+  AC_MSG_RESULT($have_x)
+  no_x=yes
+else
+  AC_MSG_RESULT([libraries $kde_x_libraries, headers $kde_x_includes])
+fi
+
+if test -z "$kde_x_includes" || test "x$kde_x_includes" = xNONE; then
+  X_INCLUDES=""
+  x_includes="."; dnl better than nothing :-
+ else
+  x_includes=$kde_x_includes
+  X_INCLUDES="-I$x_includes"
+fi
+
+if test -z "$kde_x_libraries" || test "x$kde_x_libraries" = xNONE; then
+  X_LDFLAGS=""
+  x_libraries="/usr/lib"; dnl better than nothing :-
+ else
+  x_libraries=$kde_x_libraries
+  X_LDFLAGS="-L$x_libraries"
+fi
+all_includes="$X_INCLUDES"
+all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
+
+# Check for libraries that X11R6 Xt/Xaw programs need.
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+# SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+# check for ICE first), but we must link in the order -lSM -lICE or
+# we get undefined symbols.  So assume we have SM if we have ICE.
+# These have to be linked with before -lX11, unlike the other
+# libraries we check for below, so use a different variable.
+#  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+AC_CHECK_LIB(ICE, IceConnectionNumber,
+  [LIBSM="-lSM -lICE"], , $X_EXTRA_LIBS)
+LDFLAGS="$ac_save_LDFLAGS"
+
+LIB_X11='-lX11 $(LIBSOCKET)'
+
+AC_MSG_CHECKING(for libXext)
+AC_CACHE_VAL(kde_cv_have_libXext,
+[
+kde_ldflags_safe="$LDFLAGS"
+kde_libs_safe="$LIBS"
+
+LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS"
+LIBS="-lXext -lX11 $LIBSOCKET"
+
+AC_TRY_LINK([
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+],
+[
+printf("hello Xext\n");
+],
+kde_cv_have_libXext=yes,
+kde_cv_have_libXext=no
+)
+
+LDFLAGS=$kde_ldflags_safe
+LIBS=$kde_libs_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_libXext)
+
+if test "$kde_cv_have_libXext" = "no"; then
+  AC_MSG_ERROR([We need a working libXext to proceed. Since configure
+can't find it itself, we stop here assuming that make wouldn't find
+them either.])
+fi
+
+LIB_XEXT="-lXext"
+QTE_NORTTI=""
+
+elif test "$kde_use_qt_emb" = "yes"; then
+  dnl We're using QT Embedded
+  CPPFLAGS=-DQWS
+  CXXFLAGS="$CXXFLAGS -fno-rtti"
+  QTE_NORTTI="-fno-rtti -DQWS"
+  X_PRE_LIBS=""
+  LIB_X11=""
+  LIB_XEXT=""
+  LIB_XRENDER=""
+  LIBSM=""
+  X_INCLUDES=""
+  X_LDFLAGS=""
+  x_includes=""
+  x_libraries=""
+elif test "$kde_use_qt_mac" = "yes"; then
+  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
+  dnl be included to get the information) --Sam
+  CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
+  CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
+  X_PRE_LIBS=""
+  LIB_X11=""
+  LIB_XEXT=""
+  LIB_XRENDER=""
+  LIBSM=""
+  X_INCLUDES=""
+  X_LDFLAGS=""
+  x_includes=""
+  x_libraries=""
+fi
+AC_SUBST(X_PRE_LIBS)
+AC_SUBST(LIB_X11)
+AC_SUBST(LIB_XRENDER)
+AC_SUBST(LIBSM)
+AC_SUBST(X_INCLUDES)
+AC_SUBST(X_LDFLAGS)
+AC_SUBST(x_includes)
+AC_SUBST(x_libraries)
+AC_SUBST(QTE_NORTTI)
+AC_SUBST(LIB_XEXT)
+
+])
+
+AC_DEFUN([KDE_PRINT_QT_PROGRAM],
+[
+AC_REQUIRE([KDE_USE_QT])
+cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#error 1
+#endif
+EOF
+fi
+fi
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <private/qucomextra_p.h>
+EOF
+fi
+
+echo "#if ! ($kde_qt_verstring)" >> conftest.$ac_ext
+cat >> conftest.$ac_ext <<EOF
+#error 1
+#endif
+
+int main() {
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+    QStringList *t = new QStringList();
+    Q_UNUSED(t);
+EOF
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+    QString s;
+    s.setLatin1("Elvis is alive", 14);
+EOF
+fi
+fi
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+    (void)QStyleFactory::create(QString::null);
+    QCursor c(Qt::WhatsThisCursor);
+EOF
+fi
+cat >> conftest.$ac_ext <<EOF
+    return 0;
+}
+EOF
+])
+
+AC_DEFUN([KDE_USE_QT],
+[
+if test -z "$1"; then
+  # Current default Qt version: 3.3
+  kde_qtver=3
+  kde_qtsubver=3
+else
+  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
+  # following is the check if subversion isnt found in passed argument
+  if test "$kde_qtsubver" = "$1"; then
+    kde_qtsubver=1
+  fi
+  kde_qtver=`echo "$1" | sed -e 's#^\([0-9][0-9]*\)\..*#\1#'`
+  if test "$kde_qtver" = "1"; then
+    kde_qtsubver=42
+  fi
+fi
+
+if test -z "$2"; then
+  if test "$kde_qtver" = "2"; then
+    if test $kde_qtsubver -gt 0; then
+      kde_qt_minversion=">= Qt 2.2.2"
+    else
+      kde_qt_minversion=">= Qt 2.0.2"
+    fi
+  fi
+  if test "$kde_qtver" = "3"; then
+    if test $kde_qtsubver -gt 0; then
+	 if test $kde_qtsubver -gt 1; then
+	    if test $kde_qtsubver -gt 2; then
+		kde_qt_minversion=">= Qt 3.3"
+	    else
+	        kde_qt_minversion=">= Qt 3.2"
+	    fi
+	 else
+            kde_qt_minversion=">= Qt 3.1 (20021021)"
+         fi
+    else
+      kde_qt_minversion=">= Qt 3.0"
+    fi
+  fi
+  if test "$kde_qtver" = "1"; then
+    kde_qt_minversion=">= 1.42 and < 2.0"
+  fi
+else
+   kde_qt_minversion="$2"
+fi
+
+if test -z "$3"; then
+   if test $kde_qtver = 3; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
+       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
+       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
+     else
+       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
+     fi
+   fi
+   if test $kde_qtver = 2; then
+     if test $kde_qtsubver -gt 0; then
+       kde_qt_verstring="QT_VERSION >= 222"
+     else
+       kde_qt_verstring="QT_VERSION >= 200"
+     fi
+   fi
+   if test $kde_qtver = 1; then
+    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
+   fi
+else
+   kde_qt_verstring="$3"
+fi
+
+if test $kde_qtver = 3; then
+  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
+fi
+if test $kde_qtver = 2; then
+   kde_qt_dirs="$QTDIR /usr/lib/qt2 /usr/lib/qt"
+fi
+if test $kde_qtver = 1; then
+   kde_qt_dirs="$QTDIR /usr/lib/qt"
+fi
+])
+
+AC_DEFUN([KDE_CHECK_QT_DIRECT],
+[
+AC_REQUIRE([KDE_USE_QT])
+AC_MSG_CHECKING([if Qt compiles without flags])
+AC_CACHE_VAL(kde_cv_qt_direct,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_LD_LIBRARY_PATH_safe=$LD_LIBRARY_PATH
+ac_LIBRARY_PATH="$LIBRARY_PATH"
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_includes"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBQT -lXext -lX11 $LIBSOCKET"
+else
+LIBS="$LIBQT $LIBSOCKET"
+fi
+LD_LIBRARY_PATH=
+export LD_LIBRARY_PATH
+LIBRARY_PATH=
+export LIBRARY_PATH
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+  kde_cv_qt_direct="yes"
+else
+  kde_cv_qt_direct="no"
+  echo "configure: failed program was:" >&AC_FD_CC
+  cat conftest.$ac_ext >&AC_FD_CC
+fi
+
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+LD_LIBRARY_PATH="$ac_LD_LIBRARY_PATH_safe"
+export LD_LIBRARY_PATH
+LIBRARY_PATH="$ac_LIBRARY_PATH"
+export LIBRARY_PATH
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_qt_direct" = "yes"; then
+  AC_MSG_RESULT(yes)
+  $1
+else
+  AC_MSG_RESULT(no)
+  $2
+fi
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the Qt headers and libraries.
+dnl $(QT_LDFLAGS) will be -Lqtliblocation (if needed)
+dnl and $(QT_INCLUDES) will be -Iqthdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_PATH_QT_1_3],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([KDE_USE_QT])
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+dnl ------------------------------------------------------------------------
+dnl Add configure flag to enable linking to MT version of Qt library.
+dnl ------------------------------------------------------------------------
+
+AC_ARG_ENABLE(
+  mt,
+  AC_HELP_STRING([--disable-mt],[link to non-threaded Qt (deprecated)]),
+  kde_use_qt_mt=$enableval,
+  [
+    if test $kde_qtver = 3; then
+      kde_use_qt_mt=yes
+    else
+      kde_use_qt_mt=no
+    fi
+  ]
+)
+
+USING_QT_MT=""
+
+dnl ------------------------------------------------------------------------
+dnl If we not get --disable-qt-mt then adjust some vars for the host.
+dnl ------------------------------------------------------------------------
+
+KDE_MT_LDFLAGS=
+KDE_MT_LIBS=
+if test "x$kde_use_qt_mt" = "xyes"; then
+  KDE_CHECK_THREADING
+  if test "x$kde_use_threading" = "xyes"; then
+    CPPFLAGS="$USE_THREADS -DQT_THREAD_SUPPORT $CPPFLAGS"
+    KDE_MT_LDFLAGS="$USE_THREADS"
+    KDE_MT_LIBS="$LIBPTHREAD"
+  else
+    kde_use_qt_mt=no
+  fi
+fi
+AC_SUBST(KDE_MT_LDFLAGS)
+AC_SUBST(KDE_MT_LIBS)
+
+kde_qt_was_given=yes
+
+dnl ------------------------------------------------------------------------
+dnl If we haven't been told how to link to Qt, we work it out for ourselves.
+dnl ------------------------------------------------------------------------
+if test -z "$LIBQT_GLOB"; then
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    LIBQT_GLOB="libqte.*"
+  else
+    LIBQT_GLOB="libqt.*"
+  fi
+fi
+
+dnl ------------------------------------------------------------
+dnl If we got --enable-embedded then adjust the Qt library name.
+dnl ------------------------------------------------------------
+if test "x$kde_use_qt_emb" = "xyes"; then
+  qtlib="qte"
+else
+  qtlib="qt"
+fi
+
+kde_int_qt="-l$qtlib"
+
+if test -z "$LIBQPE"; then
+dnl ------------------------------------------------------------
+dnl If we got --enable-palmtop then add -lqpe to the link line
+dnl ------------------------------------------------------------
+  if test "x$kde_use_qt_emb" = "xyes"; then
+    if test "x$kde_use_qt_emb_palm" = "xyes"; then
+      LIB_QPE="-lqpe"
+    else
+      LIB_QPE=""
+    fi
+  else
+    LIB_QPE=""
+  fi
+fi
+
+dnl ------------------------------------------------------------------------
+dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
+dnl ------------------------------------------------------------------------
+
+if test "x$kde_use_qt_mt" = "xyes"; then
+  LIBQT="-l$qtlib-mt"
+  kde_int_qt="-l$qtlib-mt"
+  LIBQT_GLOB="lib$qtlib-mt.*"
+  USING_QT_MT="using -mt"
+else
+  LIBQT="-l$qtlib"
+fi
+
+if test $kde_qtver != 1; then
+
+  AC_REQUIRE([AC_FIND_PNG])
+  AC_REQUIRE([AC_FIND_JPEG])
+  LIBQT="$LIBQT $LIBPNG $LIBJPEG"
+fi
+
+if test $kde_qtver = 3; then
+  AC_REQUIRE([KDE_CHECK_LIBDL])
+  LIBQT="$LIBQT $LIBDL"
+fi
+
+AC_MSG_CHECKING([for Qt])
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBQT="$LIBQT $X_PRE_LIBS -lXext -lX11 $LIBSM $LIBSOCKET"
+fi
+ac_qt_includes=NO ac_qt_libraries=NO ac_qt_bindir=NO
+qt_libraries=""
+qt_includes=""
+AC_ARG_WITH(qt-dir,
+    AC_HELP_STRING([--with-qt-dir=DIR],[where the root of Qt is installed ]),
+    [  ac_qt_includes="$withval"/include
+       ac_qt_libraries="$withval"/lib${kdelibsuff}
+       ac_qt_bindir="$withval"/bin
+    ])
+
+AC_ARG_WITH(qt-includes,
+    AC_HELP_STRING([--with-qt-includes=DIR],[where the Qt includes are. ]),
+    [
+       ac_qt_includes="$withval"
+    ])
+
+kde_qt_libs_given=no
+
+AC_ARG_WITH(qt-libraries,
+    AC_HELP_STRING([--with-qt-libraries=DIR],[where the Qt library is installed.]),
+    [  ac_qt_libraries="$withval"
+       kde_qt_libs_given=yes
+    ])
+
+AC_CACHE_VAL(ac_cv_have_qt,
+[#try to guess Qt locations
+
+qt_incdirs=""
+for dir in $kde_qt_dirs; do
+   qt_incdirs="$qt_incdirs $dir/include $dir"
+done
+qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
+if test ! "$ac_qt_includes" = "NO"; then
+   qt_incdirs="$ac_qt_includes $qt_incdirs"
+fi
+
+if test "$kde_qtver" != "1"; then
+  kde_qt_header=qstyle.h
+else
+  kde_qt_header=qglobal.h
+fi
+
+AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
+ac_qt_includes="$qt_incdir"
+
+qt_libdirs=""
+for dir in $kde_qt_dirs; do
+   qt_libdirs="$qt_libdirs $dir/lib${kdelibsuff} $dir"
+done
+qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
+if test ! "$ac_qt_libraries" = "NO"; then
+  qt_libdir=$ac_qt_libraries
+else
+  qt_libdirs="$ac_qt_libraries $qt_libdirs"
+  # if the Qt was given, the chance is too big that libqt.* doesn't exist
+  qt_libdir=NONE
+  for dir in $qt_libdirs; do
+    try="ls -1 $dir/${LIBQT_GLOB}"
+    if test -n "`$try 2> /dev/null`"; then qt_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+  done
+fi
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+  if test -e "$a"; then
+    LIBQT="$LIBQT ${kde_int_qt}_incremental"
+    break
+  fi
+done
+
+ac_qt_libraries="$qt_libdir"
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+ac_cxxflags_safe="$CXXFLAGS"
+ac_ldflags_safe="$LDFLAGS"
+ac_libs_safe="$LIBS"
+
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+LDFLAGS="$LDFLAGS -L$qt_libdir $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
+
+KDE_PRINT_QT_PROGRAM
+
+if AC_TRY_EVAL(ac_link) && test -s conftest; then
+  rm -f conftest*
+else
+  echo "configure: failed program was:" >&AC_FD_CC
+  cat conftest.$ac_ext >&AC_FD_CC
+  ac_qt_libraries="NO"
+fi
+rm -f conftest*
+CXXFLAGS="$ac_cxxflags_safe"
+LDFLAGS="$ac_ldflags_safe"
+LIBS="$ac_libs_safe"
+
+AC_LANG_RESTORE
+if test "$ac_qt_includes" = NO || test "$ac_qt_libraries" = NO; then
+  ac_cv_have_qt="have_qt=no"
+  ac_qt_notfound=""
+  missing_qt_mt=""
+  if test "$ac_qt_includes" = NO; then
+    if test "$ac_qt_libraries" = NO; then
+      ac_qt_notfound="(headers and libraries)";
+    else
+      ac_qt_notfound="(headers)";
+    fi
+  else
+    if test "x$kde_use_qt_mt" = "xyes"; then
+       missing_qt_mt="
+Make sure that you have compiled Qt with thread support!"
+       ac_qt_notfound="(library $qtlib-mt)";
+    else
+       ac_qt_notfound="(library $qtlib)";
+    fi
+  fi
+
+  AC_MSG_ERROR([Qt ($kde_qt_minversion) $ac_qt_notfound not found. Please check your installation!
+For more details about this problem, look at the end of config.log.$missing_qt_mt])
+else
+  have_qt="yes"
+fi
+])
+
+eval "$ac_cv_have_qt"
+
+if test "$have_qt" != yes; then
+  AC_MSG_RESULT([$have_qt]);
+else
+  ac_cv_have_qt="have_qt=yes \
+    ac_qt_includes=$ac_qt_includes ac_qt_libraries=$ac_qt_libraries"
+  AC_MSG_RESULT([libraries $ac_qt_libraries, headers $ac_qt_includes $USING_QT_MT])
+
+  qt_libraries="$ac_qt_libraries"
+  qt_includes="$ac_qt_includes"
+fi
+
+if test ! "$kde_qt_libs_given" = "yes" && test ! "$kde_qtver" = 3; then
+     KDE_CHECK_QT_DIRECT(qt_libraries= ,[])
+fi
+
+AC_SUBST(qt_libraries)
+AC_SUBST(qt_includes)
+
+if test "$qt_includes" = "$x_includes" || test -z "$qt_includes"; then
+ QT_INCLUDES=""
+else
+ QT_INCLUDES="-I$qt_includes"
+ all_includes="$QT_INCLUDES $all_includes"
+fi
+
+if test "$qt_libraries" = "$x_libraries" || test -z "$qt_libraries"; then
+ QT_LDFLAGS=""
+else
+ QT_LDFLAGS="-L$qt_libraries"
+ all_libraries="$QT_LDFLAGS $all_libraries"
+fi
+test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
+
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_LDFLAGS)
+AC_PATH_QT_MOC_UIC
+
+KDE_CHECK_QT_JPEG
+
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG) -lXext $(LIB_X11) $(LIBSM)'
+else
+LIB_QT="$kde_int_qt $LIBJPEG_QT "'$(LIBZ) $(LIBPNG)'
+fi
+test -z "$KDE_MT_LIBS" || LIB_QT="$LIB_QT $KDE_MT_LIBS"
+for a in $qt_libdir/lib`echo ${kde_int_qt} | sed 's,^-l,,'`_incremental.*; do
+  if test -e "$a"; then
+     LIB_QT="$LIB_QT ${kde_int_qt}_incremental"
+     break
+  fi
+done
+
+AC_SUBST(LIB_QT)
+AC_SUBST(LIB_QPE)
+
+AC_SUBST(kde_qtver)
+])
+
+AC_DEFUN([AC_PATH_QT],
+[
+AC_PATH_QT_1_3
+])
+
+AC_DEFUN([KDE_CHECK_UIC_PLUGINS],
+[
+AC_REQUIRE([AC_PATH_QT_MOC_UIC])
+
+if test x$ac_uic_supports_libpath = xyes; then
+
+AC_MSG_CHECKING([if UIC has KDE plugins available])
+AC_CACHE_VAL(kde_cv_uic_plugins,
+[
+cat > actest.ui << EOF
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>NewConnectionDialog</class>
+<widget class="QDialog">
+   <widget class="KLineEdit">
+        <property name="name">
+           <cstring>testInput</cstring>
+        </property>
+   </widget>
+</widget>
+</UI>
+EOF
+       
+
+
+kde_cv_uic_plugins=no
+kde_line="$UIC_PATH -L $kde_widgetdir"
+if test x$ac_uic_supports_nounload = xyes; then
+   kde_line="$kde_line -nounload"
+fi
+kde_line="$kde_line -impl actest.h actest.ui > actest.cpp"
+if AC_TRY_EVAL(kde_line); then
+	# if you're trying to debug this check and think it's incorrect,
+	# better check your installation. The check _is_ correct - your
+	# installation is not.
+	if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
+		kde_cv_uic_plugins=yes
+	fi
+fi
+rm -f actest.ui actest.cpp
+])
+
+AC_MSG_RESULT([$kde_cv_uic_plugins])
+if test "$kde_cv_uic_plugins" != yes; then
+	AC_MSG_ERROR([
+you need to install kdelibs first.
+
+If you did install kdelibs, then the Qt version that is picked up by
+this configure is not the same version you used to compile kdelibs. 
+The Qt Plugin installed by kdelibs is *ONLY* loadable if its the 
+same Qt version, compiled with the same compiler and the same Qt
+configuration settings.
+])
+fi
+fi
+])
+
+AC_DEFUN([KDE_CHECK_FINAL],
+[
+  AC_ARG_ENABLE(final,
+	AC_HELP_STRING([--enable-final],
+		       [build size optimized apps (experimental - needs lots of memory)]),
+	kde_use_final=$enableval, kde_use_final=no)
+
+  if test "x$kde_use_final" = "xyes"; then
+      KDE_USE_FINAL_TRUE=""
+      KDE_USE_FINAL_FALSE="#"
+   else
+      KDE_USE_FINAL_TRUE="#"
+      KDE_USE_FINAL_FALSE=""
+  fi
+  AC_SUBST(KDE_USE_FINAL_TRUE)
+  AC_SUBST(KDE_USE_FINAL_FALSE)
+])
+
+AC_DEFUN([KDE_CHECK_CLOSURE],
+[
+  AC_ARG_ENABLE(closure,
+		AC_HELP_STRING([--enable-closure],[delay template instantiation]),
+  	kde_use_closure=$enableval, kde_use_closure=no)
+
+  KDE_NO_UNDEFINED=""
+  if test "x$kde_use_closure" = "xyes"; then
+       KDE_USE_CLOSURE_TRUE=""
+       KDE_USE_CLOSURE_FALSE="#"
+#       CXXFLAGS="$CXXFLAGS $REPO"
+  else
+       KDE_USE_CLOSURE_TRUE="#"
+       KDE_USE_CLOSURE_FALSE=""
+       KDE_NO_UNDEFINED=""
+       case $host in 
+         *-*-linux-gnu)
+           KDE_CHECK_COMPILER_FLAG([Wl,--no-undefined],
+                [KDE_CHECK_COMPILER_FLAG([Wl,--allow-shlib-undefined],
+		[KDE_NO_UNDEFINED="-Wl,--no-undefined -Wl,--allow-shlib-undefined"],
+		[KDE_NO_UNDEFINED=""])],
+	    [KDE_NO_UNDEFINED=""])
+           ;;
+       esac
+  fi
+  AC_SUBST(KDE_USE_CLOSURE_TRUE)
+  AC_SUBST(KDE_USE_CLOSURE_FALSE)
+  AC_SUBST(KDE_NO_UNDEFINED)
+])
+
+dnl Check if the linker supports --enable-new-dtags and --as-needed
+AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
+[
+  AC_ARG_ENABLE(new_ldflags,
+		AC_HELP_STRING([--enable-new-ldflags],
+		[enable the new linker flags]),
+	kde_use_new_ldflags=$enableval, 
+	kde_use_new_ldflags=no)
+
+  LDFLAGS_AS_NEEDED=""
+  LDFLAGS_NEW_DTAGS=""
+  if test "x$kde_use_new_ldflags" = "xyes"; then
+       LDFLAGS_NEW_DTAGS=""
+       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
+		[LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
+
+       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
+		[LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
+  fi
+  AC_SUBST(LDFLAGS_AS_NEEDED)
+  AC_SUBST(LDFLAGS_NEW_DTAGS)
+])
+
+AC_DEFUN([KDE_CHECK_NMCHECK],
+[
+  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
+	kde_use_nmcheck=$enableval, kde_use_nmcheck=no)
+
+  if test "$kde_use_nmcheck" = "yes"; then
+      KDE_USE_NMCHECK_TRUE=""
+      KDE_USE_NMCHECK_FALSE="#"
+   else
+      KDE_USE_NMCHECK_TRUE="#"
+      KDE_USE_NMCHECK_FALSE=""
+  fi
+  AC_SUBST(KDE_USE_NMCHECK_TRUE)
+  AC_SUBST(KDE_USE_NMCHECK_FALSE)
+])
+
+AC_DEFUN([KDE_EXPAND_MAKEVAR], [
+savex=$exec_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+tmp=$$2
+while $1=`eval echo "$tmp"`; test "x$$1" != "x$tmp"; do tmp=$$1; done
+exec_prefix=$savex
+])
+
+dnl ------------------------------------------------------------------------
+dnl Now, the same with KDE
+dnl $(KDE_LDFLAGS) will be the kdeliblocation (if needed)
+dnl and $(kde_includes) will be the kdehdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_BASE_PATH_KDE],
+[
+AC_REQUIRE([KDE_CHECK_STL])
+AC_REQUIRE([AC_PATH_QT])dnl
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_CHECK_RPATH
+AC_MSG_CHECKING([for KDE])
+
+if test "${prefix}" != NONE; then
+  kde_includes=${includedir}
+  KDE_EXPAND_MAKEVAR(ac_kde_includes, includedir)
+
+  kde_libraries=${libdir}
+  KDE_EXPAND_MAKEVAR(ac_kde_libraries, libdir)
+
+else
+  ac_kde_includes=
+  ac_kde_libraries=
+  kde_libraries=""
+  kde_includes=""
+fi
+
+AC_CACHE_VAL(ac_cv_have_kde,
+[#try to guess kde locations
+
+if test "$kde_qtver" = 1; then
+  kde_check_header="ksock.h"
+  kde_check_lib="libkdecore.la"
+else
+  kde_check_header="ksharedptr.h"
+  kde_check_lib="libkio.la"
+fi
+
+if test -z "$1"; then
+
+kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
+test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
+kde_incdirs="$ac_kde_includes $kde_incdirs"
+AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
+ac_kde_includes="$kde_incdir"
+
+if test -n "$ac_kde_includes" && test ! -r "$ac_kde_includes/$kde_check_header"; then
+  AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE headers installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
+test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
+kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
+AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
+ac_kde_libraries="$kde_libdir"
+
+kde_widgetdir=NO
+dnl this might be somewhere else
+AC_FIND_FILE("kde3/plugins/designer/kdewidgets.la", $kde_libdirs, kde_widgetdir)
+
+if test -n "$ac_kde_libraries" && test ! -r "$ac_kde_libraries/$kde_check_lib"; then
+AC_MSG_ERROR([
+in the prefix, you've chosen, are no KDE libraries installed. This will fail.
+So, check this please and use another prefix!])
+fi
+
+if test -n "$kde_widgetdir" && test ! -r "$kde_widgetdir/kde3/plugins/designer/kdewidgets.la"; then
+AC_MSG_ERROR([
+I can't find the designer plugins. These are required and should have been installed
+by kdelibs])
+fi
+
+if test -n "$kde_widgetdir"; then
+    kde_widgetdir="$kde_widgetdir/kde3/plugins/designer"
+fi
+
+
+if test "$ac_kde_includes" = NO || test "$ac_kde_libraries" = NO || test "$kde_widgetdir" = NO; then
+  ac_cv_have_kde="have_kde=no"
+else
+  ac_cv_have_kde="have_kde=yes \
+    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+fi
+
+else dnl test -z $1, e.g. from kdelibs
+
+  ac_cv_have_kde="have_kde=no"
+
+fi
+])dnl
+
+eval "$ac_cv_have_kde"
+
+if test "$have_kde" != "yes"; then
+ if test "${prefix}" = NONE; then
+  ac_kde_prefix="$ac_default_prefix"
+ else
+  ac_kde_prefix="$prefix"
+ fi
+ if test "$exec_prefix" = NONE; then
+  ac_kde_exec_prefix="$ac_kde_prefix"
+  AC_MSG_RESULT([will be installed in $ac_kde_prefix])
+ else
+  ac_kde_exec_prefix="$exec_prefix"
+  AC_MSG_RESULT([will be installed in $ac_kde_prefix and $ac_kde_exec_prefix])
+ fi
+
+ kde_libraries="${libdir}"
+ kde_includes="${includedir}"
+
+else
+  ac_cv_have_kde="have_kde=yes \
+    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
+  AC_MSG_RESULT([libraries $ac_kde_libraries, headers $ac_kde_includes])
+
+  kde_libraries="$ac_kde_libraries"
+  kde_includes="$ac_kde_includes"
+fi
+AC_SUBST(kde_libraries)
+AC_SUBST(kde_includes)
+
+if test "$kde_includes" = "$x_includes" || test "$kde_includes" = "$qt_includes"  || test "$kde_includes" = "/usr/include"; then
+ KDE_INCLUDES=""
+else
+ KDE_INCLUDES="-I$kde_includes"
+ all_includes="$KDE_INCLUDES $all_includes"
+fi
+
+KDE_DEFAULT_CXXFLAGS="-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION"
+ 
+KDE_LDFLAGS="-L$kde_libraries"
+if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
+ all_libraries="$KDE_LDFLAGS $all_libraries"
+fi
+
+AC_SUBST(KDE_LDFLAGS)
+AC_SUBST(KDE_INCLUDES)
+
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+all_libraries="$all_libraries $USER_LDFLAGS"
+all_includes="$all_includes $USER_INCLUDES"
+AC_SUBST(all_includes)
+AC_SUBST(all_libraries)
+
+if test -z "$1"; then
+KDE_CHECK_UIC_PLUGINS
+fi
+
+ac_kde_libraries="$kde_libdir"
+
+AC_SUBST(AUTODIRS)
+
+
+])
+
+AC_DEFUN([KDE_CHECK_EXTRA_LIBS],
+[
+AC_MSG_CHECKING(for extra includes)
+AC_ARG_WITH(extra-includes,AC_HELP_STRING([--with-extra-includes=DIR],[adds non standard include paths]),
+  kde_use_extra_includes="$withval",
+  kde_use_extra_includes=NONE
+)
+kde_extra_includes=
+if test -n "$kde_use_extra_includes" && \
+   test "$kde_use_extra_includes" != "NONE"; then
+
+   ac_save_ifs=$IFS
+   IFS=':'
+   for dir in $kde_use_extra_includes; do
+     kde_extra_includes="$kde_extra_includes $dir"
+     USER_INCLUDES="$USER_INCLUDES -I$dir"
+   done
+   IFS=$ac_save_ifs
+   kde_use_extra_includes="added"
+else
+   kde_use_extra_includes="no"
+fi
+AC_SUBST(USER_INCLUDES)
+
+AC_MSG_RESULT($kde_use_extra_includes)
+
+kde_extra_libs=
+AC_MSG_CHECKING(for extra libs)
+AC_ARG_WITH(extra-libs,AC_HELP_STRING([--with-extra-libs=DIR],[adds non standard library paths]),
+  kde_use_extra_libs=$withval,
+  kde_use_extra_libs=NONE
+)
+if test -n "$kde_use_extra_libs" && \
+   test "$kde_use_extra_libs" != "NONE"; then
+
+   ac_save_ifs=$IFS
+   IFS=':'
+   for dir in $kde_use_extra_libs; do
+     kde_extra_libs="$kde_extra_libs $dir"
+     KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
+     USER_LDFLAGS="$USER_LDFLAGS -L$dir"
+   done
+   IFS=$ac_save_ifs
+   kde_use_extra_libs="added"
+else
+   kde_use_extra_libs="no"
+fi
+
+AC_SUBST(USER_LDFLAGS)
+
+AC_MSG_RESULT($kde_use_extra_libs)
+
+])
+
+AC_DEFUN([KDE_1_CHECK_PATH_HEADERS],
+[
+    AC_MSG_CHECKING([for KDE headers installed])
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include "confdefs.h"
+#include <kapp.h>
+
+int main() {
+    printf("kde_htmldir=\\"%s\\"\n", KApplication::kde_htmldir().data());
+    printf("kde_appsdir=\\"%s\\"\n", KApplication::kde_appsdir().data());
+    printf("kde_icondir=\\"%s\\"\n", KApplication::kde_icondir().data());
+    printf("kde_sounddir=\\"%s\\"\n", KApplication::kde_sounddir().data());
+    printf("kde_datadir=\\"%s\\"\n", KApplication::kde_datadir().data());
+    printf("kde_locale=\\"%s\\"\n", KApplication::kde_localedir().data());
+    printf("kde_cgidir=\\"%s\\"\n", KApplication::kde_cgidir().data());
+    printf("kde_confdir=\\"%s\\"\n", KApplication::kde_configdir().data());
+    printf("kde_mimedir=\\"%s\\"\n", KApplication::kde_mimedir().data());
+    printf("kde_toolbardir=\\"%s\\"\n", KApplication::kde_toolbardir().data());
+    printf("kde_wallpaperdir=\\"%s\\"\n",
+	KApplication::kde_wallpaperdir().data());
+    printf("kde_bindir=\\"%s\\"\n", KApplication::kde_bindir().data());
+    printf("kde_partsdir=\\"%s\\"\n", KApplication::kde_partsdir().data());
+    printf("kde_servicesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_servicetypesdir=\\"/tmp/dummy\\"\n");
+    printf("kde_moduledir=\\"/tmp/dummy\\"\n");
+    printf("kde_styledir=\\"/tmp/dummy\\"\n");
+    printf("kde_widgetdir=\\"/tmp/dummy\\"\n");
+    printf("xdg_appsdir=\\"/tmp/dummy\\"\n");
+    printf("xdg_menudir=\\"/tmp/dummy\\"\n");
+    printf("xdg_directorydir=\\"/tmp/dummy\\"\n");
+    printf("kde_kcfgdir=\\"/tmp/dummy\\"\n");
+    return 0;
+    }
+EOF
+
+ ac_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$all_includes $CPPFLAGS"
+ if AC_TRY_EVAL(ac_compile); then
+   AC_MSG_RESULT(yes)
+ else
+   AC_MSG_ERROR([your system is not able to compile a small KDE application!
+Check, if you installed the KDE header files correctly.
+For more details about this problem, look at the end of config.log.])
+  fi
+  CPPFLAGS=$ac_save_CPPFLAGS
+
+  AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_CHECK_KDEQTADDON],
+[
+AC_MSG_CHECKING(for kde-qt-addon)
+AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
+[
+ kde_ldflags_safe="$LDFLAGS"
+ kde_libs_safe="$LIBS"
+ kde_cxxflags_safe="$CXXFLAGS"
+
+ LIBS="-lkde-qt-addon $LIBQT $LIBS"
+ CXXFLAGS="$CXXFLAGS -I$prefix/include -I$prefix/include/kde $all_includes"
+ LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
+
+ AC_TRY_LINK([
+   #include <qdom.h>
+ ],
+ [
+   QDomDocument doc;
+ ],
+  kde_cv_have_kdeqtaddon=yes,
+  kde_cv_have_kdeqtaddon=no
+ )
+
+ LDFLAGS=$kde_ldflags_safe
+ LIBS=$kde_libs_safe
+ CXXFLAGS=$kde_cxxflags_safe
+])
+
+AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
+
+if test "$kde_cv_have_kdeqtaddon" = "no"; then
+  AC_MSG_ERROR([Can't find libkde-qt-addon. You need to install it first.
+It is a separate package (and CVS module) named kde-qt-addon.])
+fi
+])
+
+AC_DEFUN([KDE_CREATE_LIBS_ALIASES],
+[
+   AC_REQUIRE([KDE_MISC_TESTS])
+   AC_REQUIRE([KDE_CHECK_LIBDL])
+   AC_REQUIRE([K_PATH_X])
+
+if test $kde_qtver = 3; then
+   case $host in 
+               *cygwin*) lib_kded="-lkdeinit_kded" ;;
+               *) lib_kded="" ;;
+       esac
+   AC_SUBST(LIB_KDED, $lib_kded)
+   AC_SUBST(LIB_KDECORE, "-lkdecore")
+   AC_SUBST(LIB_KDEUI, "-lkdeui")
+   AC_SUBST(LIB_KIO, "-lkio")
+   AC_SUBST(LIB_KJS, "-lkjs")
+   AC_SUBST(LIB_SMB, "-lsmb")
+   AC_SUBST(LIB_KAB, "-lkab")
+   AC_SUBST(LIB_KABC, "-lkabc")
+   AC_SUBST(LIB_KHTML, "-lkhtml")
+   AC_SUBST(LIB_KSPELL, "-lkspell")
+   AC_SUBST(LIB_KPARTS, "-lkparts")
+   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
+   AC_SUBST(LIB_KUTILS, "-lkutils")
+   AC_SUBST(LIB_KDEPIM, "-lkdepim")
+   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
+   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
+   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
+   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
+# these are for backward compatibility
+   AC_SUBST(LIB_KSYCOCA, "-lkio")
+   AC_SUBST(LIB_KFILE, "-lkio")
+elif test $kde_qtver = 2; then
+   AC_SUBST(LIB_KDECORE, "-lkdecore")
+   AC_SUBST(LIB_KDEUI, "-lkdeui")
+   AC_SUBST(LIB_KIO, "-lkio")
+   AC_SUBST(LIB_KSYCOCA, "-lksycoca")
+   AC_SUBST(LIB_SMB, "-lsmb")
+   AC_SUBST(LIB_KFILE, "-lkfile")
+   AC_SUBST(LIB_KAB, "-lkab")
+   AC_SUBST(LIB_KHTML, "-lkhtml")
+   AC_SUBST(LIB_KSPELL, "-lkspell")
+   AC_SUBST(LIB_KPARTS, "-lkparts")
+   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
+else
+   AC_SUBST(LIB_KDECORE, "-lkdecore -lXext $(LIB_QT)")
+   AC_SUBST(LIB_KDEUI, "-lkdeui $(LIB_KDECORE)")
+   AC_SUBST(LIB_KFM, "-lkfm $(LIB_KDECORE)")
+   AC_SUBST(LIB_KFILE, "-lkfile $(LIB_KFM) $(LIB_KDEUI)")
+   AC_SUBST(LIB_KAB, "-lkab $(LIB_KIMGIO) $(LIB_KDECORE)")
+fi
+])
+
+AC_DEFUN([AC_PATH_KDE],
+[
+  AC_BASE_PATH_KDE
+  AC_ARG_ENABLE(path-check,AC_HELP_STRING([--disable-path-check],[don't try to find out, where to install]),
+  [
+  if test "$enableval" = "no";
+    then ac_use_path_checking="default"
+    else ac_use_path_checking=""
+  fi
+  ],
+  [
+  if test "$kde_qtver" = 1;
+    then ac_use_path_checking=""
+    else ac_use_path_checking="default"
+  fi
+  ]
+  )
+
+  AC_CREATE_KFSSTND($ac_use_path_checking)
+
+  AC_SUBST_KFSSTND
+  KDE_CREATE_LIBS_ALIASES
+])
+
+dnl KDE_CHECK_FUNC_EXT(<func>, [headers], [sample-use], [C prototype], [autoheader define], [call if found])
+AC_DEFUN([KDE_CHECK_FUNC_EXT],
+[
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(kde_cv_func_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+save_CXXFLAGS="$CXXFLAGS"
+kde_safe_LIBS="$LIBS"
+LIBS="$LIBS $X_EXTRA_LIBS"
+if test "$GXX" = "yes"; then
+CXXFLAGS="$CXXFLAGS -pedantic-errors"
+fi
+AC_TRY_COMPILE([
+$2
+],
+[
+$3
+],
+kde_cv_func_$1=yes,
+kde_cv_func_$1=no)
+CXXFLAGS="$save_CXXFLAGS"
+LIBS="$kde_safe_LIBS"
+AC_LANG_RESTORE
+])
+
+AC_MSG_RESULT($kde_cv_func_$1)
+
+AC_MSG_CHECKING([if $1 needs custom prototype])
+AC_CACHE_VAL(kde_cv_proto_$1,
+[
+if test "x$kde_cv_func_$1" = xyes; then
+  kde_cv_proto_$1=no
+else
+  case "$1" in
+	setenv|unsetenv|usleep|random|srandom|seteuid|mkstemps|mkstemp|revoke|vsnprintf|strlcpy|strlcat)
+		kde_cv_proto_$1="yes - in libkdefakes"
+		;;
+	*)
+		kde_cv_proto_$1=unknown
+		;;
+  esac
+fi
+
+if test "x$kde_cv_proto_$1" = xunknown; then
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+  kde_safe_libs=$LIBS
+  LIBS="$LIBS $X_EXTRA_LIBS"
+  AC_TRY_LINK([
+$2
+
+extern "C" $4;
+],
+[
+$3
+],
+[ kde_cv_func_$1=yes
+  kde_cv_proto_$1=yes ],
+  [kde_cv_proto_$1="$1 unavailable"]
+)
+LIBS=$kde_safe_libs
+AC_LANG_RESTORE
+fi
+])
+AC_MSG_RESULT($kde_cv_proto_$1)
+
+if test "x$kde_cv_func_$1" = xyes; then
+  AC_DEFINE(HAVE_$5, 1, [Define if you have $1])
+  $6
+fi
+if test "x$kde_cv_proto_$1" = xno; then
+  AC_DEFINE(HAVE_$5_PROTO, 1,
+  [Define if you have the $1 prototype])
+fi
+
+AH_VERBATIM([_HAVE_$5_PROTO],
+[
+#if !defined(HAVE_$5_PROTO)
+#ifdef __cplusplus
+extern "C" {
+#endif
+$4;
+#ifdef __cplusplus
+}
+#endif
+#endif
+])
+])
+
+AC_DEFUN([AC_CHECK_SETENV],
+[
+	KDE_CHECK_FUNC_EXT(setenv, [
+#include <stdlib.h>
+], 
+		[setenv("VAR", "VALUE", 1);],
+	        [int setenv (const char *, const char *, int)],
+		[SETENV])
+])
+
+AC_DEFUN([AC_CHECK_UNSETENV],
+[
+	KDE_CHECK_FUNC_EXT(unsetenv, [
+#include <stdlib.h>
+], 
+		[unsetenv("VAR");],
+	        [void unsetenv (const char *)],
+		[UNSETENV])
+])
+
+AC_DEFUN([AC_CHECK_GETDOMAINNAME],
+[
+	KDE_CHECK_FUNC_EXT(getdomainname, [
+#include <stdlib.h>
+#include <unistd.h>
+#include <netdb.h>
+], 
+		[
+char buffer[200];
+getdomainname(buffer, 200);
+], 	
+	        [#include <sys/types.h>
+		int getdomainname (char *, size_t)],
+		[GETDOMAINNAME])
+])
+
+AC_DEFUN([AC_CHECK_GETHOSTNAME],
+[
+	KDE_CHECK_FUNC_EXT(gethostname, [
+#include <stdlib.h>
+#include <unistd.h>
+], 
+		[
+char buffer[200];
+gethostname(buffer, 200);
+], 	
+	        [int gethostname (char *, unsigned int)],
+		[GETHOSTNAME])
+])
+
+AC_DEFUN([AC_CHECK_USLEEP],
+[
+	KDE_CHECK_FUNC_EXT(usleep, [
+#include <unistd.h>
+], 
+		[
+usleep(200);
+], 	
+	        [int usleep (unsigned int)],
+		[USLEEP])
+])
+
+
+AC_DEFUN([AC_CHECK_RANDOM],
+[
+	KDE_CHECK_FUNC_EXT(random, [
+#include <stdlib.h>
+], 
+		[
+random();
+], 	
+	        [long int random(void)],
+		[RANDOM])
+
+	KDE_CHECK_FUNC_EXT(srandom, [
+#include <stdlib.h>
+], 
+		[
+srandom(27);
+], 	
+	        [void srandom(unsigned int)],
+		[SRANDOM])
+
+])
+
+AC_DEFUN([AC_CHECK_INITGROUPS],
+[
+	KDE_CHECK_FUNC_EXT(initgroups, [
+#include <sys/types.h>
+#include <unistd.h>
+#include <grp.h>
+],
+	[
+char buffer[200];
+initgroups(buffer, 27);
+],
+	[int initgroups(const char *, gid_t)],
+	[INITGROUPS])
+])
+
+AC_DEFUN([AC_CHECK_MKSTEMPS],
+[
+	KDE_CHECK_FUNC_EXT(mkstemps, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+	[
+mkstemps("/tmp/aaaXXXXXX", 6);
+],
+	[int mkstemps(char *, int)],
+	[MKSTEMPS])
+])
+
+AC_DEFUN([AC_CHECK_MKSTEMP],
+[
+	KDE_CHECK_FUNC_EXT(mkstemp, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+	[
+mkstemp("/tmp/aaaXXXXXX");
+],
+	[int mkstemp(char *)],
+	[MKSTEMP])
+])
+
+AC_DEFUN([AC_CHECK_MKDTEMP],
+[
+	KDE_CHECK_FUNC_EXT(mkdtemp, [
+#include <stdlib.h>
+#include <unistd.h>
+],
+	[
+mkdtemp("/tmp/aaaXXXXXX");
+],
+	[char *mkdtemp(char *)],
+	[MKDTEMP])
+])
+
+
+AC_DEFUN([AC_CHECK_RES_INIT],
+[
+  AC_MSG_CHECKING([if res_init needs -lresolv])
+  kde_libs_safe="$LIBS"
+  LIBS="$LIBS $X_EXTRA_LIBS -lresolv"
+  AC_TRY_LINK(
+    [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+    ],
+    [
+      res_init(); 
+    ],
+    [
+      LIBRESOLV="-lresolv"
+      AC_MSG_RESULT(yes)
+      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
+    ],
+    [ AC_MSG_RESULT(no) ]
+  )
+  LIBS=$kde_libs_safe
+  AC_SUBST(LIBRESOLV)
+
+  KDE_CHECK_FUNC_EXT(res_init,
+    [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+    ],
+    [res_init()],
+    [int res_init(void)],
+    [RES_INIT])
+])
+
+AC_DEFUN([AC_CHECK_STRLCPY],
+[
+	KDE_CHECK_FUNC_EXT(strlcpy, [
+#include <string.h>
+],
+[ char buf[20];
+  strlcpy(buf, "KDE function test", sizeof(buf));
+],
+ 	[unsigned long strlcpy(char*, const char*, unsigned long)],
+	[STRLCPY])
+])
+
+AC_DEFUN([AC_CHECK_STRLCAT],
+[
+	KDE_CHECK_FUNC_EXT(strlcat, [
+#include <string.h>
+],
+[ char buf[20];
+  buf[0]='\0';
+  strlcat(buf, "KDE function test", sizeof(buf));
+],
+ 	[unsigned long strlcat(char*, const char*, unsigned long)],
+	[STRLCAT])
+])
+
+AC_DEFUN([AC_CHECK_RES_QUERY],
+[
+	KDE_CHECK_FUNC_EXT(res_query, [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#include <netdb.h>
+],
+[
+res_query(NULL, 0, 0, NULL, 0);
+],
+	[int res_query(const char *, int, int, unsigned char *, int)],
+	[RES_QUERY])
+])
+
+AC_DEFUN([AC_CHECK_DN_SKIPNAME],
+[
+	KDE_CHECK_FUNC_EXT(dn_skipname, [
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+],
+[
+dn_skipname (NULL, NULL);
+],
+	[int dn_skipname (unsigned char *, unsigned char *)],
+	[DN_SKIPNAME])
+])
+
+
+AC_DEFUN([AC_FIND_GIF],
+   [AC_MSG_CHECKING([for giflib])
+AC_CACHE_VAL(ac_cv_lib_gif,
+[ac_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$all_libraries -lgif -lX11 $LIBSOCKET"
+else
+LIBS="$all_libraries -lgif"
+fi
+AC_TRY_LINK(dnl
+[
+#ifdef __cplusplus
+extern "C" {
+#endif
+int GifLastError(void);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+],
+            [return GifLastError();],
+            eval "ac_cv_lib_gif=yes",
+            eval "ac_cv_lib_gif=no")
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo $ac_cv_lib_gif`\" = yes"; then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE_UNQUOTED(HAVE_LIBGIF, 1, [Define if you have libgif])
+else
+  AC_MSG_ERROR(You need giflib30. Please install the kdesupport package)
+fi
+])
+
+AC_DEFUN([KDE_FIND_JPEG_HELPER],
+[
+AC_MSG_CHECKING([for libjpeg$2])
+AC_CACHE_VAL(ac_cv_lib_jpeg_$1,
+[
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -ljpeg$2 -lm"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[/* Override any gcc2 internal prototype to avoid an error.  */
+struct jpeg_decompress_struct;
+typedef struct jpeg_decompress_struct * j_decompress_ptr;
+typedef int size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
+                                    int version, size_t structsize);
+#ifdef __cplusplus
+}
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+],
+            [jpeg_CreateDecompress(0L, 0, 0);],
+            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
+            eval "ac_cv_lib_jpeg_$1=no")
+LIBS="$ac_save_LIBS"
+CFLAGS="$ac_save_CFLAGS"
+])
+
+if eval "test ! \"`echo $ac_cv_lib_jpeg_$1`\" = no"; then
+  LIBJPEG="$ac_cv_lib_jpeg_$1"
+  AC_MSG_RESULT($ac_cv_lib_jpeg_$1)
+else
+  AC_MSG_RESULT(no)
+  $3
+fi
+
+])
+
+AC_DEFUN([AC_FIND_JPEG],
+[
+dnl first look for libraries
+KDE_FIND_JPEG_HELPER(6b, 6b,
+   KDE_FIND_JPEG_HELPER(normal, [],
+    [
+       LIBJPEG=
+    ]
+   )
+)
+
+dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
+dnl requires system dependent includes loaded before it)
+jpeg_incdirs="$includedir /usr/include /usr/local/include $kde_extra_includes"
+AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
+test "x$jpeg_incdir" = xNO && jpeg_incdir=
+
+dnl if headers _and_ libraries are missing, this is no error, and we
+dnl continue with a warning (the user will get no jpeg support in khtml)
+dnl if only one is missing, it means a configuration error, but we still
+dnl only warn
+if test -n "$jpeg_incdir" && test -n "$LIBJPEG" ; then
+  AC_DEFINE_UNQUOTED(HAVE_LIBJPEG, 1, [Define if you have libjpeg])
+else
+  if test -n "$jpeg_incdir" || test -n "$LIBJPEG" ; then
+    AC_MSG_WARN([
+There is an installation error in jpeg support. You seem to have only one
+of either the headers _or_ the libraries installed. You may need to either
+provide correct --with-extra-... options, or the development package of
+libjpeg6b. You can get a source package of libjpeg from http://www.ijg.org/
+Disabling JPEG support.
+])
+  else
+    AC_MSG_WARN([libjpeg not found. disable JPEG support.])
+  fi
+  jpeg_incdir=
+  LIBJPEG=
+fi
+
+AC_SUBST(LIBJPEG)
+AH_VERBATIM(_AC_CHECK_JPEG,
+[/*
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
+ * headers and I'm too lazy to write a configure test as long as only
+ * unixware is related
+ */
+#ifdef _UNIXWARE
+#define HAVE_BOOLEAN
+#endif
+])
+])
+
+AC_DEFUN([KDE_CHECK_QT_JPEG],
+[
+if test -n "$LIBJPEG"; then
+AC_MSG_CHECKING([if Qt needs $LIBJPEG])
+AC_CACHE_VAL(kde_cv_qt_jpeg,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS $LIBQT"
+LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
+ac_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(
+[#include <qapplication.h>],
+            [
+            int argc;
+            char** argv;
+            QApplication app(argc, argv);],
+            eval "kde_cv_qt_jpeg=no",
+            eval "kde_cv_qt_jpeg=yes")
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+fi
+])
+
+if eval "test ! \"`echo $kde_cv_qt_jpeg`\" = no"; then
+  AC_MSG_RESULT(yes)
+  LIBJPEG_QT='$(LIBJPEG)'
+else
+  AC_MSG_RESULT(no)
+  LIBJPEG_QT=
+fi
+
+])
+
+AC_DEFUN([AC_FIND_ZLIB],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for libz])
+AC_CACHE_VAL(ac_cv_lib_z,
+[
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#include<zlib.h>
+],
+[
+  char buf[42];
+  gzFile f = (gzFile) 0;
+  /* this would segfault.. but we only link, don't run */
+  (void) gzgets(f, buf, sizeof(buf));
+
+  return (zlibVersion() == ZLIB_VERSION); 
+],
+            eval "ac_cv_lib_z='-lz'",
+            eval "ac_cv_lib_z=no")
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if test ! "$ac_cv_lib_z" = no; then
+  AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
+  LIBZ="$ac_cv_lib_z"
+  AC_MSG_RESULT($ac_cv_lib_z)
+else
+  AC_MSG_ERROR(not found. 
+          Possibly configure picks up an outdated version
+          installed by XFree86. Remove it from your system.
+
+          Check your installation and look into config.log)
+  LIBZ=""
+fi
+AC_SUBST(LIBZ)
+])
+
+AC_DEFUN([KDE_TRY_TIFFLIB],
+[
+AC_MSG_CHECKING([for libtiff $1])
+
+AC_CACHE_VAL(kde_cv_libtiff_$1,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lX11 $LIBSOCKET -lm"
+else
+LIBS="$all_libraries $USER_LDFLAGS -l$1 $LIBJPEG $LIBZ -lm"
+fi
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+[
+#include<tiffio.h>
+],
+    [return (TIFFOpen( "", "r") == 0); ],
+[
+    kde_cv_libtiff_$1="-l$1 $LIBJPEG $LIBZ"
+], [
+    kde_cv_libtiff_$1=no
+])
+
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])
+
+if test "$kde_cv_libtiff_$1" = "no"; then
+    AC_MSG_RESULT(no)
+    LIBTIFF=""
+    $3
+else
+    LIBTIFF="$kde_cv_libtiff_$1"
+    AC_MSG_RESULT(yes)
+    AC_DEFINE_UNQUOTED(HAVE_LIBTIFF, 1, [Define if you have libtiff])
+    $2
+fi
+
+])
+
+AC_DEFUN([AC_FIND_TIFF],
+[
+AC_REQUIRE([K_PATH_X])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+KDE_TRY_TIFFLIB(tiff, [],
+   KDE_TRY_TIFFLIB(tiff34))
+
+AC_SUBST(LIBTIFF)
+])
+
+
+AC_DEFUN([AC_FIND_PNG],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_ZLIB])
+AC_MSG_CHECKING([for libpng])
+AC_CACHE_VAL(ac_cv_lib_png,
+[
+kde_save_LIBS="$LIBS"
+if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm -lX11 $LIBSOCKET"
+else
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -lpng $LIBZ -lm"
+fi
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+    [
+    #include<png.h>
+    ],
+    [
+    png_structp png_ptr = png_create_read_struct(  /* image ptr */
+		PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+    return( png_ptr != 0 );
+    ],
+    eval "ac_cv_lib_png='-lpng $LIBZ -lm'",
+    eval "ac_cv_lib_png=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_lib_png`\" = no"; then
+  AC_DEFINE_UNQUOTED(HAVE_LIBPNG, 1, [Define if you have libpng])
+  LIBPNG="$ac_cv_lib_png"
+  AC_SUBST(LIBPNG)
+  AC_MSG_RESULT($ac_cv_lib_png)
+else
+  AC_MSG_RESULT(no)
+  LIBPNG=""
+  AC_SUBST(LIBPNG)
+fi
+])
+
+
+AC_DEFUN([AC_FIND_JASPER],
+[
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_REQUIRE([AC_FIND_JPEG])
+AC_MSG_CHECKING([for jasper])
+AC_CACHE_VAL(ac_cv_jasper,
+[
+kde_save_LIBS="$LIBS"
+LIBS="$LIBS $all_libraries $USER_LDFLAGS -ljasper $LIBJPEG -lm"
+kde_save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
+
+AC_TRY_LINK(dnl
+    [
+    #include<jasper/jasper.h>
+    ],
+    [
+    return( jas_init() );
+    ],
+    eval "ac_cv_jasper='-ljasper $LIBJPEG -lm'",
+    eval "ac_cv_jasper=no"
+)
+LIBS="$kde_save_LIBS"
+CFLAGS="$kde_save_CFLAGS"
+])dnl
+if eval "test ! \"`echo $ac_cv_jasper`\" = no"; then
+  AC_DEFINE_UNQUOTED(HAVE_JASPER, 1, [Define if you have jasper])
+  LIB_JASPER="$ac_cv_jasper"
+  AC_MSG_RESULT($ac_cv_jasper)
+else
+  AC_MSG_RESULT(no)
+  LIB_JASPER=""
+fi
+AC_SUBST(LIB_JASPER)
+])
+
+AC_DEFUN([AC_CHECK_BOOL],
+[
+  AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool])
+])
+
+AC_DEFUN([AC_CHECK_GNU_EXTENSIONS],
+[
+AC_MSG_CHECKING(if you need GNU extensions)
+AC_CACHE_VAL(ac_cv_gnu_extensions,
+[
+cat > conftest.c << EOF
+#include <features.h>
+
+#ifdef __GNU_LIBRARY__
+yes
+#endif
+EOF
+
+if (eval "$ac_cpp conftest.c") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_gnu_extensions=yes
+else
+  ac_cv_gnu_extensions=no
+fi
+])
+
+AC_MSG_RESULT($ac_cv_gnu_extensions)
+if test "$ac_cv_gnu_extensions" = "yes"; then
+  AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_COMPILER_FLAG],
+[
+AC_MSG_CHECKING([whether $CXX supports -$1])
+kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
+AC_CACHE_VAL(kde_cv_prog_cxx_$kde_cache,
+[
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAGS -$1"
+  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cxx_$kde_cache=yes"], [])
+  CXXFLAGS="$save_CXXFLAGS"
+  AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cxx_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
+[
+AC_MSG_CHECKING([whether $CC supports -$1])
+kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
+AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
+[
+  AC_LANG_SAVE
+  AC_LANG_C
+  save_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -$1"
+  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
+  CFLAGS="$save_CFLAGS"
+  AC_LANG_RESTORE
+])
+if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ :
+ $2
+else
+ AC_MSG_RESULT(no)
+ :
+ $3
+fi
+])
+
+
+dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
+dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
+dnl it's all white-space separated
+AC_DEFUN([AC_REMOVE_FORBIDDEN],
+[ __val=$$1
+  __forbid=" $2 "
+  if test -n "$__val"; then
+    __new=""
+    ac_save_IFS=$IFS
+    IFS=" 	"
+    for i in $__val; do
+      case "$__forbid" in
+        *" $i "*) AC_MSG_WARN([found forbidden $i in $1, removing it]) ;;
+	*) # Careful to not add spaces, where there were none, because otherwise
+	   # libtool gets confused, if we change e.g. CXX
+	   if test -z "$__new" ; then __new=$i ; else __new="$__new $i" ; fi ;;
+      esac
+    done
+    IFS=$ac_save_IFS
+    $1=$__new
+  fi
+])
+
+
+AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
+[
+  AC_MSG_CHECKING([whether $CC is blacklisted])
+
+  dnl In theory we have tu run this test against $CC and $CXX
+  dnl in C and in C++ mode, because its perfectly legal for
+  dnl the user to mix compiler versions, since C has a defined
+  dnl ABI. 
+  dnl 
+  dnl For now, we assume the user is not on crack.
+
+  AC_TRY_COMPILE([
+#ifdef __GNUC__
+#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
+choke me
+#endif
+#endif
+], ,
+  kde_bad_compiler=no, 
+  kde_bad_compiler=yes
+)
+
+  AC_MSG_RESULT($kde_bad_compiler)
+
+if test "$kde_bad_compiler" = "yes"; then
+  AC_MSG_ERROR([
+
+This particular compiler version is blacklisted because it
+is known to miscompile KDE. Please use a newer version, or
+if that is not yet available, choose an older version. 
+
+Please do not report a bug or bother us reporting this
+configure error. We know about it, and we introduced
+it by intention to avoid untraceable bugs or crashes in KDE.
+
+])
+fi
+
+])
+
+dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
+AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
+[dnl
+if test "x$kde_use_qt_emb" != "xyes"; then
+ AC_REMOVE_FORBIDDEN(CXX, [-fno-rtti -rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-fno-rtti -rpath])
+else
+ AC_REMOVE_FORBIDDEN(CXX, [-rpath])
+ AC_REMOVE_FORBIDDEN(CXXFLAGS, [-rpath])
+fi
+])
+
+AC_DEFUN([AC_CHECK_COMPILERS],
+[
+  AC_ARG_ENABLE(debug,
+	        AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
+  [
+    case $enableval in
+      yes)
+        kde_use_debug_code="yes"
+        kde_use_debug_define=no
+        ;;
+      full)
+        kde_use_debug_code="full"
+        kde_use_debug_define=no
+        ;;
+      *)
+        kde_use_debug_code="no"
+        kde_use_debug_define=yes
+        ;;
+    esac
+  ], 
+    [kde_use_debug_code="no"
+      kde_use_debug_define=no
+  ])
+
+  dnl Just for configure --help
+  AC_ARG_ENABLE(dummyoption,
+	        AC_HELP_STRING([--disable-debug],
+	  		       [disables debug output and debug symbols [default=no]]),
+		[],[])
+
+  AC_ARG_ENABLE(strict,
+		AC_HELP_STRING([--enable-strict],
+			      [compiles with strict compiler options (may not work!)]),
+   [
+    if test $enableval = "no"; then
+         kde_use_strict_options="no"
+       else
+         kde_use_strict_options="yes"
+    fi
+   ], [kde_use_strict_options="no"])
+
+  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
+   [
+    if test $enableval = "no"; then
+         kde_use_warnings="no"
+       else
+         kde_use_warnings="yes"
+    fi
+   ], [kde_use_warnings="yes"])
+
+  dnl enable warnings for debug build
+  if test "$kde_use_debug_code" != "no"; then
+    kde_use_warnings=yes
+  fi
+
+  AC_ARG_ENABLE(profile,AC_HELP_STRING([--enable-profile],[creates profiling infos [default=no]]),
+    [kde_use_profiling=$enableval],
+    [kde_use_profiling="no"]
+  )
+
+  dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
+  CFLAGS=" $CFLAGS"
+
+  AC_PROG_CC 
+
+  AC_PROG_CPP
+
+  if test "$GCC" = "yes"; then
+    if test "$kde_use_debug_code" != "no"; then
+      if test $kde_use_debug_code = "full"; then
+        CFLAGS="-g3 -fno-inline $CFLAGS"
+      else
+        CFLAGS="-g -O2 $CFLAGS"
+      fi
+    else
+      CFLAGS="-O2 $CFLAGS"
+    fi
+  fi
+
+  if test "$kde_use_debug_define" = "yes"; then
+    CFLAGS="-DNDEBUG $CFLAGS"
+  fi
+
+
+  case "$host" in
+  *-*-sysv4.2uw*) CFLAGS="-D_UNIXWARE $CFLAGS";;
+  *-*-sysv5uw7*) CFLAGS="-D_UNIXWARE7 $CFLAGS";;
+  esac
+
+  if test -z "$LDFLAGS" && test "$kde_use_debug_code" = "no" && test "$GCC" = "yes"; then
+     LDFLAGS=""
+  fi
+
+  CXXFLAGS=" $CXXFLAGS"
+
+  AC_PROG_CXX
+
+  dnl KDE_CHECK_FOR_BAD_COMPILER
+
+  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
+    if test "$kde_use_debug_code" != "no"; then
+      if test "$CXX" = "KCC"; then
+        CXXFLAGS="+K0 -Wall -pedantic -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
+      else
+        if test "$kde_use_debug_code" = "full"; then
+          CXXFLAGS="-g3 -fno-inline $CXXFLAGS"
+        else
+          CXXFLAGS="-g -O2 $CXXFLAGS"
+        fi
+      fi
+      KDE_CHECK_COMPILER_FLAG(fno-builtin,[CXXFLAGS="-fno-builtin $CXXFLAGS"])
+
+      dnl convenience compiler flags
+      KDE_CHECK_COMPILER_FLAG(Woverloaded-virtual, [WOVERLOADED_VIRTUAL="-Woverloaded-virtual"], [WOVERLOADED_VRITUAL=""])
+      AC_SUBST(WOVERLOADED_VIRTUAL)
+    else
+      if test "$CXX" = "KCC"; then
+        CXXFLAGS="+K3 $CXXFLAGS"
+      else
+        CXXFLAGS="-O2 $CXXFLAGS"
+      fi  
+    fi
+  fi
+
+  if test "$kde_use_debug_define" = "yes"; then
+    CXXFLAGS="-DNDEBUG -DNO_DEBUG $CXXFLAGS"
+  fi  
+
+  if test "$kde_use_profiling" = "yes"; then
+    KDE_CHECK_COMPILER_FLAG(pg,
+    [
+      CFLAGS="-pg $CFLAGS"
+      CXXFLAGS="-pg $CXXFLAGS"
+    ])
+  fi
+
+  if test "$kde_use_warnings" = "yes"; then
+      if test "$GCC" = "yes"; then
+        dnl ### FIXME: remove -Wno-non-virtual-dtor for KDE 4
+        CXXFLAGS="-Wall -W -Wpointer-arith -Wno-non-virtual-dtor $CXXFLAGS"
+        case $host in
+          *-*-linux-gnu)	
+            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
+            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
+            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
+            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
+          ;;
+        esac
+        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
+        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
+        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
+     fi
+  fi
+
+  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
+    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
+  fi
+
+  AC_ARG_ENABLE(pch,
+     AC_HELP_STRING([--enable-pch],
+                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
+    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
+ 
+  HAVE_GCC_VISIBILITY=0
+  AC_SUBST([HAVE_GCC_VISIBILITY])
+
+  if test "$GXX" = "yes"; then
+    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
+    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
+    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
+    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=	)
+    ENABLE_PERMISSIVE_FLAG="-fpermissive"
+
+    if test "$kde_use_pch" = "yes"; then
+        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
+        echo >conftest.h
+        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
+            kde_gcc_supports_pch=yes
+            AC_MSG_RESULT(yes)
+        else
+            kde_gcc_supports_pch=no
+            AC_MSG_RESULT(no)
+        fi
+        if test "$kde_gcc_supports_pch" = "yes"; then
+            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
+            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
+                kde_gcc_supports_pch=yes
+                AC_MSG_RESULT(yes)
+            else
+                kde_gcc_supports_pch=no
+                AC_MSG_RESULT(no)
+            fi
+        fi
+        rm -f conftest.h conftest.h.gch
+    fi
+  fi
+  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
+  if test "$CXX" = "KCC"; then
+    dnl unfortunately we currently cannot disable exception support in KCC
+    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
+    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
+    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=	)
+
+    if test "$kde_use_pch" = "yes"; then
+      dnl TODO: support --pch-dir!
+      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
+      dnl the below works (but the dir must exist), but it's
+      dnl useless for a whole package.
+      dnl The are precompiled headers for each source file, so when compiling
+      dnl from scratch, it doesn't make a difference, and they take up
+      dnl around ~5Mb _per_ sourcefile.
+      dnl KDE_CHECK_COMPILER_FLAG(-pch_dir /tmp,
+      dnl   [CXXFLAGS="$CXXFLAGS --pch_dir `pwd`/pcheaders"])
+    fi
+    dnl this flag controls inlining. by default KCC inlines in optimisation mode
+    dnl all implementations that are defined inside the class {} declaration. 
+    dnl because of templates-compatibility with broken gcc compilers, this
+    dnl can cause excessive inlining. This flag limits it to a sane level
+    KDE_CHECK_COMPILER_FLAG(-inline_keyword_space_time=6,[CXXFLAGS="$CXXFLAGS --inline_keyword_space_time=6"])
+    KDE_CHECK_COMPILER_FLAG(-inline_auto_space_time=2,[CXXFLAGS="$CXXFLAGS --inline_auto_space_time=2"])
+    KDE_CHECK_COMPILER_FLAG(-inline_implicit_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_implicit_space_time=2.0"])
+    KDE_CHECK_COMPILER_FLAG(-inline_generated_space_time=2.0,[CXXFLAGS="$CXXFLAGS --inline_generated_space_time=2.0"])
+    dnl Some source files are shared between multiple executables
+    dnl (or libraries) and some of those need template instantiations.
+    dnl In that case KCC needs to compile those sources with
+    dnl --one_instantiation_per_object.  To make it easy for us we compile
+    dnl _all_ objects with that flag (--one_per is a shorthand).
+    KDE_CHECK_COMPILER_FLAG(-one_per, [CXXFLAGS="$CXXFLAGS --one_per"])
+  fi
+  AC_SUBST(USE_EXCEPTIONS)
+  dnl obsolete macro - provided to keep things going
+  USE_RTTI=
+  AC_SUBST(USE_RTTI)
+
+  case "$host" in
+      *-*-irix*)  test "$GXX" = yes && CXXFLAGS="-D_LANGUAGE_C_PLUS_PLUS -D__LANGUAGE_C_PLUS_PLUS $CXXFLAGS" ;;
+      *-*-sysv4.2uw*) CXXFLAGS="-D_UNIXWARE $CXXFLAGS";;
+      *-*-sysv5uw7*) CXXFLAGS="-D_UNIXWARE7 $CXXFLAGS";;
+      *-*-solaris*) 
+        if test "$GXX" = yes; then
+          libstdcpp=`$CXX -print-file-name=libstdc++.so`
+          if test ! -f $libstdcpp; then
+             AC_MSG_ERROR([You've compiled gcc without --enable-shared. This doesn't work with KDE. Please recompile gcc with --enable-shared to receive a libstdc++.so])
+          fi
+        fi
+        ;;
+  esac
+
+  AC_VALIDIFY_CXXFLAGS
+
+  AC_PROG_CXXCPP
+
+  if test "$GCC" = yes; then
+     NOOPT_CFLAGS=-O0
+  fi
+  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
+
+  AC_ARG_ENABLE(coverage,
+    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
+      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
+        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+        ac_coverage_linker="-lgcc"
+      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
+        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
+        ac_coverage_linker=""
+      else
+        AC_MSG_ERROR([coverage with your compiler is not supported])
+      fi
+      CFLAGS="$CFLAGS $ac_coverage_compiler"
+      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
+      LDFLAGS="$LDFLAGS $ac_coverage_linker"
+    ])
+
+  AC_SUBST(NOOPT_CXXFLAGS)
+  AC_SUBST(NOOPT_CFLAGS)
+  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
+
+  KDE_CHECK_NEW_LDFLAGS
+  KDE_CHECK_FINAL
+  KDE_CHECK_CLOSURE
+  KDE_CHECK_NMCHECK
+
+  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
+])
+
+AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
+  [
+    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
+      [
+        AC_LANG_SAVE
+        AC_LANG_CPLUSPLUS
+
+        safe_CXXFLAGS=$CXXFLAGS
+        safe_LDFLAGS=$LDFLAGS
+        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
+        LDFLAGS="$LDFLAGS -shared -fPIC"
+
+        AC_TRY_LINK(
+        [
+          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
+	  #include <string>
+          int some_function( void ) __attribute__ ((visibility("default")));
+          int some_function( void )
+          {
+	    std::string s("blafasel");
+            return 0;
+          }
+        ], [/* elvis is alive */],
+        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
+
+        CXXFLAGS=$safe_CXXFLAGS
+        LDFLAGS=$safe_LDFLAGS
+        AC_LANG_RESTORE
+      ]
+    )
+
+    if test x$kde_cv_val_gcc_visibility_bug = xno; then
+      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+    fi
+  ]
+)
+
+AC_DEFUN([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY],
+[
+  if test "$GXX" = "yes"; then
+    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
+    [
+        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
+        KDE_CHECK_VISIBILITY_GCC_BUG
+
+        HAVE_GCC_VISIBILITY=1
+        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
+    ])
+  fi
+])
+
+AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
+[
+  AC_REQUIRE([KDE_CHECK_AND_ADD_HIDDEN_VISIBILITY])
+])
+
+AC_DEFUN([KDE_ADD_DEPENDENCIES],
+[
+   [A]M_DEPENDENCIES(CC)
+   [A]M_DEPENDENCIES(CXX)
+])
+
+dnl just a wrapper to clean up configure.in
+AC_DEFUN([KDE_PROG_LIBTOOL],
+[
+AC_REQUIRE([AC_CHECK_COMPILERS])
+AC_REQUIRE([AC_ENABLE_SHARED])
+AC_REQUIRE([AC_ENABLE_STATIC])
+
+AC_REQUIRE([AC_LIBTOOL_DLOPEN])
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+AC_OBJEXT
+AC_EXEEXT
+
+AM_PROG_LIBTOOL
+AC_LIBTOOL_CXX
+
+LIBTOOL_SHELL="/bin/sh ./libtool"
+#  LIBTOOL="$LIBTOOL --silent"
+KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
+AC_SUBST(KDE_PLUGIN)
+
+# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
+KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
+AC_SUBST(KDE_CHECK_PLUGIN)
+
+# we patch configure quite some so we better keep that consistent for incremental runs 
+AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
+])
+
+AC_DEFUN([KDE_CHECK_LIB64],
+[
+    kdelibsuff="$kde_libs_suffix"
+    if test -z "$kdelibsuff"; then
+       kdelibsuff=no
+    fi
+    AC_ARG_ENABLE(libsuffix,
+        AC_HELP_STRING([--enable-libsuffix],
+            [/lib directory suffix (64,32,none[=default])]),
+            kdelibsuff=$enableval)
+    # TODO: add an auto case that compiles a little C app to check
+    # where the glibc is
+    if test "$kdelibsuff" = "no"; then
+       kdelibsuff=
+    fi
+    if test -z "$kdelibsuff"; then
+        AC_MSG_RESULT([not using lib directory suffix])
+        AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)
+    else
+        if test "$libdir" = '${exec_prefix}/lib'; then
+            libdir="$libdir${kdelibsuff}"
+            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
+        fi
+        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
+        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
+    fi
+])
+
+AC_DEFUN([KDE_CHECK_TYPES],
+[  AC_CHECK_SIZEOF(int, 4)dnl
+   AC_CHECK_SIZEOF(short)dnl
+  AC_CHECK_SIZEOF(long, 4)dnl
+  AC_CHECK_SIZEOF(char *, 4)dnl
+])dnl
+
+dnl Not used - kept for compat only?
+AC_DEFUN([KDE_DO_IT_ALL],
+[
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+AM_INIT_AUTOMAKE($1, $2)
+AM_DISABLE_LIBRARIES
+AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+AC_CHECK_COMPILERS
+KDE_PROG_LIBTOOL
+AM_KDE_WITH_NLS
+AC_PATH_KDE
+])
+
+AC_DEFUN([AC_CHECK_RPATH],
+[
+AC_MSG_CHECKING(for rpath)
+AC_ARG_ENABLE(rpath,
+      AC_HELP_STRING([--disable-rpath],[do not use the rpath feature of ld]),
+      USE_RPATH=$enableval, USE_RPATH=yes)
+
+if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
+
+  KDE_RPATH="-R \$(libdir)"
+
+  if test "$kde_libraries" != "$libdir"; then
+      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
+  fi
+
+  if test -n "$qt_libraries"; then
+    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
+  fi
+  dnl $x_libraries is set to /usr/lib in case
+  if test -n "$X_LDFLAGS"; then
+    X_RPATH="-R \$(x_libraries)"
+    KDE_RPATH="$KDE_RPATH $X_RPATH"
+  fi
+  if test -n "$KDE_EXTRA_RPATH"; then
+    KDE_RPATH="$KDE_RPATH \$(KDE_EXTRA_RPATH)"
+  fi
+fi
+AC_SUBST(KDE_EXTRA_RPATH)
+AC_SUBST(KDE_RPATH)
+AC_SUBST(X_RPATH)
+AC_MSG_RESULT($USE_RPATH)
+])
+
+dnl Check for the type of the third argument of getsockname
+AC_DEFUN([AC_CHECK_SOCKLEN_T],
+[
+   AC_MSG_CHECKING(for socklen_t)
+   AC_CACHE_VAL(kde_cv_socklen_t,
+   [
+      AC_LANG_PUSH(C++)
+      kde_cv_socklen_t=no
+      AC_TRY_COMPILE([
+         #include <sys/types.h>
+         #include <sys/socket.h>
+      ],
+      [
+         socklen_t len;
+         getpeername(0,0,&len);
+      ],
+      [
+         kde_cv_socklen_t=yes
+         kde_cv_socklen_t_equiv=socklen_t
+      ])
+      AC_LANG_POP(C++)
+   ])
+   AC_MSG_RESULT($kde_cv_socklen_t)
+   if test $kde_cv_socklen_t = no; then
+      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
+      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
+      [
+         kde_cv_socklen_t_equiv=int
+         AC_LANG_PUSH(C++)
+         for t in int size_t unsigned long "unsigned long"; do
+            AC_TRY_COMPILE([
+               #include <sys/types.h>
+               #include <sys/socket.h>
+            ],
+            [
+               $t len;
+               getpeername(0,0,&len);
+            ],
+            [
+               kde_cv_socklen_t_equiv="$t"
+               break
+            ])
+         done
+         AC_LANG_POP(C++)
+      ])
+      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
+   fi
+   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
+                     [type to use in place of socklen_t if not defined])
+   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
+                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
+])
+
+dnl This is a merge of some macros out of the gettext aclocal.m4
+dnl since we don't need anything, I took the things we need
+dnl the copyright for them is:
+dnl >
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+dnl >
+dnl for this file it is relicensed under LGPL
+
+AC_DEFUN([AM_KDE_WITH_NLS],
+  [
+    dnl If we use NLS figure out what method
+
+    AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
+        [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
+    AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+     if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
+        AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
+        GMSGFMT=":"
+      fi
+      MSGFMT=$GMSGFMT
+      AC_SUBST(GMSGFMT)
+      AC_SUBST(MSGFMT)
+
+      AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
+	[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+
+      dnl Test whether we really found GNU xgettext.
+      if test "$XGETTEXT" != ":"; then
+	dnl If it is no GNU xgettext we define it as : so that the
+	dnl Makefiles still can work.
+	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+	  : ;
+	else
+	  AC_MSG_RESULT(
+	    [found xgettext programs is not GNU xgettext; ignore it])
+	  XGETTEXT=":"
+	fi
+      fi
+     AC_SUBST(XGETTEXT)
+
+  ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# serial 1
+# Stephan Kulow: I appended a _KDE against name conflicts
+
+dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST_KDE],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+
+AC_DEFUN([AM_LC_MESSAGES],
+  [if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your locale.h file contains LC_MESSAGES])
+    fi
+  fi])
+
+dnl From Jim Meyering.
+dnl FIXME: migrate into libit.
+
+AC_DEFUN([AM_FUNC_OBSTACK],
+[AC_CACHE_CHECK([for obstacks], am_cv_func_obstack,
+ [AC_TRY_LINK([#include "obstack.h"],
+	      [struct obstack *mem;obstack_free(mem,(char *) 0)],
+	      am_cv_func_obstack=yes,
+	      am_cv_func_obstack=no)])
+ if test $am_cv_func_obstack = yes; then
+   AC_DEFINE(HAVE_OBSTACK)
+ else
+   LIBOBJS="$LIBOBJS obstack.o"
+ fi
+])
+
+dnl From Jim Meyering.  Use this if you use the GNU error.[ch].
+dnl FIXME: Migrate into libit
+
+AC_DEFUN([AM_FUNC_ERROR_AT_LINE],
+[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line,
+ [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");],
+              am_cv_lib_error_at_line=yes,
+	      am_cv_lib_error_at_line=no)])
+ if test $am_cv_lib_error_at_line = no; then
+   LIBOBJS="$LIBOBJS error.o"
+ fi
+ AC_SUBST(LIBOBJS)dnl
+])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+# Stephan Kulow: I put a KDE in it to avoid name conflicts
+
+AC_DEFUN([AM_KDE_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_RANLIB])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   AC_REQUIRE([AC_TYPE_OFF_T])dnl
+   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+   AC_REQUIRE([AC_FUNC_MMAP])dnl
+   AC_REQUIRE([AM_KDE_WITH_NLS])dnl
+   AC_CHECK_HEADERS([limits.h locale.h nl_types.h string.h values.h alloca.h])
+   AC_CHECK_FUNCS([getcwd munmap putenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next])
+
+   AC_MSG_CHECKING(for stpcpy)
+   AC_CACHE_VAL(kde_cv_func_stpcpy,
+   [
+   kde_safe_cxxflags=$CXXFLAGS
+   CXXFLAGS="-Werror"
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   AC_TRY_COMPILE([
+   #include <string.h>
+   ],
+   [
+   char buffer[200];
+   stpcpy(buffer, buffer);
+   ],
+   kde_cv_func_stpcpy=yes,
+   kde_cv_func_stpcpy=no)
+   AC_LANG_RESTORE
+   CXXFLAGS=$kde_safe_cxxflags
+   ])
+   AC_MSG_RESULT($kde_cv_func_stpcpy)
+   if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
+     AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
+   fi
+
+   AM_LC_MESSAGES
+
+   if test "x$CATOBJEXT" != "x"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for lang in ${LINGUAS=$ALL_LINGUAS}; do
+         case "$ALL_LINGUAS" in
+          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+         esac
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+  ])
+
+AC_DEFUN([AC_HAVE_XPM],
+ [AC_REQUIRE_CPP()dnl
+  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$XPM_LDFLAGS" && XPM_LDFLAGS=
+ test -z "$XPM_INCLUDE" && XPM_INCLUDE=
+
+ AC_ARG_WITH(xpm,AC_HELP_STRING([--without-xpm],[disable color pixmap XPM tests]),
+	xpm_test=$withval, xpm_test="yes")
+ if test "x$xpm_test" = xno; then
+   ac_cv_have_xpm=no
+ else
+   AC_MSG_CHECKING(for XPM)
+   AC_CACHE_VAL(ac_cv_have_xpm,
+   [
+    ac_save_ldflags="$LDFLAGS"
+    ac_save_cflags="$CFLAGS"
+    if test "x$kde_use_qt_emb" != "xyes" && test "x$kde_use_qt_mac" != "xyes"; then
+      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm -lX11 -lXext $LIBZ $LIBSOCKET"
+    else
+      LDFLAGS="$LDFLAGS $X_LDFLAGS $USER_LDFLAGS $LDFLAGS $XPM_LDFLAGS $all_libraries -lXpm $LIBZ $LIBSOCKET"
+    fi
+    CFLAGS="$CFLAGS $X_INCLUDES $USER_INCLUDES"
+    test -n "$XPM_INCLUDE" && CFLAGS="-I$XPM_INCLUDE $CFLAGS"
+    AC_TRY_LINK([#include <X11/xpm.h>],[],
+	ac_cv_have_xpm="yes",ac_cv_have_xpm="no")
+    LDFLAGS="$ac_save_ldflags"
+    CFLAGS="$ac_save_cflags"
+   ])dnl
+
+  if test "$ac_cv_have_xpm" = no; then
+    AC_MSG_RESULT(no)
+    XPM_LDFLAGS=""
+    XPMINC=""
+    $2
+  else
+    AC_DEFINE(HAVE_XPM, 1, [Define if you have XPM support])
+    if test "$XPM_LDFLAGS" = ""; then
+       XPMLIB='-lXpm $(LIB_X11)'
+    else
+       XPMLIB="-L$XPM_LDFLAGS -lXpm "'$(LIB_X11)'
+    fi
+    if test "$XPM_INCLUDE" = ""; then
+       XPMINC=""
+    else
+       XPMINC="-I$XPM_INCLUDE"
+    fi
+    AC_MSG_RESULT(yes)
+    $1
+  fi
+ fi
+ AC_SUBST(XPMINC)
+ AC_SUBST(XPMLIB)
+])
+
+AC_DEFUN([AC_HAVE_DPMS],
+ [AC_REQUIRE_CPP()dnl
+  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$DPMS_LDFLAGS" && DPMS_LDFLAGS=
+ test -z "$DPMS_INCLUDE" && DPMS_INCLUDE=
+ DPMS_LIB=
+
+ AC_ARG_WITH(dpms,AC_HELP_STRING([--without-dpms],[disable DPMS power saving]),
+	dpms_test=$withval, dpms_test="yes")
+ if test "x$dpms_test" = xno; then
+   ac_cv_have_dpms=no
+ else
+   AC_MSG_CHECKING(for DPMS)
+   dnl Note: ac_cv_have_dpms can be no, yes, or -lXdpms.
+   dnl 'yes' means DPMS_LIB="", '-lXdpms' means DPMS_LIB="-lXdpms".
+   AC_CACHE_VAL(ac_cv_have_dpms,
+   [
+    if test "x$kde_use_qt_emb" = "xyes" || test "x$kde_use_qt_mac" = "xyes"; then
+      AC_MSG_RESULT(no)
+      ac_cv_have_dpms="no"
+    else
+      ac_save_ldflags="$LDFLAGS"
+      ac_save_cflags="$CFLAGS"
+      ac_save_libs="$LIBS"
+      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+      CFLAGS="$CFLAGS $X_INCLUDES"
+      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+      AC_TRY_LINK([
+	  #include <X11/Xproto.h>
+	  #include <X11/X.h>
+	  #include <X11/Xlib.h>
+	  #include <X11/extensions/dpms.h>
+	  int foo_test_dpms()
+	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+	  ac_cv_have_dpms="yes", [
+              LDFLAGS="$ac_save_ldflags"
+              CFLAGS="$ac_save_cflags"
+              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
+              LIBS="$LIBS -lXdpms"
+              CFLAGS="$CFLAGS $X_INCLUDES"
+              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+              AC_TRY_LINK([
+	          #include <X11/Xproto.h>
+        	  #include <X11/X.h>
+        	  #include <X11/Xlib.h>
+        	  #include <X11/extensions/dpms.h>
+        	  int foo_test_dpms()
+        	  { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
+        	  [
+                  ac_cv_have_dpms="-lXdpms"
+                  ],ac_cv_have_dpms="no")
+              ])
+      LDFLAGS="$ac_save_ldflags"
+      CFLAGS="$ac_save_cflags"
+      LIBS="$ac_save_libs"
+    fi
+   ])dnl
+
+  if test "$ac_cv_have_dpms" = no; then
+    AC_MSG_RESULT(no)
+    DPMS_LDFLAGS=""
+    DPMSINC=""
+    $2
+  else
+    AC_DEFINE(HAVE_DPMS, 1, [Define if you have DPMS support])
+    if test "$ac_cv_have_dpms" = "-lXdpms"; then
+       DPMS_LIB="-lXdpms"
+    fi
+    if test "$DPMS_LDFLAGS" = ""; then
+       DPMSLIB="$DPMS_LIB "'$(LIB_X11)'
+    else
+       DPMSLIB="$DPMS_LDFLAGS $DPMS_LIB "'$(LIB_X11)'
+    fi
+    if test "$DPMS_INCLUDE" = ""; then
+       DPMSINC=""
+    else
+       DPMSINC="-I$DPMS_INCLUDE"
+    fi
+    AC_MSG_RESULT(yes)
+    $1
+  fi
+ fi
+ ac_save_cflags="$CFLAGS"
+ CFLAGS="$CFLAGS $X_INCLUDES"
+ test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
+ AH_TEMPLATE(HAVE_DPMSCAPABLE_PROTO,
+   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
+ AC_CHECK_DECL(DPMSCapable,
+   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
+   [#include <X11/extensions/dpms.h>])
+ AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
+   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
+ AC_CHECK_DECL(DPMSInfo,
+   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
+   [#include <X11/extensions/dpms.h>])
+ CFLAGS="$ac_save_cflags"
+ AC_SUBST(DPMSINC)
+ AC_SUBST(DPMSLIB)
+])
+
+AC_DEFUN([AC_HAVE_GL],
+ [AC_REQUIRE_CPP()dnl
+  AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+
+ test -z "$GL_LDFLAGS" && GL_LDFLAGS=
+ test -z "$GL_INCLUDE" && GL_INCLUDE=
+
+ AC_ARG_WITH(gl,AC_HELP_STRING([--without-gl],[disable 3D GL modes]),
+	gl_test=$withval, gl_test="yes")
+ if test "x$kde_use_qt_emb" = "xyes"; then
+   # GL and Qt Embedded is a no-go for now.
+   ac_cv_have_gl=no
+ elif test "x$gl_test" = xno; then
+   ac_cv_have_gl=no
+ else
+   AC_MSG_CHECKING(for GL)
+   AC_CACHE_VAL(ac_cv_have_gl,
+   [
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    ac_save_ldflags=$LDFLAGS
+    ac_save_cxxflags=$CXXFLAGS
+    ac_save_libs=$LIBS
+    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
+    LIBS="$LIBS -lGL -lGLU"
+    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
+    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
+    CXXFLAGS="$CFLAGS $X_INCLUDES"
+    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
+    AC_TRY_LINK([#include <GL/gl.h>
+#include <GL/glu.h>
+], [],
+	ac_cv_have_gl="yes", ac_cv_have_gl="no")
+    AC_LANG_RESTORE
+    LDFLAGS=$ac_save_ldflags
+    CXXFLAGS=$ac_save_cxxflags
+    LIBS=$ac_save_libs
+   ])dnl
+
+  if test "$ac_cv_have_gl" = "no"; then
+    AC_MSG_RESULT(no)
+    GL_LDFLAGS=""
+    GLINC=""
+    $2
+  else
+    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
+    if test "$GL_LDFLAGS" = ""; then
+       GLLIB='-lGLU -lGL $(LIB_X11)'
+    else
+       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
+    fi
+    if test "$GL_INCLUDE" = ""; then
+       GLINC=""
+    else
+       GLINC="-I$GL_INCLUDE"
+    fi
+    AC_MSG_RESULT($ac_cv_have_gl)
+    $1
+  fi
+ fi
+ AC_SUBST(GLINC)
+ AC_SUBST(GLLIB)
+])
+
+
+ dnl shadow password and PAM magic - maintained by ossi@kde.org
+
+AC_DEFUN([KDE_PAM], [
+  AC_REQUIRE([KDE_CHECK_LIBDL])
+
+  want_pam=
+  AC_ARG_WITH(pam,
+    AC_HELP_STRING([--with-pam[=ARG]],[enable support for PAM: ARG=[yes|no|service name]]),
+    [ if test "x$withval" = "xyes"; then
+        want_pam=yes
+        pam_service=kde
+      elif test "x$withval" = "xno"; then
+        want_pam=no
+      else
+        want_pam=yes
+        pam_service=$withval
+      fi
+    ], [ pam_service=kde ])
+
+  use_pam=
+  PAMLIBS=
+  if test "x$want_pam" != xno; then
+    AC_CHECK_LIB(pam, pam_start, [
+      AC_CHECK_HEADER(security/pam_appl.h,
+        [ pam_header=security/pam_appl.h ],
+        [ AC_CHECK_HEADER(pam/pam_appl.h,
+            [ pam_header=pam/pam_appl.h ],
+            [
+    AC_MSG_WARN([PAM detected, but no headers found!
+Make sure you have the necessary development packages installed.])
+            ]
+          )
+        ]
+      )
+    ], , $LIBDL)
+    if test -z "$pam_header"; then
+      if test "x$want_pam" = xyes; then
+        AC_MSG_ERROR([--with-pam was specified, but cannot compile with PAM!])
+      fi
+    else
+      AC_DEFINE(HAVE_PAM, 1, [Defines if you have PAM (Pluggable Authentication Modules)])
+      PAMLIBS="$PAM_MISC_LIB -lpam $LIBDL"
+      use_pam=yes
+
+      dnl darwin claims to be something special
+      if test "$pam_header" = "pam/pam_appl.h"; then
+        AC_DEFINE(HAVE_PAM_PAM_APPL_H, 1, [Define if your PAM headers are in pam/ instead of security/])
+      fi
+
+      dnl test whether struct pam_message is const (Linux) or not (Sun)
+      AC_MSG_CHECKING(for const pam_message)
+      AC_EGREP_HEADER([struct pam_message], $pam_header,
+        [ AC_EGREP_HEADER([const struct pam_message], $pam_header,
+                          [AC_MSG_RESULT([const: Linux-type PAM])],
+                          [AC_MSG_RESULT([nonconst: Sun-type PAM])
+                          AC_DEFINE(PAM_MESSAGE_NONCONST, 1, [Define if your PAM support takes non-const arguments (Solaris)])]
+                          )],
+        [AC_MSG_RESULT([not found - assume const, Linux-type PAM])])
+    fi
+  fi
+
+  AC_SUBST(PAMLIBS)
+])
+
+dnl DEF_PAM_SERVICE(arg name, full name, define name)
+AC_DEFUN([DEF_PAM_SERVICE], [
+  AC_ARG_WITH($1-pam,
+    AC_HELP_STRING([--with-$1-pam=[val]],[override PAM service from --with-pam for $2]),
+    [ if test "x$use_pam" = xyes; then
+        $3_PAM_SERVICE=$withval
+      else
+        AC_MSG_ERROR([Cannot use use --with-$1-pam, as no PAM was detected.
+You may want to enforce it by using --with-pam.])
+      fi
+    ], 
+    [ if test "x$use_pam" = xyes; then
+        $3_PAM_SERVICE="$pam_service"
+      fi
+    ])
+    if test -n "$$3_PAM_SERVICE"; then
+      AC_MSG_RESULT([The PAM service used by $2 will be $$3_PAM_SERVICE])
+      AC_DEFINE_UNQUOTED($3_PAM_SERVICE, "$$3_PAM_SERVICE", [The PAM service to be used by $2])
+    fi
+    AC_SUBST($3_PAM_SERVICE)
+])
+
+AC_DEFUN([KDE_SHADOWPASSWD], [
+  AC_REQUIRE([KDE_PAM])
+
+  AC_CHECK_LIB(shadow, getspent,
+    [ LIBSHADOW="-lshadow"
+      ac_use_shadow=yes
+    ],
+    [ dnl for UnixWare
+      AC_CHECK_LIB(gen, getspent, 
+        [ LIBGEN="-lgen"
+          ac_use_shadow=yes
+        ], 
+        [ AC_CHECK_FUNC(getspent, 
+            [ ac_use_shadow=yes ],
+            [ ac_use_shadow=no ])
+	])
+    ])
+  AC_SUBST(LIBSHADOW)
+  AC_SUBST(LIBGEN)
+  
+  AC_MSG_CHECKING([for shadow passwords])
+
+  AC_ARG_WITH(shadow,
+    AC_HELP_STRING([--with-shadow],[If you want shadow password support]),
+    [ if test "x$withval" != "xno"; then
+        use_shadow=yes
+      else
+        use_shadow=no
+      fi
+    ], [
+      use_shadow="$ac_use_shadow"
+    ])
+
+  if test "x$use_shadow" = xyes; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_SHADOW, 1, [Define if you use shadow passwords])
+  else
+    AC_MSG_RESULT(no)
+    LIBSHADOW=
+    LIBGEN=
+  fi
+
+  dnl finally make the relevant binaries setuid root, if we have shadow passwds.
+  dnl this still applies, if we could use it indirectly through pam.
+  if test "x$use_shadow" = xyes || 
+     ( test "x$use_pam" = xyes && test "x$ac_use_shadow" = xyes ); then
+      case $host in
+      *-*-freebsd* | *-*-netbsd* | *-*-openbsd*)
+	SETUIDFLAGS="-m 4755 -o root";;
+      *)
+	SETUIDFLAGS="-m 4755";;
+      esac
+  fi
+  AC_SUBST(SETUIDFLAGS)
+
+])
+
+AC_DEFUN([KDE_PASSWDLIBS], [
+  AC_REQUIRE([KDE_MISC_TESTS]) dnl for LIBCRYPT
+  AC_REQUIRE([KDE_PAM])
+  AC_REQUIRE([KDE_SHADOWPASSWD])
+
+  if test "x$use_pam" = "xyes"; then 
+    PASSWDLIBS="$PAMLIBS"
+  else
+    PASSWDLIBS="$LIBCRYPT $LIBSHADOW $LIBGEN"
+  fi
+
+  dnl FreeBSD uses a shadow-like setup, where /etc/passwd holds the users, but
+  dnl /etc/master.passwd holds the actual passwords.  /etc/master.passwd requires
+  dnl root to read, so kcheckpass needs to be root (even when using pam, since pam
+  dnl may need to read /etc/master.passwd).
+  case $host in
+  *-*-freebsd*)
+    SETUIDFLAGS="-m 4755 -o root"
+    ;;
+  *)
+    ;;
+  esac
+
+  AC_SUBST(PASSWDLIBS)
+])
+
+AC_DEFUN([KDE_CHECK_LIBDL],
+[
+AC_CHECK_LIB(dl, dlopen, [
+LIBDL="-ldl"
+ac_cv_have_dlfcn=yes
+])
+
+AC_CHECK_LIB(dld, shl_unload, [
+LIBDL="-ldld"
+ac_cv_have_shload=yes
+])
+
+AC_SUBST(LIBDL)
+])
+
+AC_DEFUN([KDE_CHECK_DLOPEN],
+[
+KDE_CHECK_LIBDL
+AC_CHECK_HEADERS(dlfcn.h dl.h)
+if test "$ac_cv_header_dlfcn_h" = "no"; then
+  ac_cv_have_dlfcn=no
+fi
+
+if test "$ac_cv_header_dl_h" = "no"; then
+  ac_cv_have_shload=no
+fi
+
+dnl XXX why change enable_dlopen? its already set by autoconf's AC_ARG_ENABLE
+dnl (MM)
+AC_ARG_ENABLE(dlopen,
+AC_HELP_STRING([--disable-dlopen],[link statically [default=no]]),
+enable_dlopen=$enableval,
+enable_dlopen=yes)
+
+# override the user's opinion, if we know it better ;)
+if test "$ac_cv_have_dlfcn" = "no" && test "$ac_cv_have_shload" = "no"; then
+  enable_dlopen=no
+fi
+
+if test "$ac_cv_have_dlfcn" = "yes"; then
+  AC_DEFINE_UNQUOTED(HAVE_DLFCN, 1, [Define if you have dlfcn])
+fi
+
+if test "$ac_cv_have_shload" = "yes"; then
+  AC_DEFINE_UNQUOTED(HAVE_SHLOAD, 1, [Define if you have shload])
+fi
+
+if test "$enable_dlopen" = no ; then
+  test -n "$1" && eval $1
+else
+  test -n "$2" && eval $2
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_DYNAMIC_LOADING],
+[
+KDE_CHECK_DLOPEN(libtool_enable_shared=yes, libtool_enable_static=no)
+KDE_PROG_LIBTOOL
+AC_MSG_CHECKING([dynamic loading])
+eval "`egrep '^build_libtool_libs=' libtool`"
+if test "$build_libtool_libs" = "yes" && test "$enable_dlopen" = "yes"; then
+  dynamic_loading=yes
+  AC_DEFINE_UNQUOTED(HAVE_DYNAMIC_LOADING)
+else
+  dynamic_loading=no
+fi
+AC_MSG_RESULT($dynamic_loading)
+if test "$dynamic_loading" = "yes"; then
+  $1
+else
+  $2
+fi
+])
+
+AC_DEFUN([KDE_ADD_INCLUDES],
+[
+if test -z "$1"; then
+  test_include="Pix.h"
+else
+  test_include="$1"
+fi
+
+AC_MSG_CHECKING([for libg++ ($test_include)])
+
+AC_CACHE_VAL(kde_cv_libgpp_includes,
+[
+kde_cv_libgpp_includes=no
+
+   for ac_dir in               \
+                               \
+     /usr/include/g++          \
+     /usr/include              \
+     /usr/unsupported/include  \
+     /opt/include              \
+     $extra_include            \
+     ; \
+   do
+     if test -r "$ac_dir/$test_include"; then
+       kde_cv_libgpp_includes=$ac_dir
+       break
+     fi
+   done
+])
+
+AC_MSG_RESULT($kde_cv_libgpp_includes)
+if test "$kde_cv_libgpp_includes" != "no"; then
+  all_includes="-I$kde_cv_libgpp_includes $all_includes $USER_INCLUDES"
+fi
+])
+])
+
+AC_DEFUN([KDE_CHECK_LIBPTHREAD],
+[
+  dnl This code is here specifically to handle the
+  dnl various flavors of threading library on FreeBSD
+  dnl 4-, 5-, and 6-, and the (weird) rules around it.
+  dnl There may be an environment PTHREAD_LIBS that 
+  dnl specifies what to use; otherwise, search for it.
+  dnl -pthread is special cased and unsets LIBPTHREAD
+  dnl below if found.
+  LIBPTHREAD=""
+
+  if test -n "$PTHREAD_LIBS"; then
+    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
+      LIBPTHREAD="PTHREAD"
+    else
+      PTHREAD_LIBS_save="$PTHREAD_LIBS"
+      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
+      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
+      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
+          LIBPTHREAD="$PTHREAD_LIBS_save"])
+      PTHREAD_LIBS="$PTHREAD_LIBS_save"
+    fi
+  fi
+
+  dnl Is this test really needed, in the face of the Tru64 test below?
+  if test -z "$LIBPTHREAD"; then
+    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
+  fi
+
+  dnl This is a special Tru64 check, see BR 76171 issue #18.
+  if test -z "$LIBPTHREAD" ; then
+    AC_MSG_CHECKING([for pthread_create in -lpthread])
+    kde_safe_libs=$LIBS
+    LIBS="$LIBS -lpthread"
+    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
+        AC_MSG_RESULT(yes)
+        LIBPTHREAD="-lpthread"],[
+	AC_MSG_RESULT(no)])
+    LIBS=$kde_safe_libs
+  fi
+
+  dnl Un-special-case for FreeBSD.
+  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
+    LIBPTHREAD=""
+  fi
+
+  AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_PTHREAD_OPTION],
+[
+      USE_THREADS=""
+      if test -z "$LIBPTHREAD"; then
+        KDE_CHECK_COMPILER_FLAG(pthread, [USE_THREADS="-D_THREAD_SAFE -pthread"])
+      fi
+
+    AH_VERBATIM(__svr_define, [
+#if defined(__SVR4) && !defined(__svr4__)
+#define __svr4__ 1
+#endif
+])
+    case $host_os in
+ 	solaris*)
+		KDE_CHECK_COMPILER_FLAG(mt, [USE_THREADS="-mt"])
+                CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4"
+    		;;
+        freebsd*)
+                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE $PTHREAD_CFLAGS"
+                ;;
+        aix*)
+                CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
+                LIBPTHREAD="$LIBPTHREAD -lc_r"
+                ;;
+        linux*) CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+                if test "$CXX" = "KCC"; then
+                  CXXFLAGS="$CXXFLAGS --thread_safe"
+		  NOOPT_CXXFLAGS="$NOOPT_CXXFLAGS --thread_safe"
+                fi
+                ;;
+	*)
+		;;
+    esac
+    AC_SUBST(USE_THREADS)
+    AC_SUBST(LIBPTHREAD)
+])
+
+AC_DEFUN([KDE_CHECK_THREADING],
+[
+  AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+  AC_REQUIRE([KDE_CHECK_PTHREAD_OPTION])
+  dnl default is yes if libpthread is found and no if no libpthread is available
+  if test -z "$LIBPTHREAD"; then
+    if test -z "$USE_THREADS"; then
+      kde_check_threading_default=no
+    else
+      kde_check_threading_default=yes
+    fi
+  else
+    kde_check_threading_default=yes
+  fi
+  AC_ARG_ENABLE(threading,AC_HELP_STRING([--disable-threading],[disables threading even if libpthread found]),
+   kde_use_threading=$enableval, kde_use_threading=$kde_check_threading_default)
+  if test "x$kde_use_threading" = "xyes"; then
+    AC_DEFINE(HAVE_LIBPTHREAD, 1, [Define if you have a working libpthread (will enable threaded code)])
+  fi
+])
+
+AC_DEFUN([KDE_TRY_LINK_PYTHON],
+[
+if test "$kde_python_link_found" = no; then
+
+if test "$1" = normal; then
+  AC_MSG_CHECKING(if a Python application links)
+else
+  AC_MSG_CHECKING(if Python depends on $2)
+fi
+
+AC_CACHE_VAL(kde_cv_try_link_python_$1,
+[
+kde_save_cflags="$CFLAGS"
+CFLAGS="$CFLAGS $PYTHONINC"
+kde_save_libs="$LIBS"
+LIBS="$LIBS $LIBPYTHON $2 $LIBDL $LIBSOCKET"
+kde_save_ldflags="$LDFLAGS"
+LDFLAGS="$LDFLAGS $PYTHONLIB"
+
+AC_TRY_LINK(
+[
+#include <Python.h>
+],[
+	PySys_SetArgv(1, 0);
+],
+	[kde_cv_try_link_python_$1=yes],
+	[kde_cv_try_link_python_$1=no]
+)
+CFLAGS="$kde_save_cflags"
+LIBS="$kde_save_libs"
+LDFLAGS="$kde_save_ldflags"
+])
+
+if test "$kde_cv_try_link_python_$1" = "yes"; then
+  AC_MSG_RESULT(yes)
+  kde_python_link_found=yes
+  if test ! "$1" = normal; then
+    LIBPYTHON="$LIBPYTHON $2"
+  fi
+  $3
+else
+  AC_MSG_RESULT(no)
+  $4
+fi
+
+fi
+
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_DIR],
+[
+AC_MSG_CHECKING([for Python directory])
+ 
+AC_CACHE_VAL(kde_cv_pythondir,
+[
+  if test -z "$PYTHONDIR"; then
+    kde_cv_pythondir=/usr/local
+  else
+    kde_cv_pythondir="$PYTHONDIR"
+  fi
+])
+ 
+AC_ARG_WITH(pythondir,
+AC_HELP_STRING([--with-pythondir=pythondir],[use python installed in pythondir]),
+[
+  ac_python_dir=$withval
+], ac_python_dir=$kde_cv_pythondir
+)
+ 
+AC_MSG_RESULT($ac_python_dir)
+])
+
+AC_DEFUN([KDE_CHECK_PYTHON_INTERN],
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_CHECK_LIBPTHREAD])
+AC_REQUIRE([KDE_CHECK_PYTHON_DIR])
+
+if test -z "$1"; then
+  version="1.5"
+else
+  version="$1"
+fi
+
+AC_MSG_CHECKING([for Python$version])
+
+python_incdirs="$ac_python_dir/include /usr/include /usr/local/include/ $kde_extra_includes"
+AC_FIND_FILE(Python.h, $python_incdirs, python_incdir)
+if test ! -r $python_incdir/Python.h; then
+  AC_FIND_FILE(python$version/Python.h, $python_incdirs, python_incdir)
+  python_incdir=$python_incdir/python$version
+  if test ! -r $python_incdir/Python.h; then
+    python_incdir=no
+  fi
+fi
+
+PYTHONINC=-I$python_incdir
+
+python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
+AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
+if test ! -r $python_libdir/libpython$version.so; then
+  AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
+  if test ! -r $python_libdir/libpython$version.a; then
+    AC_FIND_FILE(python$version/config/libpython$version.a, $python_libdirs, python_libdir)
+    python_libdir=$python_libdir/python$version/config
+    if test ! -r $python_libdir/libpython$version.a; then
+      python_libdir=no
+    fi
+  fi
+fi
+
+PYTHONLIB=-L$python_libdir
+kde_orig_LIBPYTHON=$LIBPYTHON
+if test -z "$LIBPYTHON"; then
+  LIBPYTHON=-lpython$version
+fi
+
+AC_FIND_FILE(python$version/copy.py, $python_libdirs, python_moddir)
+python_moddir=$python_moddir/python$version
+if test ! -r $python_moddir/copy.py; then
+  python_moddir=no
+fi
+
+PYTHONMODDIR=$python_moddir
+
+AC_MSG_RESULT(header $python_incdir library $python_libdir modules $python_moddir)
+
+if test x$python_incdir = xno ||  test x$python_libdir = xno ||  test x$python_moddir = xno; then
+   LIBPYTHON=$kde_orig_LIBPYTHON
+   test "x$PYTHONLIB" = "x-Lno" && PYTHONLIB=""
+   test "x$PYTHONINC" = "x-Ino" && PYTHONINC=""
+   $2
+else 
+  dnl Note: this test is very weak
+  kde_python_link_found=no
+  KDE_TRY_LINK_PYTHON(normal)
+  KDE_TRY_LINK_PYTHON(m, -lm)
+  KDE_TRY_LINK_PYTHON(pthread, $LIBPTHREAD)
+  KDE_TRY_LINK_PYTHON(tcl, -ltcl)
+  KDE_TRY_LINK_PYTHON(db2, -ldb2)
+  KDE_TRY_LINK_PYTHON(m_and_thread, [$LIBPTHREAD -lm])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_util, [$LIBPTHREAD -lm -lutil])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_db3, [$LIBPTHREAD -lm -ldb-3 -lutil])
+  KDE_TRY_LINK_PYTHON(pthread_and_db3, [$LIBPTHREAD -ldb-3])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_db, [$LIBPTHREAD -lm -ldb -ltermcap -lutil])
+  KDE_TRY_LINK_PYTHON(pthread_and_dl, [$LIBPTHREAD $LIBDL -lutil -lreadline -lncurses -lm])
+  KDE_TRY_LINK_PYTHON(pthread_and_panel_curses, [$LIBPTHREAD $LIBDL -lm -lpanel -lcurses])
+  KDE_TRY_LINK_PYTHON(m_and_thread_and_db_special, [$LIBPTHREAD -lm -ldb -lutil], [],
+	[AC_MSG_WARN([it seems, Python depends on another library.
+    Please set LIBPYTHON to '-lpython$version -lotherlib' before calling configure to fix this
+    and contact the authors to let them know about this problem])
+	])
+
+  LIBPYTHON="$LIBPYTHON $LIBDL $LIBSOCKET"
+  AC_SUBST(PYTHONINC)
+  AC_SUBST(PYTHONLIB)
+  AC_SUBST(LIBPYTHON)
+  AC_SUBST(PYTHONMODDIR)
+  AC_DEFINE(HAVE_PYTHON, 1, [Define if you have the development files for python])
+fi
+
+])
+
+
+AC_DEFUN([KDE_CHECK_PYTHON],
+[
+  KDE_CHECK_PYTHON_INTERN("2.4",
+   [KDE_CHECK_PYTHON_INTERN("2.3", 
+     [KDE_CHECK_PYTHON_INTERN("2.2", 
+       [KDE_CHECK_PYTHON_INTERN("2.1", 
+         [KDE_CHECK_PYTHON_INTERN("2.0", 
+           [KDE_CHECK_PYTHON_INTERN($1, $2) ])
+         ])
+       ])
+     ])
+  ])
+])
+
+AC_DEFUN([KDE_CHECK_STL],
+[
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS="`echo $CXXFLAGS | sed s/-fno-exceptions//`"
+
+    AC_MSG_CHECKING([if C++ programs can be compiled])
+    AC_CACHE_VAL(kde_cv_stl_works,
+    [
+      AC_TRY_COMPILE([
+#include <string>
+using namespace std;
+],[
+  string astring="Hallo Welt.";
+  astring.erase(0, 6); // now astring is "Welt"
+  return 0;
+], kde_cv_stl_works=yes,
+   kde_cv_stl_works=no)
+])
+
+   AC_MSG_RESULT($kde_cv_stl_works)
+
+   if test "$kde_cv_stl_works" = "yes"; then
+     # back compatible
+	 AC_DEFINE_UNQUOTED(HAVE_SGI_STL, 1, [Define if you have a STL implementation by SGI])
+   else
+	 AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
+Check config.log for details - if you're using a Linux distribution you might miss
+a package named similar to libstdc++-dev.])
+   fi
+
+   CXXFLAGS="$ac_save_CXXFLAGS"
+   AC_LANG_RESTORE
+])
+
+AC_DEFUN([AC_FIND_QIMGIO],
+   [AC_REQUIRE([AC_FIND_JPEG])
+AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
+AC_MSG_CHECKING([for qimgio])
+AC_CACHE_VAL(ac_cv_lib_qimgio,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+ac_save_LIBS="$LIBS"
+ac_save_CXXFLAGS="$CXXFLAGS"
+LIBS="$all_libraries -lqimgio -lpng -lz $LIBJPEG $LIBQT"
+CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
+AC_TRY_RUN(dnl
+[
+#include <qimageio.h>
+#include <qstring.h>
+int main() {
+		QString t = "hallo";
+		t.fill('t');
+		qInitImageIO();
+}
+],
+            ac_cv_lib_qimgio=yes,
+            ac_cv_lib_qimgio=no,
+	    ac_cv_lib_qimgio=no)
+LIBS="$ac_save_LIBS"
+CXXFLAGS="$ac_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+if eval "test \"`echo $ac_cv_lib_qimgio`\" = yes"; then
+  LIBQIMGIO="-lqimgio -lpng -lz $LIBJPEG"
+  AC_MSG_RESULT(yes)
+  AC_DEFINE_UNQUOTED(HAVE_QIMGIO, 1, [Define if you have the Qt extension qimgio available])
+  AC_SUBST(LIBQIMGIO)
+else
+  AC_MSG_RESULT(not found)
+fi
+])
+
+AC_DEFUN([AM_DISABLE_LIBRARIES],
+[
+    AC_PROVIDE([AM_ENABLE_STATIC])
+    AC_PROVIDE([AM_ENABLE_SHARED])
+    enable_static=no
+    enable_shared=yes
+])
+
+
+AC_DEFUN([AC_CHECK_UTMP_FILE],
+[
+    AC_MSG_CHECKING([for utmp file])
+
+    AC_CACHE_VAL(kde_cv_utmp_file,
+    [
+    kde_cv_utmp_file=no
+
+    for ac_file in    \
+                      \
+	/var/run/utmp \
+	/var/adm/utmp \
+	/etc/utmp     \
+     ; \
+    do
+     if test -r "$ac_file"; then
+       kde_cv_utmp_file=$ac_file
+       break
+     fi
+    done
+    ])
+
+    if test "$kde_cv_utmp_file" != "no"; then
+	AC_DEFINE_UNQUOTED(UTMP, "$kde_cv_utmp_file", [Define the file for utmp entries])
+	$1
+	AC_MSG_RESULT($kde_cv_utmp_file)
+    else
+    	$2
+	AC_MSG_RESULT([non found])
+    fi
+])
+
+
+AC_DEFUN([KDE_CREATE_SUBDIRSLIST],
+[
+
+DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
+TOPSUBDIRS=""
+
+if test ! -s $srcdir/subdirs; then
+  dnl Note: Makefile.common creates subdirs, so this is just a fallback
+  files=`cd $srcdir && ls -1`
+  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
+  for i in $dirs; do
+    echo $i >> $srcdir/subdirs
+  done
+fi
+
+ac_topsubdirs=
+if test -s $srcdir/inst-apps; then
+  ac_topsubdirs="`cat $srcdir/inst-apps`"
+elif test -s $srcdir/subdirs; then
+  ac_topsubdirs="`cat $srcdir/subdirs`"
+fi
+
+for i in $ac_topsubdirs; do
+  AC_MSG_CHECKING([if $i should be compiled])
+  if test -d $srcdir/$i; then
+    install_it="yes"
+    for j in $DO_NOT_COMPILE; do
+      if test $i = $j; then
+        install_it="no"
+      fi
+    done
+  else
+    install_it="no"
+  fi
+  AC_MSG_RESULT($install_it)
+  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
+  if test $install_it = "yes"; then
+    TOPSUBDIRS="$TOPSUBDIRS $i"
+    eval "$vari""_SUBDIR_included=yes"
+  else
+    eval "$vari""_SUBDIR_included=no"
+  fi
+done
+
+AC_SUBST(TOPSUBDIRS)
+])
+
+AC_DEFUN([KDE_CHECK_NAMESPACES],
+[
+AC_MSG_CHECKING(whether C++ compiler supports namespaces)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([
+],
+[
+namespace Foo {
+  extern int i;
+  namespace Bar {
+    extern int i;
+  }
+}
+
+int Foo::i = 0;
+int Foo::Bar::i = 1;
+],[
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_NAMESPACES)
+], [
+AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for S_ISSOCK macro. Doesn't exist on Unix SCO. faure@kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_S_ISSOCK],
+[
+AC_MSG_CHECKING(for S_ISSOCK)
+AC_CACHE_VAL(ac_cv_have_s_issock,
+[
+AC_TRY_LINK(
+[
+#include <sys/stat.h>
+],
+[
+struct stat buff;
+int b = S_ISSOCK( buff.st_mode );
+],
+ac_cv_have_s_issock=yes,
+ac_cv_have_s_issock=no)
+])
+AC_MSG_RESULT($ac_cv_have_s_issock)
+if test "$ac_cv_have_s_issock" = "yes"; then
+  AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK, 1, [Define if sys/stat.h declares S_ISSOCK.])
+fi
+
+AH_VERBATIM(_ISSOCK,
+[
+#ifndef HAVE_S_ISSOCK
+#define HAVE_S_ISSOCK
+#define S_ISSOCK(mode) (1==0)
+#endif
+])
+
+])
+
+dnl ------------------------------------------------------------------------
+dnl Check for MAXPATHLEN macro, defines KDEMAXPATHLEN. faure@kde.org
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([AC_CHECK_KDEMAXPATHLEN],
+[
+AC_MSG_CHECKING(for MAXPATHLEN)
+AC_CACHE_VAL(ac_cv_maxpathlen,
+[
+cat > conftest.$ac_ext <<EOF
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/param.h>
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+
+KDE_HELLO MAXPATHLEN
+
+EOF
+
+ac_try="$ac_cpp conftest.$ac_ext 2>/dev/null | grep '^KDE_HELLO' >conftest.out"
+
+if AC_TRY_EVAL(ac_try) && test -s conftest.out; then
+    ac_cv_maxpathlen=`sed 's#KDE_HELLO ##' conftest.out`
+else
+    ac_cv_maxpathlen=1024
+fi
+
+rm conftest.*
+
+])
+AC_MSG_RESULT($ac_cv_maxpathlen)
+AC_DEFINE_UNQUOTED(KDEMAXPATHLEN,$ac_cv_maxpathlen, [Define a safe value for MAXPATHLEN] )
+])
+
+AC_DEFUN([KDE_CHECK_HEADER],
+[
+   kde_safe_cppflags=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS $all_includes"
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
+   AC_LANG_RESTORE
+   CPPFLAGS=$kde_safe_cppflags
+])
+
+AC_DEFUN([KDE_CHECK_HEADERS],
+[
+   AH_CHECK_HEADERS([$1])
+   AC_LANG_SAVE
+   kde_safe_cppflags=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS $all_includes"
+   AC_LANG_CPLUSPLUS
+   AC_CHECK_HEADERS([$1], [$2], [$3], [$4])
+   CPPFLAGS=$kde_safe_cppflags
+   AC_LANG_RESTORE
+])
+
+AC_DEFUN([KDE_FAST_CONFIGURE],
+[
+  dnl makes configure fast (needs perl)
+  AC_ARG_ENABLE(fast-perl, AC_HELP_STRING([--disable-fast-perl],[disable fast Makefile generation (needs perl)]),
+      with_fast_perl=$enableval, with_fast_perl=yes)
+])
+
+AC_DEFUN([KDE_CONF_FILES],
+[
+  val=
+  if test -f $srcdir/configure.files ; then
+    val=`sed -e 's%^%\$(top_srcdir)/%' $srcdir/configure.files`
+  fi
+  CONF_FILES=
+  if test -n "$val" ; then
+    for i in $val ; do
+      CONF_FILES="$CONF_FILES $i"
+    done
+  fi
+  AC_SUBST(CONF_FILES)
+])dnl
+
+dnl This sets the prefix, for arts and kdelibs
+dnl Do NOT use in any other module.
+dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
+AC_DEFUN([KDE_SET_PREFIX_CORE],
+[
+  unset CDPATH
+  dnl make $KDEDIR the default for the installation
+  AC_PREFIX_DEFAULT(${KDEDIR:-/usr/local/kde})
+
+  if test "x$prefix" = "xNONE"; then
+    prefix=$ac_default_prefix
+    ac_configure_args="$ac_configure_args --prefix=$prefix"
+  fi
+  # And delete superfluous '/' to make compares easier
+  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+  kde_libs_prefix='$(prefix)'
+  kde_libs_htmldir='$(kde_htmldir)'
+  AC_SUBST(kde_libs_prefix)
+  AC_SUBST(kde_libs_htmldir)
+  KDE_FAST_CONFIGURE
+  KDE_CONF_FILES
+])
+
+
+AC_DEFUN([KDE_SET_PREFIX],
+[
+  unset CDPATH
+  dnl We can't give real code to that macro, only a value.
+  dnl It only matters for --help, since we set the prefix in this function anyway.
+  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
+
+  KDE_SET_DEFAULT_BINDIRS
+  if test "x$prefix" = "xNONE"; then
+    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
+    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
+  else
+    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
+    kde_save_PATH="$PATH"
+    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
+    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
+    PATH="$kde_save_PATH"
+  fi
+
+  kde_libs_prefix=`$KDECONFIG --prefix`
+  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
+       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
+                    This means it has been moved since you installed it.
+                    This won't work. Please recompile kdelibs for the new prefix.
+                    ])
+  fi
+  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
+  kde_libs_suffix=`$KDECONFIG --libsuffix`
+
+  AC_MSG_CHECKING([where to install])
+  if test "x$prefix" = "xNONE"; then
+    prefix=$kde_libs_prefix
+    AC_MSG_RESULT([$prefix (as returned by kde-config)])
+  else
+    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
+    given_prefix=$prefix
+    AC_MSG_RESULT([$prefix (as requested)])
+  fi
+
+  # And delete superfluous '/' to make compares easier
+  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
+
+  AC_SUBST(KDECONFIG)
+  AC_SUBST(kde_libs_prefix)
+  AC_SUBST(kde_libs_htmldir)
+
+  KDE_FAST_CONFIGURE
+  KDE_CONF_FILES
+])
+
+pushdef([AC_PROG_INSTALL],
+[
+  dnl our own version, testing for a -p flag
+  popdef([AC_PROG_INSTALL])
+  dnl as AC_PROG_INSTALL works as it works we first have
+  dnl to save if the user didn't specify INSTALL, as the
+  dnl autoconf one overwrites INSTALL and we have no chance to find
+  dnl out afterwards
+  test -n "$INSTALL" && kde_save_INSTALL_given=$INSTALL
+  test -n "$INSTALL_PROGRAM" && kde_save_INSTALL_PROGRAM_given=$INSTALL_PROGRAM
+  test -n "$INSTALL_SCRIPT" && kde_save_INSTALL_SCRIPT_given=$INSTALL_SCRIPT
+  AC_PROG_INSTALL
+
+  if test -z "$kde_save_INSTALL_given" ; then
+    # OK, user hasn't given any INSTALL, autoconf found one for us
+    # now we test, if it supports the -p flag
+    AC_MSG_CHECKING(for -p flag to install)
+    rm -f confinst.$$.* > /dev/null 2>&1
+    echo "Testtest" > confinst.$$.orig
+    ac_res=no
+    if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+      if test -f confinst.$$.new ; then
+        # OK, -p seems to do no harm to install
+	INSTALL="${INSTALL} -p"
+	ac_res=yes
+      fi
+    fi
+    rm -f confinst.$$.*
+    AC_MSG_RESULT($ac_res)
+  fi
+  dnl the following tries to resolve some signs and wonders coming up
+  dnl with different autoconf/automake versions
+  dnl e.g.:
+  dnl  *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
+  dnl   and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
+  dnl   it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
+  dnl  *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
+  dnl   INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
+  dnl   install-@DIR@PROGRAMS targets to explicitly use that flag
+  dnl  *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
+  dnl   INSTALL_SCRIPT, which breaks with automake <= 1.4
+  dnl  *autoconf >2.13 (since 10.Apr 1999) has not that failure
+  dnl  *sometimes KDE does not use the install-@DIR@PROGRAM targets from
+  dnl   automake (due to broken Makefile.am or whatever) to install programs,
+  dnl   and so does not see the -s flag in automake > 1.4
+  dnl to clean up that mess we:
+  dnl  +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
+  dnl   which cleans KDE's program with automake > 1.4;
+  dnl  +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
+  dnl   with automake<=1.4
+  dnl  note that dues to this sometimes two '-s' flags are used (if KDE
+  dnl   properly uses install-@DIR@PROGRAMS, but I don't care
+  dnl
+  dnl And to all this comes, that I even can't write in comments variable
+  dnl  names used by automake, because it is so stupid to think I wanted to
+  dnl  _use_ them, therefor I have written A_M_... instead of AM_
+  dnl hmm, I wanted to say something ... ahh yes: Arghhh.
+
+  if test -z "$kde_save_INSTALL_PROGRAM_given" ; then
+    INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+  fi
+  if test -z "$kde_save_INSTALL_SCRIPT_given" ; then
+    INSTALL_SCRIPT='${INSTALL}'
+  fi
+])dnl
+
+AC_DEFUN([KDE_LANG_CPLUSPLUS],
+[AC_LANG_CPLUSPLUS
+ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
+pushdef([AC_LANG_CPLUSPLUS], [popdef([AC_LANG_CPLUSPLUS]) KDE_LANG_CPLUSPLUS])
+])
+
+pushdef([AC_LANG_CPLUSPLUS],
+[popdef([AC_LANG_CPLUSPLUS])
+KDE_LANG_CPLUSPLUS
+])
+
+AC_DEFUN([KDE_CHECK_LONG_LONG],
+[
+AC_MSG_CHECKING(for long long)
+AC_CACHE_VAL(kde_cv_c_long_long,
+[
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_LINK([], [
+  long long foo = 0;
+  foo = foo+1;
+  ],
+  kde_cv_c_long_long=yes, kde_cv_c_long_long=no)
+  AC_LANG_RESTORE
+])
+AC_MSG_RESULT($kde_cv_c_long_long)
+if test "$kde_cv_c_long_long" = yes; then
+   AC_DEFINE(HAVE_LONG_LONG, 1, [Define if you have long long as datatype])
+fi
+])
+
+AC_DEFUN([KDE_CHECK_LIB],
+[
+     kde_save_LDFLAGS="$LDFLAGS"
+     dnl AC_CHECK_LIB modifies LIBS, so save it here
+     kde_save_LIBS="$LIBS"
+     LDFLAGS="$LDFLAGS $all_libraries"
+     case $host_os in
+      aix*) LDFLAGS="-brtl $LDFLAGS"
+	test "$GCC" = yes && LDFLAGS="-Wl,$LDFLAGS"
+	;;
+     esac
+     AC_CHECK_LIB($1, $2, $3, $4, $5)
+     LDFLAGS="$kde_save_LDFLAGS"
+     LIBS="$kde_save_LIBS"
+])
+
+AC_DEFUN([KDE_JAVA_PREFIX],
+[
+	dir=`dirname "$1"`
+	base=`basename "$1"`
+	list=`ls -1 $dir 2> /dev/null`
+	for entry in $list; do 
+		if test -d $dir/$entry/bin; then
+			case $entry in
+			   $base)
+				javadirs="$javadirs $dir/$entry/bin"
+				;;
+			esac
+		elif test -d $dir/$entry/jre/bin; then
+			case $entry in
+			   $base)
+				javadirs="$javadirs $dir/$entry/jre/bin"
+				;;
+			esac
+		fi
+	done
+])
+
+dnl KDE_CHEC_JAVA_DIR(onlyjre)
+AC_DEFUN([KDE_CHECK_JAVA_DIR],
+[
+
+AC_ARG_WITH(java,
+AC_HELP_STRING([--with-java=javadir],[use java installed in javadir, --without-java disables]),
+[  ac_java_dir=$withval
+], ac_java_dir=""
+)
+
+AC_MSG_CHECKING([for Java])
+
+dnl at this point ac_java_dir is either a dir, 'no' to disable, or '' to say look in $PATH
+if test "x$ac_java_dir" = "xno"; then
+   kde_java_bindir=no
+   kde_java_includedir=no
+   kde_java_libjvmdir=no
+   kde_java_libgcjdir=no
+   kde_java_libhpidir=no
+else
+  if test "x$ac_java_dir" = "x"; then
+     
+     
+      dnl No option set -> collect list of candidate paths
+      if test -n "$JAVA_HOME"; then
+        KDE_JAVA_PREFIX($JAVA_HOME)
+      fi
+      KDE_JAVA_PREFIX(/usr/j2se)
+      KDE_JAVA_PREFIX(/usr/lib/j2se)
+      KDE_JAVA_PREFIX(/usr/j*dk*)
+      KDE_JAVA_PREFIX(/usr/lib/j*dk*)
+      KDE_JAVA_PREFIX(/opt/j*sdk*)
+      KDE_JAVA_PREFIX(/usr/lib/java*)
+      KDE_JAVA_PREFIX(/usr/java*)
+      KDE_JAVA_PREFIX(/usr/java/j*dk*)
+      KDE_JAVA_PREFIX(/usr/java/j*re*)
+      KDE_JAVA_PREFIX(/usr/lib/SunJava2*)
+      KDE_JAVA_PREFIX(/usr/lib/SunJava*)
+      KDE_JAVA_PREFIX(/usr/lib/IBMJava2*)
+      KDE_JAVA_PREFIX(/usr/lib/IBMJava*)
+      KDE_JAVA_PREFIX(/opt/java*)
+
+      kde_cv_path="NONE"
+      kde_save_IFS=$IFS
+      IFS=':'
+      for dir in $PATH; do
+	  if test -d "$dir"; then
+	      javadirs="$javadirs $dir"
+	  fi
+      done
+      IFS=$kde_save_IFS
+      jredirs=
+
+      dnl Now javadirs contains a list of paths that exist, all ending with bin/
+      for dir in $javadirs; do
+          dnl Check for the java executable
+	  if test -x "$dir/java"; then
+	      dnl And also check for a libjvm.so somewhere under there
+	      dnl Since we have to go to the parent dir, /usr/bin is excluded, /usr is too big.
+              if test "$dir" != "/usr/bin"; then
+                  libjvmdir=`find $dir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+		  if test ! -f $libjvmdir/libjvm.so; then continue; fi
+		  jredirs="$jredirs $dir"
+	      fi
+	  fi
+      done
+
+      dnl Now jredirs contains a reduced list, of paths where both java and ../**/libjvm.so was found
+      JAVAC=
+      JAVA=
+      kde_java_bindir=no
+      for dir in $jredirs; do
+	  JAVA="$dir/java"
+	  kde_java_bindir=$dir
+	  if test -x "$dir/javac"; then
+		JAVAC="$dir/javac"
+                break
+	  fi
+      done
+
+      if test -n "$JAVAC"; then
+          dnl this substitution might not work - well, we test for jni.h below
+          kde_java_includedir=`echo $JAVAC | sed -e 's,bin/javac$,include/,'`
+      else
+          kde_java_includedir=no
+      fi
+  else
+    dnl config option set
+    kde_java_bindir=$ac_java_dir/bin
+    if test -x $ac_java_dir/bin/java && test ! -x $ac_java_dir/bin/javac; then
+	kde_java_includedir=no
+    else
+        kde_java_includedir=$ac_java_dir/include
+    fi
+  fi
+fi
+
+dnl At this point kde_java_bindir and kde_java_includedir are either set or "no"
+if test "x$kde_java_bindir" != "xno"; then
+
+  dnl Look for libjvm.so
+  kde_java_libjvmdir=`find $kde_java_bindir/.. -name libjvm.so | sed 's,libjvm.so,,'|head -n 1`
+  dnl Look for libgcj.so
+  kde_java_libgcjdir=`find $kde_java_bindir/.. -name libgcj.so | sed 's,libgcj.so,,'|head -n 1`
+  dnl Look for libhpi.so and avoid green threads
+  kde_java_libhpidir=`find $kde_java_bindir/.. -name libhpi.so | grep -v green | sed 's,libhpi.so,,' | head -n 1`
+
+  dnl Now check everything's fine under there
+  dnl the include dir is our flag for having the JDK
+  if test -d "$kde_java_includedir"; then
+    if test ! -x "$kde_java_bindir/javac"; then
+      AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
+    fi
+    if test ! -x "$kde_java_bindir/javah"; then
+      AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+    fi
+    if test ! -x "$kde_java_bindir/jar"; then
+      AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+    fi
+    if test ! -r "$kde_java_includedir/jni.h"; then
+      AC_MSG_ERROR([jni.h not found under $kde_java_includedir. Use --with-java or --without-java.])
+    fi
+
+    jni_includes="-I$kde_java_includedir"
+    dnl Strange thing, jni.h requires jni_md.h which is under genunix here..
+    dnl and under linux here.. 
+    
+    dnl not needed for gcj
+
+    if test "x$kde_java_libgcjdir" = "x"; then 
+      test -d "$kde_java_includedir/linux" && jni_includes="$jni_includes -I$kde_java_includedir/linux"
+      test -d "$kde_java_includedir/solaris" && jni_includes="$jni_includes -I$kde_java_includedir/solaris"
+      test -d "$kde_java_includedir/genunix" && jni_includes="$jni_includes -I$kde_java_includedir/genunix"
+    fi
+
+  else
+    JAVAC=
+    jni_includes=
+  fi
+
+  if test "x$kde_java_libgcjdir" = "x"; then 
+     if test ! -r "$kde_java_libjvmdir/libjvm.so"; then
+        AC_MSG_ERROR([libjvm.so not found under $kde_java_libjvmdir. Use --without-java.])
+     fi 
+  else
+     if test ! -r "$kde_java_libgcjdir/libgcj.so"; then
+        AC_MSG_ERROR([libgcj.so not found under $kde_java_libgcjdir. Use --without-java.])
+     fi 
+  fi
+
+  if test ! -x "$kde_java_bindir/java"; then
+      AC_MSG_ERROR([java not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
+  fi
+
+  dnl not needed for gcj compile
+
+  if test "x$kde_java_libgcjdir" = "x"; then 
+      if test ! -r "$kde_java_libhpidir/libhpi.so"; then
+        AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
+      fi
+  fi
+
+  if test -n "$jni_includes"; then
+    dnl Check for JNI version
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    ac_cxxflags_safe="$CXXFLAGS"
+    CXXFLAGS="$CXXFLAGS $all_includes $jni_includes"
+
+    AC_TRY_COMPILE([
+  #include <jni.h>
+	      ],
+	      [
+  #ifndef JNI_VERSION_1_2
+  Syntax Error
+  #endif
+	      ],[ kde_jni_works=yes ],
+	      [ kde_jni_works=no ])
+
+    if test $kde_jni_works = no; then
+      AC_MSG_ERROR([Incorrect version of $kde_java_includedir/jni.h.
+		    You need to have Java Development Kit (JDK) version 1.2. 
+
+		    Use --with-java to specify another location.
+		    Use --without-java to configure without java support.
+		    Or download a newer JDK and try again. 
+		    See e.g. http://java.sun.com/products/jdk/1.2 ])
+    fi
+
+    CXXFLAGS="$ac_cxxflags_safe"    
+    AC_LANG_RESTORE
+
+    dnl All tests ok, inform and subst the variables
+
+    JAVAC=$kde_java_bindir/javac
+    JAVAH=$kde_java_bindir/javah
+    JAR=$kde_java_bindir/jar
+    AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+    if test "x$kde_java_libgcjdir" = "x"; then 
+      JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
+    else
+      JVMLIBS="-L$kde_java_libgcjdir -lgcj"
+    fi
+    AC_MSG_RESULT([java JDK in $kde_java_bindir])
+
+  else
+      AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+      AC_MSG_RESULT([java JRE in $kde_java_bindir])
+  fi
+elif test -d "/Library/Java/Home"; then
+  kde_java_bindir="/Library/Java/Home/bin"
+  jni_includes="-I/Library/Java/Home/include"
+
+  JAVAC=$kde_java_bindir/javac
+  JAVAH=$kde_java_bindir/javah
+  JAR=$kde_java_bindir/jar
+  JVMLIBS="-Xlinker -framework -Xlinker JavaVM"
+
+  AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
+  AC_MSG_RESULT([Apple Java Framework])
+else
+  AC_MSG_RESULT([none found])
+fi
+
+AC_SUBST(JAVAC)
+AC_SUBST(JAVAH)
+AC_SUBST(JAR)
+AC_SUBST(JVMLIBS)
+AC_SUBST(jni_includes)
+
+# for backward compat
+kde_cv_java_includedir=$kde_java_includedir
+kde_cv_java_bindir=$kde_java_bindir
+])
+
+dnl this is a redefinition of autoconf 2.5x's AC_FOREACH.
+dnl When the argument list becomes big, as in KDE for AC_OUTPUT in
+dnl big packages, m4_foreach is dog-slow.  So use our own version of
+dnl it.  (matz@kde.org)
+m4_define([mm_foreach],
+[m4_pushdef([$1])_mm_foreach($@)m4_popdef([$1])])
+m4_define([mm_car], [[$1]])
+m4_define([mm_car2], [[$@]])
+m4_define([_mm_foreach],
+[m4_if(m4_quote($2), [], [],
+       [m4_define([$1], mm_car($2))$3[]_mm_foreach([$1],
+                                                   mm_car2(m4_shift($2)),
+                                                   [$3])])])
+m4_define([AC_FOREACH],
+[mm_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
+
+AC_DEFUN([KDE_NEED_FLEX],
+[
+kde_libs_safe=$LIBS
+LIBS="$LIBS $USER_LDFLAGS"
+AM_PROG_LEX
+LIBS=$kde_libs_safe
+if test -z "$LEXLIB"; then
+    AC_MSG_ERROR([You need to have flex installed.])
+fi
+AC_SUBST(LEXLIB)
+])
+
+AC_DEFUN([AC_PATH_QTOPIA],
+[
+  dnl TODO: use AC_CACHE_VAL
+
+  if test -z "$1"; then
+    qtopia_minver_maj=1
+    qtopia_minver_min=5
+    qtopia_minver_pat=0
+  else
+    qtopia_minver_maj=`echo "$1" | sed -e "s/^\(.*\)\..*\..*$/\1/"`
+    qtopia_minver_min=`echo "$1" | sed -e "s/^.*\.\(.*\)\..*$/\1/"`
+    qtopia_minver_pat=`echo "$1" | sed -e "s/^.*\..*\.\(.*\)$/\1/"`
+  fi
+
+  qtopia_minver="$qtopia_minver_maj$qtopia_minver_min$qtopia_minver_pat"
+  qtopia_minverstr="$qtopia_minver_maj.$qtopia_minver_min.$qtopia_minver_pat"
+
+  AC_REQUIRE([AC_PATH_QT])
+
+  AC_MSG_CHECKING([for Qtopia])
+
+  LIB_QTOPIA="-lqpe"
+  AC_SUBST(LIB_QTOPIA)
+
+  kde_qtopia_dirs="$QPEDIR /opt/Qtopia"
+
+  ac_qtopia_incdir=NO
+
+  AC_ARG_WITH(qtopia-dir,
+              AC_HELP_STRING([--with-qtopia-dir=DIR],[where the root of Qtopia is installed]),
+              [  ac_qtopia_incdir="$withval"/include] ) 
+  
+  qtopia_incdirs=""
+  for dir in $kde_qtopia_dirs; do
+    qtopia_incdirs="$qtopia_incdirs $dir/include"
+  done
+
+  if test ! "$ac_qtopia_incdir" = "NO"; then
+    qtopia_incdirs="$ac_qtopia_incdir $qtopia_incdirs"
+  fi
+
+  qtopia_incdir=""
+  AC_FIND_FILE(qpe/qpeapplication.h, $qtopia_incdirs, qtopia_incdir)
+  ac_qtopia_incdir="$qtopia_incdir"
+
+  if test -z "$qtopia_incdir"; then
+    AC_MSG_ERROR([Cannot find Qtopia headers. Please check your installation.])
+  fi
+
+  qtopia_ver_maj=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION "\(.*\)\..*\..*".*,\1,p'`;
+  qtopia_ver_min=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\.\(.*\)\..*".*,\1,p'`;
+  qtopia_ver_pat=`cat $qtopia_incdir/qpe/version.h | sed -n -e 's,.*QPE_VERSION ".*\..*\.\(.*\)".*,\1,p'`;
+
+  qtopia_ver="$qtopia_ver_maj$qtopia_ver_min$qtopia_ver_pat"
+  qtopia_verstr="$qtopia_ver_maj.$qtopia_ver_min.$qtopia_ver_pat"
+  if test "$qtopia_ver" -lt "$qtopia_minver"; then
+    AC_MSG_ERROR([found Qtopia version $qtopia_verstr but version $qtopia_minverstr
+is required.])
+  fi
+
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  ac_cxxflags_safe="$CXXFLAGS"
+  ac_ldflags_safe="$LDFLAGS"
+  ac_libs_safe="$LIBS"
+
+  CXXFLAGS="$CXXFLAGS -I$qtopia_incdir $all_includes"
+  LDFLAGS="$LDFLAGS $QT_LDFLAGS $all_libraries $USER_LDFLAGS $KDE_MT_LDFLAGS"
+  LIBS="$LIBS $LIB_QTOPIA $LIBQT"
+
+  cat > conftest.$ac_ext <<EOF
+#include "confdefs.h"
+#include <qpe/qpeapplication.h>
+#include <qpe/version.h>
+
+int main( int argc, char **argv )
+{
+    QPEApplication app( argc, argv );
+    return 0;
+}
+EOF
+
+  if AC_TRY_EVAL(ac_link) && test -s conftest; then
+    rm -f conftest*
+  else
+    rm -f conftest*
+    AC_MSG_ERROR([Cannot link small Qtopia Application. For more details look at
+the end of config.log])
+  fi
+
+  CXXFLAGS="$ac_cxxflags_safe"
+  LDFLAGS="$ac_ldflags_safe"
+  LIBS="$ac_libs_safe"
+
+  AC_LANG_RESTORE
+
+  QTOPIA_INCLUDES="-I$qtopia_incdir"
+  AC_SUBST(QTOPIA_INCLUDES)
+
+  AC_MSG_RESULT([found version $qtopia_verstr with headers at $qtopia_incdir])
+])
+
+
+AC_DEFUN([KDE_INIT_DOXYGEN],
+[
+AC_MSG_CHECKING([for Qt docs])
+kde_qtdir=
+if test "${with_qt_dir+set}" = set; then
+  kde_qtdir="$with_qt_dir"
+fi
+
+AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
+AC_MSG_RESULT($QTDOCDIR)
+
+AC_SUBST(QTDOCDIR)
+
+KDE_FIND_PATH(dot, DOT, [], [])
+if test -n "$DOT"; then
+  KDE_HAVE_DOT="YES"
+else
+  KDE_HAVE_DOT="NO"
+fi
+AC_SUBST(KDE_HAVE_DOT)
+KDE_FIND_PATH(doxygen, DOXYGEN, [], [])
+AC_SUBST(DOXYGEN)
+
+DOXYGEN_PROJECT_NAME="$1"
+DOXYGEN_PROJECT_NUMBER="$2"
+AC_SUBST(DOXYGEN_PROJECT_NAME)
+AC_SUBST(DOXYGEN_PROJECT_NUMBER)
+
+KDE_HAS_DOXYGEN=no
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
+  KDE_HAS_DOXYGEN=yes
+fi
+AC_SUBST(KDE_HAS_DOXYGEN)
+
+])
+
+
+AC_DEFUN([AC_FIND_BZIP2],
+[
+AC_MSG_CHECKING([for bzDecompress in libbz2])
+AC_CACHE_VAL(ac_cv_lib_bzip2,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_LIBS="$LIBS"
+LIBS="$all_libraries $USER_LDFLAGS -lbz2 $LIBSOCKET"
+kde_save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
+AC_TRY_LINK(dnl
+[
+#define BZ_NO_STDIO
+#include<bzlib.h>
+],
+            [ bz_stream s; (void) bzDecompress(&s); ],
+            eval "ac_cv_lib_bzip2='-lbz2'",
+            eval "ac_cv_lib_bzip2=no")
+LIBS="$kde_save_LIBS"
+CXXFLAGS="$kde_save_CXXFLAGS"
+AC_LANG_RESTORE
+])dnl
+AC_MSG_RESULT($ac_cv_lib_bzip2)
+
+if test ! "$ac_cv_lib_bzip2" = no; then
+  BZIP2DIR=bzip2
+
+  LIBBZ2="$ac_cv_lib_bzip2"
+  AC_SUBST(LIBBZ2)
+
+else
+
+   cxx_shared_flag=
+   ld_shared_flag=
+   KDE_CHECK_COMPILER_FLAG(shared, [
+	ld_shared_flag="-shared"
+   ])
+   KDE_CHECK_COMPILER_FLAG(fPIC, [
+        cxx_shared_flag="-fPIC"
+   ])
+
+   AC_MSG_CHECKING([for BZ2_bzDecompress in (shared) libbz2])
+   AC_CACHE_VAL(ac_cv_lib_bzip2_prefix,
+   [
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   kde_save_LIBS="$LIBS"
+   LIBS="$all_libraries $USER_LDFLAGS $ld_shared_flag -lbz2 $LIBSOCKET"
+   kde_save_CXXFLAGS="$CXXFLAGS"
+   CXXFLAGS="$CFLAGS $cxx_shared_flag $all_includes $USER_INCLUDES"
+
+   AC_TRY_LINK(dnl
+   [
+   #define BZ_NO_STDIO
+   #include<bzlib.h>
+   ],
+               [ bz_stream s; (void) BZ2_bzDecompress(&s); ],
+               eval "ac_cv_lib_bzip2_prefix='-lbz2'",
+               eval "ac_cv_lib_bzip2_prefix=no")
+   LIBS="$kde_save_LIBS"
+   CXXFLAGS="$kde_save_CXXFLAGS"
+   AC_LANG_RESTORE
+   ])dnl
+
+   AC_MSG_RESULT($ac_cv_lib_bzip2_prefix)
+   
+   if test ! "$ac_cv_lib_bzip2_prefix" = no; then
+     BZIP2DIR=bzip2
+    
+     LIBBZ2="$ac_cv_lib_bzip2_prefix"
+     AC_SUBST(LIBBZ2)
+
+     AC_DEFINE(NEED_BZ2_PREFIX, 1, [Define if the libbz2 functions need the BZ2_ prefix])
+   dnl else, we just ignore this
+   fi
+
+fi
+AM_CONDITIONAL(include_BZIP2, test -n "$BZIP2DIR")
+])
+
+dnl ------------------------------------------------------------------------
+dnl Try to find the SSL headers and libraries.
+dnl $(SSL_LDFLAGS) will be -Lsslliblocation (if needed)
+dnl and $(SSL_INCLUDES) will be -Isslhdrlocation (if needed)
+dnl ------------------------------------------------------------------------
+dnl
+AC_DEFUN([KDE_CHECK_SSL],
+[
+LIBSSL="-lssl -lcrypto"
+AC_REQUIRE([KDE_CHECK_LIB64])
+
+ac_ssl_includes=NO ac_ssl_libraries=NO
+ssl_libraries=""
+ssl_includes=""
+AC_ARG_WITH(ssl-dir,
+    AC_HELP_STRING([--with-ssl-dir=DIR],[where the root of OpenSSL is installed]),
+    [  ac_ssl_includes="$withval"/include
+       ac_ssl_libraries="$withval"/lib$kdelibsuff
+    ])
+
+want_ssl=yes
+AC_ARG_WITH(ssl,
+    AC_HELP_STRING([--without-ssl],[disable SSL checks]),
+    [want_ssl=$withval])
+
+if test $want_ssl = yes; then
+
+AC_MSG_CHECKING(for OpenSSL)
+
+AC_CACHE_VAL(ac_cv_have_ssl,
+[#try to guess OpenSSL locations
+  
+  ssl_incdirs="/usr/include /usr/local/include /usr/ssl/include /usr/local/ssl/include $prefix/include $kde_extra_includes"
+  ssl_incdirs="$ac_ssl_includes $ssl_incdirs"
+  AC_FIND_FILE(openssl/ssl.h, $ssl_incdirs, ssl_incdir)
+  ac_ssl_includes="$ssl_incdir"
+
+  ssl_libdirs="/usr/lib$kdelibsuff /usr/local/lib$kdelibsuff /usr/ssl/lib$kdelibsuff /usr/local/ssl/lib$kdelibsuff $libdir $prefix/lib$kdelibsuff $exec_prefix/lib$kdelibsuff $kde_extra_libs"
+  if test ! "$ac_ssl_libraries" = "NO"; then
+    ssl_libdirs="$ac_ssl_libraries $ssl_libdirs"
+  fi
+
+  test=NONE
+  ssl_libdir=NONE
+  for dir in $ssl_libdirs; do
+    try="ls -1 $dir/libssl*"
+    if test=`eval $try 2> /dev/null`; then ssl_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
+  done
+
+  ac_ssl_libraries="$ssl_libdir"
+
+  ac_ldflags_safe="$LDFLAGS"
+  ac_libs_safe="$LIBS"
+
+  LDFLAGS="$LDFLAGS -L$ssl_libdir $all_libraries"
+  LIBS="$LIBS $LIBSSL -lRSAglue -lrsaref"
+
+  AC_TRY_LINK(,void RSAPrivateEncrypt(void);RSAPrivateEncrypt();,
+  ac_ssl_rsaref="yes"
+  ,
+  ac_ssl_rsaref="no"
+  )
+
+  LDFLAGS="$ac_ldflags_safe"
+  LIBS="$ac_libs_safe"
+
+  if test "$ac_ssl_includes" = NO || test "$ac_ssl_libraries" = NO; then
+    have_ssl=no
+  else
+    have_ssl=yes;
+  fi
+
+  ])
+
+  eval "$ac_cv_have_ssl"
+
+  AC_MSG_RESULT([libraries $ac_ssl_libraries, headers $ac_ssl_includes])
+
+  AC_MSG_CHECKING([whether OpenSSL uses rsaref])
+  AC_MSG_RESULT($ac_ssl_rsaref)
+
+  AC_MSG_CHECKING([for easter eggs])
+  AC_MSG_RESULT([none found])
+
+else
+  have_ssl=no
+fi
+
+if test "$have_ssl" = yes; then
+  AC_MSG_CHECKING(for OpenSSL version)
+  dnl Check for SSL version
+  AC_CACHE_VAL(ac_cv_ssl_version,
+  [
+
+    cat >conftest.$ac_ext <<EOF
+#include <openssl/opensslv.h>
+#include <stdio.h>
+    int main() {
+ 
+#ifndef OPENSSL_VERSION_NUMBER
+      printf("ssl_version=\\"error\\"\n");
+#else
+      if (OPENSSL_VERSION_NUMBER < 0x00906000)
+        printf("ssl_version=\\"old\\"\n");
+      else
+        printf("ssl_version=\\"ok\\"\n");
+#endif
+     return (0);
+    }
+EOF
+
+    ac_save_CPPFLAGS=$CPPFLAGS
+    if test "$ac_ssl_includes" != "/usr/include"; then
+        CPPFLAGS="$CPPFLAGS -I$ac_ssl_includes"
+    fi
+
+    if AC_TRY_EVAL(ac_link); then 
+
+      if eval `./conftest 2>&5`; then
+        if test $ssl_version = error; then
+          AC_MSG_ERROR([$ssl_incdir/openssl/opensslv.h doesn't define OPENSSL_VERSION_NUMBER !])
+        else
+          if test $ssl_version = old; then
+            AC_MSG_WARN([OpenSSL version too old. Upgrade to 0.9.6 at least, see http://www.openssl.org. SSL support disabled.])
+            have_ssl=no
+          fi
+        fi
+        ac_cv_ssl_version="ssl_version=$ssl_version"
+      else
+        AC_MSG_ERROR([Your system couldn't run a small SSL test program.
+        Check config.log, and if you can't figure it out, send a mail to 
+        David Faure <faure@kde.org>, attaching your config.log])
+      fi
+
+    else
+      AC_MSG_ERROR([Your system couldn't link a small SSL test program.
+      Check config.log, and if you can't figure it out, send a mail to 
+      David Faure <faure@kde.org>, attaching your config.log])
+    fi 
+    CPPFLAGS=$ac_save_CPPFLAGS
+
+  ])
+
+  eval "$ac_cv_ssl_version"
+  AC_MSG_RESULT($ssl_version)
+fi
+
+if test "$have_ssl" != yes; then
+  LIBSSL="";
+else
+  AC_DEFINE(HAVE_SSL, 1, [If we are going to use OpenSSL])
+  ac_cv_have_ssl="have_ssl=yes \
+    ac_ssl_includes=$ac_ssl_includes ac_ssl_libraries=$ac_ssl_libraries ac_ssl_rsaref=$ac_ssl_rsaref"
+  
+  
+  ssl_libraries="$ac_ssl_libraries"
+  ssl_includes="$ac_ssl_includes"
+
+  if test "$ac_ssl_rsaref" = yes; then
+    LIBSSL="-lssl -lcrypto -lRSAglue -lrsaref" 
+  fi
+
+  if test $ssl_version = "old"; then
+    AC_DEFINE(HAVE_OLD_SSL_API, 1, [Define if you have OpenSSL < 0.9.6])
+  fi
+fi
+
+SSL_INCLUDES=
+
+if test "$ssl_includes" = "/usr/include"; then
+  if test -f /usr/kerberos/include/krb5.h; then
+	SSL_INCLUDES="-I/usr/kerberos/include"
+  fi
+elif test  "$ssl_includes" != "/usr/local/include" && test -n "$ssl_includes"; then
+  SSL_INCLUDES="-I$ssl_includes"
+fi
+
+if test "$ssl_libraries" = "/usr/lib" || test "$ssl_libraries" = "/usr/local/lib" || test -z "$ssl_libraries" || test "$ssl_libraries" = "NONE"; then
+ SSL_LDFLAGS=""
+else
+ SSL_LDFLAGS="-L$ssl_libraries -R$ssl_libraries"
+fi
+
+AC_SUBST(SSL_INCLUDES)
+AC_SUBST(SSL_LDFLAGS)
+AC_SUBST(LIBSSL)
+])
+
+AC_DEFUN([KDE_CHECK_STRLCPY],
+[
+  AC_REQUIRE([AC_CHECK_STRLCAT])
+  AC_REQUIRE([AC_CHECK_STRLCPY])
+  AC_CHECK_SIZEOF(size_t)
+  AC_CHECK_SIZEOF(unsigned long)
+
+  AC_MSG_CHECKING([sizeof size_t == sizeof unsigned long])
+  AC_TRY_COMPILE(,[
+    #if SIZEOF_SIZE_T != SIZEOF_UNSIGNED_LONG
+       choke me
+    #endif
+    ],AC_MSG_RESULT([yes]),[
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([
+       Apparently on your system our assumption sizeof size_t == sizeof unsigned long 
+       does not apply. Please mail kde-devel@kde.org with a description of your system!
+      ])
+  ])
+])
+
+AC_DEFUN([KDE_CHECK_BINUTILS],
+[
+  AC_MSG_CHECKING([if ld supports unversioned version maps])
+
+  kde_save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+  echo "{ local: extern \"C++\" { foo }; };" > conftest.map
+  AC_TRY_LINK([int foo;],
+[
+#ifdef __INTEL_COMPILER
+icc apparently does not support libtools version-info and version-script
+at the same time. Dunno where the bug is, but until somebody figured out,
+better disable the optional version scripts.
+#endif
+
+  foo = 42;
+], kde_supports_versionmaps=yes, kde_supports_versionmaps=no)
+  LDFLAGS="$kde_save_LDFLAGS"
+  rm -f conftest.map
+  AM_CONDITIONAL(include_VERSION_SCRIPT, 
+    [test "$kde_supports_versionmaps" = "yes" && test "$kde_use_debug_code" = "no"])
+
+  AC_MSG_RESULT($kde_supports_versionmaps)
+])
+
+AC_DEFUN([AM_PROG_OBJC],[
+AC_CHECK_PROGS(OBJC, gcc, gcc)
+test -z "$OBJC" && AC_MSG_ERROR([no acceptable objective-c gcc found in \$PATH])
+if test "x${OBJCFLAGS-unset}" = xunset; then
+   OBJCFLAGS="-g -O2"
+fi
+AC_SUBST(OBJCFLAGS)
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(OBJC)])
+])
+
+AC_DEFUN([KDE_CHECK_PERL],
+[
+	KDE_FIND_PATH(perl, PERL, [$bindir $exec_prefix/bin $prefix/bin], [
+		    AC_MSG_ERROR([No Perl found in your $PATH.
+We need perl to generate some code.])
+	])
+    AC_SUBST(PERL)
+])
+
+AC_DEFUN([KDE_CHECK_LARGEFILE],
+[
+AC_SYS_LARGEFILE
+if test "$ac_cv_sys_file_offset_bits" != no; then
+  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+fi
+
+if test "x$ac_cv_sys_large_files" != "xno"; then
+  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
+fi
+
+])
+
+dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
+dnl which allows to search for libs that get installed into the KDE prefix.
+dnl
+dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
+dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
+dnl also defines KSTUFF_PKG_ERRORS on error
+AC_DEFUN([KDE_PKG_CHECK_MODULES], [
+
+   PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+   if test "$prefix" != "$kde_libs_prefix"; then
+       PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+   fi
+   export PKG_CONFIG_PATH
+   PKG_CHECK_MODULES($1,$2,$3,$4)
+])
+
diff --git a/admin/am_edit b/admin/am_edit
new file mode 100644
index 0000000000000000000000000000000000000000..d457ea6c984b5da922e6d837cbf3538615d212db
--- /dev/null
+++ b/admin/am_edit
@@ -0,0 +1,2444 @@
+#!/usr/bin/perl -w
+
+# Expands the specialised KDE tags in Makefile.in to (hopefully) valid
+# make syntax.
+# When called without file parameters, we work recursively on all Makefile.in
+# in and below the current subdirectory. When called with file parameters,
+# only those Makefile.in are changed.
+# The currently supported tags are
+#
+# {program}_METASOURCES
+# where you have a choice of two styles
+#   {program}_METASOURCES = name1.moc name2.moc ... [\]
+#   {program}_METASOURCES = AUTO
+#       The second style requires other tags as well.
+#
+# To install icons :
+#    KDE_ICON = iconname iconname2 ...
+#    KDE_ICON = AUTO
+#
+# For documentation :
+#    http://developer.kde.org/documentation/other/developer-faq.html
+#
+# and more new tags TBD!
+#
+# The concept (and base code) for this program came from automoc,
+# supplied by the following
+#
+# Matthias Ettrich <ettrich@kde.org>      (The originator)
+# Kalle Dalheimer <kalle@kde.org>      (The original implementator)
+# Harri Porten  <porten@tu-harburg.de>
+# Alex Zepeda  <jazepeda@pacbell.net>
+# David Faure <faure@kde.org>
+# Stephan Kulow <coolo@kde.org>
+# Dirk Mueller <mueller@kde.org>
+
+use Cwd;
+use File::Find;
+use File::Basename;
+
+# Prototype the functions
+sub initialise ();
+sub processMakefile ($);
+sub updateMakefile ();
+sub restoreMakefile ();
+
+sub removeLine ($$);
+sub appendLines ($);
+sub substituteLine ($$);
+
+sub findMocCandidates ();
+sub pruneMocCandidates ($);
+sub checkMocCandidates ();
+sub addMocRules ();
+sub findKcfgFile($);
+
+sub tag_AUTOMAKE ();
+sub tag_META_INCLUDES ();
+sub tag_METASOURCES ();
+sub tag_POFILES ();
+sub tag_DOCFILES ();
+sub tag_LOCALINSTALL();
+sub tag_IDLFILES();
+sub tag_UIFILES();
+sub tag_KCFGFILES();
+sub tag_SUBDIRS();
+sub tag_ICON();
+sub tag_CLOSURE();
+sub tag_NO_UNDEFINED();
+sub tag_NMCHECK();
+sub tag_DIST();
+sub tag_KDEINIT();
+
+# Some global globals...
+$verbose    = 0;        # a debug flag
+$thisProg   = "$0";     # This programs name
+$topdir     = cwd();    # The current directory
+@makefiles  = ();       # Contains all the files we'll process
+@foreignfiles = ();
+$start      = (times)[0]; # some stats for testing - comment out for release
+$version    = "v0.2";
+$errorflag  = 0;
+$cppExt     = "(cpp|cc|cxx|C|c\\+\\+)";
+$hExt       = "(h|H|hh|hxx|hpp|h\\+\\+)";
+$progId     = "KDE tags expanded automatically by " . basename($thisProg);
+$automkCall = "\n";
+$printname  = "";  # used to display the directory the Makefile is in
+$use_final  = 1;        # create code for --enable-final
+$cleantarget = "clean";
+$dryrun     = 0;
+$pathoption = 0;
+$foreign_libtool = 0;
+
+while (defined ($ARGV[0]))
+{
+    $_ = shift;
+    if (/^--version$/)
+    {
+        print STDOUT "\n";
+        print STDOUT basename($thisProg), " $version\n",
+                "This is really free software, unencumbered by the GPL.\n",
+                "You can do anything you like with it except sueing me.\n",
+                "Copyright 1998 Kalle Dalheimer <kalle\@kde.org>\n",
+                "Concept, design and unnecessary questions about perl\n",
+                "       by Matthias Ettrich <ettrich\@kde.org>\n\n",
+                "Making it useful by Stephan Kulow <coolo\@kde.org> and\n",
+                "Harri Porten <porten\@kde.org>\n",
+                "Updated (Feb-1999), John Birch <jb.nz\@writeme.com>\n",
+                "Fixes and Improvements by Dirk Mueller <mueller\@kde.org>\n",
+	        "Current Maintainer Stephan Kulow\n\n";
+        exit 0;
+    }
+    elsif (/^--verbose$|^-v$/)
+    {
+        $verbose = 1;       # Oh is there a problem...?
+    }
+    elsif (/^(?:-p|--path=)(.+)$/)
+    {
+        my $p = $1;
+        $thisProg = $p . "/". basename($thisProg);
+        warn ("$thisProg doesn't exist\n")      if (!(-f $thisProg));
+        $thisProg .= " -p".$p;
+        $pathoption=1;
+    }
+    elsif (/^--help$|^-h$/)
+    {
+        print STDOUT "Usage $thisProg [OPTION] ... [dir/Makefile.in]...\n",
+                "\n",
+                "Patches dir/Makefile.in generated by automake\n",
+                "(where dir can be an absolute or relative directory name)\n",
+                "\n",
+                "  -v, --verbose      verbosely list files processed\n",
+                "  -h, --help         print this help, then exit\n",
+                "  --version          print version number, then exit\n",
+                "  -p, --path=        use the path to am_edit if the path\n",
+                "                     called from is not the one to be used\n",
+	        "  --no-final         don't patch for --enable-final\n";
+	
+        exit 0;
+    }
+    elsif (/^--no-final$/)
+    {
+	$use_final = 0;
+        $thisProg .= " --no-final";
+    }
+    elsif (/^--foreign-libtool$/)
+    {
+        $foreign_libtool = 1;
+        $thisProg .= " --foreign-libtool";
+    }
+    elsif (/^-n$/)
+    {
+    	$dryrun = 1;
+    }
+    else
+    {
+        # user selects what input files to check
+        # add full path if relative path is given
+        $_ = cwd()."/".$_   if (! /^\//);
+        print "User wants $_\n" if ($verbose);
+        push (@makefiles, $_);
+    }
+}
+
+if ($thisProg =~ /^\// && !$pathoption )
+{
+  print STDERR "Illegal full pathname call performed...\n",
+      "The call to \"$thisProg\"\nwould be inserted in some Makefile.in.\n",
+      "Please use option --path.\n";
+  exit 1;
+}
+
+# Only scan for files when the user hasn't entered data
+if (!@makefiles)
+{
+    print STDOUT "Scanning for Makefile.in\n"       if ($verbose);
+    find (\&add_makefile, cwd());
+    #chdir('$topdir');
+} else {
+    print STDOUT "Using input files specified by user\n"   if ($verbose);
+}
+
+foreach $makefile (sort(@makefiles))
+{
+    processMakefile ($makefile);
+    last            if ($errorflag);
+}
+
+# Just some debug statistics - comment out for release as it uses printf.
+printf STDOUT "Time %.2f CPU sec\n", (times)[0] - $start     if ($verbose);
+
+exit $errorflag;        # causes make to fail if erroflag is set
+
+#-----------------------------------------------------------------------------
+
+# In conjunction with the "find" call, this builds the list of input files
+sub add_makefile ()
+{
+  push (@makefiles, $File::Find::name) if (/Makefile.in$/);
+}
+
+#-----------------------------------------------------------------------------
+
+# Processes a single make file
+# The parameter contains the full path name of the Makefile.in to use
+sub processMakefile ($)
+{
+    # some useful globals for the subroutines called here
+    local ($makefile)       = @_;
+    local @headerdirs       = ('.');
+    local $haveAutomocTag   = 0;
+    local $MakefileData     = "";
+
+    local $cxxsuffix  = "KKK";
+
+    local @programs = ();  # lists the names of programs and libraries
+    local $program = "";
+
+    local @kdeinits = (); # lists the kdeinit targets
+
+    local %realObjs = ();  # lists the objects compiled into $program
+    local %sources = ();   # lists the sources used for $program
+    local %finalObjs = (); # lists the objects compiled when final
+    local %realname = ();  # the binary name of program variable
+    local %idlfiles = ();  # lists the idl files used for $program
+    local %globalmocs = ();# list of all mocfiles (in %mocFiles format)
+    local %important = (); # list of files to be generated asap
+    local %uiFiles = ();
+    local %kcfgFiles = ();
+
+    local $allidls = "";
+    local $idl_output = "";# lists all idl generated files for cleantarget
+    local $ui_output = "";# lists all uic generated files for cleantarget
+    local $kcfg_output = "";# lists all kcfg generated files for cleantarget
+
+    local %dependmocs = ();
+    
+    local $metasourceTags = 0;
+    local $dep_files      = "";
+    local $dep_finals     = "";
+    local %target_adds    = (); # the targets to add
+    local %rule_adds      = ();
+    local $kdelang        = "";
+    local @cleanfiles     = ();
+    local $cleanMoc       = "";
+    local $closure_output = "";
+
+    local %varcontent     = ();
+
+    $makefileDir = dirname($makefile);
+    chdir ($makefileDir);
+    $printname = $makefile;
+    $printname =~ s/^\Q$topdir\E\///;
+    $makefile = basename($makefile);
+
+    print STDOUT "Processing makefile $printname\n"   if ($verbose);
+
+    # Setup and see if we need to do this.
+    return      if (!initialise());
+
+    tag_AUTOMAKE ();            # Allows a "make" to redo the Makefile.in
+    tag_META_INCLUDES ();       # Supplies directories for src locations
+
+    foreach $program (@programs) {
+        $sources_changed{$program} = 0;
+        $dependmocs{$program} = "";
+        $important{$program} = "";
+	tag_IDLFILES();             # Sorts out idl rules
+	tag_NO_UNDEFINED();
+	tag_CLOSURE();
+	tag_NMCHECK();
+	tag_UIFILES();              # Sorts out ui rules
+	tag_KCFGFILES();            # Sorts out kcfg rules
+        tag_METASOURCES ();         # Sorts out the moc rules
+        if ($sources_changed{$program}) {
+            my $lookup = $program . '_SOURCES\s*=[ \t]*(.*)';
+
+            if($program =~ /libkdeinit_(.*)/) {
+                my $prog = $1;
+                substituteLine($prog . '_SOURCES\s*=[ \t]*(.*)', 
+                    "${prog}_SOURCES = ${prog}_dummy.$cxxsuffix\n" .
+                    "libkdeinit_${prog}_SOURCES = " . $sources{$program});
+                $sources{$prog} = "${prog}_dummy.$cxxsuffix";
+            }
+            else {
+                substituteLine($lookup, "$program\_SOURCES=" . $sources{$program});
+            }
+        }
+        if ($important{$program}) {
+            local %source_dict = ();
+            for $source (split(/[\034\s]+/, $sources{$program})) {
+                $source_dict{$source} = 1;
+            }
+            for $source (@cleanfiles) {
+                $source_dict{$source} = 0;
+            }
+            for $source (keys %source_dict) {
+                next if (!$source);
+                if ($source_dict{$source}) {
+                    # sanity check
+                    if (! -f $source) {
+                        print STDERR "Error: $source is listed in a _SOURCE line in $printname, but doesn't exist yet. Put it in DISTCLEANFILES!\n";
+                    } else {
+                        $target_adds{"\$(srcdir)/$source"} .= $important{$program};
+                    }
+                }
+            }
+        }
+    }
+    if ($cleanMoc) {
+        # Always add dist clean tag
+        # Add extra *.moc.cpp files created for USE_AUTOMOC because they
+        # aren't included in the normal *.moc clean rules.
+        appendLines ("$cleantarget-metasources:\n\t-rm -f $cleanMoc\n");
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-metasources ";
+    }
+    
+    tag_DIST() unless ($kdeopts{"noautodist"});
+
+    if ($idl_output) {
+        appendLines ("$cleantarget-idl:\n\t-rm -f $idl_output\n");
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-idl ";
+    }
+
+    if ($ui_output) {
+        appendLines ("$cleantarget-ui:\n\t-rm -f $ui_output\n");
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-ui ";
+    }
+
+    if ($kcfg_output) {
+        appendLines ("$cleantarget-kcfg:\n\t-rm -f $kcfg_output\n");
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-kcfg ";
+    }
+
+    if ($closure_output) {
+        appendLines ("$cleantarget-closures:\n\t-rm -f $closure_output\n");
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-closures ";
+    }
+
+    if ($MakefileData =~ /\nKDE_LANG\s*=\s*(\S*)\s*\n/) {
+        $kdelang = '$(KDE_LANG)'
+    } else {
+        $kdelang = '';
+    }
+
+    tag_POFILES ();             # language rules for po directory
+    tag_DOCFILES ();            # language rules for doc directories
+    tag_LOCALINSTALL();         # add $(DESTDIR) before all kde_ dirs
+    tag_ICON();
+    tag_SUBDIRS();
+
+    my $tmp = "force-reedit:\n";
+    $tmp   .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n";
+    appendLines($tmp);
+
+    make_bcheck_target();
+    make_meta_classes();
+    tag_COMPILE_FIRST();
+    tag_FINAL() if (!$kdeopts{"nofinal"});
+
+    my $final_lines = "final:\n\t\$(MAKE) ";
+    my $final_install_lines = "final-install:\n\t\$(MAKE) ";
+    my $nofinal_lines = "no-final:\n\t\$(MAKE) ";
+    my $nofinal_install_lines = "no-final-install:\n\t\$(MAKE) ";
+
+    foreach $program (@programs) {
+        my $lookup = $program . '_OBJECTS\s*=[ \t]*.*';
+        my $new = "";
+        my @list = split(/[\034\s]+/, $realObjs{$program});
+        if (!$kdeopts{"nofinal"} && @list > 1 && $finalObjs{$program}) {
+            $new .= "$program\_final\_OBJECTS = " . $finalObjs{$program};
+            $new .= "\n$program\_nofinal\_OBJECTS = " . $realObjs{$program};
+            $new .= "\n\@KDE_USE_FINAL_FALSE\@$program\_OBJECTS = \$($program\_nofinal\_OBJECTS)";
+            $new .= "\n\@KDE_USE_FINAL_TRUE\@$program\_OBJECTS = \$($program\_final\_OBJECTS)";
+
+            $final_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
+            $final_install_lines .= "$program\_OBJECTS=\"\$($program\_final_OBJECTS)\" ";
+            $nofinal_lines .= "$program\_OBJECTS=\"\$($program\_nofinal\_OBJECTS)\" ";
+            $nofinal_install_lines .= "$program\_OBJECTS=\"\$($program\_nofinal_OBJECTS)\" ";
+        } else {
+            $new = "$program\_OBJECTS = " . $realObjs{$program};
+        }
+        if($MakefileData =~ m/\n$lookup/) {
+            substituteLine ($lookup, $new);
+        }
+        else {
+            appendLines("$new\n");
+        }
+    }
+    appendLines($final_lines . "all-am\n");
+    appendLines($final_install_lines . "install-am\n");
+    appendLines($nofinal_lines . "all-am\n");
+    appendLines($nofinal_install_lines . "install-am\n");
+
+    my $lookup = '(\@\S+\@)?DEP_FILES\s*=[ \t]*(.*)';
+    if ($MakefileData =~ /\n$lookup/) {
+        my $condition = $1;
+        my $depfiles = $2;
+        my $workfiles;
+
+        if ($dep_finals) {
+            # Add the conditions on every line, since
+            # there may be line continuations in the list.
+            $workfiles = "$dep_files $dep_finals $depfiles";
+            $workfiles =~ s/\034/\034$condition\@KDE_USE_FINAL_TRUE\@\t/g;
+            $lines  = "$condition\@KDE_USE_FINAL_TRUE\@DEP_FILES = $workfiles\n";
+            $workfiles = "$dep_files $depfiles";
+            $workfiles =~ s/\034/\034$condition\@KDE_USE_FINAL_FALSE\@\t/g;
+            $lines .= "$condition\@KDE_USE_FINAL_FALSE\@DEP_FILES = $workfiles";
+        } else {
+            $workfiles = "$dep_files $depfiles";
+            $workfiles =~ s/\034/\034$condition\t/g;
+            $lines = $condition . "DEP_FILES = $workfiles";
+        }
+        substituteLine($lookup, $lines);
+    }
+
+    # new recursive targets
+    $target_adds{ "nmcheck" } .= ""; # always create nmcheck target
+    $target_adds{ "nmcheck-am" } .= "nmcheck";
+    $lookup = 'RECURSIVE_TARGETS\s*=[ \t]*(.*)';
+    if ($MakefileData =~ /\n$lookup/) {
+      substituteLine($lookup, "RECURSIVE_TARGETS = $1 nmcheck-recursive bcheck-recursive");
+    }
+
+    $cvs_lines  = "kde-rpo-clean:\n";
+    $cvs_lines .= "\t-rm -f *.rpo\n";
+    appendLines($cvs_lines);
+    $target_adds{"clean"} .= "kde-rpo-clean ";
+
+    my %target_dels = ("install-data-am" => "");
+
+    # some strange people like to do a install-exec, and expect that also
+    # all modules are installed.  automake doesn't know this, so we need to move
+    # this here from install-data to install-exec.
+    if ($MakefileData =~ m/\nkde_module_LTLIBRARIES\s*=/) {
+#      $target_adds{"install-exec-am"} .= "install-kde_moduleLTLIBRARIES ";
+#      don't use $target_adds here because we need to append the dependency, not
+#      prepend it. Fixes #44342 , when a module depends on a lib in the same dir
+#      and libtool needs it during relinking upon install (Simon)
+      my $lookup = "install-exec-am:([^\n]*)";
+      if($MakefileData =~ /\n$lookup\n/) {
+        substituteLine("$lookup", "install-exec-am: $1 install-kde_moduleLTLIBRARIES");
+      }
+      $target_dels{"install-data-am"} .= "install-kde_moduleLTLIBRARIES ";
+      $target_adds{"install-data-am"} .= " ";
+    }
+
+    my $lines = "";
+
+    foreach $add (keys %target_adds) {
+	my $lookup = quotemeta($add) . ':([^\n]*)';
+        if ($MakefileData =~ /\n$lookup\n/) {
+	  my $newlines = $1;
+	  my $oldlines = $lookup;
+	  if (defined $target_dels{$add}) {
+	    foreach $del (split(' ', $target_dels{$add})) {
+	      $newlines =~ s/\s*$del\s*/ /g;
+	    }
+	  }
+	  substituteLine($oldlines, "$add: " . $target_adds{$add} . $newlines);
+        } else {
+	  $lines .= "$add: " . $target_adds{$add} . "\n";
+        }
+    }
+
+    appendLines($lines) if ($lines);
+
+    $lines = join("\n", values %rule_adds);
+    appendLines($lines) if ($lines);
+
+    my $found = 1;
+
+    while ($found) {
+        if ($MakefileData =~ m/\n(.*)\$\(CXXFLAGS\)(.*)\n/) {
+            my $stuff_before = $1;
+            my $stuff_after = $2;
+            my $lookup = quotemeta("$1\$(CXXFLAGS)$2");
+            my $replacement = "$1\$(KCXXFLAGS)$2";
+            $MakefileData =~ s/$lookup/$replacement/;
+            $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/;
+            $replacement = "$stuff_before\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$stuff_after";
+            next if ($stuff_before =~ /\$\(KDE_CXXFLAGS\)/ or $stuff_after =~ /\$\(KDE_CXXFLAGS\)/);
+            substituteLine($lookup, $replacement);
+        } else {
+            $found = 0;
+        }
+    }
+
+    if($foreign_libtool == 0) {
+        $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=link) (\$\(CXXLD\).*\$\(KCXXFLAGS\))';
+
+        if ($MakefileData =~ m/$lookup/ ) {
+            $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
+        }
+
+        $lookup = '(\n[^#].*\$\(LIBTOOL\) --mode=compile)\s+(\$\(CXX\)\s+)';
+        if ($MakefileData =~ m/$lookup/ ) {
+            $MakefileData =~ s/$lookup/$1 --tag=CXX $2/;
+        }
+    }
+
+    $MakefileData =~ s/\$\(KCXXFLAGS\)/\$\(CXXFLAGS\)/g;
+
+    $lookup = '(.*)cp -pr \$\$/\$\$file \$\(distdir\)/\$\$file(.*)';
+    if ($MakefileData =~ m/\n$lookup\n/) {
+        substituteLine($lookup, "$1cp -pr \$\$d/\$\$file \$(distdir)/\$\$file$2");
+    }
+
+    # Always update the Makefile.in
+    updateMakefile ();
+    return;
+}
+
+#-----------------------------------------------------------------------------
+
+# Beware: This procedure is not complete.  E.g. it also parses lines
+# containing a '=' in rules (for instance setting shell vars).  For our
+# usage this us enough, though.
+sub read_variables ()
+{
+    while ($MakefileData =~ /\n\s*(\S+)\s*=([^\n]*)/g) {
+        $varcontent{$1} = $2;
+    }
+}
+
+# Check to see whether we should process this make file.
+# This is where we look for tags that we need to process.
+# A small amount of initialising on the tags is also done here.
+# And of course we open and/or create the needed make files.
+sub initialise ()
+{
+    if (! -r "Makefile.am") {
+	print STDOUT "found Makefile.in without Makefile.am\n" if ($verbose);
+	return 0;
+    }
+
+    # Checking for files to process...
+
+    open (FILEIN, $makefile) || die "Can't open $makefileDir/$makefile: $!\n";
+    # perl bug in 5.8.0: in utf8 mode it badly screws up
+    binmode(FILEIN, ":bytes") if ($] >= 5.008);
+    # Read the file
+    # stat(FILEIN)[7] might look more elegant, but is slower as it 
+    # requires stat'ing the file
+    seek(FILEIN, 0, 2);
+    my $fsize = tell(FILEIN);
+    seek(FILEIN, 0, 0);
+    read FILEIN, $MakefileData, $fsize;
+    close FILEIN;
+    print "DOS CRLF within $makefileDir/$makefile!\n" if($MakefileData =~ y/\r//d);
+
+    # Remove the line continuations, but keep them marked
+    # Note: we lose the trailing spaces but that's ok.
+    # Don't mangle line-leading spaces (usually tabs)
+    # since they're important.
+    $MakefileData =~ s/\\\s*\n/\034/g;
+
+    # If we've processed the file before...
+    restoreMakefile ()      if ($MakefileData =~ /$progId/);
+
+    foreach $dir (@foreignfiles) {
+      if (substr($makefileDir,0,length($dir)) eq $dir) {
+	return 0;
+      }
+    }
+
+    %kdeopts = ();
+    $kdeopts{"foreign"} = 0;
+    $kdeopts{"qtonly"} = 0;
+    $kdeopts{"noautodist"} = 0;
+    $kdeopts{"foreign-libtool"} = $foreign_libtool;
+    $kdeopts{"nofinal"} = !$use_final; # default
+
+    read_variables();
+
+    if ($MakefileData =~ /\nKDE_OPTIONS\s*=[ \t]*([^\n]*)\n/) {
+	my $kde_options_str = $1;
+        local @kde_options = split(/[\034\s]+/, $kde_options_str);
+        if (grep(/^foreign$/, @kde_options)) {
+            push(@foreignfiles, $makefileDir . "/");
+            return 0; # don't touch me
+        }
+        for $opt (@kde_options) {
+            if (!defined $kdeopts{$opt}) {
+                print STDERR "Warning: unknown option $opt in $printname\n";
+            } else {
+                $kdeopts{$opt} = 1;
+            }
+        }
+    }
+
+    # Look for the tags that mean we should process this file.
+    $metasourceTags = 0;
+    $metasourceTags++    while ($MakefileData =~ /\n[^=\#]*METASOURCES\s*=/g);
+
+    my $pofileTag = 0;
+    $pofileTag++    while ($MakefileData =~ /\nPOFILES\s*=/g);
+    if ($pofileTag > 1)
+      {
+          print STDERR "Error: Only one POFILES tag allowed\n";
+          $errorflag = 1;
+      }
+
+    while ($MakefileData =~ /\n\.SUFFIXES:([^\n]+)\n/g) {
+	my $suffixes_str = $1;
+	my @list=split(' ', $suffixes_str);
+	foreach $ext (@list) {
+	    if ($ext =~ /^\.$cppExt$/) {
+		$cxxsuffix = $ext;
+		$cxxsuffix =~ s/\.//g;
+		print STDOUT "will use suffix $cxxsuffix\n" if ($verbose);
+		last;
+	    }
+	}
+    }
+
+    tag_KDEINIT();
+
+    while ($MakefileData =~ /\n(\S*)_OBJECTS\s*=[\034 \t]*([^\n]*)\n/g) {
+
+        my $program = $1;
+        my $objs = $2; # safe them
+
+        my $ocv = 0;
+
+        my @objlist = split(/[\034\s]+/, $objs);
+        foreach $obj (@objlist) {
+            if ($obj =~ /(\S*)\$\((\S+)\)/ ) {
+		my $pre = $1;
+                my $variable = $2;
+		if ($pre eq '' && exists($varcontent{$variable})) {
+		    my @addlist = split(/[\034\s]+/, $varcontent{$variable});
+		    push(@objlist, @addlist);
+                } elsif ($variable !~ 'OBJEXT' && $variable !~ /am__objects_\d+/ ) {
+                    $ocv = 1;
+		}
+            }
+        }
+
+        next if ($ocv);
+        next if ($program =~ /^am_libkdeinit_/);
+
+        $program =~ s/^am_// if ($program =~ /^am_/);
+
+        my $sourceprogram = $program;
+        $sourceprogram =~ s/\@am_/\@/ if($sourceprogram =~ /^.*\@am_.+/);
+
+        print STDOUT "found program $program\n" if ($verbose);
+        push(@programs, $program);
+
+        $realObjs{$program} = $objs;
+
+        if ($MakefileData =~ /\n$sourceprogram\_SOURCES\s*=[ \t]*(.*)\n/) {
+            $sources{$program} = $1;
+        } 
+        else {
+            $sources{$program} = "";
+            print STDERR "found program with no _SOURCES: $program\n";
+        }
+        
+        my $realprogram = $program;
+        $realprogram =~ s/_/./g; # unmask to regexp
+        if ($MakefileData =~ /\n($realprogram)(\$\(EXEEXT\)?)?:.*\$\($program\_OBJECTS\)/) {
+            $realname{$program} = $1;
+        } else {
+            # not standard Makefile - nothing to worry about
+            $realname{$program} = "";
+        }
+    }
+
+    my $lookup = 'DEPDIR\s*=.*';
+    if ($MakefileData !~ /\n$lookup/) {
+        $lookup = 'bindir\s*=[ \t]*.*';
+        substituteLine($lookup, "DEPDIR = .deps\n$1") if ($MakefileData =~ /\n($lookup)/);
+    }
+
+    my @marks = ('MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES');
+    foreach $mark (@marks) {
+        while ($MakefileData =~ /\n($mark)\s*=[ \t]*([^\n]*)/g) {
+	    my $clean_str = $2; 
+            foreach $file (split('[\034\s]+', $clean_str)) {
+                $file =~ s/\.\///;
+                push(@cleanfiles, $file);
+            }
+        }
+    }
+
+    my $localTag = 0;
+    $localTag++ if ($MakefileData =~ /\ninstall-\S+-local:/);
+    
+    return (!$errorflag);
+}
+
+#-----------------------------------------------------------------------------
+
+# Gets the list of user defined directories - relative to $srcdir - where
+# header files could be located.
+sub tag_META_INCLUDES ()
+{
+    my $lookup = '[^=\n]*META_INCLUDES\s*=[ \t]*(.*)';
+    return 1    if ($MakefileData !~ /($lookup)\n/);
+    print STDOUT "META_INCLUDE processing <$1>\n"       if ($verbose);
+
+    my $headerStr = $2;
+    removeLine ($lookup, $1);
+
+    my @headerlist = split(/[\034\s]+/, $headerStr);
+
+    foreach $dir (@headerlist)
+    {
+        $dir =~ s#\$\(srcdir\)#.#;
+        if (! -d $dir)
+        {
+            print STDERR "Warning: $dir can't be found. ",
+                            "Must be a relative path to \$(srcdir)\n";
+        }
+        else
+        {
+            push (@headerdirs, $dir);
+        }
+    }
+
+    return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+sub tag_FINAL()
+{
+    my @final_names = ();
+    
+    foreach $program (@programs) {
+        
+        if ($sources{$program} =~ /\(/) {
+            print STDOUT "found ( in $program\_SOURCES. skipping\n" if ($verbose);
+            next;
+        }
+
+        my $mocs = "";       # Moc files (in this program)
+	my $moc_cpp_added = 0;  # If we added some .moc.cpp files, due to
+				# no other .cpp file including the .moc one.
+        
+        my @progsources = split(/[\034\s]+/, $sources{$program});
+        my %shash = ();
+        @shash{@progsources} = 1;  # we are only interested in the existence
+        my %sourcelist = ();
+        my %extradeps = ();
+        
+        foreach $source (@progsources) {
+            my $suffix = $source;
+            $suffix =~ s/^.*\.([^\.]+)$/$1/;
+            
+            $sourcelist{$suffix} .= "$source ";
+        }
+        foreach my $mocFile (keys (%globalmocs))
+        {
+            my ($dir, $hFile, $cppFile) = split ("\035", $globalmocs{$mocFile}, 3);
+            if (defined ($cppFile)) {
+                $mocs .= " $mocFile.moc" if exists $shash{$cppFile};
+            } else {
+		$sourcelist{$cxxsuffix} .= "$mocFile.moc.$cxxsuffix ";
+		$moc_cpp_added = 1;
+	    }
+        }
+
+        # scan for extra given dependencies and add them to our target
+        while ($MakefileData =~ /\n\s*(\S+)\.(?:lo|o)\s*:([^\n]*)/g) {
+            $extradeps{$1} = $2;
+        }
+
+        foreach $suffix (keys %sourcelist) {
+            # See if this file contains c++ code. (i.e., just check the file's suffix against c++ extensions)
+            my $suffix_is_cxx = 0;
+            if($suffix =~ /($cppExt)$/) {
+              $cxxsuffix = $1;
+              $suffix_is_cxx = 1;
+            }
+            
+            my $mocfiles_in = ($suffix eq $cxxsuffix) && $moc_cpp_added;
+            
+            my @sourcelist = split(/[\034\s]+/, $sourcelist{$suffix});
+            
+            if ((@sourcelist == 1 && !$mocfiles_in) || $suffix_is_cxx != 1 ) {
+                
+                # we support IDL on our own
+                if ($suffix eq "skel" || $suffix =~ /^stub/
+		    || $suffix =~ /^signals/ # obsolete, remove in KDE-4
+                    || $suffix eq "h" || $suffix eq "ui" 
+                    || $suffix eq "kcfgc" ) {
+                    next;
+                }
+                
+                foreach $file (@sourcelist) {
+                    $file =~ s/\Q$suffix\E$//;
+                    
+                    $finalObjs{$program} .= $file;
+                    if ($program =~ /_la$/) {
+                        $finalObjs{$program} .= "lo ";
+                    } else {
+                        $finalObjs{$program} .= "o ";
+                    }
+                }
+                next; # suffix
+            }
+            
+            my $source_deps = "";
+            foreach $source (@sourcelist) {
+                if (-f $source) {
+                    $source_deps .= " \$(srcdir)/$source";
+                } else {
+                    $source_deps .= " $source";
+                }
+                my $plainsource = $source;
+                $plainsource =~ s/\.$cppExt$//;
+                $source_deps .= " " . $extradeps{$plainsource} if (exists($extradeps{$plainsource}));
+            }
+
+            $handling = "$program.all_$suffix.$suffix: \$(srcdir)/Makefile.in" . $source_deps . " " . join(' ', $mocs)  . "\n";
+            $handling .= "\t\@echo 'creating $program.all_$suffix.$suffix ...'; \\\n";
+            $handling .= "\trm -f $program.all_$suffix.files $program.all_$suffix.final; \\\n";
+            $handling .= "\techo \"#define KDE_USE_FINAL 1\" >> $program.all_$suffix.final; \\\n";
+            $handling .= "\tfor file in " . $sourcelist{$suffix} . "; do \\\n";
+            $handling .= "\t  echo \"#include \\\"\$\$file\\\"\" >> $program.all_$suffix.files; \\\n";
+            $handling .= "\t  test ! -f \$\(srcdir\)/\$\$file || egrep '^#pragma +implementation' \$\(srcdir\)/\$\$file >> $program.all_$suffix.final; \\\n";
+            $handling .= "\tdone; \\\n";
+            $handling .= "\tcat $program.all_$suffix.final $program.all_$suffix.files > $program.all_$suffix.$suffix; \\\n";
+            $handling .= "\trm -f $program.all_$suffix.final $program.all_$suffix.files\n";
+
+            appendLines($handling);
+
+            push(@final_names, "$program.all_$suffix.$suffix");
+            my $finalObj = "$program.all_$suffix.";
+            if ($program =~ /_la$/) {
+                $finalObj .= "lo";
+            } else {
+                $finalObj .= "o";
+            }
+	    $finalObjs{$program} .= $finalObj . " ";
+        }
+    }
+    
+    if (!$kdeopts{"nofinal"} && @final_names >= 1) {
+        # add clean-final target
+        my $lines = "$cleantarget-final:\n";
+        $lines .= "\t-rm -f " . join(' ', @final_names) . "\n" if (@final_names);
+        appendLines($lines);
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-final ";
+        
+        foreach $finalfile (@final_names) {
+            $finalfile =~ s/\.[^.]*$/.P/;
+            $dep_finals .= " \$(DEPDIR)/$finalfile";
+        }
+    }
+}
+
+sub tag_KDEINIT()
+{
+    my @progs = ();
+    my $ltlibs = "";
+    my $lookup = 'kdeinit_LTLIBRARIES\s*=[ \t]*(.*)';
+
+    if ($MakefileData =~ m/\n$lookup/) {
+	@kdeinits = split(/[\034\s]+/, $1);
+	my $lines = "";
+	foreach my $kdeinit (@kdeinits) {
+	    if ($kdeinit =~ m/\.la$/) {
+		$kdeinit =~ s/\.la$//;
+                push(@progs, $kdeinit);
+
+                $lines .= "\n${kdeinit}.la.$cxxsuffix:\n";
+                $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' > ${kdeinit}.la.$cxxsuffix; \\\n";
+                $lines .= "\techo 'int main(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}.la.$cxxsuffix\n";
+
+                $lines .= "\n${kdeinit}_dummy.$cxxsuffix:\n";
+                $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' > ${kdeinit}_dummy.$cxxsuffix; \\\n";
+                $lines .= "\techo 'extern \"C\" int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}_dummy.$cxxsuffix\n";
+
+                push(@cleanfiles, "${kdeinit}.la.$cxxsuffix");
+                push(@cleanfiles, "${kdeinit}_dummy.$cxxsuffix");
+
+                # add dependency
+                $dep_files .= " \$(DEPDIR)/${kdeinit}.la.Po" if($dep_files !~/${kdeinit}.la.Po/ );
+                $dep_files .= " \$(DEPDIR)/${kdeinit}_dummy.Plo" if($dep_files !~/${kdeinit}_dummy.Plo/ );
+
+                # make library
+                $lookup = $kdeinit . '_la_LIBADD\s*=[ \t]*(.*)';
+                if($MakefileData =~ m/\n$lookup/) {
+                    my $libadd = $1;
+                    substituteLine($lookup, "${kdeinit}_la_LIBADD = libkdeinit_${kdeinit}.la");
+                    appendLines("libkdeinit_${kdeinit}_la_LIBADD = $libadd\n");
+                }
+                appendLines("libkdeinit_${kdeinit}_la_LDFLAGS = -no-undefined -avoid-version \$(all_libraries)\n");
+
+                # add library dependencies
+                $lookup = $kdeinit . '_la_DEPENDENCIES\s*=[ \t]*(.*)';
+                if($MakefileData =~ m/\n$lookup/) {
+                    my $libdeps = $1;
+                    substituteLine($lookup, "${kdeinit}_la_DEPENDENCIES = libkdeinit_${kdeinit}.la");
+                    appendLines("libkdeinit_${kdeinit}_la_DEPENDENCIES = $libdeps\n");
+                }
+
+                # make library objects
+                $lookup = "am_${kdeinit}_la_OBJECTS" . '\s*=[ \t]*(.*)';
+                if($MakefileData =~ m/\n$lookup/) {
+                    my $libobjects = $1;
+                    substituteLine($lookup, "am_${kdeinit}_la_OBJECTS = ${kdeinit}_dummy.lo");
+                    appendLines("am_libkdeinit_${kdeinit}_la_OBJECTS = $libobjects\n");
+                    my $prog = "libkdeinit_${kdeinit}_la";
+                    push(@programs, $prog);
+                    $realObjs{$prog} = $libobjects;
+                    $realname{$prog} = "libkdeinit_${kdeinit}.la";
+                }
+                $target_adds{"libkdeinit_${kdeinit}.la"} = "\$(libkdeinit_${kdeinit}_la_OBJECTS) \$(libkdeinit_${kdeinit}_la_DEPENDENCIES)\n" .
+                        "\t\$(CXXLINK) -rpath \$(libdir) \$(libkdeinit_${kdeinit}_la_LDFLAGS) ".
+                           "\$(libkdeinit_${kdeinit}_la_OBJECTS) " .
+                           "\$(libkdeinit_${kdeinit}_la_LIBADD) " .
+                           "\$(LIBS)\n";
+
+                # make libkdeinit sources
+                $lookup = $kdeinit . '_la_SOURCES\s*=[ \t]*(.*)';
+                if($MakefileData =~ m/\n$lookup/) {
+                    my $srces = $1;
+                    $sources_changed{"libkdeinit_${kdeinit}_la"} = 1;
+                    $sources{"libkdeinit_${kdeinit}_la"} = $srces;
+                }
+
+                # make libkdeinit metasources
+                $lookup = $kdeinit . '_la_METASOURCES\s*=[ \t]*(.*)';
+                substituteLine($lookup, "libkdeinit_${kdeinit}_la_METASOURCES = $1")
+                    if($MakefileData =~ m/\n$lookup/);
+
+=cut
+                # make binary sources
+                $lookup = $kdeinit. '_SOURCES\s*=[ \t]*(.*)';
+                if($MakefileData =~ m/\n$lookup/) {
+                    substituteLine($lookup, "${kdeinit}_SOURCES = ${kdeinit}.la.$cxxsuffix");
+                    $lookup = 'SOURCES\s*=[ \t]*(.*)';
+                    if($MakefileData =~ m/\n$lookup/) {
+                        my $srces = $1;
+                        $srces =~ s/\b$kdeinit\.c\b/\$(${kdeinit}_SOURCES)/;
+                        $srces =~ s/\$\(${kdeinit}_la_SOURCES\)/\$(libkdeinit_${kdeinit}_la_SOURCES)/;
+                        substituteLine($lookup, "SOURCES = $srces");
+                    }
+                    $lookup = 'DIST_SOURCES\s*=[ \t](.*)';
+                    if($MakefileData =~ m/\n$lookup/) {
+                        my $srces = $1;
+                        $srces =~ s/\b$kdeinit\.c\b/\$(${kdeinit}_SOURCES)/;
+                        $srces =~ s/\$\(${kdeinit}_la_SOURCES\)/\$(libkdeinit_${kdeinit}_la_SOURCES)/;
+                        substituteLine($lookup, "DIST_SOURCES = $srces");
+                    }
+                }
+
+                # make binary objects / libs
+                $lookup = $kdeinit . '_OBJECTS\s*=[ \t]*.*';
+                if($MakefileData =~ m/\n$lookup/) {
+                    $realObjs{$kdeinit} = "${kdeinit}.la.\$(OBJEXT)";
+                    substituteLine("${kdeinit}_LDFLAGS\\s*=.*", "${kdeinit}_LDFLAGS = \$(all_libraries)");
+                    substituteLine("${kdeinit}_LDADD\\s*=.*", "${kdeinit}_LDADD = libkdeinit_${kdeinit}.la");
+                    substituteLine("${kdeinit}_DEPENDENCIES\\s*=.*", "${kdeinit}_DEPENDENCIES = libkdeinit_${kdeinit}.la");
+                }
+=cut
+                # add binary
+                push(@programs, $kdeinit);
+                $realObjs{$kdeinit} = "${kdeinit}.la.\$(OBJEXT)";
+                $realname{$kdeinit} = $kdeinit;
+                $sources{$kdeinit} = "${kdeinit}.la.$cxxsuffix";
+
+                $lines .= "${kdeinit}_LDFLAGS = \$(KDE_RPATH) -no-undefined \$(all_libraries)\n";
+                $lines .= "${kdeinit}_LDADD = libkdeinit_${kdeinit}.la\n";
+                $lines .= "${kdeinit}_DEPENDENCIES = libkdeinit_${kdeinit}.la\n";
+
+                $target_adds{"${kdeinit}\$(EXEEXT)"} =
+                          "\$(${kdeinit}_OBJECTS) \$(${kdeinit}_DEPENDENCIES)\n" .
+                          "\t\@rm -f ${kdeinit}\$(EXEEXT)\n" .
+                          "\t\$(CXXLINK) \$(${kdeinit}_LDFLAGS) \$(${kdeinit}_OBJECTS) \$(${kdeinit}_LDADD) \$(LIBS)\n";
+
+                $ltlibs .= " libkdeinit_${kdeinit}.la";
+	    }
+        }
+        appendLines($lines);
+
+        # add libkdeinit target
+        $lookup = 'lib_LTLIBRARIES\s*=[ \t]*(.*)';
+        if($MakefileData =~ m/\n$lookup/) {
+            substituteLine($lookup, "lib_LTLIBRARIES = $1 $ltlibs");
+        }
+        else {
+            print STDERR
+                "Error: lib_LTLIBRARIES missing in $printname (required for kdeinit_LTLIBRARIES).\n";
+            $errorflag = 1;
+        }
+    }
+
+    if($#progs >= 0) {
+        if($MakefileData !~ m/\nbin_PROGRAMS\s*=/) {
+            print STDERR "Error: bin_PROGRAMS missing in $printname (required for kdeinit_LTLIBRARIES).\n";
+            $errorflag = 1;
+        }
+        else {
+            # add our new progs to SOURCES, DIST_SOURCES and bin_PROGRAMS
+            my $progsources = "";
+            my $progexes = "";
+            foreach my $p (@progs) {
+                $progsources .= "\$(${p}_SOURCES) ";
+                $progexes .= "${p}\$(EXEEXT) ";
+            }
+            $lookup = 'SOURCES\s*=[ \t]*(.*)';
+            if($MakefileData =~ /\n$lookup/) {
+                substituteLine($lookup, "SOURCES = $1 $progsources");
+            }
+            $lookup = 'DIST_SOURCES\s*=[ \t]*(.*)';
+            if($MakefileData =~ /\n$lookup/) {
+                substituteLine($lookup, "DIST_SOURCES = $1 $progsources");
+            }
+            # bin_PROGRAMS is complicated, as it exists twice, so we do a little
+            # magic trick here
+            $lookup = 'PROGRAMS\s*=[ \t]*(.*)';
+            if ($MakefileData =~ /\n$lookup/) {
+                substituteLine($lookup, "bin_PROGRAMS += $progexes\nPROGRAMS = $1");
+            }
+        }
+    }
+}
+
+#-----------------------------------------------------------------------------
+
+sub tag_COMPILE_FIRST()
+{
+  foreach $program (@programs) {
+    my $lookup = "$program" . '_COMPILE_FIRST\s*=[ \t]*(.*)';
+    if ($MakefileData =~ m/\n$lookup\n/) {
+      my $compilefirst_str = $1;
+      my @compilefirst = split(/[\034\s]+/, $compilefirst_str);
+      my @progsources = split(/[\034\s]+/, $sources{$program});
+      my %donesources = ();
+      foreach $source (@progsources) {
+        my @deps  = ();
+        my $sdeps = "";
+        if (-f $source) {
+          $sdeps = "\$(srcdir)/$source";
+        } else {
+          $sdeps = "$source";
+        }
+        foreach $depend (@compilefirst) {
+          next if ($source eq $depend);
+          # avoid cyclic dependencies
+          next if defined($donesources{$depend});
+          push @deps, $depend;
+        }
+        $target_adds{$sdeps} .= join(' ', @deps) . ' ' if (@deps);
+        $donesources{$source} = 1;
+      }
+    }
+  }
+}
+
+#-----------------------------------------------------------------------------
+
+
+# Organises the list of headers that we'll use to produce moc files
+# from.
+sub tag_METASOURCES ()
+{
+    local @newObs           = ();  # here we add to create object files
+    local @depend           = ();  # here we add to create moc files
+    local $mocExt           = ".moc";
+    local %mocFiles         = ();
+
+    my $line = "";
+    my $postEqual = "";
+
+    my $lookup;
+    my $found = "";
+    if ($metasourceTags > 1) {
+	$lookup = $program . '_METASOURCES\s*=\s*(.*)';
+	return 1    if ($MakefileData !~ /\n($lookup)\n/);
+	$found = $1;
+    } else {
+	$lookup = $program . '_METASOURCES\s*=\s*(.*)';
+	if ($MakefileData !~ /\n($lookup)\n/) {
+	    $lookup = 'METASOURCES\s*=\s*(.*)';
+	    return 1    if ($MakefileData !~ /\n($lookup)\n/);
+	    $found = $1;
+	    $metasourceTags = 0; # we can use the general target only once
+	} else {
+            $found = $1;
+        }
+    }
+    print STDOUT "METASOURCE processing <$found>)\n"      if ($verbose);
+    
+    $postEqual = $found;
+    $postEqual =~ s/[^=]*=//;
+    
+    removeLine ($lookup, $found);
+    
+    # Always find the header files that could be used to "moc"
+    return 1    if (findMocCandidates ());
+    
+    if ($postEqual =~ /AUTO\s*(\S*)|USE_AUTOMOC\s*(\S*)/)
+    {
+	print STDERR "$printname: the argument for AUTO|USE_AUTOMOC is obsolete" if ($+);
+	$mocExt = ".moc.$cxxsuffix";
+	$haveAutomocTag = 1;
+    }
+    else
+    {
+        # Not automoc so read the list of files supplied which
+        # should be .moc files.
+
+        $postEqual =~ tr/\034/ /;
+
+        # prune out extra headers - This also checks to make sure that
+        # the list is valid.
+        pruneMocCandidates ($postEqual);
+    }
+
+    checkMocCandidates ();
+    
+    if (@newObs) {
+        my $ext =  ($program =~ /_la$/) ? ".moc.lo " : ".moc.o ";
+        $realObjs{$program} .= "\034" . join ($ext, @newObs) . $ext;
+        $dependmocs{$program} = join (".moc.$cxxsuffix " , @newObs) . ".moc.$cxxsuffix";
+        foreach $file (@newObs) {
+            $dep_files .= " \$(DEPDIR)/$file.moc.P" if($dep_files !~/$file.moc.P/);
+        }
+    }
+    if (@depend) {
+        $dependmocs{$program} .= " ";
+        $dependmocs{$program} .= join('.moc ', @depend) . ".moc";
+        $dependmocs{$program} .= " ";
+    }
+    addMocRules ();
+    @globalmocs{keys %mocFiles}=values %mocFiles;
+}
+
+#-----------------------------------------------------------------------------
+
+# Returns 0 if the line was processed - 1 otherwise.
+# Errors are logged in the global $errorflags
+sub tag_AUTOMAKE ()
+{
+    my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\034\s]+\$\(AUTOMAKE\)(.*)';
+    return 1    if ($MakefileData !~ /\n($lookup)\n/);
+    print STDOUT "AUTOMAKE processing <$1>\n"        if ($verbose);
+
+    my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname";
+
+    # automake 1.8.x adds another automake call. *sigh*
+    $newLine =~ s/;([\034\s]+cd\s+\$\(srcdir\)\s+&&[\034\s]+\$\(AUTOMAKE\).*)[\034\s]+\&\&[\034\s]+exit[\034\s]+0;([\034\s]+exit\s+1)/; \034 ( $1 ) || exit 1; echo \' cd \$(top_srcdir) && perl $thisProg \'; cd \$(top_srcdir) && perl $thisProg && exit 0; $2/;
+    substituteLine ($lookup, $newLine);
+    $automkCall = $1;
+
+    $lookup = '.*cd \$\(srcdir\)\s+&&[\034\s]+\$\(AUTOCONF\)(.*)';
+    if ($MakefileData =~ /\n($lookup)\n/) {
+      $newLine  = "\tcd \$(srcdir) && rm -f configure\n";
+      $newLine .= "\tcd \$(top_srcdir) && \$(MAKE) -f admin/Makefile.common configure";
+      substituteLine ($lookup, $newLine);
+    }
+
+    return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+sub handle_TOPLEVEL()
+{
+    my $pofiles = "";
+    my @restfiles = ();
+    opendir (THISDIR, ".");
+    foreach $entry (readdir(THISDIR)) {
+        next if (-d $entry);
+        
+        next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/ || $entry =~ /.gmo$/);
+                 
+        if ($entry =~ /\.po$/) {
+             next;
+        }
+        push(@restfiles, $entry);
+    }
+    closedir (THISDIR);
+            
+    if (@restfiles) {
+        $target_adds{"install-data-am"} .= "install-nls-files ";
+        $lines = "install-nls-files:\n";
+        $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$kdelang\n";
+        for $file (@restfiles) {
+            $lines .= "\t\$(INSTALL_DATA) \$\(srcdir\)/$file \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
+        }
+	$target_adds{"uninstall"} .= "uninstall-nls-files ";
+        $lines .= "uninstall-nls-files:\n";
+        for $file (@restfiles) {
+            $lines .= "\t-rm -f \$(DESTDIR)\$(kde_locale)/$kdelang/$file\n";
+        }
+        appendLines($lines);
+    }
+    
+    return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+sub tag_SUBDIRS ()
+{
+  if ($MakefileData !~ /\nSUBDIRS\s*=\s*\$\(AUTODIRS\)\s*\n/) {
+    return 1;
+  }
+
+  my $subdirs = ".";
+
+  opendir (THISDIR, ".");
+  foreach $entry (readdir(THISDIR)) {
+    next if ($entry eq "CVS" || $entry =~ /^\./);
+    if (-d $entry && -f $entry . "/Makefile.am") {
+      $subdirs .= " $entry";
+      next;
+    }
+  }
+  closedir (THISDIR);
+
+  substituteLine('SUBDIRS\s*=.*', "SUBDIRS =$subdirs");
+  return 0;
+}
+
+sub tag_IDLFILES ()
+{
+    my @psources = split(/[\034\s]+/, $sources{$program});
+    my $dep_lines = "";
+    my @cppFiles = ();
+    
+    foreach $source (@psources) {
+        my $skel = ($source =~ m/\.skel$/);
+        my $stub = ($source =~ m/\.stub$/);
+        my $signals = ($source =~ m/\.signals$/); # obsolete, remove in KDE-4
+        
+        if ($stub || $skel || $signals) {
+
+            my $qs = quotemeta($source);
+            $sources{$program} =~ s/$qs//;
+            $sources_changed{$program} = 1;
+
+            $source =~ s/\.(stub|skel|signals)$//;
+            my $sourcename;
+
+            if ($skel) {
+                $sourcename = "$source\_skel";
+            } elsif ($stub) {
+                $sourcename = "$source\_stub";
+            } else {
+                $sourcename = "$source\_signals";
+            }
+            
+            my $sourcedir = '';
+            if (-f "$makefileDir/$source.h") {
+                $sourcedir = '$(srcdir)/';
+            } else {
+                if ($MakefileData =~ /\n$source\_DIR\s*=\s*(\S+)\n/) {
+                    $sourcedir = $1;
+                    $sourcedir .= "/" if ($sourcedir !~ /\/$/);
+                }
+            }
+            
+            if ($allidls !~ /$source\_kidl/) {
+                
+                $use_ng = ($MakefileData =~ /\n$source\_DCOPIDLNG\s*=\s*(\S+)\n/);
+                $dcopidl =  $use_ng ? "KDECONFIG=\"\$(KDECONFIG)\" \$(DCOPIDLNG)" : "\$(DCOPIDL)";
+
+                $dep_lines .= "$source.kidl: $sourcedir$source.h \$(DCOP_DEPENDENCIES)\n";
+                $dep_lines .= "\t$dcopidl $sourcedir$source.h > $source.kidl || ( rm -f $source.kidl ; false )\n";
+                
+                $allidls .= $source . "_kidl ";
+            }
+            
+            if ($allidls !~ /$sourcename/) {
+                
+                $dep_lines_tmp = "";
+
+                if ($skel) {
+                    $dep_lines .= "$sourcename.$cxxsuffix: $source.kidl\n";
+                    $dep_lines .= "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-stub $source.kidl\n";
+                } elsif ($stub) {
+                    $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-signals --no-skel $source.kidl\n";
+                } else { # signals - obsolete, remove in KDE 4
+                    $dep_lines_tmp = "\t\$(DCOPIDL2CPP) --c++-suffix $cxxsuffix --no-stub --no-skel $source.kidl\n";
+                }
+
+                if ($stub || $signals) {
+                    $target_adds{"$sourcename.$cxxsuffix"} .= "$sourcename.h ";
+                    $dep_lines .= "$sourcename.h: $source.kidl\n";
+                    $dep_lines .= $dep_lines_tmp;
+                }
+                
+                $allidls .= $sourcename . " ";
+            }
+            
+            $idlfiles{$program} .= $sourcename . " ";
+            
+            if ($program =~ /_la$/) {
+                $realObjs{$program} .= " $sourcename.lo";
+            } else {
+                $realObjs{$program} .= " $sourcename.\$(OBJEXT)";
+            }
+            $sources{$program} .= " $sourcename.$cxxsuffix";
+            $sources_changed{$program} = 1;
+            $important{$program} .= "$sourcename.h " if (!$skel);
+            $idl_output .= "\\\n\t$sourcename.$cxxsuffix $sourcename.h $source.kidl ";
+            push(@cleanfiles, "$sourcename.$cxxsuffix");
+            push(@cleanfiles, "$sourcename.h");
+            push(@cleanfiles, "$sourcename.kidl");
+            $dep_files .= " \$(DEPDIR)/$sourcename.P" if ($dep_files !~/$sourcename.P/);
+        }
+    }
+    if ($dep_lines) {
+        appendLines($dep_lines);
+    }
+    
+    if (0) {
+        my $lookup = "($program)";
+        $lookup .= '(|\$\(EXEEXT\))';
+        $lookup =~ s/\_/./g;
+        $lookup .= ":(.*..$program\_OBJECTS..*)";
+        #    $lookup = quotemeta($lookup);
+        if ($MakefileData =~ /\n$lookup\n/) {
+            
+            my $line = "$1$2: ";
+            foreach $file (split(' ', $idlfiles{$program})) {
+                $line .= "$file.$cxxsuffix ";
+            }
+            $line .= $3;
+            substituteLine($lookup, $line);
+        } else {
+            print STDERR "no built dependency found $lookup\n";
+        }
+    }
+}
+
+sub tag_UIFILES ()
+{
+    my @psources = split(/[\034\s]+/, $sources{$program});
+    my @depFiles = ();
+    
+    foreach $source (@psources) {
+
+        if ($source =~ m/\.ui$/) {
+
+            print STDERR "adding UI file $source\n" if ($verbose);
+
+            my $qs = quotemeta($source);
+            $sources{$program} =~ s/$qs//;
+            $sources_changed{$program} = 1;
+      
+            $source =~ s/\.ui$//;
+
+            my $sourcedir = '';
+            if (-f "$makefileDir/$source.ui") {
+                $sourcedir = '$(srcdir)/';
+            }
+
+            if (!$uiFiles{$source}) {
+
+                my $dep_lines = "$source.$cxxsuffix: $sourcedir$source.ui $source.h $source.moc\n";
+                $dep_lines .= "\trm -f $source.$cxxsuffix\n";
+                if (!$kdeopts{"qtonly"}) {
+                    $dep_lines .= "\techo '#include <kdialog.h>' > $source.$cxxsuffix\n";
+                    $dep_lines .= "\techo '#include <klocale.h>' >> $source.$cxxsuffix\n";
+                    my ($mangled_source) = $source;
+                    $mangled_source =~ s/[^A-Za-z0-9]/_/g;  # get rid of garbage
+                    $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui > $source.$cxxsuffix.temp ; ret=\$\$?; \\\n";
+                    $dep_lines .= "\t\$(PERL) -pe \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" $source.$cxxsuffix.temp | \$(PERL) -pe \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" | \$(PERL) -pe \"s,image([0-9][0-9]*)_data,img\\\$\$1_" . $mangled_source . ",g\" | \$(PERL) -pe \"s,: QWizard\\(,: KWizard(,g\" >> $source.$cxxsuffix ;\\\n";
+		    $dep_lines .= "\trm -f $source.$cxxsuffix.temp ;\\\n";
+                } else {
+                    $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix; ret=\$\$?; \\\n";
+                }
+		$dep_lines .= "\tif test \"\$\$ret\" = 0; then echo '#include \"$source.moc\"' >> $source.$cxxsuffix; else rm -f $source.$cxxsuffix ; exit \$\$ret ; fi\n\n";
+                $dep_lines .= "$source.h: $sourcedir$source.ui\n";
+                $dep_lines .= "\trm -rf $source.h;\n";
+                if (!$kdeopts{"qtonly"}) {
+                    $dep_lines .= "\t\$(UIC) $sourcedir$source.ui | \$(PERL) -pi -e \"s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g\" >> $source.h ;\n";
+                } else {
+                    $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n";
+                }
+                $dep_lines .= "$source.moc: $source.h\n";
+                $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n";
+
+                $rule_adds{"$source.$cxxsuffix"} = $dep_lines;
+
+		$uiFiles{$source} = 1;
+                $dependmocs{$program} .= " $source.moc";
+                $globalmocs{$source} = "\035$source.h\035$source.cpp";
+            }
+            
+            if ($program =~ /_la$/) {
+                $realObjs{$program} .= " $source.lo";
+            } else {
+                $realObjs{$program} .= " $source.\$(OBJEXT)";
+            }
+            $sources{$program} .= " $source.$cxxsuffix";
+            $sources_changed{$program} = 1;
+            $important{$program} .= "$source.h ";
+            $ui_output .= "\\\n\t$source.$cxxsuffix $source.h $source.moc ";
+            push(@cleanfiles, "$source.$cxxsuffix");
+            push(@cleanfiles, "$source.h");
+            push(@cleanfiles, "$source.moc");
+            $dep_files .= " \$(DEPDIR)/$source.P" if($dep_files !~/$source.P/ );
+        }
+    }
+}
+
+sub tag_KCFGFILES ()
+{
+    my @psources = split(/[\034\s]+/, $sources{$program});
+    my @depFiles = ();
+    
+    foreach $source (@psources) {
+
+        if ($source =~ m/\.kcfgc$/) {
+
+            print STDERR "adding KCFG file $source\n" if ($verbose);
+
+            my $qs = quotemeta($source);
+            $sources{$program} =~ s/$qs//;
+            $sources_changed{$program} = 1;
+      
+            $source =~ s/\.kcfgc$//;
+
+            my $sourcedir = '';
+            if (-f "$makefileDir/$source.kcfgc") {
+                $sourcedir = '$(srcdir)/';
+            }
+
+            if (!$kcfgFiles{$source}) {
+                $kcfg = "$program.kcfg";
+                findKcfgFile("$source.kcfgc");
+
+                my $fixsuffix = "";
+                $fixsuffix = "else mv $source.cpp $source.$cxxsuffix ; " 
+                    unless "cpp" eq $cxxsuffix;
+
+                my $dep_lines = "$source.$cxxsuffix: $source.h\n";
+                $dep_lines .= "$source.h: $sourcedir$kcfg $sourcedir$source.kcfgc \$(KCFG_DEPENDENCIES)\n";
+                $dep_lines .= "\t\$(KCONFIG_COMPILER) $sourcedir$kcfg $sourcedir$source.kcfgc; ret=\$\$?; \\\n";
+		$dep_lines .= "\tif test \"\$\$ret\" != 0; then rm -f $source.h ; exit \$\$ret ; $fixsuffix fi\n\n";
+
+                $rule_adds{"$source.$cxxsuffix"} = $dep_lines;
+
+		$kcfgFiles{$source} = 1;
+            }
+            
+            if ($program =~ /_la$/) {
+                $realObjs{$program} .= " $source.lo";
+            } else {
+                $realObjs{$program} .= " $source.\$(OBJEXT)";
+            }
+            $sources{$program} .= " $source.$cxxsuffix";
+            $sources_changed{$program} = 1;
+            $important{$program} .= "$source.h ";
+            $kcfg_output .= "\\\n\t$source.$cxxsuffix $source.h ";
+            push(@cleanfiles, "$source.$cxxsuffix");
+            push(@cleanfiles, "$source.h");
+            $dep_files .= " \$(DEPDIR)/$source.P" if($dep_files !~/$source.P/ );
+        }
+    }
+}
+
+sub tag_ICON()
+{
+    my $lookup = '([^\s]*)_ICON\s*=[ \t]*(.*)';
+    my $install = "";
+    my $uninstall = "";
+
+    while ($MakefileData =~ /\n$lookup/g) {
+        my $destdir;
+        if ($1 eq "KDE") {
+            $destdir = "kde_icondir";
+        } else {
+            $destdir = $1 . "dir";
+        }
+        my $iconauto = ($2 =~ /AUTO\s*$/);
+        my @appnames = ();
+        if ( ! $iconauto ) {
+	    my $appicon_str = $2;
+            my @_appnames = split(" ", $appicon_str);
+            print STDOUT "KDE_ICON processing <@_appnames>\n"   if ($verbose);
+            foreach $appname (@_appnames) {
+                push(@appnames, quotemeta($appname));
+            }
+        } else {
+            print STDOUT "KDE_ICON processing <AUTO>\n"   if ($verbose);
+        }
+
+        my @files = ();
+        opendir (THISDIR, ".");
+        foreach $entry (readdir(THISDIR)) {
+            next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
+            next if (! -f $entry);
+            if ( $iconauto )
+              {
+                  push(@files, $entry)
+                    if ($entry =~ /\.xpm/ || $entry =~ /\.png/ || $entry =~ /\.mng/ || $entry =~ /\.svg/);
+              } else {
+                  foreach $appname (@appnames) {
+                      push(@files, $entry)
+                        if ($entry =~ /-$appname\.xpm/ || $entry =~ /-$appname\.png/ || $entry =~ /-$appname\.mng/ || $entry =~ /-$appname\.svg/);
+                  }
+              }
+        }
+        closedir (THISDIR);
+        
+        my %directories = ();
+        
+        foreach $file (@files) {
+            my $newfile = $file;
+            my $prefix = $file;
+            $prefix =~ s/\.(png|xpm|mng|svg|svgz)$//;
+            my $appname = $prefix;
+            $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
+            $appname =~ s/^[^-]+-// if ($appname =~ /-/) ;
+            $appname = quotemeta($appname);
+            $prefix =~ s/$appname$//;
+            $prefix =~ s/-$//;
+            
+            $prefix = 'lo16-app' if ($prefix eq 'mini');
+            $prefix = 'lo32-app' if ($prefix eq 'lo');
+            $prefix = 'hi48-app' if ($prefix eq 'large');
+            $prefix .= '-app' if ($prefix =~ m/^...$/);
+            
+            my $type = $prefix;
+            $type =~ s/^.*-([^-]+)$/$1/;
+            $prefix =~ s/^(.*)-[^-]+$/$1/;
+            
+            my %type_hash =
+              (
+               'action' => 'actions',
+               'app' => 'apps',
+               'device' => 'devices',
+               'filesys' => 'filesystems',
+               'mime' => 'mimetypes'
+              );
+
+            if (! defined $type_hash{$type} ) {
+                print STDERR "unknown icon type $type in $printname ($file)\n";
+                next;
+            }
+
+            my %dir_hash =
+              (
+               'los' => 'locolor/16x16',
+               'lom' => 'locolor/32x32',
+               'him' => 'hicolor/32x32',
+               'hil' => 'hicolor/48x48',
+               'lo16' => 'locolor/16x16',
+               'lo22' => 'locolor/22x22',
+               'lo32' => 'locolor/32x32',
+               'hi16' => 'hicolor/16x16',
+               'hi22' => 'hicolor/22x22',
+               'hi32' => 'hicolor/32x32',
+               'hi48' => 'hicolor/48x48',
+               'hi64' => 'hicolor/64x64',
+               'hi128' => 'hicolor/128x128',
+               'hisc' => 'hicolor/scalable',
+ 	       'cr16' => 'crystalsvg/16x16',
+               'cr22' => 'crystalsvg/22x22',
+               'cr32' => 'crystalsvg/32x32',
+               'cr48' => 'crystalsvg/48x48',
+               'cr64' => 'crystalsvg/64x64',
+               'cr128' => 'crystalsvg/128x128',
+               'crsc' => 'crystalsvg/scalable'
+              );
+            
+            $newfile =~ s@.*-($appname\.(png|xpm|mng|svgz|svg?))@$1@;
+            
+            if (! defined $dir_hash{$prefix}) {
+                print STDERR "unknown icon prefix $prefix in $printname\n";
+                next;
+            }
+            
+            my $dir = $dir_hash{$prefix} . "/" . $type_hash{$type};
+            if ($newfile =~ /-[^\.]/) {
+                my $tmp = $newfile;
+                $tmp =~ s/^([^-]+)-.*$/$1/;
+                $dir = $dir . "/" . $tmp;
+                $newfile =~ s/^[^-]+-//;
+            }
+            
+            if (!defined $directories{$dir}) {
+                $install .= "\t\$(mkinstalldirs) \$(DESTDIR)\$($destdir)/$dir\n";
+                $directories{$dir} = 1;
+            }
+            
+            $install .= "\t\$(INSTALL_DATA) \$(srcdir)/$file \$(DESTDIR)\$($destdir)/$dir/$newfile\n";
+            $uninstall .= "\t-rm -f \$(DESTDIR)\$($destdir)/$dir/$newfile\n";
+            
+        }
+    }
+
+    if (length($install)) {
+        $target_adds{"install-data-am"} .= "install-kde-icons ";
+        $target_adds{"uninstall-am"} .= "uninstall-kde-icons ";
+        appendLines("install-kde-icons:\n" . $install . "\nuninstall-kde-icons:\n" . $uninstall);
+    }
+}
+
+sub handle_POFILES($$)
+{
+  my @pofiles = split(" ", $_[0]);
+  my $lang = $_[1];
+
+  # Build rules for creating the gmo files
+  my $tmp = "";
+  my $allgmofiles     = "";
+  my $pofileLine   = "POFILES =";
+  foreach $pofile (@pofiles)
+    {
+        $pofile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
+        $tmp .= "$1.gmo: $pofile\n";
+        $tmp .= "\trm -f $1.gmo; \$(GMSGFMT) -o $1.gmo \$(srcdir)/$pofile\n";
+        $tmp .= "\ttest ! -f $1.gmo || touch $1.gmo\n";
+        $allgmofiles .= " $1.gmo";
+        $pofileLine  .= " $1.po";
+    }
+  appendLines ($tmp);
+  my $lookup = 'POFILES\s*=([^\n]*)';
+  if ($MakefileData !~ /\n$lookup/) {
+    appendLines("$pofileLine\nGMOFILES =$allgmofiles");
+  } else {
+    substituteLine ($lookup, "$pofileLine\nGMOFILES =$allgmofiles");
+  }
+
+    if ($allgmofiles) {
+
+        # Add the "clean" rule so that the maintainer-clean does something
+        appendLines ("clean-nls:\n\t-rm -f $allgmofiles\n");
+
+	$target_adds{"maintainer-clean"} .= "clean-nls ";
+
+	$lookup = 'DISTFILES\s*=[ \t]*(.*)';
+	if ($MakefileData =~ /\n$lookup/) {
+	  $tmp = "DISTFILES = \$(GMOFILES) \$(POFILES) $1";
+	  substituteLine ($lookup, $tmp);
+	}
+    }
+
+  $target_adds{"install-data-am"} .= "install-nls ";
+
+  $tmp = "install-nls:\n";
+  if ($lang) {
+    $tmp  .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES\n";
+  }
+  $tmp .= "\t\@for base in ";
+  foreach $pofile (@pofiles)
+    {
+      $pofile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
+      $tmp .= "$1 ";
+    }
+
+  $tmp .= "; do \\\n";
+  if ($lang) {
+    $tmp .= "\t  echo \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
+    $tmp .= "\t  if test -f \$\$base.gmo; then \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
+    $tmp .= "\t  elif test -f \$(srcdir)/\$\$base.gmo; then \$(INSTALL_DATA) \$(srcdir)/\$\$base.gmo \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/\$\$base.mo ;\\\n";
+    $tmp .= "\t  fi ;\\\n";
+  } else {
+    $tmp .= "\t  echo \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
+    $tmp .= "\t  \$(mkinstalldirs) \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES ; \\\n";
+    $tmp .= "\t  if test -f \$\$base.gmo; then \$(INSTALL_DATA) \$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
+    $tmp .= "\t  elif test -f \$(srcdir)/\$\$base.gmo; then \$(INSTALL_DATA) \$(srcdir)/\$\$base.gmo \$(DESTDIR)\$(kde_locale)/\$\$base/LC_MESSAGES/\$(PACKAGE).mo ;\\\n";
+    $tmp .= "\t  fi ;\\\n";
+  }
+  $tmp .= "\tdone\n\n";
+  appendLines ($tmp);
+
+  $target_adds{"uninstall"} .= "uninstall-nls ";
+
+  $tmp = "uninstall-nls:\n";
+  foreach $pofile (@pofiles)
+    {
+      $pofile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
+      if ($lang) {
+	$tmp .= "\trm -f \$(DESTDIR)\$(kde_locale)/$lang/LC_MESSAGES/$1.mo\n";
+      } else {
+	$tmp .= "\trm -f \$(DESTDIR)\$(kde_locale)/$1/LC_MESSAGES/\$(PACKAGE).mo\n";
+      }
+    }
+  appendLines($tmp);
+
+  $target_adds{"all"} .= "all-nls ";
+
+  $tmp = "all-nls: \$(GMOFILES)\n";
+
+  appendLines($tmp);
+
+  $target_adds{"distdir"} .= "distdir-nls ";
+
+  $tmp = "distdir-nls:\$(GMOFILES)\n";
+  $tmp .= "\tfor file in \$(POFILES); do \\\n";
+  $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+  $tmp .= "\tdone\n";
+  $tmp .= "\tfor file in \$(GMOFILES); do \\\n";
+  $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+  $tmp .= "\tdone\n";
+
+  appendLines ($tmp);
+
+  if (!$lang) {
+    appendLines("merge:\n\t\$(MAKE) -f \$(top_srcdir)/admin/Makefile.common package-merge POFILES=\"\${POFILES}\" PACKAGE=\${PACKAGE}\n\n");
+  }
+ 
+}
+
+#-----------------------------------------------------------------------------
+
+# Returns 0 if the line was processed - 1 otherwise.
+# Errors are logged in the global $errorflags
+sub tag_POFILES ()
+{
+    my $lookup = 'POFILES\s*=([^\n]*)';
+    return 1    if ($MakefileData !~ /\n$lookup/);
+    print STDOUT "POFILES processing <$1>\n"   if ($verbose);
+
+    my $tmp = $1;
+
+    # make sure these are all gone.
+    if ($MakefileData =~ /\n\.po\.gmo:\n/)
+    {
+        print STDERR "Warning: Found old .po.gmo rules in $printname. New po rules not added\n";
+        return 1;
+    }
+
+    # Either find the pofiles in the directory (AUTO) or use
+    # only the specified po files.
+    my $pofiles = "";
+    if ($tmp =~ /^\s*AUTO\s*$/)
+    {
+        opendir (THISDIR, ".");
+	$pofiles =  join(" ", grep(/\.po$/, readdir(THISDIR)));
+        closedir (THISDIR);
+        print STDOUT "pofiles found = $pofiles\n"   if ($verbose);
+	if (-f "charset" && -f "kdelibs/kdelibs.po") {
+	    handle_TOPLEVEL();
+	}
+    }
+    else
+    {
+        $tmp =~ s/\034/ /g;
+        $pofiles = $tmp;
+    }
+    return 1    if (!$pofiles);        # Nothing to do
+
+    handle_POFILES($pofiles, $kdelang);
+
+    return 0;
+}
+
+sub helper_LOCALINSTALL($)
+{
+  my $lookup = "\035" . $_[0] . " *:[^\035]*\035\t";
+  my $copy = $MakefileData;
+  $copy =~ s/\n/\035/g;
+  if ($copy =~ /($lookup.*)$/) {
+
+    $install = $1;
+    $install =~ s/\035$_[0] *:[^\035]*\035//;
+    my $emptyline = 0;
+    while (! $emptyline ) {
+      if ($install =~ /([^\035]*)\035(.*)/) {
+	local $line = $1;
+	$install = $2;
+	if ($line !~ /^\s*$/ && $line !~ /^(\@.*\@)*\t/) {
+	  $emptyline = 1;
+	} else {
+	  replaceDestDir($line);
+	}
+      } else {
+	$emptyline = 1;
+      }
+    }
+  }
+
+}
+
+sub tag_LOCALINSTALL ()
+{
+  helper_LOCALINSTALL('install-exec-local');
+  helper_LOCALINSTALL('install-data-local');
+  helper_LOCALINSTALL('uninstall-local');
+
+  return 0;
+}
+
+sub replaceDestDir($) {
+  local $line = $_[0];
+
+  if (   $line =~ /^\s*(\@.*\@)*\s*\$\(mkinstalldirs\)/
+      || $line =~ /^\s*(\@.*\@)*\s*\$\(INSTALL\S*\)/
+      || $line =~ /^\s*(\@.*\@)*\s*(-?rm.*) \S*$/)
+  {
+    $line =~ s/^(.*) ([^\s]+)\s*$/$1 \$(DESTDIR)$2/ if ($line !~ /\$\(DESTDIR\)/);
+  }
+
+  if ($line ne $_[0]) {
+    $_[0] = quotemeta $_[0];
+    substituteLine($_[0], $line);
+  }
+}
+
+#---------------------------------------------------------------------------
+# libtool is very hard to persuade it could use -Wl,--no-undefined for making
+# -no-undefined actually work
+# append $(KDE_NO_UNFINED) after every -no-undefined in LDFLAGS
+# this may go away if libtool ever does this on its own
+sub tag_NO_UNDEFINED () {
+    return if ($program !~ /_la$/);
+
+    my $lookup = quotemeta($realname{$program}) . ":.*?\n\t.*?\\((.*?)\\) .*\n";
+    $MakefileData =~ m/$lookup/;
+    return if (!defined($1));
+    return if ($1 !~ /CXXLINK/);
+
+    if ($MakefileData !~ /\n$program\_LDFLAGS\s*=.*-no-undefined/ ) {
+        return;
+    }
+
+    $lookup = $program . '\_LDFLAGS(\s*)=(.*)-no-undefined(.*)';
+    if ($MakefileData =~ /\n$lookup\n/) {
+	my $replace = $program . "\_LDFLAGS$1=$2-no-undefined \$(KDE_NO_UNDEFINED)$3";
+        substituteLine($lookup, $replace);
+    }
+}
+
+sub tag_CLOSURE () {
+    return if ($program !~ /_la$/);
+
+    my $lookup = quotemeta($realname{$program}) . ":.*?\n\t.*?\\((.*?)\\) .*\n";
+    $MakefileData =~ m/$lookup/;
+    return if (!defined($1));
+    return if ($1 !~ /CXXLINK/);
+
+    if ($MakefileData !~ /\n$program\_LDFLAGS\s*=.*-no-undefined/ &&
+        $MakefileData !~ /\n$program\_LDFLAGS\s*=.*KDE_PLUGIN/ ) {
+        print STDERR "Report: $program contains undefined in $printname\n" if ($program =~ /^lib/ && $dryrun);
+        return;
+    }
+
+    my $closure = $realname{$program} . ".closure";
+    my $lines = "$closure: \$($program\_OBJECTS) \$($program\_DEPENDENCIES)\n";
+    $lines .= "\t\@echo \"int main() {return 0;}\" > $program\_closure.$cxxsuffix\n";
+    $lines .= "\t\@\$\(LTCXXCOMPILE\) -c $program\_closure.$cxxsuffix\n";
+    $lines .= "\t\$\(CXXLINK\) $program\_closure.lo \$($program\_LDFLAGS) \$($program\_OBJECTS) \$($program\_LIBADD) \$(LIBS)\n";
+    $lines .= "\t\@rm -f $program\_closure.* $closure\n";
+    $lines .= "\t\@echo \"timestamp\" > $closure\n";
+    $lines .= "\n";
+    appendLines($lines);
+    $lookup = $realname{$program} . ": (.*)";
+    if ($MakefileData =~ /\n$lookup\n/) {
+        $lines  = "\@KDE_USE_CLOSURE_TRUE@". $realname{$program} . ": $closure $1";
+        $lines .= "\n\@KDE_USE_CLOSURE_FALSE@" . $realname{$program} . ": $1";
+        substituteLine($lookup, $lines);
+    }
+    $closure_output .= " $closure";
+}
+
+sub tag_NMCHECK () {
+    return if ($program !~ /_la$/);
+    my $lookup = quotemeta($realname{$program}) . ":.*?\n\t.*?\\((.*?)\\) .*\n";
+    $MakefileData =~ m/$lookup/;
+    my $linkcmd = $1;
+    return if (!defined($1));
+    return if ($linkcmd !~ /CXXLINK/ && $linkcmd !~ /LINK/);
+
+    $lookup = $program . '_NMCHECK\s*=([^\n]*)';
+    if( $MakefileData !~ m/\n$lookup\n/ ) {
+	return;
+    }
+    my $allowed = $1;
+    $allowed =~ s/^ *//;
+    $lookup = $program . '_NMCHECKWEAK\s*=([^\n]*)';
+    my $weak = "";
+    my $is_weak = 0;
+    if( $MakefileData =~ m/\n$lookup\n/ ) {
+	$weak = $1;
+	$is_weak = 1;
+    }
+    $weak =~ s/^ *//;
+
+    if( $is_weak )
+    {
+	$weak = '--allowweak=\'' . $weak . '\' ';
+    }
+    my $nmline = "\@KDE_USE_NMCHECK_TRUE@\t\@\$(MAKE) \$(AM_MAKEFLAGS) nmcheck_$realname{$program} || ( rm -f $realname{$program}; exit 1 )";
+    $lookup = '(\t\$\(CXXLINK\)[^\n]*' . $program . '_OBJECTS[^\n]*)';
+    if( $MakefileData =~ /\n$lookup\n/ ) {
+	my $oldstuff = $1;
+	substituteLine( $lookup, $oldstuff . "\n" . $nmline );
+    }
+    $lookup = '(\t\$\(LINK\)[^\n]*' . $program . '_OBJECTS[^\n]*)';
+    if( $MakefileData =~ /\n$lookup\n/ ) {
+	my $oldstuff = $1;
+	substituteLine( $lookup, $oldstuff . "\n" . $nmline );
+    }
+    $nmline = "\@\$(top_srcdir)/admin/nmcheck $realname{$program} \'$allowed\' $weak";
+    appendLines( "\nnmcheck_$realname{$program}: $realname{$program} \n\t$nmline\n" );
+    $target_adds{ "nmcheck" } .= "nmcheck_$realname{$program} ";
+}
+
+sub tag_DIST () {
+    my %foundfiles = ();
+    opendir (THISDIR, ".");
+    foreach $entry (readdir(THISDIR)) {
+        next if ($entry eq "CVS" || $entry =~ /^\./  || $entry eq "Makefile" || $entry =~ /~$/ || $entry =~ /^\#.*\#$/);
+        next if (! -f $entry);
+        next if ($entry =~ /\.moc/ || $entry =~ /\.moc.$cppExt$/ || $entry =~ /\.lo$/ || $entry =~ /\.la$/ || $entry =~ /\.o/);
+        next if ($entry =~ /\.all_$cppExt\.$cppExt$/);
+        $foundfiles{$entry} = 1;
+    }
+    closedir (THISDIR);
+
+    # doing this for MAINTAINERCLEANFILES would be wrong
+    my @marks = ("EXTRA_DIST", "DIST_COMMON", '\S*_SOURCES', '\S*_HEADERS', 'CLEANFILES', 'DISTCLEANFILES', '\S*_OBJECTS');
+    foreach $mark (@marks) {
+        while ($MakefileData =~ /\n($mark)\s*=[ \t]*([^\n]*)/g) {
+	    my $cleanfiles_str = $2;
+            foreach $file (split('[\034\s]+', $cleanfiles_str)) {
+                $file =~ s/\.\///;
+                $foundfiles{$file} = 0 if (defined $foundfiles{$file});
+            }
+        }
+    }
+    my @files = ("Makefile", "config.cache", "config.log", "stamp-h",
+                 "stamp-h1", "stamp-h1", "config.h", "Makefile", 
+                 "config.status", "config.h", "libtool", "core" );
+    foreach $file (@files) {
+        $foundfiles{$file} = 0 if (defined $foundfiles{$file});
+    }
+
+    my $KDE_DIST = "";
+    foreach $file (keys %foundfiles) {
+        if ($foundfiles{$file} == 1) {
+            $KDE_DIST .= "$file ";
+        }
+    }
+    if ($KDE_DIST) {
+        print "KDE_DIST $printname $KDE_DIST\n" if ($verbose);
+
+        my $lookup = 'DISTFILES\s*=[ \t]*(.*)';
+        if ($MakefileData =~ /\n$lookup/) {
+            substituteLine($lookup, "DISTFILES = $1 \$(KDE_DIST)");
+            appendLines("KDE_DIST=$KDE_DIST\n");
+        }
+    }
+}
+
+#-----------------------------------------------------------------------------
+# Returns 0 if the line was processed - 1 otherwise.
+# Errors are logged in the global $errorflags
+sub tag_DOCFILES ()
+{
+    $target_adds{"all"} .= "docs-am ";
+
+    my $lookup = 'KDE_DOCS\s*=[ \t]*([^\n]*)';
+    goto nodocs    if ($MakefileData !~ /\n$lookup/);
+    print STDOUT "KDE_DOCS processing <$1>\n"   if ($verbose);
+
+    my $tmp = $1;
+
+    # Either find the files in the directory (AUTO) or use
+    # only the specified po files.
+    my $files = "";
+    my $appname = $tmp;
+    $appname =~ s/^(\S*)\s*.*$/$1/;
+    if ($appname =~ /AUTO/) {
+      $appname = basename($makefileDir);
+      if ("$appname" eq "en") {
+      	  print STDERR "Error: KDE_DOCS = AUTO relies on the directory name. Yours is 'en' - you most likely want something else, e.g. KDE_DOCS = myapp\n";
+          exit(1);
+      }
+    }
+
+    if ($tmp !~ / - /)
+    {
+        opendir (THISDIR, ".");
+	foreach $entry (readdir(THISDIR)) {
+	  next if ($entry eq "CVS" || $entry =~ /^\./  || $entry =~ /^Makefile/ || $entry =~ /~$/ || $entry =~ /^\#.*\#$/ || $entry eq "core" || $entry eq "index.cache.bz2");
+	  next if (! -f $entry);
+	  $files .= "$entry ";
+	}
+        closedir (THISDIR);
+        print STDOUT "docfiles found = $files\n"   if ($verbose);
+    }
+    else
+    {
+        $tmp =~ s/\034/ /g;
+	$tmp =~ s/^\S*\s*-\s*//;
+        $files = $tmp;
+    }
+    goto nodocs if (!$files);        # Nothing to do
+
+    if ($files =~ /(^| )index\.docbook($| )/) {
+
+      my $lines = "";
+      my $lookup = 'MEINPROC\s*=';
+      if ($MakefileData !~ /\n($lookup)/) {
+	$lines = "MEINPROC=/\$(kde_bindir)/meinproc\n";
+      }
+      $lookup = 'KDE_XSL_STYLESHEET\s*=';
+      if ($MakefileData !~ /\n($lookup)/) {
+        $lines .= "KDE_XSL_STYLESHEET=/\$(kde_datadir)/ksgmltools2/customization/kde-chunk.xsl\n";
+      }
+      $lookup = '\nindex.cache.bz2:';
+      if ($MakefileData !~ /\n($lookup)/) {
+         $lines .= "index.cache.bz2: \$(srcdir)/index.docbook \$(KDE_XSL_STYLESHEET) $files\n";
+         $lines .= "\t\@if test -n \"\$(MEINPROC)\"; then echo \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; \$(MEINPROC) --check --cache index.cache.bz2 \$(srcdir)/index.docbook; fi\n";
+         $lines .= "\n";
+      }
+
+      $lines .= "docs-am: index.cache.bz2\n";
+      $lines .= "\n";
+      $lines .= "install-docs: docs-am install-nls\n";
+      $lines .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
+      $lines .= "\t\@if test -f index.cache.bz2; then \\\n";
+      $lines .= "\techo \$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
+      $lines .= "\t\$(INSTALL_DATA) index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
+      $lines .= "\telif test -f  \$(srcdir)/index.cache.bz2; then \\\n";
+      $lines .= "\techo \$(INSTALL_DATA) \$(srcdir)/index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
+      $lines .= "\t\$(INSTALL_DATA) \$(srcdir)/index.cache.bz2 \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/; \\\n";
+      $lines .= "\tfi\n";
+      $lines .= "\t-rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
+      $lines .= "\t\$(LN_S) \$(kde_libs_htmldir)/$kdelang/common \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/common\n";
+
+      $lines .= "\n";
+      $lines .= "uninstall-docs:\n";
+      $lines .= "\t-rm -rf \$(kde_htmldir)/$kdelang/$appname\n";
+      $lines .= "\n";
+      $lines .= "clean-docs:\n";
+      $lines .= "\t-rm -f index.cache.bz2\n";
+      $lines .= "\n";
+      $target_adds{"install-data-am"} .= "install-docs ";
+      $target_adds{"uninstall"} .= "uninstall-docs ";
+      $target_adds{"clean-am"} .= "clean-docs ";
+      appendLines ($lines);
+    } else {
+      appendLines("docs-am: $files\n");
+    }
+
+    $target_adds{"install-data-am"} .= "install-nls ";
+    $target_adds{"uninstall"} .= "uninstall-nls ";
+
+    $tmp = "install-nls:\n";
+    $tmp .= "\t\$(mkinstalldirs) \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname\n";
+    $tmp .= "\t\@for base in $files; do \\\n";
+    $tmp .= "\t  echo \$(INSTALL_DATA) \$\$base \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
+    $tmp .= "\t  \$(INSTALL_DATA) \$(srcdir)/\$\$base \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
+    $tmp .= "\tdone\n";
+    if ($appname eq 'common') {
+      $tmp .= "\t\@echo \"merging common and language specific dir\" ;\\\n";
+      $tmp .= "\tif test ! -f \$(kde_htmldir)/en/common/kde-common.css; then echo 'no english docs found in \$(kde_htmldir)/en/common/'; exit 1; fi \n";
+      $tmp .= "\t\@com_files=`cd \$(kde_htmldir)/en/common && echo *` ;\\\n";
+      $tmp .= "\tcd \$(DESTDIR)\$(kde_htmldir)/$kdelang/common ;\\\n";
+      $tmp .= "\tif test -n \"\$\$com_files\"; then for p in \$\$com_files ; do \\\n";
+      $tmp .= "\t  case \" $files \" in \\\n";
+      $tmp .= "\t    *\" \$\$p \"*) ;; \\\n";
+      $tmp .= "\t    *) test ! -f \$\$p && echo \$(LN_S) ../../en/common/\$\$p \$(DESTDIR)\$(kde_htmldir)/$kdelang/common/\$\$p && \$(LN_S) ../../en/common/\$\$p \$\$p ;; \\\n";
+      $tmp .= "\t  esac ; \\\n";
+      $tmp .= "\tdone ; fi ; true\n";
+    }
+    $tmp .= "\n";
+    $tmp .= "uninstall-nls:\n";
+    $tmp .= "\tfor base in $files; do \\\n";
+    $tmp .= "\t  rm -f \$(DESTDIR)\$(kde_htmldir)/$kdelang/$appname/\$\$base ;\\\n";
+    $tmp .= "\tdone\n\n";
+    appendLines ($tmp);
+
+    $target_adds{"distdir"} .= "distdir-nls ";
+
+    $tmp = "distdir-nls:\n";
+    $tmp .= "\tfor file in $files; do \\\n";
+    $tmp .= "\t  cp \$(srcdir)/\$\$file \$(distdir); \\\n";
+    $tmp .= "\tdone\n";
+
+    appendLines ($tmp);
+
+    return 0;
+
+  nodocs:
+    appendLines("docs-am:\n");
+    return 1;
+}
+
+#-----------------------------------------------------------------------------
+# Find headers in any of the source directories specified previously, that
+# are candidates for "moc-ing".
+sub findMocCandidates ()
+{
+    foreach $dir (@headerdirs)
+    {
+        my @list = ();
+        opendir (SRCDIR, "$dir");
+        @hFiles = grep { /.+\.$hExt$/o && !/^\./ } readdir(SRCDIR);
+        closedir SRCDIR;
+        foreach $hf (@hFiles)
+        {
+            next if ($hf =~ /^\.\#/);
+	    $hf =~ /(.*)\.[^\.]*$/;          # Find name minus extension
+	    next if ($uiFiles{$1});
+            open (HFIN, "$dir/$hf") || die "Could not open $dir/$hf: $!\n";
+            my $hfsize = 0;
+            seek(HFIN, 0, 2);
+            $hfsize = tell(HFIN);
+            seek(HFIN, 0, 0);
+            read HFIN, $hfData, $hfsize;
+            close HFIN;
+            # push (@list, $hf) if(index($hfData, "Q_OBJECT") >= 0); ### fast but doesn't handle //Q_OBJECT
+	    # handle " { friend class blah; Q_OBJECT ", but don't match antlarr_Q_OBJECT (\b).
+            if ( $hfData =~ /{([^}]*)\bQ_OBJECT/s ) {
+                push (@list, $hf) unless $1 =~ m://[^\n]*Q_OBJECT[^\n]*$:s;  ## reject "// Q_OBJECT"
+            }
+        }
+        # The assoc array of root of headerfile and header filename
+        foreach $hFile (@list)
+        {
+            $hFile =~ /(.*)\.[^\.]*$/;          # Find name minus extension
+            if ($mocFiles{$1})
+            {
+              print STDERR "Warning: Multiple header files found for $1\n";
+              next;                           # Use the first one
+            }
+            $mocFiles{$1} = "$dir\035$hFile";   # Add relative dir
+        }
+    }
+
+    return 0;
+}
+
+#-----------------------------------------------------------------------------
+
+# The programmer has specified a moc list. Prune out the moc candidates
+# list that we found based on looking at the header files. This generates
+# a warning if the programmer gets the list wrong, but this doesn't have
+# to be fatal here.
+sub pruneMocCandidates ($)
+{
+    my %prunedMoc = ();
+    local @mocList = split(' ', $_[0]);
+
+    foreach $mocname (@mocList)
+    {
+        $mocname =~ s/\.moc$//;
+        if ($mocFiles{$mocname})
+        {
+            $prunedMoc{$mocname} = $mocFiles{$mocname};
+        }
+        else
+        {
+            my $print = $makefileDir;
+            $print =~ s/^\Q$topdir\E\\//;
+            # They specified a moc file but we can't find a header that
+            # will generate this moc file. That's possible fatal!
+            print STDERR "Warning: No moc-able header file for $print/$mocname\n";
+        }
+    }
+
+    undef %mocFiles;
+    %mocFiles = %prunedMoc;
+}
+
+#-----------------------------------------------------------------------------
+
+# Finds the cpp files (If they exist).
+# The cpp files get appended to the header file separated by \035
+sub checkMocCandidates ()
+{
+    my @cppFiles;
+    my $cpp2moc;  # which c++ file includes which .moc files
+    my $moc2cpp;  # which moc file is included by which c++ files
+
+    return unless (keys %mocFiles);
+    opendir(THISDIR, ".") || return;
+    @cppFiles = grep { /.+\.$cppExt$/o  && !/.+\.moc\.$cppExt$/o
+                         && !/.+\.all_$cppExt\.$cppExt$/o
+			 && !/^\./  } readdir(THISDIR);
+    closedir THISDIR;
+    return unless (@cppFiles);
+    my $files = join (" ", @cppFiles);
+    $cpp2moc = {};
+    $moc2cpp = {};
+    foreach $cxxf (@cppFiles)
+    {
+      open (CXXFIN, $cxxf) || die "Could not open $cxxf: $!\n";
+      seek(CXXFIN, 0, 2);
+      my $cxxfsize = tell(CXXFIN);
+      seek(CXXFIN, 0, 0);
+      read CXXFIN, $cxxfData, $cxxfsize;
+      close CXXFIN;
+      while(($cxxfData =~ m/^[ \t]*\#include\s*[<\"](.*\.moc)[>\"]/gm)) {
+	$cpp2moc->{$cxxf}->{$1} = 1;
+	$moc2cpp->{$1}->{$cxxf} = 1;
+      }
+    }
+    foreach my $mocFile (keys (%mocFiles))
+    {
+	@cppFiles = keys %{$moc2cpp->{"$mocFile.moc"}};
+        if (@cppFiles == 1) {
+            $mocFiles{$mocFile} .= "\035" . $cppFiles[0];
+	    push(@depend, $mocFile);
+        } elsif (@cppFiles == 0) {
+            push (@newObs, $mocFile);           # Produce new object file
+            next    if ($haveAutomocTag);       # This is expected...
+            # But this is an error we can deal with - let them know
+            print STDERR
+                "Warning: No c++ file that includes $mocFile.moc\n";
+        } else {
+            # We can't decide which file to use, so it's fatal. Although as a
+            # guess we could use the mocFile.cpp file if it's in the list???
+            print STDERR
+                "Error: Multiple c++ files that include $mocFile.moc\n";
+            print STDERR "\t",join ("\t", @cppFiles),"\n";
+            $errorflag = 1;
+            delete $mocFiles{$mocFile};
+            # Let's continue and see what happens - They have been told!
+        }
+    }
+}
+
+#-----------------------------------------------------------------------------
+
+# Add the rules for generating moc source from header files
+# For Automoc output *.moc.cpp but normally we'll output *.moc
+# (We must compile *.moc.cpp separately. *.moc files are included
+# in the appropriate *.cpp file by the programmer)
+sub addMocRules ()
+{
+    my $cppFile;
+    my $hFile;
+
+    foreach $mocFile (keys (%mocFiles))
+    {
+        undef $cppFile;
+        ($dir, $hFile, $cppFile) =  split ("\035", $mocFiles{$mocFile}, 3);
+        $dir =~ s#^\.#\$(srcdir)#;
+        if (defined ($cppFile))
+        {
+	  $cppFile =~ s,\.[^.]*$,,;
+	  $target_adds{"$cppFile.o"} .= "$mocFile.moc ";
+	  $target_adds{"$cppFile.lo"} .= "$mocFile.moc ";
+	  appendLines ("$mocFile.moc: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o $mocFile.moc\n");
+	  $cleanMoc .= " $mocFile.moc";
+	  appendLines ("mocs: $mocFile.moc\n");
+        }
+        else
+        {
+            appendLines ("$mocFile$mocExt: $dir/$hFile\n\t\$(MOC) $dir/$hFile -o $mocFile$mocExt\n");
+            $cleanMoc .= " $mocFile$mocExt";
+	    appendLines ("mocs: $mocFile$mocExt\n");
+        }
+    }
+}
+
+sub make_bcheck_target()
+{
+    my $lookup = 'RECURSIVE_TARGETS\s*=[ \t]*(.*)';
+    my $bcheckdep = "bcheck-am";
+    $bcheckdep = "bcheck-recursive" if ($MakefileData =~ /\n$lookup/);
+
+    my $headers= "";
+    $headers = $1 if($MakefileData =~ /\nHEADERS\s*=[ \t]*(.+)/);
+    $headers =~ s/\$\((?:noinst|EXTRA)_HEADERS\)//g;
+
+    $target_adds{"clean-am"} .= "clean-bcheck ";
+
+    my $t = "clean-bcheck: \n" .
+            "\trm -f *.bchecktest.cc *.bchecktest.cc.class a.out\n\n" .
+            "bcheck: $bcheckdep\n\n" .
+            "bcheck-am:\n" .
+           "\t\@for i in $headers; do \\\n" .
+           "\t    if test \$(srcdir)/\$\$i -nt \$\$i.bchecktest.cc; then \\\n" . 
+           "\t        echo \"int main() {return 0;}\" > \$\$i.bchecktest.cc ; \\\n" .
+           "\t        echo \"#include \\\"\$\$i\\\"\" >> \$\$i.bchecktest.cc ; \\\n" .
+           "\t        echo \"\$\$i\"; \\\n" . 
+           "\t        if ! ";
+    $t .=  $cxxsuffix eq "KKK" ?
+           "\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(CXXFLAGS) \$(KDE_CXXFLAGS) " :
+           "\$(CXXCOMPILE) ";
+    $t .=  " --dump-class-hierarchy -c \$\$i.bchecktest.cc; then \\\n" .
+           "\t            rm -f \$\$i.bchecktest.cc; exit 1; \\\n" .
+           "\t        fi ; \\\n" .
+           "\t        echo \"\" >> \$\$i.bchecktest.cc.class; \\\n" .
+           "\t        perl \$(top_srcdir)/admin/bcheck.pl \$\$i.bchecktest.cc.class || { rm -f \$\$i.bchecktest.cc; exit 1; }; \\\n" .
+           "\t        rm -f a.out; \\\n" .
+           "\t    fi ; \\\n" .
+           "\tdone\n";
+    appendLines("$t\n");
+}
+
+sub make_meta_classes ()
+{
+    return if ($kdeopts{"qtonly"});
+
+    my $cppFile;
+    my $hFile;
+    my $moc_class_headers = "";
+    foreach $program (@programs) {
+	my $mocs = "";
+	my @progsources = split(/[\034\s]+/, $sources{$program});
+	my @depmocs = split(' ', $dependmocs{$program});
+	my %shash = (), %mhash = ();
+	@shash{@progsources} = 1;  # we are only interested in the existence
+	@mhash{@depmocs} = 1;
+
+	print STDOUT "program=$program\n" if ($verbose);
+	print STDOUT "psources=[".join(' ', keys %shash)."]\n" if ($verbose);
+	print STDOUT "depmocs=[".join(' ', keys %mhash)."]\n" if ($verbose);
+	print STDOUT "globalmocs=[".join(' ', keys(%globalmocs))."]\n" if ($verbose);
+	foreach my $mocFile (keys (%globalmocs))
+	{
+	    my ($dir, $hFile, $cppFile) = split ("\035", $globalmocs{$mocFile}, 3);
+	    if (defined ($cppFile))
+	    {
+		$mocs .= " $mocFile.moc" if exists $shash{$cppFile};
+	    }
+	    else
+	    {
+		# Bah. This is the case, if no C++ file includes the .moc
+		# file. We make a .moc.cpp file for that. Unfortunately this
+		# is not included in the %sources hash, but rather is mentioned
+		# in %dependmocs. If the user wants to use AUTO he can't just
+		# use an unspecific METAINCLUDES. Instead he must use
+		# program_METAINCLUDES. Anyway, it's not working real nicely.
+		# E.g. Its not clear what happens if user specifies two
+		# METAINCLUDES=AUTO in the same Makefile.am.
+		$mocs .= " $mocFile.moc.$cxxsuffix"
+		    if exists $mhash{$mocFile.".moc.$cxxsuffix"};
+	    }
+	}
+	if ($mocs) {
+	    print STDOUT "==> mocs=[".$mocs."]\n" if ($verbose);
+	}
+	print STDOUT "\n" if $verbose;
+    }
+    if ($moc_class_headers) {
+        appendLines ("$cleantarget-moc-classes:\n\t-rm -f $moc_class_headers\n");
+        $target_adds{"$cleantarget-am"} .= "$cleantarget-moc-classes ";
+    }
+}
+
+#-----------------------------------------------------------------------------
+
+sub updateMakefile ()
+{
+    return if ($dryrun);
+
+    open (FILEOUT, "> $makefile")
+                        || die "Could not create $makefile: $!\n";
+
+    $MakefileData =~ s/\034/\\\n/g;    # Restore continuation lines
+    # Append our $progId line, _below_ the "generated by automake" line
+    # because automake-1.6 relies on the first line to be his own.
+    my $progIdLine = "\# $progId - " . '$Revision$ '."\n";
+    if ( !( $MakefileData =~ s/^(.*generated .*by automake.*\n)/$1$progIdLine/ ) ) {
+        warn "automake line not found in $makefile\n";
+	# Fallback: first line
+        print FILEOUT $progIdLine;
+    };
+    print FILEOUT $MakefileData;
+    close FILEOUT;
+}
+
+#-----------------------------------------------------------------------------
+
+# The given line needs to be removed from the makefile
+# Do this by adding the special "removed line" comment at the line start.
+sub removeLine ($$)
+{
+    my ($lookup, $old) = @_;
+
+    $old =~ s/\034/\\\n#>- /g;          # Fix continuation lines
+    $MakefileData =~ s/\n$lookup/\n#>\- $old/;
+}
+
+#-----------------------------------------------------------------------------
+
+# Replaces the old line with the new line
+# old line(s) are retained but tagged as removed. The new line(s) have the
+# "added" tag placed before it.
+sub substituteLine ($$)
+{
+    my ($lookup, $new) = @_;
+
+    if ($MakefileData =~ /\n($lookup)/) {
+      $old = $1;
+      $old =~ s/\034/\\\n#>\- /g;         # Fix continuation lines
+      my $newCount = ($new =~ tr/\034//) + ($new =~ tr/\n//) + 1;
+      $new =~ s/\\\n/\034/g;
+      $MakefileData =~ s/\n$lookup/\n#>- $old\n#>\+ $newCount\n$new/;
+    } else {
+        warn "Warning: substitution of \"$lookup\" in $printname failed\n";
+    }
+}
+
+#-----------------------------------------------------------------------------
+
+# Slap new lines on the back of the file.
+sub appendLines ($)
+{
+  my ($new) = @_;
+  my $copynew = $new;
+  my $newCount = ($new =~ tr/\034//) + ($new =~ tr/\n//) + 1;
+  $new =~ s/\\\n/\034/g;        # Fix continuation lines
+  $MakefileData .= "\n#>\+ $newCount\n$new";
+}
+
+#-----------------------------------------------------------------------------
+
+# Restore the Makefile.in to the state it was before we fiddled with it
+sub restoreMakefile ()
+{
+    $MakefileData =~ s/# $progId[^\n\034]*[\n\034]*//g;
+    # Restore removed lines
+    $MakefileData =~ s/([\n\034])#>\- /$1/g;
+    # Remove added lines
+    while ($MakefileData =~ /[\n\034]#>\+ ([^\n\034]*)/)
+    {
+        my $newCount = $1;
+        my $removeLines = "";
+        while ($newCount--) {
+            $removeLines .= "[^\n\034]*([\n\034]|)";
+        }
+        $MakefileData =~ s/[\n\034]#>\+.*[\n\034]$removeLines/\n/;
+    }
+}
+
+#-----------------------------------------------------------------------------
+
+# find the .kcfg file listed in the .kcfgc file
+sub findKcfgFile($)
+{
+  my ($kcfgf) = @_;
+  open (KCFGFIN, $kcfgf) || die "Could not open $kcfgf: $!\n";
+  seek(KCFGFIN, 0, 2);
+  my $kcfgfsize = tell(KCFGFIN);
+  seek(KCFGFIN, 0, 0);
+  read KCFGFIN, $kcfgfData, $kcfgfsize;
+  close KCFGFIN;
+  if(($kcfgfData =~ m/^File=(.*\.kcfg)/gm)) {
+    $kcfg = $1;
+  }
+}
diff --git a/admin/bcheck.pl b/admin/bcheck.pl
new file mode 100644
index 0000000000000000000000000000000000000000..46485e5f6ddfb7506d58b84a384f81414f0375f7
--- /dev/null
+++ b/admin/bcheck.pl
@@ -0,0 +1,156 @@
+#!/usr/bin/perl -w
+
+use DB_File;
+use Fcntl ':flock';
+
+if (!defined($ARGV[0])) {
+    print "usage: requires .class dump as parameter!\n";
+    exit;
+}
+
+sub bailout
+{
+    untie %bcheckdb if(defined(%bcheckdb));
+
+    if(defined(MYLOCK)) {
+        flock MYLOCK, LOCK_UN;
+        close(MYLOCK);
+    }
+
+    print @_;
+    exit 5;
+}
+
+sub ask_user
+{
+    my ($dbkey, $dbchunk) = @_;
+
+    if (defined($ENV{"BCHECK_UPDATE"})) {
+        $bcheckdb{$dbkey} = $dbchunk;
+        return;
+    }
+
+    &bailout("BC problem detected") if (! -t STDIN);
+
+    print "(I)gnore / (Q)uit / (U)pdate: ";
+
+    my $key;
+    while(defined(read STDIN, $key, 1)) {
+        $key = lc($key);
+
+        print "got: >$key<\n";
+
+        return if ($key eq 'i');
+
+        &bailout("BC problem. aborted") if ($key eq 'q');
+
+        if ($key eq 'u') {
+            $bcheckdb{$dbkey} = $dbchunk;
+            return;
+        }
+        print "\n(I)gnore / (Q)uit / (U)pdate: ";
+    }
+}
+
+sub diff_chunk($$)
+{
+    my ($oldl, $newl) = @_;
+    my @old = split /^/m, $oldl;
+    my @new = split /^/m, $newl;
+    my $haschanges = 0;
+    my $max = $#old > $#new ? $#old : $#new;
+
+    die "whoops. key different" if ($old[0] ne $new[0]);
+
+    if ($#old != $#new) {
+        warn ("Structural difference.\n");
+        print @old;
+        print "-----------------------------------------------\n";
+        print @new;
+        $haschanges = 1;
+        return $haschanges;
+    }
+
+    print $old[0];
+
+    my ($class) = ($old[0] =~ /^(?:Class |Vtable for )(\S+)/);
+
+    my $c = 1;
+    while ($c < $max) {
+        my ($o, $n) = ($old[$c], $new[$c]);
+        chomp $o;
+        chomp $n;
+        $c++;
+        next if ($o eq $n);
+
+        if(defined($class) and $n =~ /^(\d+\s+)\w+(::\S+\s*.*)$/) {
+            next if ($n eq "$1$class$2");
+        }
+
+        $haschanges = 1;
+
+        print "-$o\n+$n\n\n";
+    }
+
+    return $haschanges;
+}
+
+local $dblock = $ENV{"HOME"} . "/bcheck.lock";
+my $dbfile = $ENV{"HOME"} . "/bcheck.db";
+my $cdump  = $ARGV[0];
+
+die "file $cdump is not readable: $!" if (! -f $cdump);
+
+# make sure the advisory lock exists
+open(MYLOCK, ">$dblock");
+print MYLOCK "";
+
+flock MYLOCK, LOCK_EX;
+
+tie %bcheckdb, 'DB_File', $dbfile;
+
+my $chunk = "";
+
+open (IN, "<$cdump") or die "cannot open $cdump: $!";
+while (<IN>) {
+
+    chop;
+
+    s/0x[0-9a-fA-F]+/0x......../g;
+    s/base size=/size=/g;
+    s/base align=/align=/g;
+
+    $chunk .= $_ . "\n";
+
+    if(/^\s*$/) {
+        my @lines = split /^/m, $chunk;
+        my $key = $lines[0];
+        chomp $key;
+
+        if($key !~ /<anonymous struct>/ &&
+           $key !~ /<anonymous union>/) {
+            if(defined($bcheckdb{$key})) {
+                my $dbversion = $bcheckdb{$key};
+
+                if($dbversion ne $chunk) {
+                     &ask_user($key, $chunk) if(&diff_chunk($dbversion, $chunk));
+                }
+            }
+            else {
+                $bcheckdb{$key} = $chunk;
+                print "NEW: $key\n";
+            }
+        }
+
+        $chunk = "";
+        next;
+    }
+
+}
+close(IN);
+
+untie %bcheckdb;
+flock MYLOCK, LOCK_UN;
+close(MYLOCK);
+
+exit 0;
diff --git a/admin/compile b/admin/compile
new file mode 100755
index 0000000000000000000000000000000000000000..9bb997a6a9b4549a733ed71f7e449e70c89f7a69
--- /dev/null
+++ b/admin/compile
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# Wrapper for compilers which do not understand `-c -o'.
+
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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.
+
+# Usage:
+# compile PROGRAM [ARGS]...
+# `-o FOO.o' is removed from the args passed to the actual compile.
+
+prog=$1
+shift
+
+ofile=
+cfile=
+args=
+while test $# -gt 0; do
+   case "$1" in
+    -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we do something ugly here.
+       ofile=$2
+       shift
+       case "$ofile" in
+	*.o | *.obj)
+	   ;;
+	*)
+	   args="$args -o $ofile"
+	   ofile=
+	   ;;
+       esac
+       ;;
+    *.c)
+       cfile=$1
+       args="$args $1"
+       ;;
+    *)
+       args="$args $1"
+       ;;
+   esac
+   shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+   # If no `-o' option was seen then we might have been invoked from a
+   # pattern rule where we don't need one.  That is ok -- this is a
+   # normal compilation that the losing compiler can handle.  If no
+   # `.c' file was seen then we are probably linking.  That is also
+   # ok.
+   exec "$prog" $args
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+while true; do
+   if mkdir $lockdir > /dev/null 2>&1; then
+      break
+   fi
+   sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir $lockdir; exit 1" 1 2 15
+
+# Run the compile.
+"$prog" $args
+status=$?
+
+if test -f "$cofile"; then
+   mv "$cofile" "$ofile"
+fi
+
+rmdir $lockdir
+exit $status
diff --git a/admin/conf.change.pl b/admin/conf.change.pl
new file mode 100644
index 0000000000000000000000000000000000000000..853d2a77123605e36a4b6d3eeb1beeba1509aed3
--- /dev/null
+++ b/admin/conf.change.pl
@@ -0,0 +1,191 @@
+#!/usr/bin/env perl
+
+# this script patches a config.status file, to use our own perl script
+# in the main loop
+# we do it this way to circumvent hacking (and thereby including)
+# autoconf function (which are GPL) into our LGPL acinclude.m4.in
+# written by Michael Matz <matz@kde.org>
+# adapted by Dirk Mueller <mueller@kde.org>
+#
+#   This file 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.
+
+#   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
+#   Library General Public License for more details.
+
+#   You should have received a copy of the GNU Library General Public License
+#   along with this 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.
+
+# we have to change two places
+# 1. the splitting of the substitutions into chunks of 90 (or even 48 in
+#    later autoconf's
+# 2. the big main loop which patches all Makefile.in's
+
+use strict;
+use File::Basename;
+
+my $ac_aux_dir = dirname($0);
+my ($flag);
+my $ac_version = 0;
+my $vpath_seen = 0;
+$flag = 0;
+
+while (<>) {
+# usage of $flag: 0 -- we have seen nothing yet
+#   1 -- we are in (1)
+#   2 -- we have ended (1)
+#   3 -- we are in (2)
+#   4 -- we ended (2)
+
+    if ($flag == 4) {
+        print;
+    } elsif ($flag == 0) {
+# 1. begins with (including): "ac_max_sed_\S+\s*=\s*[0-9]+..."
+#    ends with (excluding) "CONFIG_FILE=..."
+#    in later autoconf (2.14.1) there is no CONFIG_FILES= line,
+#    but instead the (2) directly follow (1)
+        if (/^\s*ac_max_sed_([a-z]+).*=\s*([0-9]+)/ ) {
+	    $flag = 1;
+	    if ($1 eq 'lines') {
+                # lets hope its different with 2141, 
+                # wasn't able to verify that
+              if ($2 eq '48') {
+                $ac_version = 250;
+              }
+              else {
+	        $ac_version = 2141;
+              }
+	    } elsif ($1 eq 'cmds') {
+	        $ac_version = 213;
+	    }
+	    # hmm, we don't know the autoconf version, but we try anyway
+	} else {
+	    print;
+	}
+    } elsif ($flag == 1) {
+        if (/^\s*CONFIG_FILES=/ && ($ac_version != 250)) {
+	     print;
+	     $flag = 2;
+	} elsif (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
+	     $flag = 3;
+	}
+    } elsif ($flag == 2) {
+# 2. begins with: "for ac_file in.*CONFIG_FILES"  (the next 'for' after (1))
+#    end with: "rm -f conftest.s\*"
+# on autoconf 250, it ends with '# CONFIG_HEADER section'
+#
+# gg: if a post-processing commands section is found first, 
+#    stop there and insert a new loop to honor the case/esac.
+# (pattern: /^\s+#\sRun the commands associated with the file./)
+
+	if (/^\s*for\s+ac_file\s+in\s+.*CONFIG_FILES/ ) {
+	    $flag = 3;
+	} else {
+	    print;
+	}
+    } elsif ($flag == 3) {
+        if (/^\s*rm\s+-f\s+conftest/ ) {
+	    $flag = 4;
+	    &insert_main_loop();
+	} elsif (/^\s*rm\s+-f\s+.*ac_cs_root/ ) {
+	    $flag = 4;
+	    &insert_main_loop();
+	    #die "hhhhhhh";
+	    if ($ac_version != 2141) {
+	        print STDERR "hmm, don't know autoconf version\n";
+	    }
+        } elsif (/^\#\s*CONFIG_(HEADER|COMMANDS) section.*|^\s+#\s(Run) the commands associated/) {
+          $flag = 4;
+          my $commands = defined $2;
+          &insert_main_loop();
+          $commands && insert_command_loop();
+          if($ac_version != 250) {
+            print STDERR "hmm, something went wrong :-(\n";
+          }
+	} elsif (/VPATH/ ) {
+	    $vpath_seen = 1;
+	}
+    }
+}
+
+die "wrong input (flag != 4)" unless $flag == 4;
+print STDERR "hmm, don't know autoconf version\n" unless $ac_version;
+
+sub insert_main_loop {
+
+  if ($ac_version == 250) {
+    &insert_main_loop_250();
+  }
+  else {
+    &insert_main_loop_213();
+  }
+}
+
+sub insert_main_loop_250 {
+
+  print <<EOF;
+  #echo Doing the fast build of Makefiles -- autoconf $ac_version
+EOF
+    if ($vpath_seen) {
+        print <<EOF;
+        # VPATH subst was seen in original config.status main loop
+  echo '/^[ 	]*VPATH[ 	]*=[^:]*\$/d' >>\$tmp/subs.sed
+EOF
+      }
+  print <<EOF;
+  rm -f \$tmp/subs.files
+  for ac_file in .. \$CONFIG_FILES ; do
+      if test "x\$ac_file" != x..; then
+          echo \$ac_file >> \$tmp/subs.files
+      fi
+  done
+  if test -f \$tmp/subs.files ; then
+      perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
+  fi
+  rm -f \$tmp/subs.files
+
+fi
+EOF
+  return;
+}
+
+sub insert_main_loop_213 {
+    print <<EOF;
+#echo Doing the fast build of Makefiles -- autoconf $ac_version
+if test "x\$ac_cs_root" = "x" ; then
+    ac_cs_root=conftest
+fi
+EOF
+    if ($vpath_seen) {
+      print <<EOF;
+# VPATH subst was seen in original config.status main loop
+echo '/^[ 	]*VPATH[ 	]*=[^:]*\$/d' >> \$ac_cs_root.subs
+EOF
+    }
+    print <<EOF;
+rm -f \$ac_cs_root.sacfiles
+for ac_file in .. \$CONFIG_FILES ; do
+    if test "x\$ac_file" != x..; then
+        echo \$ac_file >> \$ac_cs_root.sacfiles
+    fi
+done
+if test -f \$ac_cs_root.sacfiles ; then
+    perl $ac_aux_dir/config.pl "\$ac_cs_root.subs" "\$ac_cs_root.sacfiles" "\$ac_given_srcdir" "\$ac_given_INSTALL"
+fi
+rm -f \$ac_cs_root.s*
+
+EOF
+    return;
+}
+
+sub insert_command_loop {
+    print <<EOF;
+  for ac_file in .. \$CONFIG_FILES ; do
+EOF
+}
diff --git a/admin/config.guess b/admin/config.guess
new file mode 100755
index 0000000000000000000000000000000000000000..a6d8a945f68aae8f779ad1d9134c785385ede1f7
--- /dev/null
+++ b/admin/config.guess
@@ -0,0 +1,1449 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+timestamp='2004-06-24'
+
+# 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.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# 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, 2002, 2003, 2004
+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
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	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.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		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
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# 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 ;;
+    amd64:OpenBSD:*:*)
+	echo x86_64-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    cats:OpenBSD:*:*)
+	echo arm-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    luna88k:OpenBSD:*:*)
+    	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-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 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:MirBSD:*:*)
+	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# 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.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | 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;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	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 ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
+    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=`(sed 1q /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 ;;
+    # 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 ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${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 -o $dummy $dummy.c \
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && exit 0
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-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 -o $dummy $dummy.c && $dummy && exit 0
+		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 | sed 1q | 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])
+		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" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		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 -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	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 -o $dummy $dummy.c && $dummy && exit 0
+	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 ;;
+    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*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*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 ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	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 ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	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 ;;
+    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 ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	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 i586-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:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    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 ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	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.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C 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
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+	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:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+	i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	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|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	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 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*: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 ;;
+    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 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-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:*:*)
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-?: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 ;;
+    *: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 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit 0 ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms && exit 0 ;;
+	    I*) echo ia64-dec-vms && exit 0 ;;
+	    V*) echo vax-dec-vms && exit 0 ;;
+	esac
+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 -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# 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:
diff --git a/admin/config.pl b/admin/config.pl
new file mode 100644
index 0000000000000000000000000000000000000000..034042ed6421e54ca7e6e7a6e05b9bcd03c0a69f
--- /dev/null
+++ b/admin/config.pl
@@ -0,0 +1,236 @@
+#!/usr/bin/env perl
+# a script for use by autoconf to make the Makefiles
+# from the Makefile.in's
+#
+# the original autoconf mechanism first splits all substitutions into groups
+# of ca. 90, and than invokes sed for _every_ Makefile.in and every group
+# (so around 2-3 times per Makefile.in). So this takes forever, as sed
+# has to recompile the regexps every time.
+#
+# this script does better. It changes all Makefile.ins in one process.
+# in kdelibs the time for building Makefile went down from 2:59 min to 13 sec!
+#
+# written by Michael Matz <matz@kde.org>
+# adapted by Dirk Mueller <mueller@kde.org>
+
+#   This file 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.
+
+#   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
+#   Library General Public License for more details.
+
+#   You should have received a copy of the GNU Library General Public License
+#   along with this 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.
+
+use strict;
+
+use File::Path;
+
+my $ac_subs=$ARGV[0];
+my $ac_sacfiles = $ARGV[1];
+my $ac_given_srcdir=$ARGV[2];
+my $ac_given_INSTALL=$ARGV[3];
+
+my @comp_match;
+my @comp_subs;
+
+#print "ac_subs=$ac_subs\n";
+#print "ac_sacfiles=$ac_sacfiles\n";
+#print "ac_given_srcdir=$ac_given_srcdir\n";
+#print "ac_given_INSTALL=$ac_given_INSTALL\n";
+
+my $configure_input;
+my ($srcdir, $top_srcdir);
+my $INSTALL;
+my $bad_perl = ($] < 5.005);
+my $created_file_count = 0;
+
+open(CF, "< $ac_subs") || die "can't open $ac_subs: $!";
+my @subs = <CF>;
+close(CF);
+chomp @subs;
+@comp_match=();
+@comp_subs=();
+
+if ($bad_perl) {
+    print "Using perl older than version 5.005\n";
+    foreach my $pat (@subs) {
+	if (  ($pat =~ m/s%([^%]*)%([^%]*)%g/ )
+	   || ($pat =~ m/s%([^%]*)%([^%]*)%;t/ )
+           || ($pat =~ m/s,([^,]*),(.*),;t/)
+	   || ($pat =~ m%s/([^/]*)/([^/]*)/g% )
+	   || ($pat =~ m%s/([^/]*)/([^/]*)/;t% )
+	   ) {
+            # form : s%bla%blubb%g
+            # or     s%bla%blubb%;t t   (autoconf > 2.13 and < 2.52 ?)
+            # or     s,bla,blubb,;t t   (autoconf 2.52)
+            my $srch = $1;
+            my $repl = $2;
+            $repl =~ s/\\(.)/$1/g;
+	    push @comp_subs, make_closure($srch, $repl);
+
+	} elsif ( ($pat =~ /%([^%]*)%d/ )
+	   || ($pat =~ m%/([^/]*)/d% )
+	   ) {
+	    push @comp_subs, make_closure($1, "");
+	} else {
+	    die "Uhh. Malformed pattern in $ac_subs ($pat)"
+		unless ( $pat =~ /^\s*$/ );   # ignore white lines
+	}
+    }
+} else {
+    foreach my $pat (@subs) {
+       if ( ($pat =~ /s%([^%]*)%([^%]*)%g/ ) ||
+            ($pat =~ /s%([^%]*)%([^%]*)%;t/ ) ||
+            ($pat =~ /s,([^,]*),(.*),;t/) ) {
+         # form : s%bla%blubb%g
+         # or     s%bla%blubb%;t t   (autoconf > 2.13 and < 2.52 ?)
+         # or     s,bla,blubb,;t t   (autoconf 2.52)
+         my $srch = $1;
+         my $repl = $2;
+         push @comp_match, eval "qr/\Q$srch\E/";  # compile match pattern
+         $repl =~ s/\\(.)/$1/g;
+         push @comp_subs, $repl;
+      } elsif ( ($pat =~ /%([^%]*)%d/ )
+                || ($pat =~ m%/([^/]*)/d% )
+              ) {
+        push @comp_match, eval "qr/\Q$1\E/";
+        push @comp_subs, "";
+      } else {
+          die "Uhh. Malformed pattern in $ac_subs ($pat)"
+          unless ( $pat =~ /^\s*$/ );   # ignore white lines
+      }
+    }
+}
+undef @subs;
+
+# read the list of files to be patched, form:
+# ./Makefile arts/Makefile arts/examples/Makefile arts/flow/Makefile
+
+open(CF, "< $ac_sacfiles") || die "can't open $ac_sacfiles: $!";
+my @ac_files = <CF>;
+close(CF);
+chomp @ac_files;
+
+
+my $ac_file;
+foreach $ac_file (@ac_files) {
+    next if $ac_file =~ /\.\./;
+    next if $ac_file =~ /^\s*$/;
+    my $ac_file_in;
+    my ($ac_dir, $ac_dots, $ac_dir_suffix);
+
+    if ($ac_file =~ /.*:.*/ ) {
+	($ac_file_in = $ac_file) =~ s%[^:]*:%%;
+	$ac_file =~ s%:.*%%;
+    } else {
+	$ac_file_in = $ac_file.".in";
+    }
+
+# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+# Remove last slash and all that follows it.  Not all systems have dirname.
+    ($ac_dir = $ac_file) =~ s%/[^/][^/]*$%%;
+    if ( ($ac_dir ne $ac_file) && ($ac_dir ne ".")) {
+# The file is in a subdirectory.
+	if (! -d "$ac_dir") { mkpath "$ac_dir", 0, 0777; }
+	($ac_dir_suffix = $ac_dir) =~ s%^./%%;
+	$ac_dir_suffix="/".$ac_dir_suffix;
+# A "../" for each directory in $ac_dir_suffix.
+	($ac_dots = $ac_dir_suffix) =~ s%/[^/]*%../%g;
+    } else {
+	$ac_dir_suffix="";
+	$ac_dots="";
+    }
+
+    if ($ac_given_srcdir eq ".") {
+	$srcdir=".";
+	if ($ac_dots) {
+	    ( $top_srcdir = $ac_dots) =~ s%/$%%;
+	} else { $top_srcdir="."; }
+    } elsif ($ac_given_srcdir =~ m%^/%) {
+	$srcdir=$ac_given_srcdir.$ac_dir_suffix;
+	$top_srcdir = $ac_given_srcdir;
+    } else {
+	$srcdir = $ac_dots.$ac_given_srcdir.$ac_dir_suffix;
+	$top_srcdir = $ac_dots.$ac_given_srcdir;
+    }
+
+    if ($ac_given_INSTALL) {
+	if ($ac_given_INSTALL =~ m%^/% ) {
+	    $INSTALL = $ac_given_INSTALL;
+	} else {
+	    $INSTALL = $ac_dots.$ac_given_INSTALL;
+	}
+    }
+
+    print "fast creating $ac_file\n";
+    unlink $ac_file;
+    my $ac_comsub="";
+    my $fname=$ac_file_in;
+    $fname =~ s%.*/%%;
+    $configure_input="$ac_file.  Generated from $fname by config.pl.";
+
+    my $ac_file_inputs;
+    ($ac_file_inputs = $ac_file_in) =~ s%^%$ac_given_srcdir/%;
+    $ac_file_inputs =~ s%:% $ac_given_srcdir/%g;
+
+    patch_file($ac_file, $ac_file_inputs);
+    ++$created_file_count;
+}
+
+print "config.pl: fast created $created_file_count file(s).\n";
+
+sub patch_file {
+    my ($outf, $infiles) = @_;
+    my $filedata;
+    my @infiles=split(' ', $infiles);
+    my $i=0;
+
+    foreach my $name (@infiles) {
+	if (open(CF, "< $name")) {
+	    while (<CF>) {
+		$filedata .= $_;
+	    }
+	    close(CF);
+	} else {
+	    print STDERR "can't open $name: $!"."\n";
+	}
+    }
+
+    $filedata =~ s%\@configure_input\@%$configure_input%g;
+    $filedata =~ s%\@srcdir\@%$srcdir%g;
+    $filedata =~ s%\@top_srcdir\@%$top_srcdir%g;
+    $filedata =~ s%\@INSTALL\@%$INSTALL%g;
+
+    if ($bad_perl) {
+	while ($i <= $#comp_subs) {
+	    my $ref = $comp_subs[$i];
+	    &$ref(\$filedata);
+	    $i++;
+	}
+    } else {
+	while ($i <= $#comp_match) {
+	    $filedata =~ s/$comp_match[$i]/$comp_subs[$i]/g;
+	    $i++;
+	}
+    }
+    open(CF, "> $outf") || die "can't create $outf: $!";
+    print CF $filedata;
+    close(CF);
+}
+
+sub make_closure {
+    my ($pat, $sub) = @_;
+    my $ret = eval "return sub { my \$ref=shift; \$\$ref =~ s%\Q$pat\E%\Q$sub\E%g; }";
+    if ($@) {
+        print "can't create CODE: $@\n";
+    }
+    return $ret;
+}
diff --git a/admin/config.sub b/admin/config.sub
new file mode 100755
index 0000000000000000000000000000000000000000..ac6de9869c9a1b0a8145abac6ac35d9854fb11f9
--- /dev/null
+++ b/admin/config.sub
@@ -0,0 +1,1552 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+timestamp='2004-06-24'
+
+# 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
+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 \
+	| 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 | 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 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | 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-* \
+	| 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-* | 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-* | 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-* | 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
+		;;
+	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
+		;;
+	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
+		;;
+	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
+		;;
+	-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:
diff --git a/admin/configure.in.bot.end b/admin/configure.in.bot.end
new file mode 100644
index 0000000000000000000000000000000000000000..14da27949697ac3d2263a12441c76545f08d88c4
--- /dev/null
+++ b/admin/configure.in.bot.end
@@ -0,0 +1,30 @@
+# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
+if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
+  # And if so, warn when they don't match
+  if test "$kde_libs_prefix" != "$given_prefix"; then
+    # And if kde doesn't know about the prefix yet
+    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
+    if test $? -ne 0; then
+      echo ""
+      echo "Warning: you chose to install this package in $given_prefix,"
+      echo "but KDE was found in $kde_libs_prefix."
+      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
+      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
+      echo "Then restart KDE."
+      echo ""
+    fi
+  fi
+fi
+
+if test "$all_tests" = "bad"; then
+  if test ! "$cache_file" = "/dev/null"; then
+    echo ""
+    echo "Please remove the file $cache_file after changing your setup"
+    echo "so that configure will find the changes next time."
+    echo ""
+  fi
+else
+  echo ""
+  echo "Good - your configure finished. Start make now"
+  echo ""
+fi
diff --git a/admin/configure.in.min b/admin/configure.in.min
new file mode 100644
index 0000000000000000000000000000000000000000..7c7e25a94f9c0d1440cf8a119ffecd435757fc45
--- /dev/null
+++ b/admin/configure.in.min
@@ -0,0 +1,57 @@
+dnl    This file is part of the KDE libraries/packages
+dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
+ 
+dnl    This file is free software; you can redistribute it and/or
+dnl    modify it under the terms of the GNU Library General Public
+dnl    License as published by the Free Software Foundation; either
+dnl    version 2 of the License, or (at your option) any later version.
+ 
+dnl    This library is distributed in the hope that it will be useful,
+dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl    Library General Public License for more details.
+ 
+dnl    You should have received a copy of the GNU Library General Public License
+dnl    along with this library; see the file COPYING.LIB.  If not, write to
+dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl    Boston, MA 02111-1307, USA.
+
+# Original Author was Kalle@kde.org
+# I lifted it in some mater. (Stephan Kulow)
+# I used much code from Janos Farkas
+
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(acinclude.m4) dnl a source file from your sub dir
+
+dnl This is so we can use kde-common
+AC_CONFIG_AUX_DIR(admin)
+
+dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
+unset CDPATH
+
+dnl Checking host/target/build systems, for make, install etc.
+AC_CANONICAL_SYSTEM 
+dnl Perform program name transformation
+AC_ARG_PROGRAM
+
+dnl Automake doc recommends to do this only here. (Janos)
+AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@) dnl searches for some needed programs
+
+KDE_SET_PREFIX
+
+dnl generate the config header
+AM_CONFIG_HEADER(config.h) dnl at the distribution this done
+
+dnl Checks for programs.
+AC_CHECK_COMPILERS
+AC_ENABLE_SHARED(yes)
+AC_ENABLE_STATIC(no)
+KDE_PROG_LIBTOOL
+
+dnl for NLS support. Call them in this order!
+dnl WITH_NLS is for the po files
+AM_KDE_WITH_NLS
+
+dnl KDE_USE_QT
+AC_PATH_KDE
diff --git a/admin/cvs.sh b/admin/cvs.sh
new file mode 100644
index 0000000000000000000000000000000000000000..3e3726cffa6531f1e6d260dc82adfc17438abcc5
--- /dev/null
+++ b/admin/cvs.sh
@@ -0,0 +1,654 @@
+#! /bin/sh
+#
+# cvs.sh
+#
+# This file contains support code from Makefile.common
+# It defines a shell function for each known target
+# and then does a case to call the correct function.
+
+unset MAKEFLAGS
+
+call_and_fix_autoconf()
+{
+  $AUTOCONF || exit 1
+  if test -r configure.in.in ; then
+    perl -pi -e "print \"if test \\\"x\\\$with_fast_perl\\\" = \\\"xyes\\\"; then\
+    \\n  perl -i.bak \\\$ac_aux_dir/conf.change.pl \\\$CONFIG_STATUS\
+    \\\\\\n    || mv \\\$CONFIG_STATUS.bak \\\$CONFIG_STATUS\
+    \\n  rm -f \\\$CONFIG_STATUS.bak\\nfi\
+    \\n\" if /^\\s*chmod\\s+.*\\+x\\s+.*CONFIG_STATUS/; s,^#line.*LINENO.*\$,/* \$& */, ;" configure
+  fi
+}
+
+strip_makefile()
+{
+  if test ! -f $makefile_wo; then
+    perl -e '$in=0; while ( <> ) { $in = 1 if ($_ =~ m/^if / ); print $_ unless ($in || $_ =~ m/^include /); $in = 0 if ($_ =~ m/^endif/); }' < $makefile_am > $makefile_wo
+  fi
+}
+
+check_autotool_versions()
+{
+required_autoconf_version="2.53 or newer"
+AUTOCONF_VERSION=`$AUTOCONF --version | head -n 1`
+case $AUTOCONF_VERSION in
+  Autoconf*2.5* | autoconf*2.5* ) : ;;
+  "" )
+    echo "*** AUTOCONF NOT FOUND!."
+    echo "*** KDE requires autoconf $required_autoconf_version"
+    exit 1
+    ;;
+  * )
+    echo "*** YOU'RE USING $AUTOCONF_VERSION."
+    echo "*** KDE requires autoconf $required_autoconf_version"
+    exit 1
+    ;;
+esac
+
+AUTOHEADER_VERSION=`$AUTOHEADER --version | head -n 1`
+case $AUTOHEADER_VERSION in
+  Autoconf*2.5* | autoheader*2.5* ) : ;;
+  "" )
+    echo "*** AUTOHEADER NOT FOUND!."
+    echo "*** KDE requires autoheader $required_autoconf_version"
+    exit 1
+    ;;
+  * )
+    echo "*** YOU'RE USING $AUTOHEADER_VERSION."
+    echo "*** KDE requires autoheader $required_autoconf_version"
+    exit 1
+    ;;
+esac
+
+AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
+required_automake_version="1.6.1 or newer"
+case $AUTOMAKE_STRING in
+  automake*1.5d* | automake*1.5* | automake*1.5-* )
+    echo "*** YOU'RE USING $AUTOMAKE_STRING."
+    echo "*** KDE requires automake $required_automake_version"
+    exit 1
+    ;;
+  automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9*)
+    echo "*** $AUTOMAKE_STRING found."
+    UNSERMAKE=no
+    ;;
+  "" )
+    echo "*** AUTOMAKE NOT FOUND!."
+    echo "*** KDE requires automake $required_automake_version"
+    exit 1
+    ;;
+  *unsermake* ) :
+    echo "*** YOU'RE USING UNSERMAKE."
+    echo "*** GOOD LUCK!! :)"
+    UNSERMAKE=unsermake
+    ;;
+  * )
+    echo "*** YOU'RE USING $AUTOMAKE_STRING."
+    echo "*** KDE requires automake $required_automake_version"
+    exit 1
+    ;;
+esac
+unset required_automake_version
+}
+
+cvs()
+{
+check_autotool_versions
+acinclude_m4 
+
+### Make new subdirs and configure.in.
+### The make calls could be optimized away here,
+### with a little thought.
+if test -r configure.in.in; then
+    rm -f configure.in
+    echo "*** Creating list of subdirectories"
+    create_subdirs
+
+    if test -r Makefile.am.in; then
+        echo "*** Creating Makefile.am"
+        if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then 
+            strip_makefile
+            $MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
+        else
+            Makefile_am
+        fi
+     fi
+     configure_files
+     echo "*** Creating configure.in"
+     if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then 
+       strip_makefile
+       $MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
+     else
+       configure_in
+     fi
+fi
+
+echo "*** Creating aclocal.m4"
+$ACLOCAL $ACLOCALFLAGS || exit 1
+echo "*** Creating configure"
+call_and_fix_autoconf
+
+if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
+  echo "*** Creating config.h template"
+  $AUTOHEADER || exit 1
+fi
+
+echo "*** Creating Makefile templates"
+$AUTOMAKE || exit 1
+
+if test "$UNSERMAKE" = no; then
+  echo "*** Postprocessing Makefile templates"
+  perl -w admin/am_edit || exit 1
+fi
+
+if egrep "^cvs-local:" $makefile_am >/dev/null; then \
+  strip_makefile
+  $MAKE -f $makefile_wo cvs-local top_srcdir=. || exit 1
+fi
+
+echo "*** Creating date/time stamp"
+touch stamp-h.in
+
+echo "*** Finished"
+echo "    Don't forget to run ./configure"
+echo "    If you haven't done so in a while, run ./configure --help"
+}
+
+dist()
+{
+check_autotool_versions
+
+###
+### First build all of the files necessary to do just "make"
+###
+acinclude_m4
+if test -r configure.in.in; then
+  rm -f configure.in
+  create_subdirs
+
+  if test -r Makefile.am.in; then
+    if grep '\$(top_srcdir)/Makefile.am:' $makefile_am >/dev/null; then 
+      strip_makefile
+      $MAKE -f $makefile_wo top_srcdir=. ./Makefile.am || exit 1
+    else
+      Makefile_am
+    fi
+  fi
+  configure_files
+  if grep '\$(top_srcdir)/configure.in:' $makefile_am >/dev/null; then 
+    strip_makefile
+    $MAKE -f $makefile_wo top_srcdir=. ./configure.in || exit 1
+  else
+    configure_in
+  fi
+fi
+$ACLOCAL $ACLOCALFLAGS
+if egrep "^AM_CONFIG_HEADER" configure.in >/dev/null 2>&1; then
+  echo "*** Creating config.h template"
+  $AUTOHEADER || exit 1
+fi
+$AUTOMAKE --foreign
+if test "$UNSERMAKE" = no; then
+  echo "*** Postprocessing Makefile templates"
+  perl -w admin/am_edit || exit 1
+fi
+call_and_fix_autoconf
+touch stamp-h.in
+if grep "^cvs-local:" $makefile_am >/dev/null; then
+  strip_makefile
+  $MAKE -f $makefile_wo cvs-local top_srcdir=.
+fi
+
+###
+### Then make messages
+###
+if test -d po; then
+ LIST=`find ./po -name "*.po"`
+ for i in $LIST; do
+  file2=`echo $i | sed -e "s#\.po#\.gmo#"`
+  msgfmt -o $file2 $i || touch $file2
+ done
+fi
+if grep "^cvs-dist-local:" $makefile_am >/dev/null; then
+  strip_makefile
+  $MAKE -f $makefile_wo cvs-dist-local top_srcdir=.
+fi
+}
+
+subdir_dist()
+{
+$ACLOCAL $ACLOCALFLAGS
+$AUTOHEADER
+$AUTOMAKE
+AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
+case $AUTOMAKE_STRING in
+  *unsermake* ) :
+    ;;
+  *)
+     perl -w ../admin/am_edit --path=../admin
+esac
+call_and_fix_autoconf
+touch stamp-h.in
+}
+
+configure_in()
+{
+rm -f configure.in configure.in.new
+kde_use_qt_param=
+test -f configure.files || { echo "need configure.files for configure.in"; exit 1; }
+list=`fgrep -v "configure.in.bot" < configure.files | fgrep -v "configure.in.mid"`
+: > configure.in.new
+for file in $list; do 
+  echo "dnl =======================================================" >> configure.in.new
+  echo "dnl FILE: $file" >> configure.in.new
+  echo "dnl =======================================================" >> configure.in.new
+  echo "" >> configure.in.new
+  cat $file >> configure.in.new
+done
+echo "KDE_CREATE_SUBDIRSLIST" >> configure.in.new
+if test -f Makefile.am.in; then
+  subdirs=`cat subdirs`
+  for dir in $subdirs; do
+    vdir=`echo $dir | sed -e 's,[-+.@],_,g'`
+    echo "AM_CONDITIONAL($vdir""_SUBDIR_included, test \"x\$$vdir""_SUBDIR_included\" = xyes)" >> configure.in.new
+    if test -f "$dir/configure.in"; then
+        echo "if test \"x\$$vdir""_SUBDIR_included\" = xyes; then " >> configure.in.new
+        echo "  AC_CONFIG_SUBDIRS($dir)" >> configure.in.new
+        echo "fi" >> configure.in.new
+    fi
+  done
+fi
+
+echo "AC_CONFIG_FILES([ Makefile ])" >> configure.in.new
+
+if test -f inst-apps; then
+    topleveldirs=`cat inst-apps`
+else
+    topleveldirs=
+    for dir in `ls -1d * | sort`; do
+	if test "$dir" != "debian" && test -d $dir; then
+	    topleveldirs="$topleveldirs $dir"
+	fi
+    done
+fi
+
+for topleveldir in $topleveldirs; do 
+  if test -f $topleveldir/configure.in; then
+	continue
+  fi
+  if test -f $topleveldir/Makefile.am; then :; else
+	continue
+  fi
+
+  mfs=`find $topleveldir -follow -name Makefile.am -print | fgrep -v "/." | \
+       sed -e 's#\./##; s#/Makefile.am$##' | sort | sed -e 's#$#/Makefile#'`
+  for i in $mfs; do
+     echo "AC_CONFIG_FILES([ $i ])" >> configure.in.new
+  done
+done
+
+files=`cat configure.files`
+list=`egrep '^dnl AC_OUTPUT\(.*\)' $files | sed -e "s#^.*dnl AC_OUTPUT(\(.*\))#\1#"`
+for file in $list; do 
+    echo "AC_CONFIG_FILES([ $file ])" >>  configure.in.new
+done
+
+midfiles=`cat configure.files | fgrep "configure.in.mid"`
+test -n "$midfiles" && cat $midfiles >> configure.in.new
+
+echo "AC_OUTPUT" >> configure.in.new
+modulename=
+if test -f configure.in.in; then
+   if head -n 2 configure.in.in | egrep "^#MIN_CONFIG\(.*\)$" > /dev/null; then
+      kde_use_qt_param=`cat configure.in.in | sed -n -e "s/#MIN_CONFIG(\(.*\))/\1/p"`
+   fi
+   if head -n 2 configure.in.in | egrep "^#MIN_CONFIG" > /dev/null; then
+      line=`grep "^AM_INIT_AUTOMAKE(" configure.in.in`
+      if test -n "$line"; then
+	  modulename=`echo $line | sed -e "s#AM_INIT_AUTOMAKE(\([^,]*\),.*#\1#"`
+	  VERSION=`echo $line | sed -e "s#AM_INIT_AUTOMAKE([^,]*, *\([^)]*\)).*#\1#"`
+      fi
+      sed -e "s#AM_INIT_AUTOMAKE([^@].*#dnl PACKAGE set before#" \
+          configure.in.new > configure.in && mv configure.in configure.in.new
+   fi
+fi
+if test -z "$VERSION" || test "$VERSION" = "@VERSION@"; then
+     VERSION="\"3.4.89\""
+fi
+if test -z "$modulename" || test "$modulename" = "@MODULENAME@"; then
+   modulename=`pwd`; 
+   modulename=`basename $modulename`
+   esc_VERSION=`echo $VERSION | sed -e "s#[^.0-9a-zA-Z]##g"`
+   modulename=`echo $modulename | sed -e "s#-$esc_VERSION##"`   
+
+fi
+if test -n "$kde_use_qt_param"; then
+      sed -e "s#^dnl KDE_USE_QT#KDE_USE_QT($kde_use_qt_param)#" \
+      	configure.in.new > configure.in && mv configure.in configure.in.new
+fi
+sed -e "s#@MODULENAME@#$modulename#" configure.in.new |
+	sed -e "s#@VERSION@#$VERSION#" > configure.in
+botfiles=`cat configure.files | egrep "configure.in.bot"`
+test -n "$botfiles" && cat $botfiles >> configure.in
+cat $admindir/configure.in.bot.end >> configure.in
+rm -f configure.in.new
+}
+
+configure_files()
+{
+echo "*** Creating configure.files"
+admindir=NO
+for i in . .. ../.. ../../..; do
+  if test -x $i/admin; then admindir=$i/admin; break; fi
+done
+rm -f configure.files
+touch configure.files
+if test -f configure.in.in && head -n 2 configure.in.in | grep "^#MIN_CONFIG" > /dev/null; then
+	echo $admindir/configure.in.min >> configure.files
+fi
+test -f configure.in.in && echo configure.in.in >> configure.files
+# we collect files in the subdirs and do some sorting tricks, so subsubdirs come after subdirs
+if test -f inst-apps; then
+   inst=`cat inst-apps`
+   list=""
+   for i in $inst; do
+      list="$list `find $i/ -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
+		sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`"
+   done
+else
+   list=`find . -follow -name "configure.in.in" -o -name "configure.in.bot" -o -name "configure.in.mid" | \
+		sed -e "s,/configure,/aaaconfigure," | sort | sed -e "s,/aaaconfigure,/configure,"`
+fi
+for i in $list; do if test -f $i && test `dirname $i` != "." ; then
+  echo $i >> configure.files
+fi; done
+test -f configure.in.mid && echo configure.in.mid >> configure.files
+test -f configure.in.bot && echo configure.in.bot >> configure.files
+if test ! -s configure.files; then
+   echo "There are no files to build a configure. Please check your checkout."
+   exit 1
+fi
+}
+
+create_subdirs()
+{
+if grep '\$(top_srcdir)/subdirs:' $makefile_am >/dev/null; then 
+    # as many modules contain rules to create subdirs without any
+    # dependencies make won't create it unless there is no file.
+    # so we check if that's a dummy rule or one that works
+    rm -f subdirs.cvs.sh.$$
+    if test -f subdirs; then
+	mv subdirs subdirs.cvs.sh.$$
+    fi
+    strip_makefile
+    $MAKE -f $makefile_wo top_srcdir=. ./subdirs || exit 1
+    if test -f subdirs.cvs.sh.$$; then
+	if test -s subdirs; then
+	    rm subdirs.cvs.sh.$$ 
+	else
+	    mv subdirs.cvs.sh.$$ subdirs
+	fi
+    fi
+else
+    subdirs
+fi
+}
+
+subdirs()
+{
+dirs=
+idirs=
+if test -f inst-apps; then
+   idirs=`cat inst-apps`
+else
+   idirs=`ls -1 | sort`
+fi
+
+compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
+compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
+for i in $idirs; do
+    if test -f $i/Makefile.am; then
+       case " $compilefirst $compilelast " in
+         *" $i "*) ;;
+         *) dirs="$dirs $i"
+       esac
+    fi
+done
+
+: > ./_SUBDIRS
+
+for d in $compilefirst; do
+   echo $d >> ./_SUBDIRS
+done
+
+(for d in $dirs; do 
+   list=`sed -ne "s#^COMPILE_BEFORE_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
+   for s in $list; do
+      echo $s $d
+   done
+   list=`sed -ne "s#^COMPILE_AFTER_$d""[ ]*=[ ]*##p" $makefile_am | head -n 1`
+   for s in $list; do
+      echo $d $s
+   done
+   echo $d $d
+done ) | tsort >> ./_SUBDIRS
+
+for d in $compilelast; do
+   echo $d >> ./_SUBDIRS
+done
+
+if test -r subdirs && cmp -s subdirs _SUBDIRS; then
+    rm -f _SUBDIRS
+fi
+test -r _SUBDIRS && mv _SUBDIRS subdirs || true
+}
+
+Makefile_am()
+{
+if test -f Makefile.am.in; then
+  compilefirst=`sed -ne 's#^COMPILE_FIRST[ ]*=[ ]*##p' $makefile_am | head -n 1`
+  compilelast=`sed -ne 's#^COMPILE_LAST[ ]*=[ ]*##p' $makefile_am | head -n 1`
+
+  idirs=
+  dirs=
+  if test -f inst-apps; then
+     idirs=`cat inst-apps`
+  else
+     idirs=`cat subdirs`
+  fi
+  for i in $idirs; do
+    case " $compilefirst $compilelast " in
+      *" $i "*) ;;
+      *) dirs="$dirs $i"
+    esac
+  done
+
+  adds=`fgrep '$(top_srcdir)/acinclude.m4:' Makefile.am.in | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir)/,,g'`
+  if echo "$adds" | fgrep "*" >/dev/null ; then
+    adds=`ls -d -1 $adds 2>/dev/null`
+    fgrep -v  '$(top_srcdir)/acinclude.m4:' Makefile.am.in > Makefile.am.in.adds
+    str='$(top_srcdir)/acinclude.m4:'
+    for add in $adds; do 
+	str="$str \$(top_srcdir)/$add"
+    done
+    echo $str >> Makefile.am.in.adds
+  else
+    cat Makefile.am.in > Makefile.am.in.adds
+  fi
+
+  cat Makefile.am.in.adds | \
+      sed -e 's,^\s*\(COMPILE_BEFORE.*\),# \1,' | \
+      sed -e 's,^\s*\(COMPILE_AFTER.*\),# \1,' > Makefile.am
+    echo "SUBDIRS="'$(TOPSUBDIRS)' >> Makefile.am
+  rm Makefile.am.in.adds
+fi
+}
+
+acinclude_m4()
+{
+  echo "*** Creating acinclude.m4"
+  adds=
+  if grep '\$(top_srcdir)/acinclude.m4:' $makefile_am >/dev/null; then 
+    strip_makefile
+    rm -f acinclude.m4
+    adds=`grep '\$(top_srcdir)/acinclude.m4:' $makefile_wo | sed -e 's,^[^:]*: *,,; s,\$(top_srcdir),.,g'`
+    if echo $adds | fgrep "*" >/dev/null ; then
+      adds=`ls -d -1 $adds 2>/dev/null`
+    else
+      $MAKE -f $makefile_wo top_srcdir=. ./acinclude.m4 || exit 1
+    fi
+  else
+    rm -f acinclude.m4
+  fi
+  # if it wasn't created up to now, then we do it better
+  if test ! -f acinclude.m4; then
+     cat admin/acinclude.m4.in admin/libtool.m4.in admin/pkg.m4.in $adds > acinclude.m4
+  fi
+}
+
+package_merge()
+{
+catalogs=$POFILES
+for cat in $catalogs; do
+  msgmerge -o $cat.new $cat $PACKAGE.pot
+  if test -s $cat.new; then
+    grep -v "\"POT-Creation" $cat.new > $cat.new.2
+    grep -v "\"POT-Creation" $cat >> $cat.new.1
+    if diff $cat.new.1 $cat.new.2; then
+	rm $cat.new
+    else
+	mv $cat.new $cat
+    fi
+    rm -f $cat.new.1 $cat.new.2
+  fi
+done
+}
+
+extract_messages()
+{
+podir=${podir:-$PWD/po}
+files=`find . -name Makefile.am | xargs egrep -l '^messages:' `
+dirs=`for i in $files; do echo \`dirname $i\`; done`
+tmpname="$PWD/messages.log"
+if test -z "$EXTRACTRC"; then EXTRACTRC=extractrc ; fi
+if test -z "$PREPARETIPS"; then PREPARETIPS=preparetips ; fi
+export EXTRACTRC PREPARETIPS
+
+for subdir in $dirs; do
+  test -z "$VERBOSE" || echo "Making messages in $subdir"
+  (cd $subdir
+   if test -n "`grep -e '^messages:.*rc.cpp' Makefile.am`"; then
+	$EXTRACTRC *.rc *.ui *.kcfg > rc.cpp
+   else
+	candidates=`ls -1 *.rc *.ui *.kcfg 2>/dev/null`
+	if test -n "$candidates"; then
+	    echo "$subdir has *.rc, *.ui or *.kcfg files, but not correct messages line"
+	fi
+   fi
+   if find . -name \*.c\* -o -name \*.h\* | fgrep -v ".svn" | xargs fgrep -s -q KAboutData ; then
+	echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > _translatorinfo.cpp
+   else echo " " > _translatorinfo.cpp
+   fi
+   perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
+
+   kdepotpath=${includedir:-`kde-config --expandvars --install include`}/kde.pot
+
+   $MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" srcdir=. \
+	XGETTEXT="${XGETTEXT:-xgettext} --foreign-user -C -ci18n -ki18n -ktr2i18n -kI18N_NOOP -kI18N_NOOP2 -kaliasLocale -x $kdepotpath" messages
+   exit_code=$?
+   if test "$exit_code" != 0; then
+       echo "make exit code: $exit_code"
+   fi
+   ) 2>&1 | grep -v '^make\[1\]' > $tmpname
+   test -s $tmpname && { echo $subdir ; cat "$tmpname"; }
+   test -f $subdir/rc.cpp && rm -f $subdir/rc.cpp
+   rm -f $subdir/_translatorinfo.cpp
+   rm -f $subdir/_transMakefile
+done
+rm -f $tmpname
+}
+
+package_messages()
+{
+rm -rf po.backup
+mkdir po.backup
+
+for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
+  egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > po.backup/$i
+  cat po/$i > po.backup/backup_$i
+  touch -r po/$i po.backup/backup_$i
+  rm po/$i
+done
+
+extract_messages
+
+for i in `ls -1 po.backup/*.pot 2>/dev/null | sed -e "s#po.backup/##" | egrep -v '^backup_'`; do
+  test -f po/$i || echo "disappeared: $i"
+done
+for i in `ls -1 po/*.pot 2>/dev/null | sed -e "s#po/##"`; do
+  sed -e 's,^"Content-Type: text/plain; charset=CHARSET\\n"$,"Content-Type: text/plain; charset=UTF-8\\n",' po/$i > po/$i.new && mv po/$i.new po/$i
+  #msgmerge -q -o po/$i po/$i po/$i
+  egrep -v '^#[^,]' po/$i | egrep '^.*[^ ]+.*$' | grep -v "\"POT-Creation" > temp.pot
+  if test -f po.backup/$i && ! cmp -s temp.pot po.backup/$i; then
+    echo "will update $i"
+  else
+    if test -f po.backup/backup_$i; then
+      test -z "$VERBOSE" || echo "I'm restoring $i"
+      mv po.backup/backup_$i po/$i
+      rm po.backup/$i
+    else
+      echo "will add $i"
+    fi
+  fi
+done
+rm -f temp.pot
+rm -rf po.backup
+}
+
+# Make sure that sorting is always done the same way
+LC_ALL=C
+export LC_ALL
+unset LANG || :
+unset LC_CTYPE || :
+unset LANGUAGE || :
+
+unset CDPATH || :
+admindir=`echo "$0" | sed 's%[\\/][^\\/][^\\/]*$%%'`
+test "x$admindir" = "x$0" && admindir=.
+
+test "x$MAKE" = x && MAKE=make
+makefile_am=Makefile.am
+makefile_wo=Makefile.am.wo
+if test -f Makefile.am.in; then
+  makefile_am=Makefile.am.in
+  makefile_wo=Makefile.am.in.wo
+  rm -f $makefile_wo
+fi
+
+# Suck in the AUTOCONF detection code
+. $admindir/detect-autoconf.sh
+
+###
+### Main
+###
+
+arg=`echo $1 | tr .- __`
+case $arg in
+  cvs | dist | subdir_dist | configure_in | configure_files | subdirs | \
+  cvs_clean | package_merge | package_messages | Makefile_am | acinclude_m4 | extract_messages ) $arg ;;
+  configure ) call_and_fix_autoconf ;;
+  * ) echo "Usage: cvs.sh <target>"
+      echo "Target can be one of:"
+      echo "    cvs svn dist"
+      echo "    configure.in configure.files"
+      echo "    package-merge package-messages"
+      echo ""
+      echo "Usage: anything but $1"
+      exit 1 ;;
+esac
+
+if test -f $makefile_wo; then
+  rm $makefile_wo
+fi
+
+exit 0
diff --git a/admin/debianrules b/admin/debianrules
new file mode 100755
index 0000000000000000000000000000000000000000..25897f2e39a98fc6907e4cda283eccb73452fcfe
--- /dev/null
+++ b/admin/debianrules
@@ -0,0 +1,43 @@
+#!/usr/bin/perl -w
+
+use Shell qw(mv cp mkdir rm) ;
+use File::Find;
+use Cwd;
+
+$origPwd = `pwd`;
+chomp $origPwd;
+
+$kde_prefix	=	"/usr";
+$sysconfdir	=	"/etc";
+$kde_includedir	=	"$kde_prefix/include/kde";
+$infodir	=	"$kde_prefix/share/info";
+$mandir		=	"$kde_prefix/share/man";
+$qtdir		=	"/usr/share/qt3";
+
+$kde_cgidir	=	"$kde_prefix/lib/cgi-bin";
+$kde_confdir	=	"$sysconfdir/kde3";
+$kde_htmldir	=	"$kde_prefix/share/doc/kde/HTML";
+
+if (defined $ENV{DEB_BUILD_OPTIONS} &&
+    $ENV{DEB_BUILD_OPTIONS} =~ /\bnostrip\b/) {
+	$enable_debug="--enable-debug=full";
+} else {
+	$enable_debug="--disable-debug";
+}
+
+if (@ARGV && $ARGV[0] eq 'echodirs') {
+  print STDOUT "export kde_prefix=$kde_prefix\n";
+  print STDOUT "export sysconfdir=$sysconfdir\n";
+  print STDOUT "export kde_includedir=$kde_includedir\n";
+  print STDOUT "export infodir=$infodir\n";
+  print STDOUT "export mandir=$mandir\n";
+  print STDOUT "export qtdir=$qtdir\n";
+
+  print STDOUT "export kde_cgidir=$kde_cgidir\n";
+  print STDOUT "export kde_confdir=$kde_confdir\n";
+  print STDOUT "export kde_htmldir=$kde_htmldir\n";
+
+  print STDOUT "configkde=$enable_debug --disable-rpath --prefix=\$(kde_prefix) --sysconfdir=\$(sysconfdir) --includedir=\$(kde_includedir) --infodir=\$(infodir) --mandir=\$(mandir) --with-qt-dir=\$(qtdir)\n";
+
+  exit
+}
diff --git a/admin/depcomp b/admin/depcomp
new file mode 100755
index 0000000000000000000000000000000000000000..4c20c6c944b9ebe4a70f0c1b0dfc057c26179b91
--- /dev/null
+++ b/admin/depcomp
@@ -0,0 +1,441 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Must come before tru64.
+
+  # Intel's C compiler understands `-MD -MF file'.  However
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+
+   tmpdepfile1="$object.d"
+   tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` 
+   if test "$libtool" = yes; then
+      "$@" -Wc,-MD
+   else
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  test -z "$dashmflag" && dashmflag=-M
+  ( IFS=" "
+    case " $* " in
+    *" --mode=compile "*) # this is libtool, let us make it quiet
+      for arg
+      do # cycle over the arguments
+        case "$arg" in
+	"--mode=compile")
+	  # insert --quiet before "--mode=compile"
+	  set fnord "$@" --quiet
+	  shift # fnord
+	  ;;
+	esac
+	set fnord "$@" "$arg"
+	shift # fnord
+	shift # "$arg"
+      done
+      ;;
+    esac
+    "$@" $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  # X makedepend
+  (
+    shift
+    cleared=no
+    for arg in "$@"; do
+      case $cleared in no)
+        set ""; shift
+	cleared=yes
+      esac
+      case "$arg" in
+        -D*|-I*)
+	  set fnord "$@" "$arg"; shift;;
+	-*)
+	  ;;
+	*)
+	  set fnord "$@" "$arg"; shift;;
+      esac
+    done
+    obj_suffix="`echo $object | sed 's/^.*\././'`"
+    touch "$tmpdepfile"
+    ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tail +3 "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  ( IFS=" "
+    case " $* " in
+    *" --mode=compile "*)
+      for arg
+      do # cycle over the arguments
+        case $arg in
+	"--mode=compile")
+	  # insert --quiet before "--mode=compile"
+	  set fnord "$@" --quiet
+	  shift # fnord
+	  ;;
+	esac
+	set fnord "$@" "$arg"
+	shift # fnord
+	shift # "$arg"
+      done
+      ;;
+    esac
+    "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  ( IFS=" "
+    case " $* " in
+    *" --mode=compile "*)
+      for arg
+      do # cycle over the arguments
+        case $arg in
+	"--mode=compile")
+	  # insert --quiet before "--mode=compile"
+	  set fnord "$@" --quiet
+	  shift # fnord
+	  ;;
+	esac
+	set fnord "$@" "$arg"
+	shift # fnord
+	shift # "$arg"
+      done
+      ;;
+    esac
+    "$@" -E |
+    sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/admin/deps.am b/admin/deps.am
new file mode 100644
index 0000000000000000000000000000000000000000..e8f50158890dd616fdebad9ae58e049ad514c0a6
--- /dev/null
+++ b/admin/deps.am
@@ -0,0 +1,19 @@
+$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in $(top_srcdir)/admin/cvs.sh $(top_srcdir)/admin/pkg.m4.in
+	@cd $(top_srcdir) && $(SHELL) admin/cvs.sh acinclude_m4
+
+$(top_srcdir)/configure.in: $(top_srcdir)/subdirs $(top_srcdir)/configure.files $(top_srcdir)/admin/cvs.sh
+	@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure_in
+
+$(top_srcdir)/configure.files: $(top_srcdir)/subdirs $(CONF_FILES)
+	@cd $(top_srcdir) && $(SHELL) admin/cvs.sh configure.files $(top_srcdir)/admin/cvs.sh
+
+$(top_srcdir)/Makefile.am: $(top_srcdir)/Makefile.am.in $(top_srcdir)/subdirs $(top_srcdir)/admin/cvs.sh
+	@cd $(top_srcdir) && $(SHELL) admin/cvs.sh Makefile_am
+
+$(top_srcdir)/subdirs: $(top_srcdir)/Makefile.am.in $(top_srcdir)/admin/cvs.sh
+	@cd $(top_srcdir) && $(SHELL) admin/cvs.sh subdirs
+
+# defining default rules for files that may not be present
+$(top_srcdir)/Makefile.am.in:
+$(CONF_FILES):
+
diff --git a/admin/detect-autoconf.sh b/admin/detect-autoconf.sh
new file mode 100644
index 0000000000000000000000000000000000000000..27a9f5d23971c200c722116342e9901c50d20501
--- /dev/null
+++ b/admin/detect-autoconf.sh
@@ -0,0 +1,60 @@
+#! /bin/sh
+
+# Global variables...
+AUTOCONF="autoconf"
+AUTOHEADER="autoheader"
+AUTOM4TE="autom4te"
+AUTOMAKE="automake"
+ACLOCAL="aclocal"
+UNSERMAKE="no"
+
+# Please add higher versions first. The last version number is the minimum
+# needed to compile KDE. Do not forget to include the name/version #
+# separator if one is present, e.g. -1.2 where - is the separator.
+KDE_AUTOCONF_VERS="-2.58 -2.57 257 -2.54 -2.53a -2.53 -2.52 -2.5x"
+KDE_AUTOMAKE_VERS="-1.7 17 -1.6"
+
+# We don't use variable here for remembering the type ... strings. Local 
+# variables are not that portable, but we fear namespace issues with our
+# includer.
+checkAutoconf()
+{
+  for kde_autoconf_version in $KDE_AUTOCONF_VERS; do
+    if test -x "`$WHICH $AUTOCONF$kde_autoconf_version 2>/dev/null`"; then
+      AUTOCONF="`$WHICH $AUTOCONF$kde_autoconf_version`"
+      AUTOHEADER="`$WHICH $AUTOHEADER$kde_autoconf_version`"
+      AUTOM4TE="`$WHICH $AUTOM4TE$kde_autoconf_version`"
+      break
+    fi
+  done
+}
+
+checkAutomake ()
+{
+  for kde_automake_version in $KDE_AUTOMAKE_VERS; do
+    if test -x "`$WHICH $AUTOMAKE$kde_automake_version 2>/dev/null`"; then
+      AUTOMAKE="`$WHICH $AUTOMAKE$kde_automake_version`"
+      ACLOCAL="`$WHICH $ACLOCAL$kde_automake_version`"
+      break
+    fi
+  done
+
+  if test "$UNSERMAKE" != no && test -x "`$WHICH unsermake 2>/dev/null`"; then
+      AUTOMAKE="`$WHICH unsermake` -c"
+  fi
+}
+
+checkWhich ()
+{
+  WHICH=""
+  for i in "type -p" "which" "type" ; do
+    T=`$i sh 2> /dev/null`
+    test -x "$T" && WHICH="$i" && break
+  done
+}
+
+checkWhich
+checkAutoconf
+checkAutomake
+
+export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL
diff --git a/admin/install-sh b/admin/install-sh
new file mode 100755
index 0000000000000000000000000000000000000000..36f96f3e033cfaeefc092147d99d92f78e030d12
--- /dev/null
+++ b/admin/install-sh
@@ -0,0 +1,276 @@
+#!/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 "$0: no input file specified" >&2
+	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 "$0: $src does not exist" >&2
+		exit 1
+	fi
+
+	if [ x"$dst" = x ]
+	then
+		echo "$0: no destination specified" >&2
+		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 couple of temp file names in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+	rmtmp=$dstdir/#rm.$$#
+
+# Trap to clean up temp files at exit.
+
+	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+	trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd "$src" "$dsttmp" &&
+
+# 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 remove or move aside any old file at destination location.  We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons.  In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+	if [ -f "$dstdir/$dstfile" ]
+	then
+		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+		{
+		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		  (exit 1); exit
+		}
+	else
+		:
+	fi
+} &&
+
+# Now rename the file to the real destination.
+
+	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+	(exit 0); exit
+}
diff --git a/admin/libtool.m4.in b/admin/libtool.m4.in
new file mode 100644
index 0000000000000000000000000000000000000000..b6804aee7e2bb32e8a78f78bd7267e31ea851a6f
--- /dev/null
+++ b/admin/libtool.m4.in
@@ -0,0 +1,5891 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+## Copyright 1996, 1997, 1998, 1999, 2000, 2001
+## Free Software Foundation, Inc.
+## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public 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.
+
+# serial 47 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+	 test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+	 test "X$echo_testing_string" = "X$echo_test_string"; then
+	# Cool, printf works
+	:
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	export CONFIG_SHELL
+	SHELL="$CONFIG_SHELL"
+	export SHELL
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	   test "X$echo_testing_string" = 'X\t' &&
+	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+	# maybe with a smaller string...
+	prev=:
+
+	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+	  then
+	    break
+	  fi
+	  prev="$cmd"
+	done
+
+	if test "$prev" != 'sed 50q "[$]0"'; then
+	  echo_test_string=`eval $prev`
+	  export echo_test_string
+	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	else
+	  # Oops.  We lost completely, so just stick with echo.
+	  echo=echo
+	fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+	[avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      LINUX_64_MODE="32"
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      LINUX_64_MODE="64"
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s conftest.err; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  testring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+ *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
+	       = "XX$testring") >/dev/null 2>&1 &&
+	    new_result=`expr "X$testring" : ".*" 2>&1` &&
+	    lt_cv_sys_max_cmd_len=$new_result &&
+	    test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      testring=$testring$testring
+    done
+    testring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_unknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+    
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+    	  lt_cv_dlopen_self_static, [dnl
+	  _LT_AC_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
+   # that will create temporary files in the current directory regardless of
+   # the output directory.  Thus, making CWD read-only will cause this test
+   # to fail, enabling locking or at least warning the user not to do parallel
+   # builds.
+   chmod -w .
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test ! -s out/conftest.err; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w .
+   $rm conftest* out/*
+   rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac  
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext='$(test .$module = .yes && echo .so || echo .dylib)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd*-gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case "$host_cpu" in
+  ia64*)
+    shrext='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  libsuff=
+  if test "x$LINUX_64_MODE" = x64; then
+    # Some platforms are per default 64-bit, so there's no /lib64
+    if test -d /lib64; then
+      libsuff=64
+    fi
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+	;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+	if test -n "$CXX" && test "X$CXX" != "Xno"; then
+	  AC_LIBTOOL_LANG_CXX_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      F77)
+	if test -n "$F77" && test "X$F77" != "Xno"; then
+	  AC_LIBTOOL_LANG_F77_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      GCJ)
+	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+	  AC_LIBTOOL_LANG_GCJ_CONFIG
+	else
+	  tagname=""
+	fi
+	;;
+
+      RC)
+	AC_LIBTOOL_LANG_RC_CONFIG
+	;;
+
+      *)
+	AC_MSG_ERROR([Unsupported tag name: $tagname])
+	;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [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])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+  
+mingw* | pw32*)
+  # win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='win32_libid'
+  ;;
+
+darwin* | rhapsody*)
+  # this will be overwritten by pass_all, but leave it in just in case
+  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.[[012]])
+    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case "$host_cpu" in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+  irix5* | nonstopux*)
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+    ;;
+  *)
+    case $LD in
+    *-32|*"-32 ") libmagic=32-bit;;
+    *-n32|*"-n32 ") libmagic=N32;;
+    *-64|*"-64 ") libmagic=64-bit;;
+    *) libmagic=never-match;;
+    esac
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
+    ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  case $host_cpu in
+  alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
+    lt_cv_deplibs_check_method=pass_all ;;
+  # the debian people say, arm and glibc 2.3.1 works for them with pass_all
+  arm* )
+    lt_cv_deplibs_check_method=pass_all ;;
+  *)
+    # glibc up to 2.1.1 does not perform some relocations on ARM
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+  else
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  # this will be overridden with pass_all, but let us keep it just in case
+  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=/lib/libc.so
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+      */dev/null* | *'Invalid file or object type'*)
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+        ;;
+      *)
+	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	*/dev/null*)
+	  lt_cv_path_NM="$tmp_nm -p"
+	  break
+	  ;;
+	*)
+	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	  continue # so that we can try to find one that supports BSD flags
+	  ;;
+	esac
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!).  If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+    ;;
+  esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+  if echo "$old_CC $old_CFLAGS " | grep "[[ 	]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ 	]]" >/dev/null; then :
+  else
+    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+  darwin* | rhapsody*)
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case "$host_os" in
+    rhapsody* | darwin1.[[012]])
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
+      ;;
+    *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+      else
+	case ${MACOSX_DEPLOYMENT_TARGET} in
+	  10.[012])
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	    ;;
+	  10.*)
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+	    ;;
+	esac
+      fi
+      ;;
+    esac
+    output_verbose_link_cmd='echo'
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+  else
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+  fi  
+    ;;  
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+	grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      # KDE requires run time linking.  Make it the default.
+      aix_use_runtimelinking=yes
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+	collect2name=`${CC} -print-prog-name=collect2`
+	if test -f "$collect2name" && \
+	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	then
+	  # We have reworked collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	else
+	  # We have old collect2
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	fi
+      esac
+      shared_flag='-shared'
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	shared_flag='-G'
+      else
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag='-qmkshrobj ${wl}-G'
+	else
+	  shared_flag='-qmkshrobj'
+	fi
+      fi
+    fi
+
+    # Let the compiler handle the export list.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+	# Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	# Warning - without using the other run time loading flags,
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	# -bexpall does not export symbols beginning with underscore (_)
+	_LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	# Exported symbols can be pulled into shared objects from archives
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	# This is similar to how AIX traditionally builds it's shared libraries.
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	cp $export_symbols $output_objdir/$soname.def;
+      else
+	echo EXPORTS > $output_objdir/$soname.def;
+	cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+
+  darwin* | rhapsody*)
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case "$host_os" in
+    rhapsody* | darwin1.[[012]])
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
+      ;;
+    *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+      else
+	case ${MACOSX_DEPLOYMENT_TARGET} in
+	  10.[012])
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	    ;;
+	  10.*)
+	    _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+	    ;;
+	esac
+      fi
+      ;;
+    esac
+    lt_int_apple_cc_single_mod=no
+    output_verbose_link_cmd='echo'
+    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+      lt_int_apple_cc_single_mod=yes
+    fi
+    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+    else
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+    fi
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+
+    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+  else
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+  fi
+    ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      ghcx)
+	# Green Hills C++ Compiler
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				# but as the default
+				# location of the library.
+
+    case $cc_basename in
+    CC)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+        ;;
+      ia64*)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        ;;
+      *)
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					      # but as the default
+					      # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      aCC)
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+	  ;;
+	esac
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test $with_gnu_ld = no; then
+	    case "$host_cpu" in
+	    ia64*|hppa*64*)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+	      ;;
+	    esac
+	  fi
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC)
+	# SGI C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+	# Archives containing C++ object files must be created using
+	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	;;
+      *)
+	if test "$GXX" = yes; then
+	  if test "$with_gnu_ld" = no; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+	  else
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+	  fi
+	fi
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+	;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	;;
+      icpc)
+	# Intel C++
+	with_gnu_ld=yes
+	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	;;
+      cxx)
+	# Compaq C++
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	runpath_var=LD_RUN_PATH
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC)
+	# Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	# KCC will only create a shared library if the output file
+	# ends with ".so" (or ".sl" for HP-UX), so rename the library
+	# to its proper name (with version) after linking.
+	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Archives containing C++ object files must be created using
+	# the KAI C++ compiler.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+	;;
+      RCC)
+	# Rational C++ 2.4.1
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      cxx)
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	  echo "-hidden">> $lib.exp~
+	  $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry $objdir/so_locations -o $lib~
+	  $rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+	;;
+      *)
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	  # Commands to make compiler produce verbose output that lists
+	  # what "hidden" libraries, object files and flags are used when
+	  # linking a shared library.
+	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+	else
+	  # FIXME: insert proper C++ library support
+	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sco*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case $cc_basename in
+      CC)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.x
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      lcc)
+	# Lucid
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC)
+	# Sun C++ 4.2, 5.x and Centerline C++
+	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
+
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	case $host_os in
+	  solaris2.[0-5] | solaris2.[0-5].*) ;;
+	  *)
+	    # The C++ compiler is used as linker so we must use $wl
+	    # flag to pass the commands to the underlying system
+	    # linker.
+	    # Supported since Solaris 2.6 (maybe 2.5.1?)
+	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	    ;;
+	esac
+	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+	# Commands to make compiler produce verbose output that lists
+	# what "hidden" libraries, object files and flags are used when
+	# linking a shared library.
+	#
+	# There doesn't appear to be a way to prevent this compiler from
+	# explicitly linking system object files so we need to strip them
+	# from the output so that they don't get included in the library
+	# dependencies.
+	output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+	# Archives containing C++ object files must be created using
+	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	# necessary to make sure instantiated templates are included
+	# in the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	;;
+      gcx)
+	# Green Hills C++ Compiler
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
+
+	# The C++ compiler must be used to create the archive.
+	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	;;
+      *)
+	# GNU C++ compiler with Solaris linker
+	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	  if $CC --version | grep -v '^2\.7' > /dev/null; then
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  else
+	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	    # platform.
+	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
+	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+	  fi
+
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	fi
+	;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC)
+	# NonStop-UX NCC 3.20
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+      *)
+	# FIXME: insert proper C++ library support
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+	  || test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext|*.$libext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case "$host_os" in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi  
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext='$shrext'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  test -f Makefile && make "$ltmain"
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris* | sysv5*)
+  symcode='[[BDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGISTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+	if grep ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+	  cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+	  cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68)
+	  # Green Hills C++ Compiler
+	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    if test "$host_cpu" != ia64; then
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+	    case "$host_cpu" in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux*)
+	case $cc_basename in
+	  KCC)
+	    # KAI C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  icpc)
+	    # Intel C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;; 
+	  cxx)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC)
+	    # Rational C++ 2.4.1
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx)
+	    # Digital/Compaq C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      sco*)
+	case $cc_basename in
+	  CC)
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx)
+	    # Green Hills C++ Compiler
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC)
+	    # Sun C++ 4.x
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc)
+	    # Lucid
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC)
+	    # NonStop-UX NCC 3.20
+	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      unixware*)
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case "$host_cpu" in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux*)
+      case $CC in
+      icc* | ecc*)
+	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+	cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+      runpath_var=LD_RUN_PATH
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+      # ancient GNU ld didn't support --whole-archive et. al.
+      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+ 	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+	fi
+
+	# KDE requires run time linking.  Make it the default.
+	aix_use_runtimelinking=yes
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" && \
+  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
+	  then
+  	  # We have reworked collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  else
+  	  # We have old collect2
+  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+  	  # It fails to find uninstalled libraries when the uninstalled
+  	  # path is not listed in the libpath.  Setting hardcode_minus_L
+  	  # to unsupported forces relinking
+  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	esac
+	shared_flag='-shared'
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+  	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+  	if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='-qmkshrobj ${wl}-G'
+	  else
+	    shared_flag='-qmkshrobj'
+  	fi
+	fi
+      fi
+
+      # Let the compiler handle the export list.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+	_LT_AC_SYS_LIBPATH_AIX
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+	if test "$host_cpu" = ia64; then
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an empty executable.
+	 _LT_AC_SYS_LIBPATH_AIX
+	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # -bexpall does not export symbols beginning with underscore (_)
+	  _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds it's shared libraries.
+	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi4*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+    if test "$GXX" = yes ; then
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      case "$host_os" in
+      rhapsody* | darwin1.[[012]])
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
+	;;
+      *) # Darwin 1.3 on
+	if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+	  _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	else
+	  case ${MACOSX_DEPLOYMENT_TARGET} in
+	    10.[012])
+	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
+	      ;;
+	    10.*)
+	      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
+	      ;;
+	  esac
+	fi
+	;;
+      esac
+    	lt_int_apple_cc_single_mod=no
+    	output_verbose_link_cmd='echo'
+    	if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+    	  lt_int_apple_cc_single_mod=yes
+    	fi
+    	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+    	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
+    	else
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
+      fi
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        else
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        fi
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    else  
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi  
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
+	  ;;
+	esac
+      else
+	case "$host_cpu" in
+	hppa*64*|ia64*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	case "$host_cpu" in
+	hppa*64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	ia64*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	*)
+	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       case $host_os in
+	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	   ;;
+	 *)
+	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
+	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	   ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+      else
+	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
+      fi
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv5*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+  
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && break
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
diff --git a/admin/ltmain.sh b/admin/ltmain.sh
new file mode 100644
index 0000000000000000000000000000000000000000..e0b23d2e109a7c84068053faae3a8e92f5bdd2ce
--- /dev/null
+++ b/admin/ltmain.sh
@@ -0,0 +1,6401 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | ${SED} 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5a
+TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=" 	"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+win32_libid () {
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*) 
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+# End of Shell function definitions
+#####################################
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit 1
+	;;
+      esac
+
+      case $tagname in
+      CC)
+	# Don't test for the "default" C tag, as we know, it's there, but
+	# not specially marked.
+	;;
+      *)
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
+	  taglist="$taglist $tagname"
+	  # Evaluate the configuration.
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
+	else
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
+	fi
+	;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit 0
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
+    done
+    exit 0
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit 0
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    ;;
+
+  --tag) prevopt="--tag" prev=tag ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+	case $arg in
+	-c)
+	   mode=compile
+	   break
+	   ;;
+	esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+	if test -n "$nonopt"; then
+	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+	else
+	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+	fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit 1
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_output=
+    arg_mode=normal
+    libobj=
+
+    for arg
+    do
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit 1
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-static)
+	  build_old_libs=yes
+	  continue
+	  ;;
+
+	-prefer-pic)
+	  pic_mode=yes
+	  continue
+	  ;;
+
+	-prefer-non-pic)
+	  pic_mode=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	lastarg="\"$lastarg\""
+	;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit 1
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit 1
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit 1
+      ;;
+    esac
+
+    # Infer tagged configuration to use if any are available and
+    # if one wasn't chosen via the "--tag" command line option.
+    # Only attempt this if the compiler in the base compile
+    # command doesn't match the default compiler.
+    if test -n "$available_tags" && test -z "$tagname"; then
+      case $base_compile in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+	    case "$base_compile " in
+	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit 1
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit 1" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit 1" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$0" "$lockfile" 2>/dev/null; do
+	$show "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+      $echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $srcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+	$show "$mkdir ${xdir}$objdir"
+	$run $mkdir ${xdir}$objdir
+	status=$?
+	if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+	  exit $status
+	fi
+      fi
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	test -n "$output_obj" && $run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	$show "$mv $output_obj $lobj"
+	if $run $mv $output_obj $lobj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      suppress_output=' >/dev/null 2>&1'
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $srcfile"
+      else
+	command="$base_compile $srcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+	$run $rm $removelist
+	exit 1
+      fi
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$run $rm $removelist
+	exit 1
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	$show "$mv $output_obj $obj"
+	if $run $mv $output_obj $obj; then :
+	else
+	  error=$?
+	  $run $rm $removelist
+	  exit $error
+	fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit 0
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    add_flags=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+	if test "X$arg" = "X-all-static"; then
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	else
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	fi
+	build_libtool_libs=no
+	build_old_libs=yes
+	prefer_static_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      base_compile="$base_compile $arg"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+	;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  compile_command="$compile_command @OUTPUT@"
+	  finalize_command="$finalize_command @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command="$compile_command @SYMFILE@"
+	    finalize_command="$finalize_command @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  if test ! -f "$arg"; then
+	    $echo "$modename: symbol file \`$arg' does not exist"
+	    exit 1
+	  fi
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat $save_arg`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		# If there is no directory component, then add one.
+		case $arg in
+		*/* | *\\*) . $arg ;;
+		*) . ./$arg ;;
+		esac
+
+		if test -z "$pic_object" || \
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none && \
+		   test "$non_pic_object" = none; then
+		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+		  exit 1
+		fi
+
+		# Extract subdirectory from the argument.
+		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		if test "X$xdir" = "X$arg"; then
+		  xdir=
+		else
+		  xdir="$xdir/"
+		fi
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs="$libobjs $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if test -z "$run"; then
+		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+		  exit 1
+		else
+		  # Dry-run case.
+
+		  # Extract subdirectory from the argument.
+		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+		  if test "X$xdir" = "X$arg"; then
+		    xdir=
+		  else
+		    xdir="$xdir/"
+		  fi
+
+		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+		  libobjs="$libobjs $pic_object"
+		  non_pic_objects="$non_pic_objects $non_pic_object"
+		fi
+	      fi
+	    done
+	  else
+	    $echo "$modename: link input file \`$save_arg' does not exist"
+	    exit 1
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    $echo "$modename: only absolute run-paths are allowed" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  compile_command="$compile_command $wl$qarg"
+	  finalize_command="$finalize_command $wl$qarg"
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+	        *" $qarg.ltframework "*) ;;
+		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		   ;;
+              esac
+              ;;
+   	  esac
+	  prev=
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  compile_command="$compile_command $link_static_flag"
+	  finalize_command="$finalize_command $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+	continue
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  $echo "$modename: more than one -exported-symbols argument is not allowed"
+	  exit 1
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  compile_command="$compile_command $arg"
+	  finalize_command="$finalize_command $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  if test -z "$absdir"; then
+	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+	    exit 1
+	  fi
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-freebsd*-gnu*)
+	    # prevent being parsed by the freebsd regexp below
+	    ;;
+	  *-*-mingw* | *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    continue
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-freebsd*-gnu*)
+	   # prevent being parsed by the freebsd regexp below
+	   ;;
+	 *-*-openbsd*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # gcc -m* arguments should be passed to the linker via $compiler_flags
+      # in order to pass architecture information to the linker
+      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
+      # but this is not reliable with gcc because gcc may use -mfoo to
+      # select a different linker, different libraries, etc, while
+      # -Wl,-mfoo simply passes -mfoo to the linker.
+      -m*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # in order for the loader to find any dlls it needs.
+	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  $echo "$modename: only absolute run-paths are allowed" 1>&2
+	  exit 1
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -static)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -Wc,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Wl,*)
+	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+	  case $flag in
+	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    flag="\"$flag\""
+	    ;;
+	  esac
+	  arg="$arg $wl$flag"
+	  compiler_flags="$compiler_flags $wl$flag"
+	  linker_flags="$linker_flags $flag"
+	done
+	IFS="$save_ifs"
+	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      -framework)
+        prev=framework
+	continue
+	;;
+
+      # Some other compiler flag.
+      -* | +*)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	add_flags="$add_flags $arg"
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  # If there is no directory component, then add one.
+	  case $arg in
+	  */* | *\\*) . $arg ;;
+	  *) . ./$arg ;;
+	  esac
+
+	  if test -z "$pic_object" || \
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none && \
+	     test "$non_pic_object" = none; then
+	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+	    exit 1
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	  if test "X$xdir" = "X$arg"; then
+	    xdir=
+ 	  else
+	    xdir="$xdir/"
+	  fi
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs="$libobjs $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if test -z "$run"; then
+	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+	    exit 1
+	  else
+	    # Dry-run case.
+
+	    # Extract subdirectory from the argument.
+	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+	    if test "X$xdir" = "X$arg"; then
+	      xdir=
+	    else
+	      xdir="$xdir/"
+	    fi
+
+	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+	    libobjs="$libobjs $pic_object"
+	    non_pic_objects="$non_pic_objects $non_pic_object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	add_flags="$add_flags $arg"
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Infer tagged configuration to use if any are available and
+    # if one wasn't chosen via the "--tag" command line option.
+    # Only attempt this if the compiler in the base link
+    # command doesn't match the default compiler.
+    if test -n "$available_tags" && test -z "$tagname"; then
+      case $base_compile in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+	    case $base_compile in
+	    "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
+	      # The compiler in $compile_command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit 1
+#       else
+#         $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+	exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplcations in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+    case $linkmode in
+    lib)
+	passes="conv link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+	    exit 1
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+	    continue
+	  fi
+	  if test "$pass" = conv && test "$allow_undefined" = yes; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+	    for search_ext in .la $shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    ;;
+	  *)
+	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    if test "$deplibs_check_method" != pass_all; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
+	    else
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
+	      deplibs="$deplib $deplibs"
+	    fi
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  $echo "$modename: cannot find the library \`$lib'" 1>&2
+	  exit 1
+	fi
+
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  exit 1
+	fi
+
+	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$ladir" = "X$lib" && ladir="."
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+
+	# Read the .la file
+	case $lib in
+	*/* | *\\*) . $lib ;;
+	*) . ./$lib ;;
+	esac
+
+	case $host in
+	*-*-darwin*)
+	  # Convert "-framework foo" to "foo.ltframework" in dependency_libs
+	  test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  ;;
+	esac
+
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    #echo "Adding $deplib to \$deplibs"
+	    deplibs="$deplib $deplibs"
+            if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+            fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	      exit 1
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
+	    exit 1
+	  fi
+	  continue
+	fi # $pass = conv
+
+    
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+	  exit 1
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+	    exit 1
+	  fi
+	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	else
+	  dir="$ladir/$objdir"
+	  absdir="$abs_ladir/$objdir"
+	  # Remove this search path later
+	  notinst_path="$notinst_path $abs_ladir"
+	fi # $installed = yes
+	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir"; then
+	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+	    exit 1
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+    
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var"; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath " in
+	      *" $dir "*) ;;
+	      *" $absdir "*) ;;
+	      *) temp_rpath="$temp_rpath $dir" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	if test -n "$library_names" &&
+	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+	  if test "$installed" = no; then
+	    notinst_deplibs="$notinst_deplibs $lib"
+	    need_relink=yes
+	  fi
+	  # This is a shared library
+	
+      # Warn about portability, can't link against -module's on some systems (darwin)
+      if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"    
+      fi	  
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    realname="$2"
+	    shift; shift
+	    libname=`eval \\$echo \"$libname_spec\"`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw*)
+		major=`expr $current - $age`
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      $show "extracting exported symbol list from \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      eval cmds=\"$extract_expsyms_cmds\"
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      $show "generating import library for \`$soname'"
+	      save_ifs="$IFS"; IFS='~'
+	      eval cmds=\"$old_archive_from_expsyms_cmds\"
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd" || exit $?
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against it, someone
+		    # is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi 
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="-L$inst_prefix_dir$libdir $add_dir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      $echo "$modename: configuration error: unsupported hardcode properties"
+	      exit 1
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes && \
+		 test "$hardcode_minus_L" != yes && \
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="-L$inst_prefix_dir$libdir $add_dir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    convenience="$convenience $dir/$old_library"
+	    old_convenience="$old_convenience $dir/$old_library"
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  #if test -n "$dependency_libs" &&
+	  #   { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
+	  #     test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  #fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+		test "X$dir" = "X$deplib" && dir="."
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if grep "^installed=no" $deplib > /dev/null; then
+		  path="$absdir/$objdir"
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  if test -z "$libdir"; then
+		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		    exit 1
+		  fi
+		  if test "$absdir" != "$libdir"; then
+		    # Sure, some shells/systems don't implement the -ef.
+		    # Those will have to live with the warning.
+		    test "$absdir" -ef "$libdir" > /dev/null 2>&1 ||
+		      $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+		  fi
+		  path="$absdir"
+		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs, but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		   fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		    path=""
+		  fi
+		  ;;
+		*)
+		path="-L$path"
+		;;
+		esac 
+		
+		;;
+		  -l*)
+		case $host in
+		*-*-darwin*)
+		 # Again, we only want to link against shared libraries
+		 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		 for tmp in $newlib_search_path ; do
+		     if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		       eval depdepl="$tmp/lib$tmp_libs.dylib"
+		       break
+		     fi  
+         done
+         path=""
+		  ;;
+		*) continue ;;
+		esac  		  
+		;;
+
+	      *.ltframework)
+		case $host in
+		  *-*-darwin*)
+		    depdepl="$deplib"
+		    ;;
+		esac
+		;;
+
+	      *) continue ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$deplibs $depdepl" ;;
+	      esac	      
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$deplibs $path" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	if test "$module" = no; then
+	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext\"
+	  eval libname=\"$libname_spec\"
+	else
+	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+	  exit 1
+	else
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      if test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	if test -n "$vinfo"; then
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+	fi
+
+	if test -n "$release"; then
+	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+	fi
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	IFS="$save_ifs"
+
+	if test -n "$8"; then
+	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+	
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case $revision in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	case $age in
+	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	*)
+	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+	  exit 1
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  minor_current=`expr $current + 1`
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current";
+	  ;;
+
+	irix | nonstopux)
+	  major=`expr $current - $age + 1`
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    iface=`expr $revision - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  major=.`expr $current - $age`
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  major=.`expr $current - $age`
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    iface=`expr $current - $loop`
+	    loop=`expr $loop - 1`
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  major=`expr $current - $age`
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+      fi
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$echo "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext | *$exeext)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	if test -n "$removelist"; then
+	  $show "${rm}r $removelist"
+	  $run ${rm}r $removelist
+	fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+      done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-freebsd*-gnu*)
+	    # Prevent $arg from being parsed by the freebsd regexp below.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  *-*-openbsd* | *-*-freebsd*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+ 	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $rm conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $rm conftest
+	  $LTCC -o conftest conftest.c $deplibs
+	  if test "$?" -eq 0 ; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      name="`expr $i : '-l\(.*\)'`"
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+		$rm conftest
+		$LTCC -o conftest conftest.c $i
+		# Did it work?
+		if test "$?" -eq 0 ; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
+		fi
+	      else
+		newdeplibs="$newdeplibs $i"
+	      fi
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method
+	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null \
+			 | grep " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    name="`expr $a_deplib : '-l\(.*\)'`"
+	    # If $name is empty we are operating on a -L argument.
+	    if test -n "$name" && test "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	    else
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	    fi
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library is the System framework
+	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	case $host in
+	  *-*-darwin*)
+	    newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	    dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	    ;;
+	esac
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	realname="$2"
+	shift; shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    eval cmds=\"$export_symbols_cmds\"
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex"; then
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*) 
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs" 
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	    generated="$generated $gentop"
+
+	    for xlib in $convenience; do
+	      # Extract the objects.
+	      case $xlib in
+	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	      *) xabs=`pwd`"/$xlib" ;;
+	      esac
+	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	      xdir="$gentop/$xlib"
+
+	      $show "${rm}r $xdir"
+	      $run ${rm}r "$xdir"
+	      $show "$mkdir $xdir"
+	      $run $mkdir "$xdir"
+	      status=$?
+	      if test "$status" -ne 0 && test ! -d "$xdir"; then
+		exit $status
+	      fi
+	      # We will extract separately just the conflicting names and we will no
+	      # longer touch any unique names. It is faster to leave these extract
+	      # automatically by $AR in one run.
+	      $show "(cd $xdir && $AR x $xabs)"
+	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+	      if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+		:
+	      else
+		$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+		$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+		$AR t "$xabs" | sort | uniq -cd | while read -r count name
+		do
+		  i=1
+		  while test "$i" -le "$count"
+		  do
+		   # Put our $i before any first dot (extension)
+		   # Never overwrite any file
+		   name_to="$name"
+		   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+		   do
+		     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+		   done
+		   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+		   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+		   i=`expr $i + 1`
+		  done
+		done
+	      fi
+
+	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+	    done
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+	fi
+
+	# Add all flags from the command line.  We here create a library,
+	# but those flags were only added to compile_command and
+	# finalize_command, which are only used when creating executables.
+	# So do it by hand here.
+	compiler_flags="$compiler_flags $add_flags"
+	# Only add it to commands which use CC, instead of LD, i.e.
+	# only to $compiler_flags
+	#linker_flags="$linker_flags $add_flags"
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval cmds=\"$module_expsym_cmds\"
+	  else
+	    eval cmds=\"$module_cmds\"
+	  fi
+	else
+	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	  eval cmds=\"$archive_expsym_cmds\"
+	else
+	  eval cmds=\"$archive_cmds\"
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
+	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise.
+	  $echo "creating reloadable object files..."
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  delfiles=
+	  last_robj=
+	  k=1
+	  output=$output_objdir/$save_output-${k}.$objext
+	  # Loop over the list of objects to be linked.
+	  for obj in $save_libobjs
+	  do
+	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+	    if test "X$objlist" = X ||
+	       { len=`expr "X$test_cmds" : ".*"` &&
+		 test "$len" -le "$max_cmd_len"; }; then
+	      objlist="$objlist $obj"
+	    else
+	      # The command $test_cmds is almost too long, add a
+	      # command to the queue.
+	      if test "$k" -eq 1 ; then
+		# The first file doesn't have a previous command to add.
+		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+	      else
+		# All subsequent reloadable object files will link in
+		# the last one created.
+		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+	      fi
+	      last_robj=$output_objdir/$save_output-${k}.$objext
+	      k=`expr $k + 1`
+	      output=$output_objdir/$save_output-${k}.$objext
+	      objlist=$obj
+	      len=1
+	    fi
+	  done
+	  # Handle the remaining objects by creating one last
+	  # reloadable object file.  All subsequent reloadable object
+	  # files will link in the last one created.
+	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadale object files
+	  # after they are used.
+	  i=0
+	  while test "$i" -lt "$k"
+	  do
+	    i=`expr $i + 1`
+	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+	  done
+
+	  $echo "creating a temporary reloadable object file: $output"
+
+	  # Loop through the commands generated above and execute them.
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $concat_cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    eval cmds=\"$archive_expsym_cmds\"
+	  else
+	    eval cmds=\"$archive_cmds\"
+	  fi
+
+	  # Append the command to remove the reloadable object files
+	  # to the just-reset $cmds.
+	  eval cmds=\"\$cmds~$rm $delfiles\"
+	fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+	  exit 0
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+	if test -n "$objs$old_deplibs"; then
+	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+	  exit 1
+	fi
+	libobj="$output"
+	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+	else
+	  gentop="$output_objdir/${obj}x"
+	  $show "${rm}r $gentop"
+	  $run ${rm}r "$gentop"
+	  $show "$mkdir $gentop"
+	  $run $mkdir "$gentop"
+	  status=$?
+	  if test "$status" -ne 0 && test ! -d "$gentop"; then
+	    exit $status
+	  fi
+	  generated="$generated $gentop"
+
+	  for xlib in $convenience; do
+	    # Extract the objects.
+	    case $xlib in
+	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	    *) xabs=`pwd`"/$xlib" ;;
+	    esac
+	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	    xdir="$gentop/$xlib"
+
+	    $show "${rm}r $xdir"
+	    $run ${rm}r "$xdir"
+	    $show "$mkdir $xdir"
+	    $run $mkdir "$xdir"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$xdir"; then
+	      exit $status
+	    fi
+	    # We will extract separately just the conflicting names and we will no
+	    # longer touch any unique names. It is faster to leave these extract
+	    # automatically by $AR in one run.
+	    $show "(cd $xdir && $AR x $xabs)"
+	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+	    if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+	      :
+	    else
+	      $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+	      $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+	      $AR t "$xabs" | sort | uniq -cd | while read -r count name
+	      do
+		i=1
+		while test "$i" -le "$count"
+		do
+		 # Put our $i before any first dot (extension)
+		 # Never overwrite any file
+		 name_to="$name"
+		 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+		 do
+		   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+		 done
+		 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+		 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+		 i=`expr $i + 1`
+		done
+	      done
+	    fi
+
+	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+	  done
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      eval cmds=\"$reload_cmds\"
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	exit 0
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  $show "${rm}r $gentop"
+	  $run ${rm}r $gentop
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $run eval "echo timestamp > $libobj" || exit $?
+	exit 0
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	eval cmds=\"$reload_cmds\"
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  $show "$cmd"
+	  $run eval "$cmd" || exit $?
+	done
+	IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+	$show "${rm}r $gentop"
+	$run ${rm}r $gentop
+      fi
+
+      exit 0
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+	   test "$dlopen_self_static" = unknown; then
+	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+	fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+        ;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	  dlsyms="${outputname}S.c"
+	else
+	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+	fi
+      fi
+
+      if test -n "$dlsyms"; then
+	case $dlsyms in
+	"") ;;
+	*.c)
+	  # Discover the nlist of each of the dlfiles.
+	  nlist="$output_objdir/${outputname}.nm"
+
+	  $show "$rm $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Parse the name list into a source file.
+	  $show "creating $output_objdir/$dlsyms"
+
+	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+	  if test "$dlself" = yes; then
+	    $show "generating symbol list for \`$output'"
+
+	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+	    # Add our own program objects to the symbol list.
+	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    for arg in $progfiles; do
+	      $show "extracting global C symbols from \`$arg'"
+	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	    done
+
+	    if test -n "$exclude_expsyms"; then
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    if test -n "$export_symbols_regex"; then
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$mv "$nlist"T "$nlist"'
+	    fi
+
+	    # Prepare the list of exported symbols
+	    if test -z "$export_symbols"; then
+	      export_symbols="$output_objdir/$output.exp"
+	      $run $rm $export_symbols
+	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	    else
+	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval 'mv "$nlist"T "$nlist"'
+	    fi
+	  fi
+
+	  for arg in $dlprefiles; do
+	    $show "extracting global C symbols from \`$arg'"
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
+	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -z "$run"; then
+	    # Make sure we have at least an empty file.
+	    test -f "$nlist" || : > "$nlist"
+
+	    if test -n "$exclude_expsyms"; then
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $mv "$nlist"T "$nlist"
+	    fi
+
+	    # Try sorting and uniquifying the output.
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
+	      :
+	    else
+	      grep -v "^: " < "$nlist" > "$nlist"S
+	    fi
+
+	    if test -f "$nlist"S; then
+	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+	    else
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	    fi
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+	    $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	  fi
+
+	  pic_flag_for_symtable=
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+	    esac;;
+	  *-*-hpux*)
+	    case "$compile_command " in
+	    *" -static "*) ;;
+	    *) pic_flag_for_symtable=" $pic_flag";;
+	    esac
+	  esac
+
+	  # Now compile the dynamic symbol file.
+	  $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+	  $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+	  # Clean up the generated files.
+	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+	  # Transform the symbol file into the correct name.
+	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+	  ;;
+	*)
+	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+	  exit 1
+	  ;;
+	esac
+      else
+	# We keep going just in case the user didn't refer to
+	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+	# really was required.
+
+	# Nullify the symbol file.
+	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
+      # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
+      # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
+      # This does not apply on AIX for ia64, which uses a SysV linker.
+      case "$host" in
+        ia64-*-aix5*) ;;
+        *-*-aix4* | *-*-aix5*)
+                   compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
+                   finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
+      esac
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+	# Replace the output file specification.
+	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	$show "$link_command"
+	$run eval "$link_command"
+	status=$?
+
+	# Delete the generated files.
+	if test -n "$dlsyms"; then
+	  $show "$rm $output_objdir/${outputname}S.${objext}"
+	  $run $rm "$output_objdir/${outputname}S.${objext}"
+	fi
+
+	exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+	# We should set the shlibpath_var
+	rpath=
+	for dir in $temp_rpath; do
+	  case $dir in
+	  [\\/]* | [A-Za-z]:[\\/]*)
+	    # Absolute path.
+	    rpath="$rpath$dir:"
+	    ;;
+	  *)
+	    # Relative path: add a thisdir entry.
+	    rpath="$rpath\$thisdir/$dir:"
+	    ;;
+	  esac
+	done
+	temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$run $rm $output
+	# Link the executable and exit
+	$show "$link_command"
+	$run eval "$link_command" || exit $?
+	exit 0
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+	$echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+	case $0 in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+	esac
+	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *mingw* )
+	    cwrappersource=`$echo ${output_objdir}/lt-${outputname}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+   
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2 
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+  
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe"); 
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char * 
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':') 
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char * 
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat) 
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode, 
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
+	$rm $output
+	trap "$rm $output; exit 1" 1 2 15
+
+	$echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+	  $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$echo \"\$relink_command_output\" >&2
+	$rm \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+	else
+	  $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2*)
+	  $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  # Need to set LD_LIBRARY_PATH, to the value already
+	  # computed within libtool.
+	  $echo >> $output "\
+      LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+	chmod +x $output
+      fi
+      exit 0
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	$show "${rm}r $gentop"
+	$run ${rm}r "$gentop"
+	$show "$mkdir $gentop"
+	$run $mkdir "$gentop"
+	status=$?
+	if test "$status" -ne 0 && test ! -d "$gentop"; then
+	  exit $status
+	fi
+	generated="$generated $gentop"
+
+	# Add in members from convenience archives.
+	for xlib in $addlibs; do
+	  # Extract the objects.
+	  case $xlib in
+	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+	  *) xabs=`pwd`"/$xlib" ;;
+	  esac
+	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+	  xdir="$gentop/$xlib"
+
+	  $show "${rm}r $xdir"
+	  $run ${rm}r "$xdir"
+	  $show "$mkdir $xdir"
+	  $run $mkdir "$xdir"
+	  status=$?
+	  if test "$status" -ne 0 && test ! -d "$xdir"; then
+	    exit $status
+	  fi
+	  # We will extract separately just the conflicting names and we will no
+	  # longer touch any unique names. It is faster to leave these extract
+	  # automatically by $AR in one run.
+	  $show "(cd $xdir && $AR x $xabs)"
+	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+	  if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+	    :
+	  else
+	    $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+	    $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+	    $AR t "$xabs" | sort | uniq -cd | while read -r count name
+	    do
+	      i=1
+	      while test "$i" -le "$count"
+	      do
+	       # Put our $i before any first dot (extension)
+	       # Never overwrite any file
+	       name_to="$name"
+	       while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+	       do
+		 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+	       done
+	       $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+	       $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+	       i=`expr $i + 1`
+	      done
+	    done
+	  fi
+
+	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+	done
+      fi
+
+      compiler_flags="$compiler_flags $add_flags"
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	eval cmds=\"$old_archive_from_new_cmds\"
+      else
+	eval cmds=\"$old_archive_cmds\"
+
+	if len=`expr "X$cmds" : ".*"` &&
+	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # the command line is too long to link in one step, link in parts
+	  $echo "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+	  # encoded into archives.  This makes 'ar r' malfunction in
+	  # this piecewise linking case whenever conflicting object
+	  # names appear in distinct ar calls; check, warn and compensate.
+	    if (for obj in $save_oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	    :
+	  else
+	    $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+	    $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+	    AR_FLAGS=cq
+	  fi
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done  
+	  for obj in $save_oldobjs
+	  do
+	    oldobjs="$objlist $obj"
+	    objlist="$objlist $obj"
+	    eval test_cmds=\"$old_archive_cmds\"
+	    if len=`expr "X$test_cmds" : ".*"` &&
+	       test "$len" -le "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi  
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+        relink_command=
+      fi  
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		if test -z "$libdir"; then
+		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+		  exit 1
+		fi
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit 1
+	      fi
+	      newdlfiles="$newdlfiles $libdir/$name"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      if test -z "$libdir"; then
+		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+		exit 1
+	      fi
+	      newdlprefiles="$newdlprefiles $libdir/$name"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $rm $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then
+	    $echo >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit 0
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest="$arg"
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*) ;;
+
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest="$arg"
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+	arg="\"$arg\""
+	;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	$echo "$modename: no file or destination specified" 1>&2
+      else
+	$echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+	$echo "$modename: \`$dest' is not a directory" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	library_names=
+	old_library=
+	relink_command=
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+	test "X$dir" = "X$file/" && dir=
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit 1
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  $echo "$modename: warning: relinking \`$file'" 1>&2
+	  $show "$relink_command"
+	  if $run eval "$relink_command"; then :
+	  else
+	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+	    exit 1
+	  fi
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names
+	if test -n "$2"; then
+	  realname="$2"
+	  shift
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  $show "$install_prog $dir/$srcname $destdir/$realname"
+	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+	  if test -n "$stripme" && test -n "$striplib"; then
+	    $show "$striplib $destdir/$realname"
+	    $run eval "$striplib $destdir/$realname" || exit $?
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    for linkname
+	    do
+	      if test "$linkname" != "$realname"; then
+		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+	      fi
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  eval cmds=\"$postinstall_cmds\"
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || exit $?
+	  done
+	  IFS="$save_ifs"
+	fi
+
+	# Install the pseudo-library for information purposes.
+	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	instname="$dir/$name"i
+	$show "$install_prog $instname $destdir/$name"
+	$run eval "$install_prog $instname $destdir/$name" || exit $?
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	if test -n "$destfile"; then
+	  $show "$install_prog $file $destfile"
+	  $run eval "$install_prog $file $destfile" || exit $?
+	fi
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+	  $show "$install_prog $staticobj $staticdest"
+	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+	fi
+	exit 0
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  # Check the variables that should have been set.
+	  if test -z "$notinst_deplibs"; then
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit 1
+	  fi
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      # If there is no directory component, then add one.
+	      case $lib in
+	      */* | *\\*) . $lib ;;
+	      *) . ./$lib ;;
+	      esac
+	    fi
+	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
+	  esac
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    if test "$finalize" = yes && test -z "$run"; then
+	      tmpdir="/tmp"
+	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
+	      tmpdir="$tmpdir/libtool-$$"
+	      if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
+	      else
+		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+		continue
+	      fi
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+	      outputname="$tmpdir/$file"
+	      # Replace the output file specification.
+	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	      $show "$relink_command"
+	      if $run eval "$relink_command"; then :
+	      else
+		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+		${rm}r "$tmpdir"
+		continue
+	      fi
+	      file="$outputname"
+	    else
+	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
+	    fi
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyways
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+	    ;;
+	  esac
+	  ;;
+	esac
+	$show "$install_prog$stripme $file $destfile"
+	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+	test -n "$outputname" && ${rm}r "$tmpdir"
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$striplib"; then
+	$show "$old_striplib $oldlib"
+	$run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      eval cmds=\"$old_postinstall_cmds\"
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+	IFS="$save_ifs"
+	$show "$cmd"
+	$run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $0 --finish$current_libdirs'
+    else
+      exit 0
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  eval cmds=\"$finish_cmds\"
+	  save_ifs="$IFS"; IFS='~'
+	  for cmd in $cmds; do
+	    IFS="$save_ifs"
+	    $show "$cmd"
+	    $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+	  done
+	  IFS="$save_ifs"
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    exit 0
+
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit 0
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit 1
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+	$echo "$modename: \`$file' is not a file" 1>&2
+	$echo "$help" 1>&2
+	exit 1
+      fi
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	else
+	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+	  $echo "$help" 1>&2
+	  exit 1
+	fi
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+
+	# If there is no directory component, then add one.
+	case $file in
+	*/* | *\\*) . $file ;;
+	*) . ./$file ;;
+	esac
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+	  exit 1
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+	test "X$dir" = "X$file" && dir=.
+	;;
+
+      *)
+	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  # If there is no directory component, then add one.
+	  case $file in
+	  */* | *\\*) . $file ;;
+	  *) . ./$file ;;
+	  esac
+
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      if test "${save_LC_ALL+set}" = set; then
+	LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+	LANG="$save_LANG"; export LANG
+      fi
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+	$echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit 0
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit 1
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+	dir=.
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+	|| (test -h "$file") >/dev/null 2>&1 \
+	|| test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	  . $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+	  if test "$mode" = uninstall; then
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      eval cmds=\"$postuninstall_cmds\"
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      eval cmds=\"$old_postuninstall_cmds\"
+	      save_ifs="$IFS"; IFS='~'
+	      for cmd in $cmds; do
+		IFS="$save_ifs"
+		$show "$cmd"
+		$run eval "$cmd"
+		if test "$?" -ne 0 && test "$rmforce" != yes; then
+		  exit_status=1
+		fi
+	      done
+	      IFS="$save_ifs"
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+	  # Read the .lo file
+	  . $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" \
+	     && test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" \
+	     && test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe) 
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	$show "rmdir $dir"
+	$run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit 1
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit 0
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+		    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+		    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+		    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit 1
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/admin/missing b/admin/missing
new file mode 100755
index 0000000000000000000000000000000000000000..6a37006e8f0a69ddbf5b383c882beb60cbe04d12
--- /dev/null
+++ b/admin/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/admin/mkinstalldirs b/admin/mkinstalldirs
new file mode 100755
index 0000000000000000000000000000000000000000..d2d5f21b611235316317197d3a32c2dff5897a6f
--- /dev/null
+++ b/admin/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+  	errstatus=$lasterr
+      else
+  	if test ! -z "$dirmode"; then
+	  echo "chmod $dirmode $pathcomp"
+    	  lasterr=""
+  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+  	  if test ! -z "$lasterr"; then
+  	    errstatus=$lasterr
+  	  fi
+  	fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/admin/nmcheck b/admin/nmcheck
new file mode 100755
index 0000000000000000000000000000000000000000..15447131ec13c36e7591b2ce599f7653f5448e5c
--- /dev/null
+++ b/admin/nmcheck
@@ -0,0 +1,371 @@
+#!/usr/bin/perl -w
+
+# Check namespace cleanness of a library.
+# Allowed symbols are passed as arguments.
+# They may have trailing * = wildcard.
+# Wildcards may be also specified as *::* (e.g. K*::* for all KDE classes)
+# Symbols are listed as full function unmangled names without arguments,
+# e.g. 'foo bar* nspace::*' allows foo(), foo(int), bar(), barbar()
+# and all symbols in namespace/class nspace.
+# If an argument has comma in it, it's a filename of a file containing
+# allowed symbols, one per line.
+
+
+$thisProg   = "$0";     # This programs name
+
+$library = "";
+$allowed_symbols = "";
+$debug = 0;
+$allowed_weak = "";
+$weak_specified = 0;
+
+while( defined( $ARGV[ 0 ] ))
+{
+    $_ = shift;
+    if( /^--verbose$|^-v$/ )
+    {
+	$debug = 1;
+    }
+    elsif( /^--help$|^-h$/ )
+    {
+        print STDOUT "Usage $thisProg [OPTION] ... library [allowed symbols] ...\n",
+                "\n",
+		"Check if the given library has only allowed public symbols.\n",
+                "\n",
+		"  --allowweak=[symbol] allow only these weak symbols\n",
+                "  -v, --verbose        verbosely list files processed\n",
+                "  -h, --help           print this help, then exit\n";
+        exit 0;
+    }
+    elsif( /^--allowweak=(.*)$/ )
+    {
+	$allowed_weak .= " " . $1;
+	$weak_specified = 1;
+    }
+    elsif( /^--allowweak$/ ) # simply list all weak
+    {
+	$allowed_weak .= " ";
+	$weak_specified = 1;
+    }
+    elsif( /^--*/ )
+    {
+	die "Invalid argument!\n";
+    }
+    else
+    {
+	if( ! $library )
+	{
+	    $library = $_;
+	}
+	else
+	{
+	    $allowed_symbols .= " " . $_;
+	}
+    }
+}
+
+if( ! $weak_specified )
+{
+    $allowed_weak = "*"; 
+    # allow all weak symbols by default
+    # instances of templates and similar stuff - unfortunately includes also things from other libraries,
+    # so it cannot be on by default
+}
+
+print STDERR "library:" . $library . "\n" if $debug;
+print STDERR "allowed_symbols:" . $allowed_symbols . "\n" if $debug;
+print STDERR "allowed_weak:" . $allowed_weak . "\n" if $debug;
+
+$default_symbols = "_fini _init";  # system symbols
+# on my system, every .so has :
+# A _DYNAMIC
+# A _GLOBAL_OFFSET_TABLE_
+# A __bss_start
+# A _edata
+# A _end
+# T _fini
+# T _init
+# no need to list A symbols in $default_symbols
+
+print STDERR "default_symbols: " . $default_symbols . "\n" if $debug;
+
+print STDOUT "Namespace cleanness check for " . $library . " :\n";
+
+$lib_file = "";
+if( $library =~ /\.la$/ )
+{
+    # get the real library file from .la
+    open( FILEIN, $library ) || die "Couldn't open $! !\n";
+    while( $line = <FILEIN> )
+    {
+	if( $line =~ /library_names=\'([^ ]*).*/o )
+	{
+	    $lib_file = $1;
+	}
+    }
+    close( FILEIN );
+    if( ! $lib_file )
+    {
+	print STDERR "Library file not found in .la file!\n";
+	exit 1;
+    }
+    my $libpath = $library;
+    $libpath =~ s%[^/]*$%%;
+    if(  -e $libpath . ".libs/" . $lib_file )
+    {
+	$lib_file = $libpath . ".libs/" . $lib_file;
+    }
+    else
+    {
+	$lib_file = $libpath . $lib_file;
+    }
+}
+else
+{
+    $lib_file = $library;
+}
+
+print STDERR "libfile: ". $lib_file . "\n" if $debug;
+
+$allowed_symbols .= " " . $default_symbols;
+
+sub process_symbols($\@\%\@);
+
+@wildcards = ();
+%exacts = ();
+@regwildcards = ();
+process_symbols( $allowed_symbols, @wildcards, %exacts, @regwildcards );
+@weak_wildcards = ();
+%weak_exacts = ();
+@weak_regwildcards = ();
+process_symbols( $allowed_weak, @weak_wildcards, %weak_exacts, @weak_regwildcards );
+
+# grep is for stripping not exported symbols, which don't have address (=first column)
+$nm_command = "nm -BDCg " . $lib_file . " | grep -v '^ ' |";
+
+# TODO how portable is this nmcheck stuff?
+
+print STDERR "nm command:" . $nm_command . "\n" if $debug;
+
+open( FILEIN, $nm_command ) || die "nm command failed\n";
+
+my $exit_code = 0;
+
+while( $line = <FILEIN> )
+{
+    my $type;
+    my $symbol;
+    if( $line =~ /^[^ ]* (.) (.*)$/o )
+    {
+	$type = $1;
+	$symbol = $2;
+    }
+    else
+    {
+	die "Invalid line: " . $line . "\n";
+    }
+    
+    print STDERR "Type: " . $type . " , symbol: " . $symbol . "\n" if $debug;
+    if( $type eq "A" )
+    { # these should be system symbols, so ignore them
+	next;
+    }
+
+    my $orig_symbol = $symbol;
+
+    if( $symbol =~ /\(anonymous namespace\)/o )
+    { # TODO tell to prefer named namespaces? (shorter symbols)
+	next;
+    }
+
+    # strip prefixes
+    # the :: appending is to make "CLASS::*" work also for "vtable for CLASS"
+    $symbol =~ s/^typeinfo for (.*)$/$1::/o;
+    $symbol =~ s/^typeinfo fn for (.*)$/$1::/o;
+    $symbol =~ s/^typeinfo name for (.*)$/$1::/o;
+    $symbol =~ s/^vtable for (.*)$/$1::/o;
+    $symbol =~ s/^guard variable for (.*)$/$1::/o;
+    $symbol =~ s/^reference temporary for (.*)$/$1::/o;
+    $symbol =~ s/^VTT for (.*)$/$1::/o;
+    $symbol =~ s/^virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
+    $symbol =~ s/^non-virtual thunk \[[^\]]*\] to (.*)$/$1::/o;
+    $symbol =~ s/^covariant return thunk \[[^\]]*\] to (.*)$/$1::/o;
+    $symbol =~ s/^construction vtable thunk for (.*)$/$1::/o;
+    $symbol =~ s/^construction vtable for .*-in-(.*) [0-9]*$/$1::/o;
+
+    # templates seem to have also return types mangled in their name, and nm prints it too
+    # they have also template arguments in the symbol
+    # get rid of both of those
+    while( $symbol =~ /<.*>/o )
+    {
+        $symbol =~ s/<[^<>]*>//o; # strip innermost <>
+    }
+    if( $symbol !~ /operator\(\)/o )
+    {
+	$symbol =~ s/ ?\(.*\).*$//o;  # strip () and all after it
+    }
+    else
+    {
+	$symbol =~ s/(^|:| )operator\(\) ?\(.*\).*$//o;  # strip () and all after it
+    }
+    $symbol =~ s/\[.*\] *$//o;   # strip [in-charge] etc.
+    if( $symbol =~ /(^|:| )operator /o )
+    {
+	$symbol =~ s/.* ([^\s]*)operator /$1/o; # strip everything before 'X::operator blah'
+    }
+    else
+    {
+	$symbol =~ s/.* ([^\s]+) *$/$1/o;  # get last word (strip return type)
+    }
+
+    # print STDERR "Processed symbol: " . $symbol . "\n" if $debug;
+    
+    my $found = 0;
+    if( $exacts{ $symbol } )
+    {
+	$found = 1;
+    }
+    if( ! $found )
+    {
+	for my $wild ( @wildcards )
+	{
+	    if( index( $symbol, $wild ) == 0 )
+	    {
+		$found = 1;
+		last;
+	    }
+	}
+    }
+    if( ! $found )
+    {
+	for my $wild ( @regwildcards )
+	{
+	    if( $symbol =~ /^$wild$/ )
+	    {
+		$found = 1;
+		last;
+	    }
+	}
+    }
+    if( ( ! $found ) && ( $type eq "W" || $type eq "V" ))
+    {
+	if( $weak_exacts{ $symbol } )
+	{
+	    $found = 1;
+	}
+	if( ! $found )
+	{
+	    for my $wild ( @weak_wildcards )
+	    {
+	        if( index( $symbol, $wild ) == 0 )
+	        {
+	    	    $found = 1;
+		    last;
+		}
+	    }
+	}
+	if( ! $found )
+	{
+	    for my $wild ( @weak_regwildcards )
+	    {
+	        if( $symbol =~ /^$wild$/ )
+	        {
+		    $found = 1;
+		    last;
+	        }
+	    }
+	}
+    }
+
+    if( ! $found )
+    {
+	print STDERR "Public symbol " . $orig_symbol . " is not allowed!\n";
+	$exit_code = 1;
+    }
+}
+
+close( FILEIN );
+
+print STDOUT $exit_code == 0 ? "OK\n" : "FAILED\n";
+
+exit $exit_code;
+
+sub process_symbols($\@\%\@)
+{
+    my $allowed_symbols = $_[ 0 ];
+    my $wildcards_ref = $_[ 1 ];
+    my $exacts_ref = $_[ 2 ];
+    my $regwildcards_ref = $_[ 3 ];
+    
+    $allowed_symbols =~ s/^ *//o;  # strip whitespace
+    $allowed_symbols =~ s/ *$//o;
+
+    if( $allowed_symbols eq "NONE" )
+    {
+	$allowed_symbols = "";
+    }
+
+    my @symbols1 = split( ' ', $allowed_symbols );
+    my $i = 0;
+    my @symbols2 = ();
+    while( defined( $symbols1[ $i ] ))
+    {
+	my $symbol = $symbols1[ $i ];
+	if( $symbol =~ /\./ )  # dot in name -> file
+	{
+	    open( SYMIN, $symbol ) || die ( "Cannot open file " . $symbol . "!" );
+	    while( $line = <SYMIN> )
+	    {
+		$line =~ s/^\s*//o;  # strip whitespace
+		$line =~ s/\s*$//o;
+		if( $line !~ /^$/o  # empty line
+		    &&  $line !~ /^\s*#/ ) # comment line starting with #
+		{
+		    $symbols2[ $#symbols2 + 1 ] = $line;
+		}
+	    }
+	    close( SYMIN );
+	}
+	else
+	{
+	    $symbols2[ $#symbols2 + 1 ] = $symbol;
+	}
+	$i++;
+    }
+    $i = 0;
+    while( defined( $symbols2[ $i ] ))
+    {
+	my $symbol = $symbols2[ $i ];
+	if( $symbol =~ /__/
+	    || $symbol =~ /^_[A-Z]/ )
+	{ # ISO C++ 2.10.2
+	    die "Symbols containing a double underscore or beginning with an underscore and an upper-case letter are reserved!\n";
+	}
+	elsif( $symbol eq "main"
+	    || $symbol eq "main*" )
+	{
+	    die "Symbol main is not allowed!\n";
+	}
+	if( $symbol =~ /^([^\*]*)\*$/o   # trailing * without any * before it
+	    && $symbol !~ /operator\*$/o )
+        {
+	    print STDERR "wildcard:" . $symbol . "\n" if $debug;
+    	    $wildcards_ref->[ $#{$wildcards_ref} + 1 ] = $1;
+	}
+	elsif( $symbol =~ /\*$/o
+	    && ( $symbol =~ /\*::/o || $symbol =~ /::\*/o )
+	    && $symbol !~ /^\*/o
+	    && $symbol !~ /operator\*$/o )
+	{
+	    print STDERR "regwildcard:" . $symbol . "\n" if $debug;
+	    $symbol =~ s/\*/\.\*/go;  # change * to .* (regexp)
+	    $regwildcards_ref->[ $#{$regwildcards_ref} + 1 ] = $symbol;
+	}
+	else
+	{
+	    print STDERR "exact:" . $symbol . "\n" if $debug;
+	    $exacts_ref->{ $symbol } = 1;
+	}
+	$i++;
+    }
+}
diff --git a/admin/oldinclude.m4.in b/admin/oldinclude.m4.in
new file mode 100644
index 0000000000000000000000000000000000000000..e5eb1767a5de0677a955db010454d52b3539d3ce
--- /dev/null
+++ b/admin/oldinclude.m4.in
@@ -0,0 +1,192 @@
+###   -*- autoconf -*-
+
+dnl    This file is part of the KDE libraries/packages
+dnl    Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
+dnl              (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
+
+dnl    This file is free software; you can redistribute it and/or
+dnl    modify it under the terms of the GNU Library General Public
+dnl    License as published by the Free Software Foundation; either
+dnl    version 2 of the License, or (at your option) any later version.
+
+dnl    This library is distributed in the hope that it will be useful,
+dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl    Library General Public License for more details.
+
+dnl    You should have received a copy of the GNU Library General Public License
+dnl    along with this library; see the file COPYING.LIB.  If not, write to
+dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl    Boston, MA 02111-1307, USA.
+
+AC_DEFUN([KDE_CHECK_MICO],
+[
+AC_REQUIRE([KDE_CHECK_LIBDL])
+AC_REQUIRE([KDE_MISC_TESTS])
+AC_MSG_CHECKING(for MICO)
+
+if test -z "$MICODIR"; then
+    kde_micodir=/usr/local
+ else
+    kde_micodir="$MICODIR"
+fi
+
+AC_ARG_WITH(micodir,
+  [  --with-micodir=micodir  where mico is installed ],
+  kde_micodir=$withval,
+  kde_micodir=$kde_micodir
+)
+
+AC_CACHE_VAL(kde_cv_mico_incdir,
+[
+  mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
+AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
+
+])
+kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
+
+if test ! -r  $kde_micodir/include/CORBA.h; then
+  AC_MSG_ERROR([No CORBA.h found, specify another micodir])
+fi
+
+AC_MSG_RESULT($kde_micodir)
+
+MICO_INCLUDES=-I$kde_micodir/include
+AC_SUBST(MICO_INCLUDES)
+MICO_LDFLAGS=-L$kde_micodir/lib
+AC_SUBST(MICO_LDFLAGS)
+micodir=$kde_micodir
+AC_SUBST(micodir)
+
+AC_MSG_CHECKING([for MICO version])
+AC_CACHE_VAL(kde_cv_mico_version,
+[
+AC_LANG_C
+cat >conftest.$ac_ext <<EOF
+#include <stdio.h>
+#include <mico/version.h>
+int main() {
+
+   printf("MICO_VERSION=%s\n",MICO_VERSION);
+   return (0);
+}
+EOF
+ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
+if AC_TRY_EVAL(ac_compile); then
+  if eval `./conftest 2>&5`; then
+    kde_cv_mico_version=$MICO_VERSION
+  else
+    AC_MSG_ERROR([your system is not able to execute a small application to
+    find MICO version! Check $kde_micodir/include/mico/version.h])
+  fi
+else
+  AC_MSG_ERROR([your system is not able to compile a small application to
+  find MICO version! Check $kde_micodir/include/mico/version.h])
+fi
+])
+
+dnl installed MICO version
+mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "x$1" = "x"; then
+ req_version="2.3.0"
+else
+ req_version=$1
+fi
+
+dnl required MICO version
+req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
+req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
+req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
+
+if test "$mico_v_maj" -lt "$req_v_maj" || \
+   ( test "$mico_v_maj" -eq "$req_v_maj" && \
+        test "$mico_v_mid" -lt "$req_v_mid" ) || \
+   ( test "$mico_v_mid" -eq "$req_v_mid" && \
+        test "$mico_v_min" -lt "$req_v_min" )
+
+then
+  AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
+at least is required. You should upgrade MICO.])
+else
+  AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
+fi
+
+LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
+AC_SUBST(LIBMICO)
+if test -z "$IDL"; then
+  IDL='$(kde_bindir)/cuteidl'
+fi
+AC_SUBST(IDL)
+IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
+AC_SUBST(IDL_DEPENDENCIES)
+
+idldir="\$(includedir)/idl"
+AC_SUBST(idldir)
+
+])
+
+AC_DEFUN([KDE_CHECK_MINI_STL],
+[
+AC_REQUIRE([KDE_CHECK_MICO])
+
+AC_MSG_CHECKING(if we use mico's mini-STL)
+AC_CACHE_VAL(kde_cv_have_mini_stl,
+[
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+kde_save_cxxflags="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
+AC_TRY_COMPILE(
+[
+#include <mico/config.h>
+],
+[
+#ifdef HAVE_MINI_STL
+#error "nothing"
+#endif
+],
+kde_cv_have_mini_stl=no,
+kde_cv_have_mini_stl=yes)
+CXXFLAGS="$kde_save_cxxflags"
+AC_LANG_RESTORE
+])
+
+if test "x$kde_cv_have_mini_stl" = "xyes"; then
+   AC_MSG_RESULT(yes)
+   $1
+else
+   AC_MSG_RESULT(no)
+   $2
+fi
+])
+
+])
+
+AC_DEFUN([KDE_CHECK_ANSI],
+[
+])
+
+AC_DEFUN([KDE_CHECK_INSURE],
+[
+  AC_ARG_ENABLE(insure, [  --enable-insure             use insure++ for debugging [default=no]],
+  [
+  if test $enableval = "no"; dnl
+	then ac_use_insure="no"
+	else ac_use_insure="yes"
+   fi
+  ], [ac_use_insure="no"])
+
+  AC_MSG_CHECKING(if we will use Insure++ to debug)
+  AC_MSG_RESULT($ac_use_insure)
+  if test "$ac_use_insure" = "yes"; dnl
+       then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
+   fi
+])
+
+AC_DEFUN([KDE_CHECK_NEWLIBS],
+[
+
+])
diff --git a/admin/pkg.m4.in b/admin/pkg.m4.in
new file mode 100644
index 0000000000000000000000000000000000000000..f2bfc2d49f9bf073fc71d81d77ce4ef4c623adb5
--- /dev/null
+++ b/admin/pkg.m4.in
@@ -0,0 +1,57 @@
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN([PKG_CHECK_MODULES], [
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        AC_MSG_CHECKING(for $2)
+
+        if $PKG_CONFIG --exists "$2" ; then
+            AC_MSG_RESULT(yes)
+            succeeded=yes
+
+            AC_MSG_CHECKING($1_CFLAGS)
+            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+            AC_MSG_RESULT($$1_CFLAGS)
+
+            AC_MSG_CHECKING($1_LIBS)
+            $1_LIBS=`$PKG_CONFIG --libs "$2"`
+            AC_MSG_RESULT($$1_LIBS)
+        else
+            $1_CFLAGS=""
+            $1_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but 
+            ## do set a variable so people can do so.
+            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+            ifelse([$4], ,echo $$1_PKG_ERRORS,)
+        fi
+
+        AC_SUBST($1_CFLAGS)
+        AC_SUBST($1_LIBS)
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     ifelse([$3], , :, [$3])
+  else
+     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
+  fi
+])
+
+
diff --git a/admin/ylwrap b/admin/ylwrap
new file mode 100755
index 0000000000000000000000000000000000000000..5ea68e4fcd33b2bcc19f9ee975458b49060157f2
--- /dev/null
+++ b/admin/ylwrap
@@ -0,0 +1,143 @@
+#! /bin/sh
+# ylwrap - wrapper for lex/yacc invocations.
+# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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.
+
+# Usage:
+#     ylwrap INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
+# * INPUT is the input file
+# * OUTPUT is file PROG generates
+# * DESIRED is file we actually want
+# * PROGRAM is program to run
+# * ARGS are passed to PROG
+# Any number of OUTPUT,DESIRED pairs may be used.
+
+# The input.
+input="$1"
+shift
+case "$input" in
+ [\\/]* | ?:[\\/]*)
+    # Absolute path; do nothing.
+    ;;
+ *)
+    # Relative path.  Make it absolute.
+    input="`pwd`/$input"
+    ;;
+esac
+
+# The directory holding the input.
+input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
+# Quote $INPUT_DIR so we can use it in a regexp.
+# FIXME: really we should care about more than `.' and `\'.
+input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
+
+echo "got $input_rx"
+
+pairlist=
+while test "$#" -ne 0; do
+   if test "$1" = "--"; then
+      shift
+      break
+   fi
+   pairlist="$pairlist $1"
+   shift
+done
+
+# The program to run.
+prog="$1"
+shift
+# Make any relative path in $prog absolute.
+case "$prog" in
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
+esac
+
+# FIXME: add hostname here for parallel makes that run commands on
+# other machines.  But that might take us over the 14-char limit.
+dirname=ylwrap$$
+trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+mkdir $dirname || exit 1
+
+cd $dirname
+
+$prog ${1+"$@"} "$input"
+status=$?
+
+if test $status -eq 0; then
+   set X $pairlist
+   shift
+   first=yes
+   # Since DOS filename conventions don't allow two dots,
+   # the DOS version of Bison writes out y_tab.c instead of y.tab.c
+   # and y_tab.h instead of y.tab.h. Test to see if this is the case.
+   y_tab_nodot="no"
+   if test -f y_tab.c || test -f y_tab.h; then
+      y_tab_nodot="yes"
+   fi
+
+   while test "$#" -ne 0; do
+      from="$1"
+      # Handle y_tab.c and y_tab.h output by DOS
+      if test $y_tab_nodot = "yes"; then
+	 if test $from = "y.tab.c"; then
+	    from="y_tab.c"
+	 else
+	    if test $from = "y.tab.h"; then
+	       from="y_tab.h"
+	    fi
+	 fi
+      fi
+      if test -f "$from"; then
+         # If $2 is an absolute path name, then just use that,
+         # otherwise prepend `../'.
+         case "$2" in
+	   [\\/]* | ?:[\\/]*) target="$2";;
+	   *) target="../$2";;
+	 esac
+
+	 # Edit out `#line' or `#' directives.  We don't want the
+	 # resulting debug information to point at an absolute srcdir;
+	 # it is better for it to just mention the .y file with no
+	 # path.
+	 sed -e "/^#/ s,$input_rx,," "$from" > "$target" || status=$?
+      else
+	 # A missing file is only an error for the first file.  This
+	 # is a blatant hack to let us support using "yacc -d".  If -d
+	 # is not specified, we don't want an error when the header
+	 # file is "missing".
+	 if test $first = yes; then
+	    status=1
+	 fi
+      fi
+      shift
+      shift
+      first=no
+   done
+else
+   status=$?
+fi
+
+# Remove the directory.
+cd ..
+rm -rf $dirname
+
+exit $status
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d963a301dfa2df0e13967bd6f93e550183d5fd35
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#AM_VERSION=1.6
+if test -n "$AM_VERSION" ; then
+	ACLOCAL=aclocal-${AM_VERSION}
+	AUTOMAKE=automake-${AM_VERSION}
+else
+	ACLOCAL=aclocal
+	AUTOMAKE=automake
+fi
+
+echo "Generating build scripts in sflphone..."
+
+$ACLOCAL -I m4
+autoheader
+$AUTOMAKE --force-missing --add-missing --copy
+libtoolize --copy --force
+autoconf
+rm -rf config.cache
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000000000000000000000000000000000000..c2d7ebcaa9c5e9961f7918f39f29a10ddf7804e4
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,195 @@
+AC_INIT(aclocal.m4)
+
+AM_CONFIG_HEADER(config.h)
+
+dnl figure out the sflphone version
+VERSION=`sed -ne 's/^#define SFLPHONED_VERSION "\(.*\)"/\1/p' ${srcdir}/src/global.h`
+
+dnl get rid of release number
+RPM_VERSION=`echo $VERSION | cut -d- -f1`
+AC_SUBST(RPM_VERSION)
+RPM_RELEASE=`echo $VERSION | sed -ne 's/.*-\(.*\)/\1/p' `
+AC_SUBST(RPM_RELEASE)
+
+VERSION=`echo $VERSION | cut -d- -f1`
+AC_SUBST(VERSION)
+
+LIBS="$LIBS -lstdc++"
+
+dnl
+dnl Solaris pkgadd support definitions
+PKGADD_PKG="SFLPhoned"
+PKGADD_NAME="SFLPhone - a SIP client and daemon"
+PKGADD_VENDOR="http://www.sflphone.org/"
+AC_SUBST(PKGADD_PKG)
+AC_SUBST(PKGADD_NAME)
+AC_SUBST(PKGADD_VENDOR)
+
+AC_LANG_CPLUSPLUS
+
+AC_PROG_CXX
+AC_PROG_CC
+
+dnl AM_GNU_GETTEXT
+
+dnl AC_PATH_QT
+dnl KDE_USE_QT(3.3)
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+AM_INIT_AUTOMAKE(sflphoned, $VERSION)
+AC_PROG_LIBTOOL
+dnl AC_CHECK_COMPILERS
+
+dnl check for portaudio
+LP_SETUP_PORTAUDIO
+
+dnl check for osip2
+LP_CHECK_OSIP2
+
+dnl setup flags for embedded exosip library
+LP_SETUP_EXOSIP
+
+CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"
+
+SFLPHONE_CXXFLAGS=""
+
+with_samplerate=no
+case $host in
+  *darwin*)
+    need_no_undefined=no
+    AC_CHECK_HEADER([libsamplerate.h], [
+      AC_CHECK_LIB(samplerate, src_simple, 
+       [
+        with_samplerate=yes
+       ], [ with_samplerate=no ]
+      ) 
+     ], [ with_samplerate=no ]
+    )
+
+    ;;
+
+  *-*-cygwin | *-*-mingw* | *-*-pw32*)
+    need_no_undefined=yes
+    ;;
+  *)
+    need_no_undefined=no
+    ;;
+esac
+
+AM_CONDITIONAL(USE_SAMPLERATE, test x$with_samplerate = xyes)
+AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS( \
+ostream \
+)
+
+
+LIBCCGNU2_MIN_VERSION=1.3.1
+PKG_CHECK_MODULES(libccgnu2, libccgnu2 >= ${LIBCCGNU2_MIN_VERSION})
+SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libccgnu2_CFLAGS"
+SFLPHONE_LIBS="$SFLPHONE_LIBS $libccgnu2_LIBS"
+
+LIBCCEXT2_MIN_VERSION=1.3.1
+PKG_CHECK_MODULES(libccext2, libccext2 >= ${LIBCCEXT2_MIN_VERSION})
+SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libccext2_CFLAGS"
+SFLPHONE_LIBS="$SFLPHONE_LIBS $libccext2_LIBS"
+
+LIBCCRT_MIN_VERSION=1.3.0
+PKG_CHECK_MODULES(libccrtp1, libccrtp1 >= ${LIBCCRT_MIN_VERSION})
+SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libccrtp1_CFLAGS"
+SFLPHONE_LIBS="$SFLPHONE_LIBS $libccrtp1_LIBS"
+
+
+SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $OSIP_CFLAGS $EXOSIP_CFLAGS $PORTAUDIO_CFLAGS"
+SFLPHONE_LIBS="$SFLPHONE_LIBS $OSIP_LIBS $EXOSIP_LIBS "
+
+
+AC_SUBST(SFLPHONE_CXXFLAGS)
+AC_SUBST(SFLPHONE_LIBS)
+
+#zeroconf...
+AC_ARG_ENABLE(speex, [  --enable-speex	compile with speex codec ], with_speex=$enableval, with_speex=yes)
+
+if test "x$with_speex" = "xyes" ; then
+  AC_CHECK_HEADER([speex/speex.h], [
+    AC_CHECK_LIB(speex, speex_decode_int, 
+     [
+      with_speex=yes
+     ], [ with_speex=no ]
+    ) 
+   ], [ with_speex=no ]
+  )
+fi
+AM_CONDITIONAL(USE_SPEEX, test "x$with_speex" = "xyes" )
+
+
+AC_ARG_ENABLE(zeroconf, [  --disable-zeroconf	don't require libdns_sd (browsing and publishing DNS-SD services will not be possible) ],  with_zeroconf=$enableval, with_zeroconf=yes)
+if test "$with_zeroconf" = "yes"; then
+AC_MSG_CHECKING(for DNS-SD support)
+save_dnssdtest_LIBS="$LIBS"
+save_dnssdtest_LDFLAGS="$LDFLAGS"
+save_dnssdtest_CPPFLAGS="$CPPFLAGS"
+LDFLAGS="$all_libraries $LDFLAGS"
+CPPFLAGS="$CPPFLAGS $all_includes"
+case $host_os in
+  darwin*) LIBS="" ;;
+  *) LIBS="-ldns_sd" ;;
+esac
+have_libdns_sd="no"
+AC_TRY_LINK(	[
+			#include <dns_sd.h>
+		],[
+			DNSServiceRefDeallocate( (DNSServiceRef) 0);
+			TXTRecordDeallocate( (TXTRecordRef*) 0);
+		],[
+			AC_DEFINE(HAVE_DNSSD,1,[Define if dns-sd is available])
+			case $host_os in
+				darwin*) LIB_DNSSD="" ;;
+				*) LIB_DNSSD="-ldns_sd" ;;
+			esac
+			have_libdns_sd="yes"
+			AC_MSG_RESULT(yes)
+		],[
+			AC_MSG_RESULT(no)
+                        LIB_DNSSD=""
+])
+CPPFLAGS=$save_dnssdtest_CPPFLAGS
+LDFLAGS=$save_dnssdtest_LDFLAGS
+LIBS=$save_dnssdtest_LIBS
+fi
+AC_SUBST(LIB_DNSSD)
+AM_CONDITIONAL(USE_ZEROCONF, test "$have_libdns_sd" = "yes")	
+
+dnl AC_CONFIG_FILES(
+AC_OUTPUT(
+debian/changelog \
+sflphone.spec \
+Makefile \
+m4/Makefile \
+libs/Makefile \
+libs/eXosip2/Makefile \
+libs/portaudio/Makefile \
+libs/stund/Makefile \
+libs/utilspp/Makefile \
+libs/utilspp/functor/Makefile \
+libs/utilspp/singleton/Makefile \
+include/Makefile \
+include/eXosip2/Makefile \
+src/Makefile \
+src/sflphone \
+src/audio/Makefile \
+src/audio/gsm/Makefile \
+src/audio/pacpp/Makefile \
+src/audio/pacpp/include/Makefile \
+src/audio/pacpp/include/portaudiocpp/Makefile \
+src/audio/pacpp/source/Makefile \
+src/audio/pacpp/source/portaudiocpp/Makefile \
+src/config/Makefile \
+src/gui/Makefile \
+src/gui/server/Makefile \
+src/zeroconf/Makefile \
+ringtones/Makefile \
+platform/fedora/sflphoned.spec \
+)
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000000000000000000000000000000000000..7762c69b8b66ca48097f4cd9f04c9cbb543d7885
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,6 @@
+sflphoned for Debian
+--------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- jpbarrette <jean-philippe.barrette-lapierre@savoirfairelinux.com>, Thu, 10 Nov 2005 11:37:53 -0500
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000000000000000000000000000000000..dea3e5f7af816257fc99e23a1ca3d9f8f8e7b2f6
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+sflphoned (0.6.1-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Jean-Philippe Barrette-LaPierre <jean-philippe.barrette-lapierre@savoirfairelinux.com>  Thu, 10 Nov 2005 11:37:53 -0500
+
diff --git a/debian/changelog.in b/debian/changelog.in
new file mode 100644
index 0000000000000000000000000000000000000000..2a1667b8a865bf674c3fa260e3006ba429e6c0d0
--- /dev/null
+++ b/debian/changelog.in
@@ -0,0 +1,6 @@
+sflphoned (@VERSION@-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Jean-Philippe Barrette-LaPierre <jean-philippe.barrette-lapierre@savoirfairelinux.com>  Thu, 10 Nov 2005 11:37:53 -0500
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000000000000000000000000000000000..b8626c4cff2849624fb67f87cd0ad72b163671ad
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000000000000000000000000000000000..9608ac68baf0d20d44adf2e84db75d16ebbf86c0
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,14 @@
+Source: sflphoned
+Section: unknown
+Priority: optional
+Maintainer: Jean-Philippe Barrette-LaPierre <jean-philippe.barrette-lapierre@savoirfairelinux.com>
+Build-Depends: debhelper (>= 4.0.0), libcommoncpp2-dev (>= 1.3.14), libosip2-dev (>= 2.2.0), libccrtp-dev (>= 1.3.1), g++-4.0
+Standards-Version: 3.6.1
+
+Package: sflphoned
+Architecture: any
+Depends: ${shlibs:Depends}, libcommoncpp2-1.3c2, libosip2-3 (>= 2.2.0), libccrtp1-1.3c2 (>= 1.3.1)
+Recommends: sflphone-qt
+Description: SFLPhoned is a VoIP daeamon with SIP protocol
+ SFLPhoned is a VoIP daeamon with SIP protocol. It's developed by Savoir-faire
+ Linux inc. in Montreal, Canada.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000000000000000000000000000000000..f586bb4a6d9e713ab36f2f923dc297ad4b9a1640
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,17 @@
+This package was debianized by Jean-Philippe Barrette-LaPierre <jean-philippe.barrette-lapierre@savoirfairelinux.com> on
+Thu, 10 Nov 2005 11:37:53 -0500.
+
+It was downloaded from http://www.sflphone.org/releases/
+
+Copyright:
+
+Upstream Author(s): Jean-Philippe Barrette-LaPierre <jean-philippe.barrette-lapierre@savoirfairelinux.com>
+
+License:
+
+This software is copyright (c) 2004-2005 Savoir-Faire Linux inc.
+
+You are free to distribute this software under the terms of
+the GNU General Public License.
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file `/usr/share/common-licenses/GPL'.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000000000000000000000000000000000000..ca882bbb78588982a650ff2685c36fe51ae99ae3
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000000000000000000000000000000000000..b27c726c173d150b103a5d0b50f0973f9905f504
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,4 @@
+NEWS
+README
+TODO
+CHANGES
diff --git a/debian/files b/debian/files
new file mode 100644
index 0000000000000000000000000000000000000000..6c2e42a51346c9310fb1d614e472adb81581e916
--- /dev/null
+++ b/debian/files
@@ -0,0 +1 @@
+sflphoned_0.6-1_i386.deb unknown optional
diff --git a/debian/menu.ex b/debian/menu.ex
new file mode 100644
index 0000000000000000000000000000000000000000..f9707c6bffd9b9e5da21feda2c70f61eb1a735bd
--- /dev/null
+++ b/debian/menu.ex
@@ -0,0 +1,2 @@
+?package(sflphoned):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\
+  title="sflphoned" command="/usr/bin/sflphoned"
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000000000000000000000000000000000..1db45d437cad274c9aa11af91f68afcc29a02cda
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,137 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets  by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CXX = g++-4.0
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+config.status: configure
+	dh_testdir
+	# Add here commands to configure the package.
+	CFLAGS="$(CFLAGS)" CXX="$(CXX)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+
+#Architecture 
+build: build-arch build-indep
+
+build-arch: build-arch-stamp
+build-arch-stamp:  config.status
+
+	# Add here commands to compile the arch part of the package.
+	#$(MAKE) 
+	touch build-arch-stamp
+
+build-indep: build-indep-stamp
+build-indep-stamp:  config.status
+
+	# Add here commands to compile the indep part of the package.
+	#$(MAKE) doc
+	touch build-indep-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+	dh_clean 
+
+install: install-indep install-arch
+install-indep:
+	dh_testdir
+	dh_testroot
+	dh_clean -k -i 
+	dh_installdirs -i
+
+	# Add here commands to install the indep part of the package into
+	# debian/<package>-doc.
+	#INSTALLDOC#
+
+	dh_install -i
+
+install-arch:
+	dh_testdir
+	dh_testroot
+	dh_clean -k -s 
+	dh_installdirs -s
+
+	# Add here commands to install the arch part of the package into 
+	# debian/tmp.
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/sflphoned
+
+	dh_install -s
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog
+	dh_installdocs
+	dh_installexamples
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate	
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress 
+	dh_fixperms
+#	dh_perl
+#	dh_python
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+# Build architecture independant packages using the common target.
+binary-indep: build-indep install-indep
+	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build-arch install-arch
+	$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch 
diff --git a/debian/sflphoned-doc.docs b/debian/sflphoned-doc.docs
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/debian/sflphoned-doc.install b/debian/sflphoned-doc.install
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/doc/eXosip_event.txt b/doc/eXosip_event.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b68bf161d2961b6eace901c40d53bca0e29b248a
--- /dev/null
+++ b/doc/eXosip_event.txt
@@ -0,0 +1,94 @@
+include/osip2/osip.h
+type_t = INT
+
+    542   struct osip_event
+    543   {
+    544     type_t type;             /**< Event Type */
+    545     int transactionid;       /**< identifier of the related osip transaction */
+    546     osip_message_t *sip;     /**< SIP message (optional) */
+    547   };
+
+include/osipparser2/osip_message.h
+     52 /**
+     53  * Structure for SIP Message (REQUEST and RESPONSE).
+     54  * @struct osip_message
+     55  */
+     56   struct osip_message
+     57   {
+     58     char *sip_version;                /**< SIP version (SIP request only) */
+     59     osip_uri_t *req_uri;              /**< Request-Uri (SIP request only) */
+     60     char *sip_method;                 /**< METHOD (SIP request only) */
+     61
+     62     int status_code;                  /**< Status Code (SIP answer only) */
+     63     char *reason_phrase;              /**< Reason Phrase (SIP answer only) */
+     64
+     65     osip_list_t *accepts;             /**< Accept headers */
+     66     osip_list_t *accept_encodings;    /**< Accept-Encoding headers */
+     67     osip_list_t *accept_languages;    /**< Accept-Language headers */
+     68     osip_list_t *alert_infos;         /**< Alert-Info headers */
+     69     osip_list_t *allows;              /**< Allows headers */
+     70     osip_list_t *authentication_infos;/**< authentication_info headers */
+     71     osip_list_t *authorizations;      /**< Authorizations headers */
+     72     osip_call_id_t *call_id;          /**< Call-ID header */
+     73     osip_list_t *call_infos;          /**< Call-Infos header */
+     74     osip_list_t *contacts;            /**< Contacts headers */
+     75     osip_list_t *content_dispositions;/**< Content-Dispositions headers */
+     76     osip_list_t *content_encodings;   /**< Content-Encodings headers */
+     77     osip_content_length_t *content_length;   /**< Content-Length header */
+     78     osip_content_type_t *content_type;       /**< Content-Type header */
+     79     osip_cseq_t *cseq;                /**< CSeq header */
+     80     osip_list_t *error_infos;         /**< Error-Info headers */
+     81     osip_from_t *from;                /**< From header */
+     82     osip_mime_version_t *mime_version;/**< Mime-Version header */
+     83     osip_list_t *proxy_authenticates; /**< Proxy-Authenticate headers */
+     84     osip_list_t *proxy_authentication_infos; /**< P-Authentication-Info headers */
+     85     osip_list_t *proxy_authorizations;/**< Proxy-authorization headers */
+     86     osip_list_t *record_routes;       /**< Record-Route headers */
+     87     osip_list_t *routes;              /**< Route headers */
+     88     osip_to_t *to;                    /**< To header */
+     89     osip_list_t *vias;                /**< Vias headers */
+     90     osip_list_t *www_authenticates;   /**< WWW-Authenticate headers */
+     91
+     92     osip_list_t *headers;             /**< Other headers */
+     93
+     94     osip_list_t *bodies;              /**< List of attachements */
+     95
+     96     /*
+     97        1: structure and buffer "message" are identical.
+     98        2: buffer "message" is not up to date with the structure info (call osip_message_to_str to update it).
+     99      */
+    100     int message_property;             /**@internal */
+    101     char *message;                    /**@internal */
+    102     size_t message_length;            /**@internal */
+    103
+    104     void *application_data;           /**can be used by upper layer*/
+    105   };
+
+
+    249  * @struct eXosip_event
+    250  */
+    251   struct eXosip_event
+    252   {
+    253     eXosip_event_type_t type;               /**< type of the event */
+    254     char                textinfo[256];      /**< text description of event */
+    255     void               *external_reference; /**< external reference (for calls) */
+    256
+    257     osip_message_t     *request;   /**< request within current transaction */
+    258     osip_message_t     *response;  /**< last response within current transaction */
+    259     osip_message_t     *ack;       /**< ack within current transaction */
+    260
+    261     int tid; /**< unique id for transactions (to be used for answers) */
+    262     int did; /**< unique id for SIP dialogs */
+    263
+    264     int rid; /**< unique id for registration */
+    265     int cid; /**< unique id for SIP calls (but multiple dialogs!) */
+    266     int sid; /**< unique id for outgoing subscriptions */
+    267     int nid; /**< unique id for incoming subscriptions */
+    268
+    269     int ss_status;  /**< current Subscription-State for subscription */
+    270     int ss_reason;  /**< current Reason status for subscription */
+    271   };
+
+opip_fifo_get retourne un void*
+el = osip_list_get (ff->queue, 0);
+
diff --git a/doc/eXosip_eventCode.txt b/doc/eXosip_eventCode.txt
new file mode 100644
index 0000000000000000000000000000000000000000..208b67de9c44999ceeabdc19aaa5b403c3bc81b7
--- /dev/null
+++ b/doc/eXosip_eventCode.txt
@@ -0,0 +1,69 @@
+  typedef enum eXosip_event_type
+    {
+      /* REGISTER related events */
+       0 EXOSIP_REGISTRATION_NEW,         /**< announce new registration.       */
+       1 EXOSIP_REGISTRATION_SUCCESS,     /**< user is successfully registred.  */
+       2 EXOSIP_REGISTRATION_FAILURE,     /**< user is not registred.           */
+       3 EXOSIP_REGISTRATION_REFRESHED,   /**< registration has been refreshed. */
+       4 EXOSIP_REGISTRATION_TERMINATED,  /**< UA is not registred any more.    */
+      
+      /* INVITE related events within calls */
+       5 EXOSIP_CALL_INVITE,          /**< announce a new call                   */
+       6 EXOSIP_CALL_REINVITE,        /**< announce a new INVITE within call     */
+
+       7 EXOSIP_CALL_NOANSWER,        /**< announce no answer within the timeout */
+       8 EXOSIP_CALL_PROCEEDING,      /**< announce processing by a remote app   */
+       9 EXOSIP_CALL_RINGING,         /**< announce ringback                     */
+      10 EXOSIP_CALL_ANSWERED,        /**< announce start of call                */
+      11 EXOSIP_CALL_REDIRECTED,      /**< announce a redirection                */
+      12 EXOSIP_CALL_REQUESTFAILURE,  /**< announce a request failure            */
+      13 EXOSIP_CALL_SERVERFAILURE,   /**< announce a server failure             */
+      14 EXOSIP_CALL_GLOBALFAILURE,   /**< announce a global failure             */
+      15 EXOSIP_CALL_ACK,             /**< ACK received for 200ok to INVITE      */
+      
+      16 EXOSIP_CALL_CANCELLED,       /**< announce that call has been cancelled */
+      17 EXOSIP_CALL_TIMEOUT,         /**< announce that call has failed         */
+
+      /* request related events within calls (except INVITE) */
+      18 EXOSIP_CALL_MESSAGE_NEW,            /**< announce new incoming MESSAGE. */
+      19 EXOSIP_CALL_MESSAGE_PROCEEDING,     /**< announce a 1xx for MESSAGE. */
+      20 EXOSIP_CALL_MESSAGE_ANSWERED,       /**< announce a 200ok  */
+      21 EXOSIP_CALL_MESSAGE_REDIRECTED,     /**< announce a failure. */
+      22 EXOSIP_CALL_MESSAGE_REQUESTFAILURE, /**< announce a failure. */
+      23 EXOSIP_CALL_MESSAGE_SERVERFAILURE,  /**< announce a failure. */
+      24 EXOSIP_CALL_MESSAGE_GLOBALFAILURE,  /**< announce a failure. */
+
+      25 EXOSIP_CALL_CLOSED,          /**< a BYE was received for this call      */
+
+      /* for both UAS & UAC events */
+      26 EXOSIP_CALL_RELEASED,           /**< call context is cleared.            */
+      
+      /* response received for request outside calls */
+      27 EXOSIP_MESSAGE_NEW,            /**< announce new incoming MESSAGE. */
+      28 EXOSIP_MESSAGE_PROCEEDING,     /**< announce a 1xx for MESSAGE. */
+      29 EXOSIP_MESSAGE_ANSWERED,       /**< announce a 200ok  */
+      30 EXOSIP_MESSAGE_REDIRECTED,     /**< announce a failure. */
+      31 EXOSIP_MESSAGE_REQUESTFAILURE, /**< announce a failure. */
+      32 EXOSIP_MESSAGE_SERVERFAILURE,  /**< announce a failure. */
+      33 EXOSIP_MESSAGE_GLOBALFAILURE,  /**< announce a failure. */
+      
+      /* Presence and Instant Messaging */
+      34 EXOSIP_SUBSCRIPTION_UPDATE,       /**< announce incoming SUBSCRIBE.      */
+      35 EXOSIP_SUBSCRIPTION_CLOSED,       /**< announce end of subscription.     */
+      
+      36 EXOSIP_SUBSCRIPTION_NOANSWER,        /**< announce no answer              */
+      37 EXOSIP_SUBSCRIPTION_PROCEEDING,      /**< announce a 1xx                  */
+      38 EXOSIP_SUBSCRIPTION_ANSWERED,        /**< announce a 200ok                */
+      39 EXOSIP_SUBSCRIPTION_REDIRECTED,      /**< announce a redirection          */
+      40 EXOSIP_SUBSCRIPTION_REQUESTFAILURE,  /**< announce a request failure      */
+      41 EXOSIP_SUBSCRIPTION_SERVERFAILURE,   /**< announce a server failure       */
+      42 EXOSIP_SUBSCRIPTION_GLOBALFAILURE,   /**< announce a global failure       */
+      43 EXOSIP_SUBSCRIPTION_NOTIFY,          /**< announce new NOTIFY request     */
+      
+      44 EXOSIP_SUBSCRIPTION_RELEASED,        /**< call context is cleared.        */
+      
+      45 EXOSIP_IN_SUBSCRIPTION_NEW,          /**< announce new incoming SUBSCRIBE.*/
+      46 EXOSIP_IN_SUBSCRIPTION_RELEASED,     /**< announce end of subscription.   */
+      
+      47 EXOSIP_EVENT_COUNT                /**< MAX number of events              */
+    } eXosip_event_type_t;
diff --git a/doc/echange.txt b/doc/echange.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ee2058e56b2423aace9d6a577012cfd4ee30b0cb
--- /dev/null
+++ b/doc/echange.txt
@@ -0,0 +1,21 @@
+  --> INVITE (20) -->         0     0 IN IP4 192.168.1.172 c=IN IP4 192.168.1.172 m=audio 56198
+ <--  407 Proxy Auth
+  --> ACK 20
+  --> INVITE (21)                 0    0 IN IP4 192.168.1.172 c=IN IP4 192.168.1.172 m=audio 56198 (proxy-auth)
+ <--  100 Trying (21 INVITE)
+ <--  180 Ringing (21 INVITE)
+ <--  200 OK             root 26195 26195 IN IP4 192.168.1.10  c=IN IP4 192.168.1.10  m=audio 15792
+  --> ACK 21
+ <--  INVITE (102)       root 26195 26196 IN IP4 192.168.1.124 c=IN IP4 192.168.1.124 m=audio 53628
+  --> 100 Trying (102 INVITE)
+  --> 403 Forbidden (102 INVITE)
+  --> ACK (192.168.1.172) (102 ACK)
+  --> INVITE (103)       root 26195 26197 IN IP4 192.168.1.10  c=IN IP4 192.168.1.10  m=audio 15792
+ <--  100 Trying (103 INVITE)
+ <--  500 Retry Later (103 INVITE)
+#
+U 192.168.1.172:5060 -> 192.168.1.10:5060
+  SIP/2.0 500 Retry Later..Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bK2af68dba;rport=5060..From
+  : <sip:124@savoirfairelinux.net>;tag=as46619d38..To: "Yan Morin 2" <sip:sfl-127@savoirfairelinux.ne
+  t>;tag=785584300..Call-ID: 1746410696@192.168.1.172..CSeq: 103 INVITE..Retry-After: 10..Allow: INVI
+  TE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, MESSAGE, INFO, REFER, UPDATE..Content-Length: 0..
\ No newline at end of file
diff --git a/doc/libsamplerate.png b/doc/libsamplerate.png
new file mode 100644
index 0000000000000000000000000000000000000000..4d918b85924c7934527adcaf5d744e42e47030fc
Binary files /dev/null and b/doc/libsamplerate.png differ
diff --git a/doc/outgoingcall.txt b/doc/outgoingcall.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b08053381261641d87ab6995b748c971bfc66a86
--- /dev/null
+++ b/doc/outgoingcall.txt
@@ -0,0 +1,15 @@
+1. outgoingCall()
+1.1 generateNewCallId() (short)
+1.2 pushBackNewCall()
+1.2.1 new Call(id, type, _voIPLinkVector.at(DFT_VOIP_LINK))
+1.2.1.1 _state = NotExist;
+1.2.1.2 _voIPLink->newOutgoingCall(_id);
+1.2.1.2.1 new SipCall(callid, Manager::instance().getCodecDescVector()));
+1.2.1.2.2 _sipcallVector.push_back(sipcall);
+1.2.1.2.3 sipcall->setStandBy(true);
+1.2.2 _callVector.push_back(call);
+1.3 call->setStatus(string(TRYING_STATUS));
+1.4 call->setState(Progressing);
+1.5 call->setCallerIdNumber(to);
+1.6 call->outgoingCall(to);
+
diff --git a/doc/playtone.txt b/doc/playtone.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f8efb9212fd25fbdd0dd73ffa8e79d65b6608b11
--- /dev/null
+++ b/doc/playtone.txt
@@ -0,0 +1,9 @@
+Appel:
+playtone s1   [joue tant que playtone = false]
+playdtmf s2 1 [si playtone = true ( playtone = false) flush, start playdtmf]
+playdtmf s3 0 []
+playdtmf s4 3 []
+
+
+
+
diff --git a/doc/sflphone-construct.xmi b/doc/sflphone-construct.xmi
new file mode 100644
index 0000000000000000000000000000000000000000..83c9d4cc4e8dad6026b70d973155fa67aa4f70d2
--- /dev/null
+++ b/doc/sflphone-construct.xmi
@@ -0,0 +1,10167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2005-09-22T11:58:08" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.4.2</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" >
+   <UML:Namespace.ownedElement>
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="20191" isRoot="false" isAbstract="false" name="datatype" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20190" isRoot="false" isAbstract="false" name="int" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20192" isRoot="false" isAbstract="false" name="char" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20193" isRoot="false" isAbstract="false" name="bool" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20194" isRoot="false" isAbstract="false" name="float" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20195" isRoot="false" isAbstract="false" name="double" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20196" isRoot="false" isAbstract="false" name="long" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20197" isRoot="false" isAbstract="false" name="short" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20198" isRoot="false" isAbstract="false" name="string" />
+    <UML:DataType stereotype="20191" isSpecification="false" isLeaf="false" visibility="public" xmi.id="20218" isRoot="false" isAbstract="false" name="void" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20201" isRoot="false" isAbstract="false" name="ManagerImpl" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20202" isRoot="false" isAbstract="false" name="ToneGenerator" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20203" isRoot="false" isAbstract="false" name="Error" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20204" isRoot="false" isAbstract="false" name="Gui" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20205" isRoot="false" isAbstract="false" name="AudioLayer" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20214" isRoot="false" isAbstract="false" name="voIPLinkVector" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20215" isRoot="false" isAbstract="false" name="CallVector" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20216" isRoot="false" isAbstract="false" name="CodecDescriptorVector" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20237" isRoot="false" isAbstract="false" name="SipVoIPLink" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="20302" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20253" isRoot="false" isAbstract="false" name="CodecDescriptor" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20275" isRoot="false" isAbstract="false" name="Call" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20294" isRoot="false" isAbstract="false" name="VoIPLink" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20310" isRoot="false" isAbstract="false" name="SipCallVector" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20311" isRoot="false" isAbstract="false" name="SipCall" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20323" isRoot="false" isAbstract="false" name="AudioRtp" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20327" isRoot="false" isAbstract="false" name="EventThread" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="20334" isRoot="false" isAbstract="false" name="AudioCodec" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20230" name="Constructor" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20231" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20232" aggregation="none" type="20203" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20233" name="Constructor" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20234" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20235" aggregation="none" type="20202" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20238" name="init" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20239" aggregation="shared" type="20214" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20240" aggregation="none" type="20237" name="" multiplicity="1" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20241" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20242" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20243" aggregation="none" type="20214" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20250" name="initAudioCodec" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20251" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20252" aggregation="none" type="20216" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20254" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20255" aggregation="shared" type="20216" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20256" aggregation="none" type="20253" name="" multiplicity="3" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20261" name="selectAudioDriver" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20262" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20263" aggregation="none" type="20205" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20266" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20267" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20268" aggregation="none" type="20215" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20276" name="pushBackNewCall" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20277" aggregation="shared" type="20215" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20278" aggregation="none" type="20275" name="" multiplicity="0..*" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20283" name="initGui" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20284" aggregation="shared" type="20201" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20285" aggregation="none" type="20204" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20288" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20289" aggregation="shared" type="20275" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20290" aggregation="none" type="20214" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20291" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20292" aggregation="shared" type="20275" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20293" aggregation="none" type="20237" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20295" name="init" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20296" aggregation="shared" type="20214" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20297" aggregation="none" type="20294" name="" multiplicity="1" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="20237" visibility="public" xmi.id="20302" parent="20294" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20305" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20306" aggregation="shared" type="20275" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20307" aggregation="none" type="20294" name="" multiplicity="1" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20312" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20313" aggregation="shared" type="20310" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20314" aggregation="none" type="20237" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20315" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20316" aggregation="shared" type="20237" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20317" aggregation="none" type="20310" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20318" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20319" aggregation="shared" type="20310" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20320" aggregation="none" type="20311" name="" multiplicity="0..*" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20324" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20325" aggregation="shared" type="20237" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20326" aggregation="none" type="20323" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20328" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20329" aggregation="shared" type="20237" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20330" aggregation="none" type="20327" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20331" name="SipCall::Constructor" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20332" aggregation="shared" type="20311" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20333" aggregation="none" type="20216" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20335" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20336" aggregation="shared" type="20311" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20337" aggregation="none" type="20334" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20355" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20356" aggregation="shared" type="20323" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20357" aggregation="none" type="20311" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="20358" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20359" aggregation="shared" type="20323" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="20360" aggregation="none" type="20205" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+   </UML:Namespace.ownedElement>
+  </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+  <docsettings viewid="20199" documentation="" uniqueid="20374" />
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="81" showgrid="0" showopsig="0" usefillcolor="1" snapx="10" canvaswidth="1037" snapy="10" showatts="1" xmi.id="20199" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="900000" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="684" >
+    <widgets>
+     <classwidget usesdiagramfillcolour="1" width="89" showattsigs="601" usesdiagramusefillcolour="1" x="541" linecolour="none" y="105" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20201" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="41" showattsigs="601" usesdiagramusefillcolour="1" x="562" linecolour="none" y="1" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20203" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="102" showattsigs="601" usesdiagramusefillcolour="1" x="436" linecolour="none" y="2" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20202" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="105" showattsigs="601" usesdiagramusefillcolour="1" x="340" linecolour="none" y="76" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20214" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="88" showattsigs="601" usesdiagramusefillcolour="1" x="151" linecolour="none" y="163" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20237" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="153" showattsigs="601" usesdiagramusefillcolour="1" x="550" linecolour="none" y="346" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20216" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="113" showattsigs="601" usesdiagramusefillcolour="1" x="808" linecolour="none" y="319" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20253" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="81" showattsigs="601" usesdiagramusefillcolour="1" x="450" linecolour="none" y="271" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20205" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="74" showattsigs="601" usesdiagramusefillcolour="1" x="425" linecolour="none" y="173" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20215" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="33" showattsigs="601" usesdiagramusefillcolour="1" x="312" linecolour="none" y="151" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20275" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="31" showattsigs="601" usesdiagramusefillcolour="1" x="787" linecolour="none" y="105" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20204" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="68" showattsigs="601" usesdiagramusefillcolour="1" x="180" linecolour="none" y="73" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20294" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="94" showattsigs="601" usesdiagramusefillcolour="1" x="98" linecolour="none" y="242" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20310" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="53" showattsigs="601" usesdiagramusefillcolour="1" x="194" linecolour="none" y="303" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20311" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="67" showattsigs="601" usesdiagramusefillcolour="1" x="283" linecolour="none" y="241" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20323" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="86" showattsigs="601" usesdiagramusefillcolour="1" x="27" linecolour="none" y="163" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20327" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="86" showattsigs="601" usesdiagramusefillcolour="1" x="210" linecolour="none" y="396" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="20334" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <notewidget usesdiagramfillcolour="1" width="164" usesdiagramusefillcolour="1" x="15" linecolour="none" y="382" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="50" usefillcolor="1" isinstance="0" xmi.id="20340" text="answeredCall_without_hold
+incomingCall" font="Sans,8,-1,5,50,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="20203" widgetaid="20201" xmi.id="20230" >
+      <linepath>
+       <startpoint startx="600" starty="105" />
+       <endpoint endx="582" endy="34" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="75" usesdiagramusefillcolour="1" x="590" linecolour="none" y="69" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20361" text="Constructor" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="20202" widgetaid="20201" xmi.id="20233" >
+      <linepath>
+       <startpoint startx="570" starty="105" />
+       <endpoint endx="487" endy="35" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="75" usesdiagramusefillcolour="1" x="464" linecolour="none" y="69" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20362" text="Constructor" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20214" widgetaid="20201" xmi.id="20241" >
+      <linepath>
+       <startpoint startx="541" starty="121" />
+       <endpoint endx="445" endy="92" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="4" indexa="3" totalcountb="2" indexb="1" widgetbid="20216" widgetaid="20201" xmi.id="20250" >
+      <linepath>
+       <startpoint startx="607" starty="138" />
+       <endpoint endx="626" endy="346" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="95" usesdiagramusefillcolour="1" x="565" linecolour="none" y="245" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20363" text="initAudioCodec" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20253" widgetaid="20216" xmi.id="20254" >
+      <linepath>
+       <startpoint startx="703" starty="362" />
+       <endpoint endx="808" endy="335" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="15" usesdiagramusefillcolour="1" x="791" linecolour="none" y="318" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20364" text="3" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="4" indexa="2" totalcountb="2" indexb="1" widgetbid="20205" widgetaid="20201" xmi.id="20261" >
+      <linepath>
+       <startpoint startx="585" starty="138" />
+       <endpoint endx="490" endy="271" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="110" usesdiagramusefillcolour="1" x="520" linecolour="none" y="183" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20365" text="selectAudioDriver" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="4" indexa="1" totalcountb="2" indexb="1" widgetbid="20215" widgetaid="20201" xmi.id="20266" >
+      <linepath>
+       <startpoint startx="563" starty="138" />
+       <endpoint endx="462" endy="173" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20275" widgetaid="20215" xmi.id="20276" >
+      <linepath>
+       <startpoint startx="425" starty="189" />
+       <endpoint endx="345" endy="167" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="113" usesdiagramusefillcolour="1" x="371" linecolour="none" y="197" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20366" text="pushBackNewCall" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="28" usesdiagramusefillcolour="1" x="347" linecolour="none" y="144" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20367" text="0..*" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20204" widgetaid="20201" xmi.id="20283" >
+      <linepath>
+       <startpoint startx="630" starty="121" />
+       <endpoint endx="787" endy="121" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="45" usesdiagramusefillcolour="1" x="638" linecolour="none" y="122" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20368" text="initGui" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20294" widgetaid="20214" xmi.id="20295" >
+      <linepath>
+       <startpoint startx="340" starty="92" />
+       <endpoint endx="248" endy="89" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="25" usesdiagramusefillcolour="1" x="300" linecolour="none" y="91" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20369" text="init" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="15" usesdiagramusefillcolour="1" x="250" linecolour="none" y="45" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20370" text="1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="20294" widgetaid="20237" xmi.id="20302" >
+      <linepath>
+       <startpoint startx="195" starty="163" />
+       <endpoint endx="202" endy="106" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="20294" widgetaid="20275" xmi.id="20305" >
+      <linepath>
+       <startpoint startx="312" starty="167" />
+       <endpoint endx="225" endy="106" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="15" usesdiagramusefillcolour="1" x="169" linecolour="none" y="107" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20371" text="1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="20310" widgetaid="20237" xmi.id="20315" >
+      <linepath>
+       <startpoint startx="180" starty="196" />
+       <endpoint endx="145" endy="242" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="20311" widgetaid="20310" xmi.id="20318" >
+      <linepath>
+       <startpoint startx="145" starty="275" />
+       <endpoint endx="211" endy="303" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="28" usesdiagramusefillcolour="1" x="268" linecolour="none" y="301" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20372" text="0..*" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="20323" widgetaid="20237" xmi.id="20324" >
+      <linepath>
+       <startpoint startx="209" starty="196" />
+       <endpoint endx="316" endy="241" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20327" widgetaid="20237" xmi.id="20328" >
+      <linepath>
+       <startpoint startx="151" starty="179" />
+       <endpoint endx="113" endy="179" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20216" widgetaid="20311" xmi.id="20331" >
+      <linepath>
+       <startpoint startx="247" starty="319" />
+       <endpoint endx="550" endy="362" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="124" usesdiagramusefillcolour="1" x="346" linecolour="none" y="342" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="20373" text="SipCall::Constructor" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20334" widgetaid="20311" xmi.id="20335" >
+      <linepath>
+       <startpoint startx="220" starty="336" />
+       <endpoint endx="253" endy="396" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="20334" widgetaid="20340" roleBdoc="" documentation="" roleAdoc="" type="513" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="179" starty="407" />
+       <endpoint endx="210" endy="412" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="20311" widgetaid="20323" xmi.id="20355" >
+      <linepath>
+       <startpoint startx="316" starty="274" />
+       <endpoint endx="229" endy="303" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="20205" widgetaid="20323" xmi.id="20358" >
+      <linepath>
+       <startpoint startx="350" starty="257" />
+       <endpoint endx="450" endy="287" />
+      </linepath>
+     </assocwidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" label="Views" >
+    <listitem open="1" type="801" label="Logical View" >
+     <listitem open="1" type="813" id="20334" />
+     <listitem open="1" type="813" id="20205" />
+     <listitem open="1" type="813" id="20323" />
+     <listitem open="1" type="813" id="20275" />
+     <listitem open="1" type="813" id="20215" />
+     <listitem open="1" type="813" id="20253" />
+     <listitem open="1" type="813" id="20216" />
+     <listitem open="1" type="813" id="20203" />
+     <listitem open="1" type="813" id="20327" />
+     <listitem open="1" type="813" id="20204" />
+     <listitem open="1" type="813" id="20201" />
+     <listitem open="1" type="813" id="20311" />
+     <listitem open="1" type="813" id="20310" />
+     <listitem open="1" type="813" id="20237" />
+     <listitem open="1" type="813" id="20202" />
+     <listitem open="1" type="813" id="20294" />
+     <listitem open="1" type="813" id="20214" />
+     <listitem open="1" type="830" label="Datatypes" >
+      <listitem open="1" type="829" id="20193" />
+      <listitem open="1" type="829" id="20192" />
+      <listitem open="1" type="829" id="20195" />
+      <listitem open="1" type="829" id="20194" />
+      <listitem open="1" type="829" id="20190" />
+      <listitem open="1" type="829" id="20196" />
+      <listitem open="1" type="829" id="20197" />
+      <listitem open="1" type="829" id="20198" />
+      <listitem open="1" type="829" id="20218" />
+     </listitem>
+    </listitem>
+    <listitem open="1" type="802" label="Use Case View" />
+    <listitem open="1" type="821" label="Component View" />
+    <listitem open="1" type="827" label="Deployment View" />
+    <listitem open="1" type="836" label="Entity Relationship Model" />
+   </listitem>
+  </listview>
+  <codegeneration>
+   <codegenerator language="Cpp" >
+    <classifiercodedocument writeOutCode="true" package="" id="20201" parent_class="20201" fileExt=".cpp" fileName="managerimpl" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;managerimpl.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_24" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_25" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_26" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_27" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_28" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_29" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_30" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_31" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_32" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_33" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_34" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			managerimpl.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:32&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20230" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20230" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20233" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20233" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20241" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20241" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20250" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20250" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20261" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20261" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_24" canDelete="false" writeOutText="false" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20266" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20266" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_25" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_26" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_27" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_28" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_29" canDelete="false" writeOutText="false" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20283" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20283" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_30" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_31" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_32" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_33" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_34" canDelete="false" writeOutText="false" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20202" parent_class="20202" fileExt=".cpp" fileName="tonegenerator" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tonegenerator.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tonegenerator.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20233" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20233" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20203" parent_class="20203" fileExt=".cpp" fileName="error" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;error.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			error.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20230" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20230" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20204" parent_class="20204" fileExt=".cpp" fileName="gui" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;gui.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			gui.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20283" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20283" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20205" parent_class="20205" fileExt=".cpp" fileName="audiolayer" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiolayer.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiolayer.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20261" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20261" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20358" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20358" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20214" parent_class="20214" fileExt=".cpp" fileName="voiplinkvector" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplinkvector.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkvector.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:41&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20238" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20238" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20241" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20241" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20288" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20288" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20295" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20295" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20215" parent_class="20215" fileExt=".cpp" fileName="callvector" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;callvector.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			callvector.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20266" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20266" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20276" field_type="3" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20276" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20216" parent_class="20216" fileExt=".cpp" fileName="codecdescriptorvector" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;codecdescriptorvector.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			codecdescriptorvector.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20250" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20250" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20254" field_type="3" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20254" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20331" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20331" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20237" parent_class="20237" fileExt=".cpp" fileName="sipvoiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipvoiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_24" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_25" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_26" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_27" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_28" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_29" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:17&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20238" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20238" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20291" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20291" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20312" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20312" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20315" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20315" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20324" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20324" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_24" canDelete="false" writeOutText="false" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20328" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20328" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_25" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_26" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_27" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_28" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_29" canDelete="false" writeOutText="false" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20253" parent_class="20253" fileExt=".cpp" fileName="codecdescriptor" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;codecdescriptor.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			codecdescriptor.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20254" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20254" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20275" parent_class="20275" fileExt=".cpp" fileName="call" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;call.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			call.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:39&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20276" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20276" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20288" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20288" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20291" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20291" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20305" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20305" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20294" parent_class="20294" fileExt=".cpp" fileName="voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:15&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20295" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20295" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20305" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20305" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20310" parent_class="20310" fileExt=".cpp" fileName="sipcallvector" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipcallvector.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipcallvector.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:37&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20312" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20312" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20315" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20315" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20318" field_type="3" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20318" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20311" parent_class="20311" fileExt=".cpp" fileName="sipcall" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipcall.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipcall.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:40&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20318" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20318" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20331" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20331" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20335" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20335" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20355" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20355" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20323" parent_class="20323" fileExt=".cpp" fileName="audiortp" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiortp.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiortp.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20324" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20324" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20355" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20355" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20358" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20358" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20327" parent_class="20327" fileExt=".cpp" fileName="eventthread" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;eventthread.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			eventthread.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20328" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20328" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="20334" parent_class="20334" fileExt=".cpp" fileName="audiocodec" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiocodec.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiocodec.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20335" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20335" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <codedocument writeOutCode="false" package="" id="Makefile_DOC" fileExt="" fileName="Makefile" >
+     <textblocks/>
+     <header>
+      <codecomment tag="" />
+     </header>
+    </codedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20201" parent_class="20201" fileExt=".h" fileName="managerimpl" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef MANAGERIMPL_H&amp;#010;#define MANAGERIMPL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20201" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ManagerImpl&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20230" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Error ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20233" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ToneGenerator ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20241" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" voIPLinkVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20250" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" CodecDescriptorVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20261" tag="tblock_4" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioLayer ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20266" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" CallVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20283" tag="tblock_6" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Gui ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ManagerImpl ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_25" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_26" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_27" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_28" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_29" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_30" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_31" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_32" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_33" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_34" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_35" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_36" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_37" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_38" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_39" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_40" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //MANAGERIMPL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			managerimpl.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:32&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20230" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20230" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Error ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20233" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20233" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ToneGenerator ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20241" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20241" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" voIPLinkVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20250" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20250" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" CodecDescriptorVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_25" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20261" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20261" tag="tblock_4" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioLayer ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_26" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_27" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_28" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_29" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_30" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20266" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20266" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" CallVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_31" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_32" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_33" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_34" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_35" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20283" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20283" tag="tblock_6" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Gui ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_36" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_37" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_38" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_39" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_40" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20202" parent_class="20202" fileExt=".h" fileName="tonegenerator" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TONEGENERATOR_H&amp;#010;#define TONEGENERATOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20202" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ToneGenerator&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20233" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ToneGenerator ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TONEGENERATOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tonegenerator.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20233" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20233" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20233" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20233" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20233" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20233" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20233" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20233" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20203" parent_class="20203" fileExt=".h" fileName="error" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ERROR_H&amp;#010;#define ERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20203" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Error&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20230" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Error ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			error.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20230" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20230" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20230" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20230" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20230" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20230" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20230" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20230" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20204" parent_class="20204" fileExt=".h" fileName="gui" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef GUI_H&amp;#010;#define GUI_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20204" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Gui&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20283" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Gui ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //GUI_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			gui.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20283" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20283" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20283" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20283" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20283" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20283" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20283" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20283" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20205" parent_class="20205" fileExt=".h" fileName="audiolayer" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOLAYER_H&amp;#010;#define AUDIOLAYER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20205" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioLayer&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20261" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20358" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioRtp ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioLayer ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOLAYER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiolayer.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20261" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20261" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20261" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20261" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20261" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20261" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20261" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20261" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20358" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20358" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioRtp ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20214" parent_class="20214" fileExt=".h" fileName="voiplinkvector" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINKVECTOR_H&amp;#010;#define VOIPLINKVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20214" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class voIPLinkVector&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20238" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipVoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20241" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20288" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Call ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20295" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="voIPLinkVector ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINKVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkvector.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:41&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20238" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20238" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20241" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20241" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20241" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20241" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20241" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20241" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20241" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20241" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20288" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20288" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Call ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20295" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20295" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20215" parent_class="20215" fileExt=".h" fileName="callvector" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CALLVECTOR_H&amp;#010;#define CALLVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &lt;vector>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20215" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class CallVector&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20266" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20276" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="CallVector ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CALLVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			callvector.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20266" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20266" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20266" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20266" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20266" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20266" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20266" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20266" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20276" field_type="3" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20276" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20216" parent_class="20216" fileExt=".h" fileName="codecdescriptorvector" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CODECDESCRIPTORVECTOR_H&amp;#010;#define CODECDESCRIPTORVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &lt;vector>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20216" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class CodecDescriptorVector&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20250" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20254" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20331" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCall ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="CodecDescriptorVector ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CODECDESCRIPTORVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			codecdescriptorvector.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20250" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20250" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" ManagerImpl ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20250" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20250" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20250" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20250" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20250" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20250" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20254" field_type="3" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20254" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20331" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20331" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCall ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20237" parent_class="20237" fileExt=".h" fileName="sipvoiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPVOIPLINK_H&amp;#010;#define SIPVOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20237" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipVoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20238" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" voIPLinkVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20291" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Call ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20312" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCallVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20315" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipCallVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20324" tag="tblock_4" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioRtp ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20328" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" EventThread ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipVoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_25" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_26" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_27" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_28" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_29" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_30" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_31" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_32" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_33" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_34" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPVOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:17&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20238" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20238" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" voIPLinkVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20238" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20238" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20238" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20238" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20238" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20238" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20291" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20291" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Call ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20312" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20312" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCallVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20315" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20315" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipCallVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20324" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20324" tag="tblock_4" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioRtp ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_25" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_26" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_27" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_28" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_29" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20328" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20328" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" EventThread ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_30" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_31" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_32" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_33" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_34" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20253" parent_class="20253" fileExt=".h" fileName="codecdescriptor" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CODECDESCRIPTOR_H&amp;#010;#define CODECDESCRIPTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20253" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class CodecDescriptor&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20254" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" CodecDescriptorVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="CodecDescriptor ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CODECDESCRIPTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			codecdescriptor.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20254" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20254" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" CodecDescriptorVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20254" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20254" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20254" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20254" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20254" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20254" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20275" parent_class="20275" fileExt=".h" fileName="call" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CALL_H&amp;#010;#define CALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20275" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Call&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20276" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" CallVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20288" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" voIPLinkVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20291" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipVoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20305" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Call ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			call.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:39&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20276" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20276" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" CallVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20276" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20276" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20276" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20276" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20276" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20276" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20288" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20288" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" voIPLinkVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20288" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20288" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20288" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20288" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20288" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20288" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20291" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20291" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20291" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20291" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20291" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20291" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20291" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20291" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20305" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20305" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20294" parent_class="20294" fileExt=".h" fileName="voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINK_H&amp;#010;#define VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20294" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20295" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" voIPLinkVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20305" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Call ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:15&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20295" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20295" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" voIPLinkVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20295" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20295" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20295" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20295" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20295" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20295" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20305" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20305" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Call ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20305" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20305" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20305" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20305" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20305" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20305" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20310" parent_class="20310" fileExt=".h" fileName="sipcallvector" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPCALLVECTOR_H&amp;#010;#define SIPCALLVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &lt;vector>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20310" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipCallVector&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20312" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipVoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20315" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20318" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipCallVector ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPCALLVECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipcallvector.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:37&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20312" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20312" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20312" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20312" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20312" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20312" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20312" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20312" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20315" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20315" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20315" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20315" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20315" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20315" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20315" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20315" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20318" field_type="3" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20318" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20311" parent_class="20311" fileExt=".h" fileName="sipcall" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPCALL_H&amp;#010;#define SIPCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20311" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipCall&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20318" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCallVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20331" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" CodecDescriptorVector ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20335" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioCodec ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20355" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioRtp ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipCall ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipcall.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:10:40&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20318" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20318" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCallVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20318" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20318" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20318" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20318" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20318" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20331" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20331" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" CodecDescriptorVector ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20331" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20331" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20331" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20331" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20331" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20331" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20335" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20335" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioCodec ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20355" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20355" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioRtp ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20323" parent_class="20323" fileExt=".h" fileName="audiortp" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIORTP_H&amp;#010;#define AUDIORTP_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20323" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioRtp&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20324" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20355" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipCall ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="20358" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioLayer ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioRtp ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIORTP_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiortp.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20324" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20324" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20324" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20324" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20324" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20324" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20324" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20324" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20355" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20355" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SipCall ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20355" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20355" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20355" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20355" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20355" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20355" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="20358" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20358" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" AudioLayer ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20358" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20358" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20358" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20358" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20358" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20358" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20327" parent_class="20327" fileExt=".h" fileName="eventthread" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef EVENTTHREAD_H&amp;#010;#define EVENTTHREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20327" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class EventThread&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20328" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="EventThread ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //EVENTTHREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			eventthread.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20328" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20328" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20328" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20328" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20328" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20328" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20328" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20328" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader20334" parent_class="20334" fileExt=".h" fileName="audiocodec" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOCODEC_H&amp;#010;#define AUDIOCODEC_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="20334" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioCodec&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="20335" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCall ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioCodec ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOCODEC_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiocodec.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 11:09:14&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="20335" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="20335" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipCall ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="20335" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="20335" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="20335" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="20335" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="20335" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="20335" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+   </codegenerator>
+  </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/doc/sflphone-minitone.xmi b/doc/sflphone-minitone.xmi
new file mode 100644
index 0000000000000000000000000000000000000000..169d33eb48a9aab4f98f0e65ecc34bb10807401d
--- /dev/null
+++ b/doc/sflphone-minitone.xmi
@@ -0,0 +1,2617 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2005-10-27T13:03:27" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.4.2</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" >
+   <UML:Namespace.ownedElement>
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="169" isRoot="false" isAbstract="false" name="datatype" />
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="225" isRoot="false" isAbstract="false" name="enum" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="168" isRoot="false" isAbstract="false" name="int" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="170" isRoot="false" isAbstract="false" name="char" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="171" isRoot="false" isAbstract="false" name="bool" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="172" isRoot="false" isAbstract="false" name="float" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="173" isRoot="false" isAbstract="false" name="double" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="174" isRoot="false" isAbstract="false" name="long" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="175" isRoot="false" isAbstract="false" name="short" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="176" isRoot="false" isAbstract="false" name="string" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="179" isRoot="false" isAbstract="false" name="void" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="184" isRoot="false" isAbstract="false" name="char*" />
+    <UML:DataType stereotype="169" isSpecification="false" isLeaf="false" visibility="public" xmi.id="196" isRoot="false" isAbstract="false" name="int16" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="197" isRoot="false" isAbstract="false" name="ToneList" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="201" isRoot="false" initialValue="" type="176" isAbstract="false" name="toneZone" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="357" isRoot="false" initialValue="" type="168" isAbstract="false" name="nbTone" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="367" isRoot="false" initialValue="" type="168" isAbstract="false" name="nbCountry" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="202" isRoot="false" isAbstract="false" name="getDefinition" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="424" type="176" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="203" isRoot="false" value="" type="168" isAbstract="false" name="countryId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="204" isRoot="false" value="" type="224" isAbstract="false" name="tone" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="398" isRoot="false" isAbstract="false" name="getCountryId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="425" type="168" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="407" isRoot="false" value="" type="176" isAbstract="false" name="countryName" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="198" isRoot="false" isAbstract="false" name="TelephoneTone" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="318" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="240" isRoot="false" initialValue="" type="224" isAbstract="false" name="currentTone" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="262" isRoot="false" initialValue="" type="199" isAbstract="false" name="toneList" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="218" isRoot="false" isAbstract="false" name="TelephoneTone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="219" isRoot="false" value="" type="176" isAbstract="false" name="country" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="227" isRoot="false" isAbstract="false" name="getCurrentTone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="426" type="224" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="230" isRoot="false" isAbstract="false" name="setCurrentTone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="231" isRoot="false" value="" type="224" isAbstract="false" name="toneid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="199" isRoot="false" isAbstract="false" name="Tone" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="269" isRoot="false" initialValue="" type="196" isAbstract="false" name="buffer" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="272" isRoot="false" initialValue="" type="168" isAbstract="false" name="size" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="275" isRoot="false" initialValue="" type="168" isAbstract="false" name="pos" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="280" isRoot="false" isAbstract="false" name="genSin" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="288" isRoot="false" value="" type="168" isAbstract="false" name="f1" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="291" isRoot="false" value="" type="168" isAbstract="false" name="f2" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="294" isRoot="false" isAbstract="false" name="genBuffer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="295" isRoot="false" value="" type="176" isAbstract="false" name="definition" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="300" isRoot="false" isAbstract="false" name="getNext" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="427" type="168" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="304" isRoot="false" value="" type="196" isAbstract="false" name="output" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="308" isRoot="false" value="" type="168" isAbstract="false" name="size" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Enumeration stereotype="225" isSpecification="false" isLeaf="false" visibility="public" xmi.id="224" isRoot="false" isAbstract="false" name="TONEID" />
+    <UML:Generalization isSpecification="false" child="198" visibility="public" xmi.id="318" parent="197" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="330" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="331" aggregation="shared" type="198" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="332" aggregation="none" type="197" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="339" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="340" aggregation="shared" type="198" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="341" aggregation="none" type="199" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+   </UML:Namespace.ownedElement>
+  </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+  <docsettings viewid="167" documentation="" uniqueid="427" />
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="81" showgrid="0" showopsig="0" usefillcolor="1" snapx="10" canvaswidth="559" snapy="10" showatts="1" xmi.id="167" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="900000" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="664" >
+    <widgets>
+     <datatypewidget usesdiagramfillcolour="1" width="76" usesdiagramusefillcolour="1" x="16" linecolour="none" y="10" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="34" usefillcolor="1" isinstance="0" xmi.id="196" font="Sans,10,-1,5,75,1,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="340" showattsigs="601" usesdiagramusefillcolour="0" x="13" linecolour="#ff0000" y="100" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="102" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="197" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="144" showattsigs="601" usesdiagramusefillcolour="0" x="411" linecolour="#ff0000" y="92" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="102" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="198" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="90" showattsigs="601" usesdiagramusefillcolour="0" x="438" linecolour="#ff0000" y="273" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="119" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="199" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <enumwidget usesdiagramfillcolour="1" width="73" usesdiagramusefillcolour="1" x="107" linecolour="none" y="11" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="42" usefillcolor="1" isinstance="0" xmi.id="224" showpackage="0" font="Sans,10,-1,5,50,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="197" widgetaid="198" xmi.id="330" >
+      <linepath>
+       <startpoint startx="411" starty="143" />
+       <endpoint endx="353" endy="151" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="199" widgetaid="198" xmi.id="339" >
+      <linepath>
+       <startpoint startx="483" starty="194" />
+       <endpoint endx="483" endy="273" />
+      </linepath>
+     </assocwidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" label="Views" >
+    <listitem open="1" type="801" label="Logical View" >
+     <listitem open="1" type="813" id="198" >
+      <listitem open="0" type="814" id="240" />
+      <listitem open="0" type="814" id="262" />
+      <listitem open="0" type="815" id="218" />
+      <listitem open="0" type="815" id="227" />
+      <listitem open="0" type="815" id="230" />
+     </listitem>
+     <listitem open="1" type="813" id="199" >
+      <listitem open="0" type="814" id="269" />
+      <listitem open="0" type="814" id="272" />
+      <listitem open="0" type="814" id="275" />
+      <listitem open="0" type="815" id="280" />
+      <listitem open="0" type="815" id="294" />
+      <listitem open="0" type="815" id="300" />
+     </listitem>
+     <listitem open="1" type="813" id="197" >
+      <listitem open="0" type="814" id="201" />
+      <listitem open="0" type="814" id="357" />
+      <listitem open="0" type="814" id="367" />
+      <listitem open="0" type="815" id="202" />
+      <listitem open="0" type="815" id="398" />
+     </listitem>
+     <listitem open="1" type="830" label="Datatypes" >
+      <listitem open="1" type="829" id="171" />
+      <listitem open="1" type="829" id="170" />
+      <listitem open="1" type="829" id="184" />
+      <listitem open="1" type="829" id="173" />
+      <listitem open="1" type="829" id="172" />
+      <listitem open="1" type="829" id="168" />
+      <listitem open="1" type="829" id="196" />
+      <listitem open="1" type="829" id="174" />
+      <listitem open="1" type="829" id="175" />
+      <listitem open="1" type="829" id="176" />
+      <listitem open="1" type="829" id="179" />
+     </listitem>
+     <listitem open="1" type="831" id="224" />
+    </listitem>
+    <listitem open="1" type="802" label="Use Case View" />
+    <listitem open="1" type="821" label="Component View" />
+    <listitem open="1" type="827" label="Deployment View" />
+    <listitem open="1" type="836" label="Entity Relationship Model" />
+   </listitem>
+  </listview>
+  <codegeneration>
+   <codegenerator language="Cpp" >
+    <codedocument writeOutCode="false" package="" id="Makefile_DOC" fileExt="" fileName="Makefile" >
+     <textblocks/>
+     <header>
+      <codecomment tag="" />
+     </header>
+    </codedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="196" parent_class="196" fileExt=".cpp" fileName="int16" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;int16.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int16.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:36:37&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="197" parent_class="197" fileExt=".cpp" fileName="tonelist" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tonelist.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="201" tag="hblock_tag_0" canDelete="false" classfield_id="201" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="201" tag="hblock_tag_1" canDelete="false" classfield_id="201" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="202" tag="operation_202" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="357" tag="hblock_tag_7" canDelete="false" classfield_id="357" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="357" tag="hblock_tag_8" canDelete="false" classfield_id="357" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="367" tag="hblock_tag_9" canDelete="false" classfield_id="367" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="367" tag="hblock_tag_10" canDelete="false" classfield_id="367" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="398" tag="operation_398" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tonelist.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 10:00:43&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="201" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="201" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="201" tag="hblock_tag_0" canDelete="false" classfield_id="201" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="201" tag="hblock_tag_1" canDelete="false" classfield_id="201" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="318" field_type="17" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="330" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="330" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="357" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="357" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="357" tag="hblock_tag_7" canDelete="false" classfield_id="357" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="357" tag="hblock_tag_8" canDelete="false" classfield_id="357" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="367" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="367" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="367" tag="hblock_tag_9" canDelete="false" classfield_id="367" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="367" tag="hblock_tag_10" canDelete="false" classfield_id="367" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="198" parent_class="198" fileExt=".cpp" fileName="telephonetone" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;telephonetone.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="218" tag="operation_218" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="227" tag="operation_227" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="230" tag="operation_230" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="240" tag="hblock_tag_0" canDelete="false" classfield_id="240" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="240" tag="hblock_tag_1" canDelete="false" classfield_id="240" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="262" tag="hblock_tag_2" canDelete="false" classfield_id="262" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="262" tag="hblock_tag_3" canDelete="false" classfield_id="262" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			telephonetone.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:54:26&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="240" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="240" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="240" tag="hblock_tag_0" canDelete="false" classfield_id="240" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="240" tag="hblock_tag_1" canDelete="false" classfield_id="240" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="262" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="262" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="262" tag="hblock_tag_2" canDelete="false" classfield_id="262" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="262" tag="hblock_tag_3" canDelete="false" classfield_id="262" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="318" field_type="48" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="318" tag="" canDelete="false" writeOutText="false" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="330" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="330" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="339" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="339" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="199" parent_class="199" fileExt=".cpp" fileName="tone" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tone.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="269" tag="hblock_tag_0" canDelete="false" classfield_id="269" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="269" tag="hblock_tag_1" canDelete="false" classfield_id="269" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="272" tag="hblock_tag_2" canDelete="false" classfield_id="272" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="272" tag="hblock_tag_3" canDelete="false" classfield_id="272" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="275" tag="hblock_tag_4" canDelete="false" classfield_id="275" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="275" tag="hblock_tag_5" canDelete="false" classfield_id="275" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="280" tag="operation_280" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="294" tag="operation_294" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="300" tag="operation_300" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tone.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:54:31&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="269" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="269" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="269" tag="hblock_tag_0" canDelete="false" classfield_id="269" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="269" tag="hblock_tag_1" canDelete="false" classfield_id="269" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="272" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="272" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="272" tag="hblock_tag_2" canDelete="false" classfield_id="272" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="272" tag="hblock_tag_3" canDelete="false" classfield_id="272" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="275" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="275" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="275" tag="hblock_tag_4" canDelete="false" classfield_id="275" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="275" tag="hblock_tag_5" canDelete="false" classfield_id="275" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="339" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="339" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="224" parent_class="224" fileExt=".cpp" fileName="toneid" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;toneid.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			toneid.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:47:29&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader196" parent_class="196" fileExt=".h" fileName="int16" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef INT16_H&amp;#010;#define INT16_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="196" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class int16&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="int16 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //INT16_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int16.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:36:37&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader197" parent_class="197" fileExt=".h" fileName="tonelist" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TONELIST_H&amp;#010;#define TONELIST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;toneid.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="197" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ToneList&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="330" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TelephoneTone ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ToneList ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="202" tag="operation_202" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param countryId &amp;#010;@param tone " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="398" tag="operation_398" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param countryName " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="201" tag="tblock_0" canDelete="false" indentLevel="1" text=" string toneZone;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="357" tag="tblock_8" canDelete="false" indentLevel="1" text=" int nbTone;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="367" tag="tblock_11" canDelete="false" indentLevel="1" text=" int nbCountry;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="201" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="201" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="201" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="201" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="357" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="357" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="357" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="357" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="367" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="367" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="367" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="367" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TONELIST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tonelist.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 10:00:43&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="201" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="201" tag="tblock_0" canDelete="false" indentLevel="1" text=" string toneZone;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="201" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="201" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="201" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="201" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="318" field_type="17" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TelephoneTone ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="330" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="330" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TelephoneTone ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="357" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="357" tag="tblock_8" canDelete="false" indentLevel="1" text=" int nbTone;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="357" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="357" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="357" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="357" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="367" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="367" tag="tblock_11" canDelete="false" indentLevel="1" text=" int nbCountry;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="367" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="367" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="367" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="367" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader198" parent_class="198" fileExt=".h" fileName="telephonetone" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TELEPHONETONE_H&amp;#010;#define TELEPHONETONE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;toneid.h&quot;&amp;#010;#include &quot;tone.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="198" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TelephoneTone&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="330" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ToneList ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="339" tag="tblock_11" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Tone ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TelTone ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="218" tag="operation_218" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param country " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="227" tag="operation_227" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="230" tag="operation_230" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param toneid " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="240" tag="tblock_0" canDelete="false" indentLevel="1" text=" TONEID currentTone;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="262" tag="tblock_2" canDelete="false" indentLevel="1" text=" Tone toneList;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="240" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="240" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="240" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="240" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="262" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="262" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="262" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="262" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TELEPHONETONE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			telephonetone.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:54:26&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="240" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="240" tag="tblock_0" canDelete="false" indentLevel="1" text=" TONEID currentTone;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="240" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="240" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="240" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="240" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="262" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="262" tag="tblock_2" canDelete="false" indentLevel="1" text=" Tone toneList;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="262" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="262" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="262" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="262" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="318" field_type="6684777" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ToneList ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="318" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="318" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="330" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="330" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ToneList ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="330" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="330" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="330" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="330" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="330" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="330" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="339" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="339" tag="tblock_11" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Tone ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader199" parent_class="199" fileExt=".h" fileName="tone" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TONE_H&amp;#010;#define TONE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="199" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Tone&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="339" tag="tblock_8" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TelephoneTone ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Tone ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="280" tag="operation_280" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param f1 &amp;#010;@param f2 " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="294" tag="operation_294" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param definition " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="300" tag="operation_300" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param output &amp;#010;@param size " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="269" tag="tblock_0" canDelete="false" indentLevel="1" text=" int16 buffer;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="272" tag="tblock_2" canDelete="false" indentLevel="1" text=" int size;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="275" tag="tblock_5" canDelete="false" indentLevel="1" text=" int pos;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="269" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="269" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="269" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="269" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="272" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="272" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="272" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="272" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="275" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="275" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="275" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="275" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TONE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tone.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:54:31&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="269" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="269" tag="tblock_0" canDelete="false" indentLevel="1" text=" int16 buffer;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="269" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="269" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="269" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="269" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="272" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="272" tag="tblock_2" canDelete="false" indentLevel="1" text=" int size;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="272" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="272" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="272" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="272" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="275" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="275" tag="tblock_5" canDelete="false" indentLevel="1" text=" int pos;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="275" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="275" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="275" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="275" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="339" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="339" tag="tblock_8" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TelephoneTone ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="339" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="339" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="339" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="339" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="339" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="339" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader224" parent_class="224" fileExt=".h" fileName="toneid" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TONEID_H&amp;#010;#define TONEID_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="224" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TONEID&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TONEID ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TONEID_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			toneid.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Oct 26 2005 at 09:47:29&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+   </codegenerator>
+  </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/doc/sflphone-server.xmi b/doc/sflphone-server.xmi
new file mode 100644
index 0000000000000000000000000000000000000000..ad1b52fd183d46c1bc3788341804866b064cf595
--- /dev/null
+++ b/doc/sflphone-server.xmi
@@ -0,0 +1,35642 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2005-09-21T17:39:21" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.4.2</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" >
+   <UML:Namespace.ownedElement>
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="2469" isRoot="false" isAbstract="false" name="datatype" />
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="8373" isRoot="false" isAbstract="false" name="enum" />
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="8442" isRoot="false" isAbstract="false" name="typedef" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2468" isRoot="false" isAbstract="false" name="int" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2470" isRoot="false" isAbstract="false" name="char" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2471" isRoot="false" isAbstract="false" name="bool" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2472" isRoot="false" isAbstract="false" name="float" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2473" isRoot="false" isAbstract="false" name="double" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2474" isRoot="false" isAbstract="false" name="long" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2475" isRoot="false" isAbstract="false" name="short" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2476" isRoot="false" isAbstract="false" name="string" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2479" isRoot="false" isAbstract="false" name="void" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2493" isRoot="false" isAbstract="false" name="const std::string&amp;" elementReference="2492" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2551" isRoot="false" isAbstract="false" name="GUIServer*" elementReference="2544" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2658" isRoot="false" isAbstract="false" name="Request*" elementReference="2545" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2660" isRoot="false" isAbstract="false" name="RequestCreatorBase*" elementReference="2654" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2680" isRoot="false" isAbstract="false" name="std::map&lt; std :: string, RequestCreatorBase * >" elementReference="2679" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2691" isRoot="false" isAbstract="false" name="ost::TCPSocket&amp;" elementReference="2690" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2746" isRoot="false" isAbstract="false" name="ost::TCPSession*" elementReference="2685" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2750" isRoot="false" isAbstract="false" name="std::list&lt; Request * >" elementReference="2749" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2753" isRoot="false" isAbstract="false" name="RequestFactory*" elementReference="2670" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8369" isRoot="false" isAbstract="false" name="const char*" elementReference="2470" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8382" isRoot="false" isAbstract="false" name="VoIPLink*" elementReference="8377" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8466" isRoot="false" isAbstract="false" name="std::vector&lt; Call * >" elementReference="8465" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8467" isRoot="false" isAbstract="false" name="CallVector" elementReference="8466" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8468" isRoot="false" isAbstract="false" name="std::vector&lt; VoIPLink * >" elementReference="8465" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8469" isRoot="false" isAbstract="false" name="VoIPLinkVector" elementReference="8468" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8470" isRoot="false" isAbstract="false" name="std::vector&lt; CodecDescriptor * >" elementReference="8465" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8471" isRoot="false" isAbstract="false" name="CodecDescriptorVector" elementReference="19368" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8481" isRoot="false" isAbstract="false" name="GuiFramework*" elementReference="2477" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8484" isRoot="false" isAbstract="false" name="ToneGenerator*" elementReference="8464" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8486" isRoot="false" isAbstract="false" name="Error*" elementReference="8463" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8488" isRoot="false" isAbstract="false" name="AudioLayer*" elementReference="8461" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8497" isRoot="false" isAbstract="false" name="CallVector*" elementReference="8467" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8500" isRoot="false" isAbstract="false" name="Call*" elementReference="8378" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8505" isRoot="false" isAbstract="false" name="VoIPLinkVector*" elementReference="8469" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8507" isRoot="false" isAbstract="false" name="CodecDescriptorVector*" elementReference="8471" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8580" isRoot="false" isAbstract="false" name="StunAddress4&amp;" elementReference="8449" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17634" isRoot="false" isAbstract="false" name="SipCall*" elementReference="17623" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17640" isRoot="false" isAbstract="false" name="ost::Time*" elementReference="17639" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17646" isRoot="false" isAbstract="false" name="ost::RTPSession*" elementReference="17645" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17650" isRoot="false" isAbstract="false" name="ost::SymmetricRTPSession*" elementReference="17649" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17656" isRoot="false" isAbstract="false" name="unsigned char*" elementReference="17655" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17659" isRoot="false" isAbstract="false" name="int16*" elementReference="17658" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17668" isRoot="false" isAbstract="false" name="int&amp;" elementReference="2468" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17677" isRoot="false" isAbstract="false" name="AudioRtpRTX*" elementReference="17624" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17699" isRoot="false" isAbstract="false" name="const string&amp;" elementReference="2476" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17723" isRoot="false" isAbstract="false" name="AudioCodec*" elementReference="17683" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17747" isRoot="false" isAbstract="false" name="vector&lt; CodecDescriptor * >" elementReference="17746" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17819" isRoot="false" isAbstract="false" name="eXosip_event_t*" elementReference="17818" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17829" isRoot="false" isAbstract="false" name="osip_message_t*" elementReference="17828" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17834" isRoot="false" isAbstract="false" name="sdp_message_t*" elementReference="17833" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17838" isRoot="false" isAbstract="false" name="EventThread*" elementReference="17745" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17840" isRoot="false" isAbstract="false" name="std::vector&lt; SipCall * >" elementReference="8465" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19368" isRoot="false" isAbstract="false" name="vector&lt; CodecDescriptor *, allocator &lt; CodecDescriptor * > >" elementReference="17746" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19402" isRoot="false" isAbstract="false" name="char*" elementReference="2470" />
+    <UML:DataType stereotype="2469" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19419" isRoot="false" isAbstract="false" name="sdp_media_t*" elementReference="19418" />
+    <UML:Class comment=" Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ Author: Laurielle Lea &lt;laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2477" isRoot="false" isAbstract="false" name="GuiFramework" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="protected" xmi.id="2543" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_message" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2478" isRoot="false" isAbstract="false" name="GuiFramework" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2480" isRoot="false" isAbstract="false" name="~ GuiFramework" />
+      <UML:Operation comment="Parent class to child class" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2481" isRoot="false" isAbstract="true" name="incomingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19808" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2482" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2483" isRoot="false" isAbstract="true" name="peerAnsweredCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2484" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2485" isRoot="false" isAbstract="true" name="peerRingingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19809" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2486" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2487" isRoot="false" isAbstract="true" name="peerHungupCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19810" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2488" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2489" isRoot="false" isAbstract="true" name="displayTextMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2490" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2494" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2495" isRoot="false" isAbstract="true" name="displayErrorText" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2496" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2497" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2498" isRoot="false" isAbstract="true" name="displayError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2499" isRoot="false" value="" type="2493" isAbstract="false" name="error" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2500" isRoot="false" isAbstract="true" name="displayStatus" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2501" isRoot="false" value="" type="2493" isAbstract="false" name="status" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2502" isRoot="false" isAbstract="true" name="displayContext" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2503" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2504" isRoot="false" isAbstract="true" name="getRingtoneFile" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19811" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2505" isRoot="false" isAbstract="true" name="setup" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2506" isRoot="false" isAbstract="true" name="selectedCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19812" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2507" isRoot="false" isAbstract="true" name="isCurrentId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19813" type="2471" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2508" isRoot="false" value="" type="2475" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2509" isRoot="false" isAbstract="true" name="startVoiceMessageNotification" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2510" isRoot="false" isAbstract="true" name="stopVoiceMessageNotification" />
+      <UML:Operation comment="Child class to parent class" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2511" isRoot="false" isAbstract="false" name="outgoingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19814" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2512" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2513" isRoot="false" isAbstract="false" name="hangupCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19815" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2514" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2515" isRoot="false" isAbstract="false" name="cancelCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19816" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2516" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2517" isRoot="false" isAbstract="false" name="answerCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19817" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2518" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2519" isRoot="false" isAbstract="false" name="onHoldCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19818" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2520" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2521" isRoot="false" isAbstract="false" name="offHoldCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19819" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2522" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2523" isRoot="false" isAbstract="false" name="transferCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19820" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2524" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2525" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2526" isRoot="false" isAbstract="false" name="muteOn" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2527" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2528" isRoot="false" isAbstract="false" name="muteOff" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2529" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2530" isRoot="false" isAbstract="false" name="refuseCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19821" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2531" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2532" isRoot="false" isAbstract="false" name="saveConfig" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19822" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2533" isRoot="false" isAbstract="false" name="registerVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19823" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2534" isRoot="false" isAbstract="false" name="unregisterVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19824" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2535" isRoot="false" isAbstract="false" name="quitApplication" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19825" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2536" isRoot="false" isAbstract="false" name="sendTextMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19826" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2537" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2538" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2539" isRoot="false" isAbstract="false" name="accessToDirectory" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19827" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2540" isRoot="false" isAbstract="false" name="sendDtmf" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2541" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2542" isRoot="false" value="" type="2470" isAbstract="false" name="code" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Package isSpecification="false" isLeaf="false" visibility="public" xmi.id="2491" isRoot="false" isAbstract="false" name="std" >
+     <UML:Namespace.ownedElement>
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2492" isRoot="false" isAbstract="false" name="string" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2679" isRoot="false" isAbstract="false" name="map" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2749" isRoot="false" isAbstract="false" name="list" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8465" isRoot="false" isAbstract="false" name="vector" />
+     </UML:Namespace.ownedElement>
+    </UML:Package>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2544" isRoot="false" isAbstract="false" name="GUIServer" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2705" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2747" isRoot="false" initialValue="" type="2746" isAbstract="false" name="sessionIn" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2748" isRoot="false" initialValue="" type="2746" isAbstract="false" name="sessionOut" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2751" isRoot="false" initialValue="" type="2750" isAbstract="false" name="_requests" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2752" isRoot="false" initialValue="" type="2749" isAbstract="false" name="_responses" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2754" isRoot="false" initialValue="" type="2753" isAbstract="false" name="_factory" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2756" isRoot="false" initialValue="" type="2755" isAbstract="false" name="_mutex" />
+      <UML:Operation comment="// GUIServer constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2708" isRoot="false" isAbstract="false" name="GUIServer" />
+      <UML:Operation comment="// GUIServer destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2709" isRoot="false" isAbstract="false" name="~ GUIServer" />
+      <UML:Operation comment="// exec loop" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2710" isRoot="false" isAbstract="false" name="exec" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19828" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2711" isRoot="false" isAbstract="false" name="pushRequestMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2712" isRoot="false" value="" type="2493" isAbstract="false" name="request" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2713" isRoot="false" isAbstract="false" name="popRequest" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19829" type="2658" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2714" isRoot="false" isAbstract="false" name="pushResponseMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2715" isRoot="false" value="" type="2493" isAbstract="false" name="response" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2716" isRoot="false" isAbstract="false" name="popResponseMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19830" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Reimplementation of virtual functions" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2717" isRoot="false" isAbstract="false" name="incomingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19831" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2718" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2719" isRoot="false" isAbstract="false" name="peerAnsweredCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2720" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2721" isRoot="false" isAbstract="false" name="peerRingingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19832" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2722" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2723" isRoot="false" isAbstract="false" name="peerHungupCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19833" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2724" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2725" isRoot="false" isAbstract="false" name="displayTextMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2726" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2727" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2728" isRoot="false" isAbstract="false" name="displayErrorText" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2729" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2730" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2731" isRoot="false" isAbstract="false" name="displayError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2732" isRoot="false" value="" type="2493" isAbstract="false" name="error" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2733" isRoot="false" isAbstract="false" name="displayStatus" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2734" isRoot="false" value="" type="2493" isAbstract="false" name="status" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2735" isRoot="false" isAbstract="false" name="displayContext" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2736" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2737" isRoot="false" isAbstract="false" name="getRingtoneFile" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19834" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2738" isRoot="false" isAbstract="false" name="setup" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2739" isRoot="false" isAbstract="false" name="selectedCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19835" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2740" isRoot="false" isAbstract="false" name="isCurrentId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19836" type="2471" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2741" isRoot="false" value="" type="2475" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2742" isRoot="false" isAbstract="false" name="startVoiceMessageNotification" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2743" isRoot="false" isAbstract="false" name="stopVoiceMessageNotification" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2744" isRoot="false" isAbstract="false" name="outgoingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19837" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2745" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2545" isRoot="false" isAbstract="false" name="Request" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="protected" xmi.id="2556" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_sequenceId" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="protected" xmi.id="2557" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_arg" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2546" isRoot="false" isAbstract="false" name="Request" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2547" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2548" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2549" isRoot="false" isAbstract="false" name="~ Request" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2550" isRoot="false" isAbstract="false" name="execute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19838" type="2492" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2552" isRoot="false" value="" type="2551" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2553" isRoot="false" isAbstract="false" name="message" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19839" type="2492" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2554" isRoot="false" value="" type="2493" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2555" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2558" isRoot="false" isAbstract="false" name="RequestGlobalCall" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2559" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="protected" xmi.id="2566" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_callid" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2562" isRoot="false" isAbstract="false" name="RequestGlobalCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2563" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2564" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2565" isRoot="false" isAbstract="false" name="~ RequestGlobalCall" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2567" isRoot="false" isAbstract="false" name="RequestCall" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2568" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2576" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_destination" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2577" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_account" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2571" isRoot="false" isAbstract="false" name="RequestCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2572" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2573" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2574" isRoot="false" isAbstract="false" name="execute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19840" type="2492" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2575" isRoot="false" value="" type="2551" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2578" isRoot="false" isAbstract="false" name="RequestAnswer" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2579" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2582" isRoot="false" isAbstract="false" name="RequestAnswer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2583" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2584" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2585" isRoot="false" isAbstract="false" name="RequestRefuse" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2586" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2589" isRoot="false" isAbstract="false" name="RequestRefuse" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2590" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2591" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2592" isRoot="false" isAbstract="false" name="RequestHold" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2593" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2596" isRoot="false" isAbstract="false" name="RequestHold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2597" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2598" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2599" isRoot="false" isAbstract="false" name="RequestUnhold" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2600" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2603" isRoot="false" isAbstract="false" name="RequestUnhold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2604" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2605" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2606" isRoot="false" isAbstract="false" name="RequestTransfer" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2607" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2610" isRoot="false" isAbstract="false" name="RequestTransfer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2611" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2612" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2613" isRoot="false" isAbstract="false" name="RequestGlobal" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2614" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2617" isRoot="false" isAbstract="false" name="RequestGlobal" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2618" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2619" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2620" isRoot="false" isAbstract="false" name="~ RequestGlobal" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2621" isRoot="false" isAbstract="false" name="execute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19841" type="2492" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2622" isRoot="false" value="" type="2551" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2623" isRoot="false" isAbstract="false" name="RequestMute" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2624" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2627" isRoot="false" isAbstract="false" name="RequestMute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2628" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2629" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2630" isRoot="false" isAbstract="false" name="RequestUnmute" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2631" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2634" isRoot="false" isAbstract="false" name="RequestUnmute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2635" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2636" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2637" isRoot="false" isAbstract="false" name="RequestQuit" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2638" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2641" isRoot="false" isAbstract="false" name="RequestQuit" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2642" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2643" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2644" isRoot="false" isAbstract="false" name="RequestSyntaxError" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2645" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2648" isRoot="false" isAbstract="false" name="RequestSyntaxError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2649" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2650" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2651" isRoot="false" isAbstract="false" name="~ RequestSyntaxError" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2652" isRoot="false" isAbstract="false" name="execute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19842" type="2492" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2653" isRoot="false" value="" type="2551" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2654" isRoot="false" isAbstract="false" name="RequestCreatorBase" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2655" isRoot="false" isAbstract="true" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19843" type="2658" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2656" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2657" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2659" isRoot="false" isAbstract="true" name="clone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19844" type="2660" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2661" isRoot="false" isAbstract="false" name="RequestCreator" >
+     <UML:ModelElement.templateParameter>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="2662" isRoot="false" isAbstract="false" name="T" />
+     </UML:ModelElement.templateParameter>
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2663" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2666" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19845" type="2658" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2667" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2668" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2669" isRoot="false" isAbstract="false" name="clone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19846" type="2660" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+     <UML:Namespace.ownedElement>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="2662" isRoot="false" isAbstract="false" name="T" />
+     </UML:Namespace.ownedElement>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2670" isRoot="false" isAbstract="false" name="RequestFactory" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2681" isRoot="false" initialValue="" type="2680" isAbstract="false" name="mRequests" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2671" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19847" type="2658" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2672" isRoot="false" value="" type="2493" isAbstract="false" name="requestLine" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2673" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19848" type="2658" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2674" isRoot="false" value="" type="2493" isAbstract="false" name="requestname" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2675" isRoot="false" value="" type="2493" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2676" isRoot="false" value="" type="2493" isAbstract="false" name="arg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2677" isRoot="false" isAbstract="false" name="registerRequest" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2678" isRoot="false" value="" type="2493" isAbstract="false" name="requestname" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2682" isRoot="false" isAbstract="false" name="TCPSessionReader" >
+     <UML:ModelElement.templateParameter>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="2683" isRoot="false" isAbstract="false" name="T" />
+     </UML:ModelElement.templateParameter>
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2686" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2695" isRoot="false" initialValue="" type="2551" isAbstract="false" name="_gui" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2689" isRoot="false" isAbstract="false" name="TCPSessionReader" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2692" isRoot="false" value="" type="2691" isAbstract="false" name="server" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2693" isRoot="false" value="" type="2551" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2694" isRoot="false" isAbstract="false" name="run" />
+     </UML:Classifier.feature>
+     <UML:Namespace.ownedElement>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="2683" isRoot="false" isAbstract="false" name="T" />
+     </UML:Namespace.ownedElement>
+    </UML:Class>
+    <UML:Package isSpecification="false" isLeaf="false" visibility="public" xmi.id="2684" isRoot="false" isAbstract="false" name="ost" >
+     <UML:Namespace.ownedElement>
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2685" isRoot="false" isAbstract="false" name="TCPSession" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2690" isRoot="false" isAbstract="false" name="TCPSocket" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2755" isRoot="false" isAbstract="false" name="Mutex" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17625" isRoot="false" isAbstract="false" name="Thread" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17629" isRoot="false" isAbstract="false" name="TimerPort" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17639" isRoot="false" isAbstract="false" name="Time" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17645" isRoot="false" isAbstract="false" name="RTPSession" />
+      <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17649" isRoot="false" isAbstract="false" name="SymmetricRTPSession" />
+     </UML:Namespace.ownedElement>
+    </UML:Package>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2696" isRoot="false" isAbstract="false" name="TCPSessionWriter" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="2697" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2704" isRoot="false" initialValue="" type="2551" isAbstract="false" name="_gui" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2700" isRoot="false" isAbstract="false" name="TCPSessionWriter" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2701" isRoot="false" value="" type="2691" isAbstract="false" name="server" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2702" isRoot="false" value="" type="2551" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2703" isRoot="false" isAbstract="false" name="run" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class comment=" Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ Author:  Jean-Philippe Barrette-LaPierre 
+             &lt;jean-philippe.barrette-lapierre@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA." isSpecification="false" isLeaf="false" visibility="public" xmi.id="8368" isRoot="false" isAbstract="false" name="AudioDevice" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="8370" isRoot="false" initialValue="" type="8369" isAbstract="false" name="hostApiName" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="8371" isRoot="false" initialValue="" type="8369" isAbstract="false" name="deviceName" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Enumeration stereotype="8373" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8372" isRoot="false" isAbstract="false" name="CallType" >
+     <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" xmi.id="8374" isRoot="false" isAbstract="false" name="Null" />
+     <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" xmi.id="8375" isRoot="false" isAbstract="false" name="Incoming" />
+     <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" xmi.id="8376" isRoot="false" isAbstract="false" name="Outgoing" />
+    </UML:Enumeration>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8377" isRoot="false" isAbstract="false" name="VoIPLink" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17740" isRoot="false" initialValue="" type="2475" isAbstract="false" name="_id" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17741" isRoot="false" initialValue="" type="17680" isAbstract="false" name="_type" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17742" isRoot="false" initialValue="" type="2476" isAbstract="false" name="_fullname" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17743" isRoot="false" initialValue="" type="2476" isAbstract="false" name="_hostname" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17744" isRoot="false" initialValue="" type="2476" isAbstract="false" name="_localIpAddress" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17684" isRoot="false" isAbstract="false" name="VoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17685" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17686" isRoot="false" isAbstract="false" name="~ VoIPLink" />
+      <UML:Operation comment="// Pure virtual functions" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17687" isRoot="false" isAbstract="true" name="getEvent" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19849" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17688" isRoot="false" isAbstract="true" name="init" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19850" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17689" isRoot="false" isAbstract="true" name="checkNetwork" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19851" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17690" isRoot="false" isAbstract="true" name="terminate" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17691" isRoot="false" isAbstract="true" name="newOutgoingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17692" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17693" isRoot="false" isAbstract="true" name="newIncomingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17694" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17695" isRoot="false" isAbstract="true" name="deleteSipCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17696" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17697" isRoot="false" isAbstract="true" name="outgoingInvite" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19852" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17698" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17700" isRoot="false" value="" type="17699" isAbstract="false" name="to_url" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17701" isRoot="false" isAbstract="true" name="answer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19853" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17702" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17703" isRoot="false" isAbstract="true" name="hangup" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19854" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17704" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17705" isRoot="false" isAbstract="true" name="cancel" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19855" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17706" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17707" isRoot="false" isAbstract="true" name="onhold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19856" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17708" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17709" isRoot="false" isAbstract="true" name="offhold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19857" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17710" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17711" isRoot="false" isAbstract="true" name="transfer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19858" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17712" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17713" isRoot="false" value="" type="17699" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17714" isRoot="false" isAbstract="true" name="refuse" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19859" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17715" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17716" isRoot="false" isAbstract="true" name="setRegister" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19860" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17717" isRoot="false" isAbstract="true" name="setUnregister" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19861" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17718" isRoot="false" isAbstract="true" name="carryingDTMFdigits" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17719" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17720" isRoot="false" value="" type="2470" isAbstract="false" name="code" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17721" isRoot="false" isAbstract="true" name="getAudioCodec" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19862" type="17723" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17722" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17724" isRoot="false" isAbstract="false" name="setId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17725" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17726" isRoot="false" isAbstract="false" name="getId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19863" type="2475" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17727" isRoot="false" isAbstract="false" name="setType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17728" isRoot="false" value="" type="17680" isAbstract="false" name="type" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17729" isRoot="false" isAbstract="false" name="getType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19864" type="17680" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17730" isRoot="false" isAbstract="false" name="setFullName" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17731" isRoot="false" value="" type="17699" isAbstract="false" name="fullname" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17732" isRoot="false" isAbstract="false" name="getFullName" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19865" type="2476" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17733" isRoot="false" isAbstract="false" name="setHostName" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17734" isRoot="false" value="" type="17699" isAbstract="false" name="hostname" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17735" isRoot="false" isAbstract="false" name="getHostName" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19866" type="2476" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17736" isRoot="false" isAbstract="false" name="setLocalIpAddress" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17737" isRoot="false" value="" type="17699" isAbstract="false" name="ipAdress" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17738" isRoot="false" isAbstract="false" name="getLocalIpAddress" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19867" type="2476" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="17739" isRoot="false" isAbstract="false" name="initConstructor" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8378" isRoot="false" isAbstract="false" name="Call" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8434" isRoot="false" initialValue="" type="8382" isAbstract="false" name="_voIPLink" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8435" isRoot="false" initialValue="" type="2475" isAbstract="false" name="_id" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8436" isRoot="false" initialValue="" type="8400" isAbstract="false" name="_state" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8437" isRoot="false" initialValue="" type="8404" isAbstract="false" name="_type" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8438" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_callerIdName" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8439" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_callerIdNumber" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8440" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_status" />
+      <UML:Operation comment="// Constructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8379" isRoot="false" isAbstract="false" name="Call" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8380" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8381" isRoot="false" value="" type="8372" isAbstract="false" name="type" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8383" isRoot="false" value="" type="8382" isAbstract="false" name="voiplink" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Destructor" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8384" isRoot="false" isAbstract="false" name="~ Call" />
+      <UML:Operation comment="// Handle call-id" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8385" isRoot="false" isAbstract="false" name="getId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19868" type="2475" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8386" isRoot="false" isAbstract="false" name="setId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8387" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor and modifior of VoIPLink" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8388" isRoot="false" isAbstract="false" name="getVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19869" type="8382" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8389" isRoot="false" isAbstract="false" name="setVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8390" isRoot="false" value="" type="8382" isAbstract="false" name="voIPLink" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor and modifior of status" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8391" isRoot="false" isAbstract="false" name="getStatus" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19870" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8392" isRoot="false" isAbstract="false" name="setStatus" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8393" isRoot="false" value="" type="2493" isAbstract="false" name="status" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Handle id name and id number" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8394" isRoot="false" isAbstract="false" name="getCallerIdName" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19871" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8395" isRoot="false" isAbstract="false" name="setCallerIdName" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8396" isRoot="false" value="" type="2493" isAbstract="false" name="callerId_name" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8397" isRoot="false" isAbstract="false" name="getCallerIdNumber" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19872" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8398" isRoot="false" isAbstract="false" name="setCallerIdNumber" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8399" isRoot="false" value="" type="2493" isAbstract="false" name="callerId_number" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Handle state" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8401" isRoot="false" isAbstract="false" name="getState" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19873" type="8400" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8402" isRoot="false" isAbstract="false" name="setState" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8403" isRoot="false" value="" type="8400" isAbstract="false" name="state" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Handle type of call (incoming or outoing)" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8405" isRoot="false" isAbstract="false" name="getType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19874" type="8404" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8406" isRoot="false" isAbstract="false" name="setType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8407" isRoot="false" value="" type="8404" isAbstract="false" name="type" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8408" isRoot="false" isAbstract="false" name="isBusy" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19875" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8409" isRoot="false" isAbstract="false" name="isOnHold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19876" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8410" isRoot="false" isAbstract="false" name="isOffHold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19877" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8411" isRoot="false" isAbstract="false" name="isOnMute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19878" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8412" isRoot="false" isAbstract="false" name="isOffMute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19879" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8413" isRoot="false" isAbstract="false" name="isTransfered" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19880" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8414" isRoot="false" isAbstract="false" name="isHungup" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19881" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8415" isRoot="false" isAbstract="false" name="isRinging" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19882" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8416" isRoot="false" isAbstract="false" name="isRefused" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19883" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8417" isRoot="false" isAbstract="false" name="isCancelled" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19884" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8418" isRoot="false" isAbstract="false" name="isAnswered" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19885" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8419" isRoot="false" isAbstract="false" name="isProgressing" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19886" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8420" isRoot="false" isAbstract="false" name="isOutgoingType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19887" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8421" isRoot="false" isAbstract="false" name="isIncomingType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19888" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8422" isRoot="false" isAbstract="false" name="outgoingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19889" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8423" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8424" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8425" isRoot="false" isAbstract="false" name="hangup" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19890" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8426" isRoot="false" isAbstract="false" name="cancel" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19891" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8427" isRoot="false" isAbstract="false" name="answer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19892" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8428" isRoot="false" isAbstract="false" name="onHold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19893" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8429" isRoot="false" isAbstract="false" name="offHold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19894" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8430" isRoot="false" isAbstract="false" name="transfer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19895" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8431" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8432" isRoot="false" isAbstract="false" name="refuse" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19896" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="8433" isRoot="false" isAbstract="false" name="initConstructor" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8400" isRoot="false" isAbstract="false" name="enum CallState" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8404" isRoot="false" isAbstract="false" name="enum CallType" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8441" isRoot="false" isAbstract="false" name="UInt8" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8443" isRoot="false" isAbstract="false" name="UInt16" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8444" isRoot="false" isAbstract="false" name="UInt32" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8445" isRoot="false" isAbstract="false" name="UInt64" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8446" isRoot="false" isAbstract="false" name="UInt128" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8447" isRoot="false" isAbstract="false" name="StunMsgHdr" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8448" isRoot="false" isAbstract="false" name="StunAtrHdr" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8449" isRoot="false" isAbstract="false" name="StunAddress4" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8450" isRoot="false" isAbstract="false" name="StunAtrAddress4" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8451" isRoot="false" isAbstract="false" name="StunAtrChangeRequest" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8452" isRoot="false" isAbstract="false" name="StunAtrError" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8453" isRoot="false" isAbstract="false" name="StunAtrUnknown" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8454" isRoot="false" isAbstract="false" name="StunAtrString" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8455" isRoot="false" isAbstract="false" name="StunAtrIntegrity" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8456" isRoot="false" isAbstract="false" name="StunHmacStatus" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8457" isRoot="false" isAbstract="false" name="StunMessage" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8458" isRoot="false" isAbstract="false" name="NatType" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8459" isRoot="false" isAbstract="false" name="StunMediaRelay" />
+    <UML:Class stereotype="8442" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8460" isRoot="false" isAbstract="false" name="StunServerInfo" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8461" isRoot="false" isAbstract="false" name="AudioLayer" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8462" isRoot="false" isAbstract="false" name="CodecDescriptor" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8463" isRoot="false" isAbstract="false" name="Error" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8464" isRoot="false" isAbstract="false" name="ToneGenerator" />
+    <UML:Class comment="Structure for audio device" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8472" isRoot="false" isAbstract="false" name="device_t" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="8473" isRoot="false" initialValue="" type="8369" isAbstract="false" name="hostApiName" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="8474" isRoot="false" initialValue="" type="8369" isAbstract="false" name="deviceName" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8475" isRoot="false" isAbstract="false" name="ManagerImpl" >
+     <UML:Classifier.feature>
+      <UML:Attribute comment="/////////////////////// Private variables/////////////////////" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8611" isRoot="false" initialValue="" type="8484" isAbstract="false" name="_tone" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8612" isRoot="false" initialValue="" type="8486" isAbstract="false" name="_error" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8613" isRoot="false" initialValue="" type="8481" isAbstract="false" name="_gui" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8614" isRoot="false" initialValue="" type="8488" isAbstract="false" name="_audiodriverPA" />
+      <UML:Attribute comment="Vector of VoIPLink" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8615" isRoot="false" initialValue="" type="8469" isAbstract="false" name="_voIPLinkVector" />
+      <UML:Attribute comment="Vector of calls" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8616" isRoot="false" initialValue="" type="8467" isAbstract="false" name="_callVector" />
+      <UML:Attribute comment="Vector of CodecDescriptor" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8617" isRoot="false" initialValue="" type="8471" isAbstract="false" name="_codecDescVector" />
+      <UML:Attribute comment="Mutex to protect access to code section" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8618" isRoot="false" initialValue="" type="2755" isAbstract="false" name="_mutex" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8619" isRoot="false" initialValue="" type="8490" isAbstract="false" name="_nCalls" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8620" isRoot="false" initialValue="" type="2475" isAbstract="false" name="_currentCallId" />
+      <UML:Attribute comment="For the call timer" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8621" isRoot="false" initialValue="" type="8490" isAbstract="false" name="_startTime" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8622" isRoot="false" initialValue="" type="8490" isAbstract="false" name="_endTime" />
+      <UML:Attribute comment="Path of the ConfigFile " isSpecification="false" isLeaf="false" visibility="private" xmi.id="8623" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_path" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8624" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_exist" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8625" isRoot="false" initialValue="" type="8490" isAbstract="false" name="_nCodecs" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8626" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_zonetone" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8627" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_congestion" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8628" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_ringback" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8629" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_ringtone" />
+      <UML:Attribute comment="// To handle volume control" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8630" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_spkr_volume" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8631" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_mic_volume" />
+      <UML:Attribute comment="// To handle firewall" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8632" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_firewallPort" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8633" isRoot="false" initialValue="" type="2492" isAbstract="false" name="_firewallAddr" />
+      <UML:Attribute comment="// Variables used in exception" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8634" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_loaded" />
+      <UML:Attribute comment="// look if zeroconf scanning should run or not" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8635" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_useZeroconf" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8476" isRoot="false" isAbstract="false" name="ManagerImpl" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8477" isRoot="false" isAbstract="false" name="~ ManagerImpl" />
+      <UML:Operation comment="// Init a new VoIPLink, audio codec and audio driver" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8478" isRoot="false" isAbstract="false" name="init" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8479" isRoot="false" isAbstract="false" name="terminate" />
+      <UML:Operation comment="// Set the graphic user interface" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8480" isRoot="false" isAbstract="false" name="setGui" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8482" isRoot="false" value="" type="8481" isAbstract="false" name="gui" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to tonegenerator" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8483" isRoot="false" isAbstract="false" name="getTonegenerator" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19897" type="8484" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to error" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8485" isRoot="false" isAbstract="false" name="error" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19898" type="8486" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to audiodriver" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8487" isRoot="false" isAbstract="false" name="getAudioDriver" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19899" type="8488" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to number of calls " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8489" isRoot="false" isAbstract="false" name="getNumberOfCalls" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19900" type="8490" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Modifior of number of calls " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8491" isRoot="false" isAbstract="false" name="setNumberOfCalls" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8492" isRoot="false" value="" type="8490" isAbstract="false" name="nCalls" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to current call id " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8493" isRoot="false" isAbstract="false" name="getCurrentCallId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19901" type="2475" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Modifior of current call id " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8494" isRoot="false" isAbstract="false" name="setCurrentCallId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8495" isRoot="false" value="" type="2475" isAbstract="false" name="currentCallId" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to the Call vector " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8496" isRoot="false" isAbstract="false" name="getCallVector" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19902" type="8497" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to the Call with the id 'id' " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8498" isRoot="false" isAbstract="false" name="getCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19903" type="8500" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8499" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Handle codec number" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8501" isRoot="false" isAbstract="false" name="getNumberOfCodecs" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19904" type="8490" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8502" isRoot="false" isAbstract="false" name="setNumberOfCodecs" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8503" isRoot="false" value="" type="8490" isAbstract="false" name="nb_codec" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="// Accessor to VoIPLinkVector" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8504" isRoot="false" isAbstract="false" name="getVoIPLinkVector" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19905" type="8505" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8506" isRoot="false" isAbstract="false" name="getCodecDescVector" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19906" type="8507" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8508" isRoot="false" isAbstract="false" name="getZonetone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19907" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8509" isRoot="false" isAbstract="false" name="setZonetone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8510" isRoot="false" value="" type="2471" isAbstract="false" name="b" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Attribute a new random id for a new call 
+and check if it's already attributed to existing calls. 
+If not exists, returns 'id' otherwise return 0 " isSpecification="false" isLeaf="false" visibility="public" xmi.id="8511" isRoot="false" isAbstract="false" name="generateNewCallId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19908" type="2475" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Add a new call at the end of the CallVector with identifiant 'id'" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8512" isRoot="false" isAbstract="false" name="pushBackNewCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8513" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8514" isRoot="false" value="" type="8404" isAbstract="false" name="type" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Erase the Call(id) from the CallVector" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8515" isRoot="false" isAbstract="false" name="deleteCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8516" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Functions which occur with a user's action" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8517" isRoot="false" isAbstract="false" name="outgoingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19909" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8518" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8519" isRoot="false" isAbstract="false" name="hangupCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19910" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8520" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8521" isRoot="false" isAbstract="false" name="cancelCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19911" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8522" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8523" isRoot="false" isAbstract="false" name="answerCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19912" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8524" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8525" isRoot="false" isAbstract="false" name="onHoldCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19913" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8526" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8527" isRoot="false" isAbstract="false" name="offHoldCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19914" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8528" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8529" isRoot="false" isAbstract="false" name="transferCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19915" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8530" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8531" isRoot="false" value="" type="2493" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8532" isRoot="false" isAbstract="false" name="muteOn" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8533" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8534" isRoot="false" isAbstract="false" name="muteOff" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8535" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8536" isRoot="false" isAbstract="false" name="refuseCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19916" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8537" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8538" isRoot="false" isAbstract="false" name="saveConfig" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19917" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8539" isRoot="false" isAbstract="false" name="registerVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19918" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8540" isRoot="false" isAbstract="false" name="unregisterVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19919" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8541" isRoot="false" isAbstract="false" name="quitApplication" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19920" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8542" isRoot="false" isAbstract="false" name="sendTextMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19921" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8543" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8544" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8545" isRoot="false" isAbstract="false" name="accessToDirectory" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19922" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Handle choice of the DTMF-send-way
+
+@param   id: callid of the line.
+@param   code: pressed key." isSpecification="false" isLeaf="false" visibility="public" xmi.id="8546" isRoot="false" isAbstract="false" name="sendDtmf" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19923" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8547" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8548" isRoot="false" value="" type="2470" isAbstract="false" name="code" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8549" isRoot="false" isAbstract="false" name="incomingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19924" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8550" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8551" isRoot="false" isAbstract="false" name="peerAnsweredCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8552" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8553" isRoot="false" isAbstract="false" name="peerRingingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19925" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8554" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8555" isRoot="false" isAbstract="false" name="peerHungupCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19926" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8556" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8557" isRoot="false" isAbstract="false" name="displayTextMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8558" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8559" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8560" isRoot="false" isAbstract="false" name="displayErrorText" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8561" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8562" isRoot="false" value="" type="2493" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8563" isRoot="false" isAbstract="false" name="displayError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8564" isRoot="false" value="" type="2493" isAbstract="false" name="error" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8565" isRoot="false" isAbstract="false" name="displayStatus" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8566" isRoot="false" value="" type="2493" isAbstract="false" name="status" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8567" isRoot="false" isAbstract="false" name="selectedCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19927" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8568" isRoot="false" isAbstract="false" name="isCurrentId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19928" type="2471" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8569" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8570" isRoot="false" isAbstract="false" name="startVoiceMessageNotification" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8571" isRoot="false" isAbstract="false" name="stopVoiceMessageNotification" />
+      <UML:Operation comment="Handle audio sounds heard by a caller while they wait for their 
+connection to a called party to be completed." isSpecification="false" isLeaf="false" visibility="public" xmi.id="8572" isRoot="false" isAbstract="false" name="ringback" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8573" isRoot="false" value="" type="2471" isAbstract="false" name="var" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Handle played music when an incoming call occurs" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8574" isRoot="false" isAbstract="false" name="ringtone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8575" isRoot="false" value="" type="2471" isAbstract="false" name="var" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8576" isRoot="false" isAbstract="false" name="congestion" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8577" isRoot="false" value="" type="2471" isAbstract="false" name="var" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Notification of incoming call when you are already busy" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8578" isRoot="false" isAbstract="false" name="notificationIncomingCall" />
+      <UML:Operation comment="Get information about firewall 
+@param	stunSvrAddr: stun server" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8579" isRoot="false" isAbstract="false" name="getStunInfo" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8581" isRoot="false" value="" type="8580" isAbstract="false" name="stunSvrAddr" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8582" isRoot="false" isAbstract="false" name="useStun" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19929" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8583" isRoot="false" isAbstract="false" name="getbCongestion" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19930" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8584" isRoot="false" isAbstract="false" name="getbRingback" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19931" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8585" isRoot="false" isAbstract="false" name="getbRingtone" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19932" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8586" isRoot="false" isAbstract="false" name="getSpkrVolume" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19933" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8587" isRoot="false" isAbstract="false" name="setSpkrVolume" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8588" isRoot="false" value="" type="2468" isAbstract="false" name="spkr_vol" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8589" isRoot="false" isAbstract="false" name="getMicroVolume" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19934" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8590" isRoot="false" isAbstract="false" name="setMicroVolume" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8591" isRoot="false" value="" type="2468" isAbstract="false" name="mic_vol" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8592" isRoot="false" isAbstract="false" name="getFirewallPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19935" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8593" isRoot="false" isAbstract="false" name="setFirewallPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8594" isRoot="false" value="" type="2468" isAbstract="false" name="port" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8595" isRoot="false" isAbstract="false" name="getFirewallAddress" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19936" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8596" isRoot="false" isAbstract="false" name="isDriverLoaded" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19937" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8597" isRoot="false" isAbstract="false" name="loaded" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8598" isRoot="false" value="" type="2471" isAbstract="false" name="l" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Functions about audio device" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8599" isRoot="false" isAbstract="false" name="deviceList" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19938" type="8368" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8600" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8601" isRoot="false" isAbstract="false" name="deviceCount" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19939" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8602" isRoot="false" isAbstract="false" name="defaultDevice" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19940" type="2471" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8603" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Init default values for the different fields" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8604" isRoot="false" isAbstract="false" name="initConfigFile" />
+      <UML:Operation comment="Returns the number of calls in the vector" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8605" isRoot="false" isAbstract="false" name="callVectorSize" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19941" type="8490" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Create .PROGNAME directory in home user and create 
+configuration tree from the settings file if this file exists.
+
+@return	0 if creating file failed
+		1 if config-file exists
+		2 if file doesn't exist yet." isSpecification="false" isLeaf="false" visibility="private" xmi.id="8606" isRoot="false" isAbstract="false" name="createSettingsPath" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19942" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Initialize audiocodec" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8607" isRoot="false" isAbstract="false" name="initAudioCodec" />
+      <UML:Operation comment="Initialize audiodriver" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8608" isRoot="false" isAbstract="false" name="selectAudioDriver" />
+      <UML:Operation comment="Initialize zeroconf module and scanning" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8609" isRoot="false" isAbstract="false" name="initZeroconf" />
+      <UML:Operation comment="Init the Gui interface (after setting it) inside setGui" isSpecification="false" isLeaf="false" visibility="private" xmi.id="8610" isRoot="false" isAbstract="false" name="initGui" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8490" isRoot="false" isAbstract="false" name="unsigned int" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="14791" isRoot="false" isAbstract="false" name="ResponseMessage" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="15608" isRoot="false" initialValue="" type="2476" isAbstract="false" name="message" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="15609" isRoot="false" initialValue="" type="2476" isAbstract="false" name="seq" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17010" isRoot="false" initialValue="" type="2476" isAbstract="false" name="code" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="16654" isRoot="false" isAbstract="false" name="toString" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19943" type="2492" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="16655" isRoot="false" isAbstract="false" name="isFinal" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19944" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17623" isRoot="false" isAbstract="false" name="SipCall" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="19373" isRoot="false" initialValue="" type="2468" isAbstract="false" name="payload" />
+      <UML:Attribute comment="1 started, -1 stopped" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19374" isRoot="false" initialValue="" type="2468" isAbstract="false" name="enable_audio" />
+      <UML:Attribute comment="///////////////////////////// Private member variables///////////////////////////" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19421" isRoot="false" initialValue="" type="8507" isAbstract="false" name="_cdv" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19422" isRoot="false" initialValue="" type="17723" isAbstract="false" name="_audiocodec" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19423" isRoot="false" initialValue="" type="2475" isAbstract="false" name="_id" />
+      <UML:Attribute comment="// call id" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19424" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_cid" />
+      <UML:Attribute comment="// dialog id" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19425" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_did" />
+      <UML:Attribute comment="// transaction id" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19426" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_tid" />
+      <UML:Attribute comment="// wait for a cid and did when outgoing call is made" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19427" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_standby" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19428" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_status_code" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19429" isRoot="false" initialValue="" type="19402" isAbstract="false" name="_reason_phrase" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19430" isRoot="false" initialValue="" type="19402" isAbstract="false" name="_textinfo" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19431" isRoot="false" initialValue="" type="19402" isAbstract="false" name="_remote_uri" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19432" isRoot="false" initialValue="" type="19402" isAbstract="false" name="_remote_sdp_audio_ip" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19433" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_state" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19434" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_local_audio_port" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="19435" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_remote_sdp_audio_port" />
+      <UML:Attribute comment="_SENDRECV, _SENDONLY, _RECVONLY" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19436" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_local_sendrecv" />
+      <UML:Attribute comment="_SENDRECV, _SENDONLY, _RECVONLY" isSpecification="false" isLeaf="false" visibility="private" xmi.id="19437" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_remote_sendrecv" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19369" isRoot="false" isAbstract="false" name="SipCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19370" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19371" isRoot="false" value="" type="8507" isAbstract="false" name="cdv" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19372" isRoot="false" isAbstract="false" name="~ SipCall" />
+      <UML:Operation comment="Store information about incoming call and negociate payload" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19375" isRoot="false" isAbstract="false" name="newIncomingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19945" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19376" isRoot="false" value="" type="17819" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Use to answer to a ONHOLD/OFFHOLD event " isSpecification="false" isLeaf="false" visibility="public" xmi.id="19377" isRoot="false" isAbstract="false" name="answeredCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19946" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19378" isRoot="false" value="" type="17819" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Use to answer to an incoming call " isSpecification="false" isLeaf="false" visibility="public" xmi.id="19379" isRoot="false" isAbstract="false" name="answeredCall_without_hold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19380" isRoot="false" value="" type="17819" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19381" isRoot="false" isAbstract="false" name="ringingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19947" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19382" isRoot="false" value="" type="17819" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19383" isRoot="false" isAbstract="false" name="receivedAck" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19948" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19384" isRoot="false" value="" type="17819" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Manage local audio port for each sipcall" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19385" isRoot="false" isAbstract="false" name="setLocalAudioPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19386" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19387" isRoot="false" isAbstract="false" name="getLocalAudioPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19949" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Manage id, did (dialog-id), cid (call-id) and tid (transaction-id) 
+for each sipcall" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19388" isRoot="false" isAbstract="false" name="setId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19389" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19390" isRoot="false" isAbstract="false" name="getId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19950" type="2475" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19391" isRoot="false" isAbstract="false" name="setDid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19392" isRoot="false" value="" type="2468" isAbstract="false" name="did" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19393" isRoot="false" isAbstract="false" name="getDid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19951" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19394" isRoot="false" isAbstract="false" name="setCid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19395" isRoot="false" value="" type="2468" isAbstract="false" name="cid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19396" isRoot="false" isAbstract="false" name="getCid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19952" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19397" isRoot="false" isAbstract="false" name="setTid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19398" isRoot="false" value="" type="2468" isAbstract="false" name="tid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19399" isRoot="false" isAbstract="false" name="getTid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19953" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Manage remote sdp audio port" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19400" isRoot="false" isAbstract="false" name="getRemoteSdpAudioPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19954" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19401" isRoot="false" isAbstract="false" name="getRemoteSdpAudioIp" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19955" type="19402" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Manage audio codec" isSpecification="false" isLeaf="false" visibility="public" xmi.id="19403" isRoot="false" isAbstract="false" name="getAudioCodec" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19956" type="17723" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19404" isRoot="false" isAbstract="false" name="setAudioCodec" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19405" isRoot="false" value="" type="17723" isAbstract="false" name="ac" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19406" isRoot="false" isAbstract="false" name="getRemoteUri" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19957" type="19402" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19407" isRoot="false" isAbstract="false" name="setStandBy" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19408" isRoot="false" value="" type="2471" isAbstract="false" name="standby" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="19409" isRoot="false" isAbstract="false" name="getStandBy" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19958" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="19410" isRoot="false" isAbstract="false" name="alloc" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="19411" isRoot="false" isAbstract="false" name="dealloc" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="19412" isRoot="false" isAbstract="false" name="noSupportedCodec" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="19413" isRoot="false" isAbstract="false" name="sdp_complete_message" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19959" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19414" isRoot="false" value="" type="17834" isAbstract="false" name="remote_sdp" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19415" isRoot="false" value="" type="17829" isAbstract="false" name="msg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="19416" isRoot="false" isAbstract="false" name="sdp_analyse_attribute" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19960" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19417" isRoot="false" value="" type="17834" isAbstract="false" name="sdp" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="19420" isRoot="false" value="" type="19419" isAbstract="false" name="med" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class comment="///////////////////////////////////////////////////////////////////////////////// Two pair of sockets///////////////////////////////////////////////////////////////////////////////" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17624" isRoot="false" isAbstract="false" name="AudioRtpRTX" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="17626" />
+      <UML:Generalization xmi.idref="17630" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute comment="// For incoming call notification " isSpecification="false" isLeaf="false" visibility="public" xmi.id="17641" isRoot="false" initialValue="" type="17640" isAbstract="false" name="time" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17643" isRoot="false" initialValue="" type="17634" isAbstract="false" name="_ca" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17644" isRoot="false" initialValue="" type="8488" isAbstract="false" name="_audioDevice" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17647" isRoot="false" initialValue="" type="17646" isAbstract="false" name="_sessionSend" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17648" isRoot="false" initialValue="" type="17646" isAbstract="false" name="_sessionRecv" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17651" isRoot="false" initialValue="" type="17650" isAbstract="false" name="_session" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17652" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_sym" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17633" isRoot="false" isAbstract="false" name="AudioRtpRTX" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17635" isRoot="false" value="" type="17634" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17636" isRoot="false" value="" type="8488" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17637" isRoot="false" value="" type="2471" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17638" isRoot="false" isAbstract="false" name="~ AudioRtpRTX" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17642" isRoot="false" isAbstract="false" name="run" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="17653" isRoot="false" isAbstract="false" name="initAudioRtpSession" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="17654" isRoot="false" isAbstract="false" name="sendSessionFromMic" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17657" isRoot="false" value="" type="17656" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17660" isRoot="false" value="" type="17659" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17661" isRoot="false" value="" type="17659" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17662" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17663" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="17664" isRoot="false" isAbstract="false" name="receiveSessionForSpkr" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17665" isRoot="false" value="" type="17659" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17666" isRoot="false" value="" type="17659" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17667" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17669" isRoot="false" value="" type="17668" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17655" isRoot="false" isAbstract="false" name="unsigned char" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17658" isRoot="false" isAbstract="false" name="int16" />
+    <UML:Class comment="///////////////////////////////////////////////////////////////////////////////// Main class rtp///////////////////////////////////////////////////////////////////////////////" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17670" isRoot="false" isAbstract="false" name="AudioRtp" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17678" isRoot="false" initialValue="" type="17677" isAbstract="false" name="_RTXThread" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17679" isRoot="false" initialValue="" type="2471" isAbstract="false" name="_symetric" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17671" isRoot="false" isAbstract="false" name="AudioRtp" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17672" isRoot="false" isAbstract="false" name="~ AudioRtp" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17673" isRoot="false" isAbstract="false" name="createNewSession" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19961" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17674" isRoot="false" value="" type="17634" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17675" isRoot="false" isAbstract="false" name="closeRtpSession" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17676" isRoot="false" value="" type="17634" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Enumeration stereotype="8373" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17680" isRoot="false" isAbstract="false" name="VoIPLinkType" >
+     <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" xmi.id="17681" isRoot="false" isAbstract="false" name="Sip" />
+     <UML:EnumerationLiteral isSpecification="false" isLeaf="false" visibility="public" xmi.id="17682" isRoot="false" isAbstract="false" name="Iax" />
+    </UML:Enumeration>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17683" isRoot="false" isAbstract="false" name="AudioCodec" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17745" isRoot="false" isAbstract="false" name="EventThread" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17746" isRoot="false" isAbstract="false" name="vector" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17748" isRoot="false" isAbstract="false" name="SipVoIPLink" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="17749" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute comment="///////////////////////////// Private member variables///////////////////////////" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17839" isRoot="false" initialValue="" type="17838" isAbstract="false" name="_evThread" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17841" isRoot="false" initialValue="" type="17840" isAbstract="false" name="_sipcallVector" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17842" isRoot="false" initialValue="" type="17670" isAbstract="false" name="_audiortp" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17843" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_localPort" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17844" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_cid" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17845" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_reg_id" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="17846" isRoot="false" initialValue="" type="2468" isAbstract="false" name="_nMsgVoicemail" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17752" isRoot="false" isAbstract="false" name="SipVoIPLink" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17753" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17754" isRoot="false" isAbstract="false" name="~ SipVoIPLink" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17755" isRoot="false" isAbstract="false" name="init" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19962" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17756" isRoot="false" isAbstract="false" name="checkNetwork" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19963" type="2471" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17757" isRoot="false" isAbstract="false" name="terminate" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17758" isRoot="false" isAbstract="false" name="setRegister" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19964" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17759" isRoot="false" isAbstract="false" name="setUnregister" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19965" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17760" isRoot="false" isAbstract="false" name="outgoingInvite" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19966" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17761" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17762" isRoot="false" value="" type="17699" isAbstract="false" name="to_url" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17763" isRoot="false" isAbstract="false" name="answer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19967" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17764" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17765" isRoot="false" isAbstract="false" name="hangup" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19968" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17766" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17767" isRoot="false" isAbstract="false" name="cancel" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19969" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17768" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17769" isRoot="false" isAbstract="false" name="onhold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19970" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17770" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17771" isRoot="false" isAbstract="false" name="offhold" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19971" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17772" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17773" isRoot="false" isAbstract="false" name="transfer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19972" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17774" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17775" isRoot="false" value="" type="17699" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17776" isRoot="false" isAbstract="false" name="refuse" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19973" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17777" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17778" isRoot="false" isAbstract="false" name="getEvent" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19974" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17779" isRoot="false" isAbstract="false" name="carryingDTMFdigits" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17780" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17781" isRoot="false" value="" type="2470" isAbstract="false" name="code" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="To handle the local port" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17782" isRoot="false" isAbstract="false" name="getLocalPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19975" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17783" isRoot="false" isAbstract="false" name="setLocalPort" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17784" isRoot="false" value="" type="2468" isAbstract="false" name="" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Add a new SipCall at the end of the SipCallVector with identifiant 'id'" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17785" isRoot="false" isAbstract="false" name="newOutgoingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17786" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17787" isRoot="false" isAbstract="false" name="newIncomingCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17788" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Erase the SipCall(id) from the SipCallVector" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17789" isRoot="false" isAbstract="false" name="deleteSipCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17790" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Return a pointer to the SipCall with identifiant 'id'" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17791" isRoot="false" isAbstract="false" name="getSipCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19976" type="17634" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17792" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Accessor to the audio codec of SipCall with identifiant 'id'" isSpecification="false" isLeaf="false" visibility="public" xmi.id="17793" isRoot="false" isAbstract="false" name="getAudioCodec" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19977" type="17723" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17794" isRoot="false" value="" type="2475" isAbstract="false" name="callid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17795" isRoot="false" isAbstract="false" name="setCid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17796" isRoot="false" value="" type="2468" isAbstract="false" name="cid" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17797" isRoot="false" isAbstract="false" name="getCid" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19978" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17798" isRoot="false" isAbstract="false" name="setMsgVoicemail" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17799" isRoot="false" value="" type="2468" isAbstract="false" name="nMsg" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="17800" isRoot="false" isAbstract="false" name="getMsgVoicemail" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19979" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="If you are behind a NAT, you have to use STUN server, specified in 
+STUN configuration(you can change this one by default) to give you an 
+public IP address and assign a port number.
+
+Return 0 if an error occured and 1 if no error." isSpecification="false" isLeaf="false" visibility="private" xmi.id="17801" isRoot="false" isAbstract="false" name="behindNat" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19980" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="To Store the local IP address, and allow to know if the network is 
+available.
+
+Return -1 if an error occured and 0 if no error" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17802" isRoot="false" isAbstract="false" name="getLocalIp" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19981" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Return -1 if an error occured and 0 if no error" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17803" isRoot="false" isAbstract="false" name="checkUrl" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19982" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17804" isRoot="false" value="" type="17699" isAbstract="false" name="url" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Allow the authentication when you want register
+Return -1 if an error occured and 0 if no error " isSpecification="false" isLeaf="false" visibility="private" xmi.id="17805" isRoot="false" isAbstract="false" name="setAuthentication" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19983" type="2468" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Build a sip address from the user configuration
+Example: &quot;Display user name&quot; &lt;sip:user@host.com>
+Return the result in a string" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17806" isRoot="false" isAbstract="false" name="fromHeader" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19984" type="2476" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17807" isRoot="false" value="" type="17699" isAbstract="false" name="user" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17808" isRoot="false" value="" type="17699" isAbstract="false" name="host" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Build a sip address with the number that you want to call
+Example: sip:124@domain.com
+Return the result in a string" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17809" isRoot="false" isAbstract="false" name="toHeader" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19985" type="2476" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17810" isRoot="false" value="" type="17699" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Beginning point to make outgoing call.
+Check the 'from' and 'to' url.
+Allocate local audio port.
+Build SDP body.
+Return -1 if an error occured and 0 if no error" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17811" isRoot="false" isAbstract="false" name="startCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19986" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17812" isRoot="false" value="" type="2475" isAbstract="false" name="id" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17813" isRoot="false" value="" type="17699" isAbstract="false" name="from" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17814" isRoot="false" value="" type="17699" isAbstract="false" name="to" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17815" isRoot="false" value="" type="17699" isAbstract="false" name="subject" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17816" isRoot="false" value="" type="17699" isAbstract="false" name="route" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Look for call with same cid/did 
+Return the id of the found call" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17817" isRoot="false" isAbstract="false" name="findCallId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19987" type="2475" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17820" isRoot="false" value="" type="17819" isAbstract="false" name="e" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="17821" isRoot="false" isAbstract="false" name="findCallIdWhenRinging" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19988" type="2475" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="Return true if payload is already in the rtpmap and false if not" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17822" isRoot="false" isAbstract="false" name="isInRtpmap" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19989" type="2471" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17823" isRoot="false" value="" type="2468" isAbstract="false" name="index" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17824" isRoot="false" value="" type="2468" isAbstract="false" name="payload" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17825" isRoot="false" value="" type="8507" isAbstract="false" name="cdv" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="To build sdp with 200 OK when answered call" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17826" isRoot="false" isAbstract="false" name="sdp_complete_200ok" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19990" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17827" isRoot="false" value="" type="2468" isAbstract="false" name="did" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17830" isRoot="false" value="" type="17829" isAbstract="false" name="answer" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17831" isRoot="false" value="" type="2468" isAbstract="false" name="port" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="To build sdp when call is on-hold" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17832" isRoot="false" isAbstract="false" name="sdp_hold_call" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19991" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17835" isRoot="false" value="" type="17834" isAbstract="false" name="sdp" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation comment="To build sdp when call is off-hold" isSpecification="false" isLeaf="false" visibility="private" xmi.id="17836" isRoot="false" isAbstract="false" name="sdp_off_hold_call" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="19992" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="17837" isRoot="false" value="" type="17834" isAbstract="false" name="sdp" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17818" isRoot="false" isAbstract="false" name="eXosip_event_t" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17828" isRoot="false" isAbstract="false" name="osip_message_t" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17833" isRoot="false" isAbstract="false" name="sdp_message_t" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="19418" isRoot="false" isAbstract="false" name="sdp_media_t" />
+    <UML:Generalization isSpecification="false" child="2558" visibility="public" xmi.id="2559" parent="2545" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2567" visibility="public" xmi.id="2568" parent="2558" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2578" visibility="public" xmi.id="2579" parent="2558" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2585" visibility="public" xmi.id="2586" parent="2558" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2592" visibility="public" xmi.id="2593" parent="2558" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2599" visibility="public" xmi.id="2600" parent="2558" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2606" visibility="public" xmi.id="2607" parent="2558" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2613" visibility="public" xmi.id="2614" parent="2545" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2623" visibility="public" xmi.id="2624" parent="2613" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2630" visibility="public" xmi.id="2631" parent="2613" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2637" visibility="public" xmi.id="2638" parent="2613" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2644" visibility="public" xmi.id="2645" parent="2545" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2661" visibility="public" xmi.id="2663" parent="2654" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2682" visibility="public" xmi.id="2686" parent="2685" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2696" visibility="public" xmi.id="2697" parent="2685" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2544" visibility="public" xmi.id="2705" parent="2477" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="15024" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="15025" aggregation="shared" type="2545" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="15026" aggregation="none" type="14791" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="17624" visibility="public" xmi.id="17626" parent="17625" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="17624" visibility="public" xmi.id="17630" parent="17629" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="17748" visibility="public" xmi.id="17749" parent="8377" discriminator="" name="" />
+   </UML:Namespace.ownedElement>
+  </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+  <docsettings viewid="2467" documentation="" uniqueid="19992" />
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="75" showgrid="0" showopsig="0" usefillcolor="1" snapx="10" canvaswidth="1701" snapy="10" showatts="1" xmi.id="2467" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="900000" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1393" >
+    <widgets>
+     <classwidget usesdiagramfillcolour="1" width="217" showattsigs="601" usesdiagramusefillcolour="1" x="550" linecolour="none" y="64" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="510" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2544" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="217" showattsigs="601" usesdiagramusefillcolour="1" x="285" linecolour="none" y="59" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="612" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2477" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="160" showattsigs="601" usesdiagramusefillcolour="1" x="606" linecolour="none" y="691" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="119" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2545" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="126" showattsigs="601" usesdiagramusefillcolour="1" x="666" linecolour="none" y="1127" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2578" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="155" showattsigs="601" usesdiagramusefillcolour="1" x="887" linecolour="none" y="1061" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="85" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2567" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="113" showattsigs="601" usesdiagramusefillcolour="1" x="1245" linecolour="none" y="252" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="81" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2661" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="134" showattsigs="601" usesdiagramusefillcolour="1" x="1253" linecolour="none" y="94" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2654" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="380" showattsigs="601" usesdiagramusefillcolour="1" x="875" linecolour="none" y="16" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="85" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2670" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="133" showattsigs="601" usesdiagramusefillcolour="1" x="396" linecolour="none" y="986" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="76" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2613" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="157" showattsigs="601" usesdiagramusefillcolour="1" x="690" linecolour="none" y="935" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="68" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2558" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="158" showattsigs="601" usesdiagramusefillcolour="1" x="1000" linecolour="none" y="187" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="90" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2682" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="143" showattsigs="601" usesdiagramusefillcolour="1" x="983" linecolour="none" y="499" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="68" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2696" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="85" showattsigs="601" usesdiagramusefillcolour="1" x="1034" linecolour="none" y="353" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2685" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="217" showattsigs="601" usesdiagramusefillcolour="1" x="20" linecolour="none" y="12" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="1377" usefillcolor="1" showpubliconly="0" showattributes="0" isinstance="0" xmi.id="8475" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="124" showattsigs="601" usesdiagramusefillcolour="0" x="887" linecolour="#ff0000" y="707" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="102" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="14791" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="251" showattsigs="601" usesdiagramusefillcolour="1" x="1231" linecolour="none" y="357" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="833" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="17748" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="201" showattsigs="601" usesdiagramusefillcolour="1" x="1496" linecolour="none" y="360" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="833" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="17623" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="2477" widgetaid="2544" xmi.id="2705" >
+      <linepath>
+       <startpoint startx="550" starty="319" />
+       <endpoint endx="502" endy="365" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="2654" widgetaid="2661" xmi.id="2663" >
+      <linepath>
+       <startpoint startx="1301" starty="252" />
+       <endpoint endx="1320" endy="153" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="5" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="2670" widgetaid="2544" xmi.id="2754" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="767" starty="166" />
+       <endpoint endx="1065" endy="101" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="30" usesdiagramusefillcolour="1" x="1037" linecolour="none" y="57" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="17495" text="0..1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="63" usesdiagramusefillcolour="1" x="1004" linecolour="none" y="128" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="17494" text="_factory" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="2545" widgetaid="2613" xmi.id="2614" >
+      <linepath>
+       <startpoint startx="462" starty="986" />
+       <endpoint endx="659" endy="810" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="2545" widgetaid="2558" xmi.id="2559" >
+      <linepath>
+       <startpoint startx="768" starty="935" />
+       <endpoint endx="712" endy="810" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="2558" widgetaid="2567" xmi.id="2568" >
+      <linepath>
+       <startpoint startx="964" starty="1061" />
+       <endpoint endx="794" endy="1003" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="2558" widgetaid="2578" xmi.id="2579" >
+      <linepath>
+       <startpoint startx="729" starty="1127" />
+       <endpoint endx="742" endy="1003" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="5" indexb="2" widgetbid="2544" widgetaid="2682" xmi.id="2695" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="1000" starty="232" />
+       <endpoint endx="767" endy="268" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="30" usesdiagramusefillcolour="1" x="857" linecolour="none" y="500" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="17497" text="0..1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="40" usesdiagramusefillcolour="1" x="851" linecolour="none" y="221" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="17496" text="_gui" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" visibilityB="200" totalcountb="5" indexb="4" widgetbid="2544" widgetaid="2696" xmi.id="2704" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="1030" starty="499" />
+       <endpoint endx="767" endy="472" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="30" usesdiagramusefillcolour="1" x="893" linecolour="none" y="220" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="17499" text="0..1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="40" usesdiagramusefillcolour="1" x="818" linecolour="none" y="494" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="17498" text="_gui" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="2685" widgetaid="2682" xmi.id="2686" >
+      <linepath>
+       <startpoint startx="1079" starty="277" />
+       <endpoint endx="1076" endy="353" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="2685" widgetaid="2696" xmi.id="2697" >
+      <linepath>
+       <startpoint startx="1078" starty="499" />
+       <endpoint endx="1076" endy="386" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="5" indexa="3" visibilityB="200" totalcountb="2" indexb="1" widgetbid="2685" widgetaid="2544" xmi.id="2747" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="767" starty="370" />
+       <endpoint endx="1034" endy="369" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="30" usesdiagramusefillcolour="1" x="1048" linecolour="none" y="280" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="17501" text="0..1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="72" usesdiagramusefillcolour="1" x="1000" linecolour="none" y="337" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="17500" text="sessionIn" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="2477" widgetaid="8475" xmi.id="8613" type="501" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="237" starty="700" />
+       <endpoint endx="285" endy="365" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="30" usesdiagramusefillcolour="1" x="287" linecolour="none" y="367" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="17503" text="0..1" font="Sans,10,-1,5,50,0,0,0,0,0" />
+      <floatingtext usesdiagramfillcolour="1" width="40" usesdiagramusefillcolour="1" x="237" linecolour="none" y="357" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="17502" text="_gui" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="14791" widgetaid="2545" xmi.id="15024" >
+      <linepath>
+       <startpoint startx="766" starty="750" />
+       <endpoint endx="887" endy="758" />
+      </linepath>
+     </assocwidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" label="Views" >
+    <listitem open="1" type="801" label="Logical View" >
+     <listitem open="0" type="813" id="17683" />
+     <listitem open="1" type="813" id="8368" >
+      <listitem open="0" type="814" id="8370" />
+      <listitem open="0" type="814" id="8371" />
+     </listitem>
+     <listitem open="1" type="813" id="8461" />
+     <listitem open="0" type="813" id="17670" >
+      <listitem open="0" type="814" id="17678" />
+      <listitem open="0" type="814" id="17679" />
+      <listitem open="0" type="815" id="17671" />
+      <listitem open="0" type="815" id="17672" />
+      <listitem open="0" type="815" id="17673" />
+      <listitem open="0" type="815" id="17675" />
+     </listitem>
+     <listitem open="0" type="813" id="17624" >
+      <listitem open="0" type="814" id="17641" />
+      <listitem open="0" type="814" id="17643" />
+      <listitem open="0" type="814" id="17644" />
+      <listitem open="0" type="814" id="17647" />
+      <listitem open="0" type="814" id="17648" />
+      <listitem open="0" type="814" id="17651" />
+      <listitem open="0" type="814" id="17652" />
+      <listitem open="0" type="815" id="17633" />
+      <listitem open="0" type="815" id="17638" />
+      <listitem open="0" type="815" id="17642" />
+      <listitem open="0" type="815" id="17653" />
+      <listitem open="0" type="815" id="17654" />
+      <listitem open="0" type="815" id="17664" />
+     </listitem>
+     <listitem open="1" type="813" id="8378" >
+      <listitem open="0" type="814" id="8434" />
+      <listitem open="0" type="814" id="8435" />
+      <listitem open="0" type="814" id="8436" />
+      <listitem open="0" type="814" id="8437" />
+      <listitem open="0" type="814" id="8438" />
+      <listitem open="0" type="814" id="8439" />
+      <listitem open="0" type="814" id="8440" />
+      <listitem open="0" type="815" id="8379" />
+      <listitem open="0" type="815" id="8384" />
+      <listitem open="0" type="815" id="8385" />
+      <listitem open="0" type="815" id="8386" />
+      <listitem open="0" type="815" id="8388" />
+      <listitem open="0" type="815" id="8389" />
+      <listitem open="0" type="815" id="8391" />
+      <listitem open="0" type="815" id="8392" />
+      <listitem open="0" type="815" id="8394" />
+      <listitem open="0" type="815" id="8395" />
+      <listitem open="0" type="815" id="8397" />
+      <listitem open="0" type="815" id="8398" />
+      <listitem open="0" type="815" id="8401" />
+      <listitem open="0" type="815" id="8402" />
+      <listitem open="0" type="815" id="8405" />
+      <listitem open="0" type="815" id="8406" />
+      <listitem open="0" type="815" id="8408" />
+      <listitem open="0" type="815" id="8409" />
+      <listitem open="0" type="815" id="8410" />
+      <listitem open="0" type="815" id="8411" />
+      <listitem open="0" type="815" id="8412" />
+      <listitem open="0" type="815" id="8413" />
+      <listitem open="0" type="815" id="8414" />
+      <listitem open="0" type="815" id="8415" />
+      <listitem open="0" type="815" id="8416" />
+      <listitem open="0" type="815" id="8417" />
+      <listitem open="0" type="815" id="8418" />
+      <listitem open="0" type="815" id="8419" />
+      <listitem open="0" type="815" id="8420" />
+      <listitem open="0" type="815" id="8421" />
+      <listitem open="0" type="815" id="8422" />
+      <listitem open="0" type="815" id="8425" />
+      <listitem open="0" type="815" id="8426" />
+      <listitem open="0" type="815" id="8427" />
+      <listitem open="0" type="815" id="8428" />
+      <listitem open="0" type="815" id="8429" />
+      <listitem open="0" type="815" id="8430" />
+      <listitem open="0" type="815" id="8432" />
+      <listitem open="0" type="815" id="8433" />
+     </listitem>
+     <listitem open="1" type="813" id="8462" />
+     <listitem open="1" type="813" id="8463" />
+     <listitem open="0" type="813" id="17745" />
+     <listitem open="0" type="813" id="2544" >
+      <listitem open="0" type="814" id="2747" />
+      <listitem open="0" type="814" id="2748" />
+      <listitem open="0" type="814" id="2751" />
+      <listitem open="0" type="814" id="2752" />
+      <listitem open="0" type="814" id="2754" />
+      <listitem open="0" type="814" id="2756" />
+      <listitem open="0" type="815" id="2708" />
+      <listitem open="0" type="815" id="2709" />
+      <listitem open="0" type="815" id="2710" />
+      <listitem open="0" type="815" id="2711" />
+      <listitem open="0" type="815" id="2713" />
+      <listitem open="0" type="815" id="2714" />
+      <listitem open="0" type="815" id="2716" />
+      <listitem open="0" type="815" id="2717" />
+      <listitem open="0" type="815" id="2719" />
+      <listitem open="0" type="815" id="2721" />
+      <listitem open="0" type="815" id="2723" />
+      <listitem open="0" type="815" id="2725" />
+      <listitem open="0" type="815" id="2728" />
+      <listitem open="0" type="815" id="2731" />
+      <listitem open="0" type="815" id="2733" />
+      <listitem open="0" type="815" id="2735" />
+      <listitem open="0" type="815" id="2737" />
+      <listitem open="0" type="815" id="2738" />
+      <listitem open="0" type="815" id="2739" />
+      <listitem open="0" type="815" id="2740" />
+      <listitem open="0" type="815" id="2742" />
+      <listitem open="0" type="815" id="2743" />
+      <listitem open="0" type="815" id="2744" />
+     </listitem>
+     <listitem open="0" type="813" id="2477" >
+      <listitem open="0" type="814" id="2543" />
+      <listitem open="0" type="815" id="2478" />
+      <listitem open="0" type="815" id="2480" />
+      <listitem open="0" type="815" id="2481" />
+      <listitem open="0" type="815" id="2483" />
+      <listitem open="0" type="815" id="2485" />
+      <listitem open="0" type="815" id="2487" />
+      <listitem open="0" type="815" id="2489" />
+      <listitem open="0" type="815" id="2495" />
+      <listitem open="0" type="815" id="2498" />
+      <listitem open="0" type="815" id="2500" />
+      <listitem open="0" type="815" id="2502" />
+      <listitem open="0" type="815" id="2504" />
+      <listitem open="0" type="815" id="2505" />
+      <listitem open="0" type="815" id="2506" />
+      <listitem open="0" type="815" id="2507" />
+      <listitem open="0" type="815" id="2509" />
+      <listitem open="0" type="815" id="2510" />
+      <listitem open="0" type="815" id="2511" />
+      <listitem open="0" type="815" id="2513" />
+      <listitem open="0" type="815" id="2515" />
+      <listitem open="0" type="815" id="2517" />
+      <listitem open="0" type="815" id="2519" />
+      <listitem open="0" type="815" id="2521" />
+      <listitem open="0" type="815" id="2523" />
+      <listitem open="0" type="815" id="2526" />
+      <listitem open="0" type="815" id="2528" />
+      <listitem open="0" type="815" id="2530" />
+      <listitem open="0" type="815" id="2532" />
+      <listitem open="0" type="815" id="2533" />
+      <listitem open="0" type="815" id="2534" />
+      <listitem open="0" type="815" id="2535" />
+      <listitem open="0" type="815" id="2536" />
+      <listitem open="0" type="815" id="2539" />
+      <listitem open="0" type="815" id="2540" />
+     </listitem>
+     <listitem open="1" type="813" id="8475" >
+      <listitem open="0" type="814" id="8611" />
+      <listitem open="0" type="814" id="8612" />
+      <listitem open="0" type="814" id="8613" />
+      <listitem open="0" type="814" id="8614" />
+      <listitem open="0" type="814" id="8615" />
+      <listitem open="0" type="814" id="8616" />
+      <listitem open="0" type="814" id="8617" />
+      <listitem open="0" type="814" id="8618" />
+      <listitem open="0" type="814" id="8619" />
+      <listitem open="0" type="814" id="8620" />
+      <listitem open="0" type="814" id="8621" />
+      <listitem open="0" type="814" id="8622" />
+      <listitem open="0" type="814" id="8623" />
+      <listitem open="0" type="814" id="8624" />
+      <listitem open="0" type="814" id="8625" />
+      <listitem open="0" type="814" id="8626" />
+      <listitem open="0" type="814" id="8627" />
+      <listitem open="0" type="814" id="8628" />
+      <listitem open="0" type="814" id="8629" />
+      <listitem open="0" type="814" id="8630" />
+      <listitem open="0" type="814" id="8631" />
+      <listitem open="0" type="814" id="8632" />
+      <listitem open="0" type="814" id="8633" />
+      <listitem open="0" type="814" id="8634" />
+      <listitem open="0" type="814" id="8635" />
+      <listitem open="0" type="815" id="8476" />
+      <listitem open="0" type="815" id="8477" />
+      <listitem open="0" type="815" id="8478" />
+      <listitem open="0" type="815" id="8479" />
+      <listitem open="0" type="815" id="8480" />
+      <listitem open="0" type="815" id="8483" />
+      <listitem open="0" type="815" id="8485" />
+      <listitem open="0" type="815" id="8487" />
+      <listitem open="0" type="815" id="8489" />
+      <listitem open="0" type="815" id="8491" />
+      <listitem open="0" type="815" id="8493" />
+      <listitem open="0" type="815" id="8494" />
+      <listitem open="0" type="815" id="8496" />
+      <listitem open="0" type="815" id="8498" />
+      <listitem open="0" type="815" id="8501" />
+      <listitem open="0" type="815" id="8502" />
+      <listitem open="0" type="815" id="8504" />
+      <listitem open="0" type="815" id="8506" />
+      <listitem open="0" type="815" id="8508" />
+      <listitem open="0" type="815" id="8509" />
+      <listitem open="0" type="815" id="8511" />
+      <listitem open="0" type="815" id="8512" />
+      <listitem open="0" type="815" id="8515" />
+      <listitem open="0" type="815" id="8517" />
+      <listitem open="0" type="815" id="8519" />
+      <listitem open="0" type="815" id="8521" />
+      <listitem open="0" type="815" id="8523" />
+      <listitem open="0" type="815" id="8525" />
+      <listitem open="0" type="815" id="8527" />
+      <listitem open="0" type="815" id="8529" />
+      <listitem open="0" type="815" id="8532" />
+      <listitem open="0" type="815" id="8534" />
+      <listitem open="0" type="815" id="8536" />
+      <listitem open="0" type="815" id="8538" />
+      <listitem open="0" type="815" id="8539" />
+      <listitem open="0" type="815" id="8540" />
+      <listitem open="0" type="815" id="8541" />
+      <listitem open="0" type="815" id="8542" />
+      <listitem open="0" type="815" id="8545" />
+      <listitem open="0" type="815" id="8546" />
+      <listitem open="0" type="815" id="8549" />
+      <listitem open="0" type="815" id="8551" />
+      <listitem open="0" type="815" id="8553" />
+      <listitem open="0" type="815" id="8555" />
+      <listitem open="0" type="815" id="8557" />
+      <listitem open="0" type="815" id="8560" />
+      <listitem open="0" type="815" id="8563" />
+      <listitem open="0" type="815" id="8565" />
+      <listitem open="0" type="815" id="8567" />
+      <listitem open="0" type="815" id="8568" />
+      <listitem open="0" type="815" id="8570" />
+      <listitem open="0" type="815" id="8571" />
+      <listitem open="0" type="815" id="8572" />
+      <listitem open="0" type="815" id="8574" />
+      <listitem open="0" type="815" id="8576" />
+      <listitem open="0" type="815" id="8578" />
+      <listitem open="0" type="815" id="8579" />
+      <listitem open="0" type="815" id="8582" />
+      <listitem open="0" type="815" id="8583" />
+      <listitem open="0" type="815" id="8584" />
+      <listitem open="0" type="815" id="8585" />
+      <listitem open="0" type="815" id="8586" />
+      <listitem open="0" type="815" id="8587" />
+      <listitem open="0" type="815" id="8589" />
+      <listitem open="0" type="815" id="8590" />
+      <listitem open="0" type="815" id="8592" />
+      <listitem open="0" type="815" id="8593" />
+      <listitem open="0" type="815" id="8595" />
+      <listitem open="0" type="815" id="8596" />
+      <listitem open="0" type="815" id="8597" />
+      <listitem open="0" type="815" id="8599" />
+      <listitem open="0" type="815" id="8601" />
+      <listitem open="0" type="815" id="8602" />
+      <listitem open="0" type="815" id="8604" />
+      <listitem open="0" type="815" id="8605" />
+      <listitem open="0" type="815" id="8606" />
+      <listitem open="0" type="815" id="8607" />
+      <listitem open="0" type="815" id="8608" />
+      <listitem open="0" type="815" id="8609" />
+      <listitem open="0" type="815" id="8610" />
+     </listitem>
+     <listitem open="1" type="813" id="8458" />
+     <listitem open="1" type="813" id="2545" >
+      <listitem open="0" type="814" id="2556" />
+      <listitem open="0" type="814" id="2557" />
+      <listitem open="0" type="815" id="2546" />
+      <listitem open="0" type="815" id="2549" />
+      <listitem open="0" type="815" id="2550" />
+      <listitem open="0" type="815" id="2553" />
+     </listitem>
+     <listitem open="1" type="813" id="2578" >
+      <listitem open="0" type="815" id="2582" />
+     </listitem>
+     <listitem open="1" type="813" id="2567" >
+      <listitem open="0" type="814" id="2576" />
+      <listitem open="0" type="814" id="2577" />
+      <listitem open="0" type="815" id="2571" />
+      <listitem open="0" type="815" id="2574" />
+     </listitem>
+     <listitem open="1" type="813" id="2661" >
+      <listitem open="0" type="815" id="2666" />
+      <listitem open="0" type="815" id="2669" />
+      <listitem open="0" type="816" id="2662" />
+     </listitem>
+     <listitem open="1" type="813" id="2654" >
+      <listitem open="0" type="815" id="2655" />
+      <listitem open="0" type="815" id="2659" />
+     </listitem>
+     <listitem open="1" type="813" id="2670" >
+      <listitem open="0" type="814" id="2681" />
+      <listitem open="0" type="815" id="2671" />
+      <listitem open="0" type="815" id="2673" />
+      <listitem open="0" type="815" id="2677" />
+     </listitem>
+     <listitem open="1" type="813" id="2613" >
+      <listitem open="0" type="815" id="2617" />
+      <listitem open="0" type="815" id="2620" />
+      <listitem open="0" type="815" id="2621" />
+     </listitem>
+     <listitem open="1" type="813" id="2558" >
+      <listitem open="0" type="814" id="2566" />
+      <listitem open="0" type="815" id="2562" />
+      <listitem open="0" type="815" id="2565" />
+     </listitem>
+     <listitem open="1" type="813" id="2592" >
+      <listitem open="0" type="815" id="2596" />
+     </listitem>
+     <listitem open="1" type="813" id="2623" >
+      <listitem open="0" type="815" id="2627" />
+     </listitem>
+     <listitem open="1" type="813" id="2637" >
+      <listitem open="0" type="815" id="2641" />
+     </listitem>
+     <listitem open="1" type="813" id="2585" >
+      <listitem open="0" type="815" id="2589" />
+     </listitem>
+     <listitem open="1" type="813" id="2644" >
+      <listitem open="0" type="815" id="2648" />
+      <listitem open="0" type="815" id="2651" />
+      <listitem open="0" type="815" id="2652" />
+     </listitem>
+     <listitem open="1" type="813" id="2606" >
+      <listitem open="0" type="815" id="2610" />
+     </listitem>
+     <listitem open="1" type="813" id="2599" >
+      <listitem open="0" type="815" id="2603" />
+     </listitem>
+     <listitem open="1" type="813" id="2630" >
+      <listitem open="0" type="815" id="2634" />
+     </listitem>
+     <listitem open="1" type="813" id="14791" >
+      <listitem open="0" type="814" id="15608" />
+      <listitem open="0" type="814" id="15609" />
+      <listitem open="0" type="814" id="17010" />
+      <listitem open="0" type="815" id="16654" />
+      <listitem open="0" type="815" id="16655" />
+     </listitem>
+     <listitem open="0" type="813" id="17623" >
+      <listitem open="0" type="814" id="19373" />
+      <listitem open="0" type="814" id="19374" />
+      <listitem open="0" type="814" id="19421" />
+      <listitem open="0" type="814" id="19422" />
+      <listitem open="0" type="814" id="19423" />
+      <listitem open="0" type="814" id="19424" />
+      <listitem open="0" type="814" id="19425" />
+      <listitem open="0" type="814" id="19426" />
+      <listitem open="0" type="814" id="19427" />
+      <listitem open="0" type="814" id="19428" />
+      <listitem open="0" type="814" id="19429" />
+      <listitem open="0" type="814" id="19430" />
+      <listitem open="0" type="814" id="19431" />
+      <listitem open="0" type="814" id="19432" />
+      <listitem open="0" type="814" id="19433" />
+      <listitem open="0" type="814" id="19434" />
+      <listitem open="0" type="814" id="19435" />
+      <listitem open="0" type="814" id="19436" />
+      <listitem open="0" type="814" id="19437" />
+      <listitem open="0" type="815" id="19369" />
+      <listitem open="0" type="815" id="19372" />
+      <listitem open="0" type="815" id="19375" />
+      <listitem open="0" type="815" id="19377" />
+      <listitem open="0" type="815" id="19379" />
+      <listitem open="0" type="815" id="19381" />
+      <listitem open="0" type="815" id="19383" />
+      <listitem open="0" type="815" id="19385" />
+      <listitem open="0" type="815" id="19387" />
+      <listitem open="0" type="815" id="19388" />
+      <listitem open="0" type="815" id="19390" />
+      <listitem open="0" type="815" id="19391" />
+      <listitem open="0" type="815" id="19393" />
+      <listitem open="0" type="815" id="19394" />
+      <listitem open="0" type="815" id="19396" />
+      <listitem open="0" type="815" id="19397" />
+      <listitem open="0" type="815" id="19399" />
+      <listitem open="0" type="815" id="19400" />
+      <listitem open="0" type="815" id="19401" />
+      <listitem open="0" type="815" id="19403" />
+      <listitem open="0" type="815" id="19404" />
+      <listitem open="0" type="815" id="19406" />
+      <listitem open="0" type="815" id="19407" />
+      <listitem open="0" type="815" id="19409" />
+      <listitem open="0" type="815" id="19410" />
+      <listitem open="0" type="815" id="19411" />
+      <listitem open="0" type="815" id="19412" />
+      <listitem open="0" type="815" id="19413" />
+      <listitem open="0" type="815" id="19416" />
+     </listitem>
+     <listitem open="0" type="813" id="17748" >
+      <listitem open="0" type="814" id="17839" />
+      <listitem open="0" type="814" id="17841" />
+      <listitem open="0" type="814" id="17842" />
+      <listitem open="0" type="814" id="17843" />
+      <listitem open="0" type="814" id="17844" />
+      <listitem open="0" type="814" id="17845" />
+      <listitem open="0" type="814" id="17846" />
+      <listitem open="0" type="815" id="17752" />
+      <listitem open="0" type="815" id="17754" />
+      <listitem open="0" type="815" id="17755" />
+      <listitem open="0" type="815" id="17756" />
+      <listitem open="0" type="815" id="17757" />
+      <listitem open="0" type="815" id="17758" />
+      <listitem open="0" type="815" id="17759" />
+      <listitem open="0" type="815" id="17760" />
+      <listitem open="0" type="815" id="17763" />
+      <listitem open="0" type="815" id="17765" />
+      <listitem open="0" type="815" id="17767" />
+      <listitem open="0" type="815" id="17769" />
+      <listitem open="0" type="815" id="17771" />
+      <listitem open="0" type="815" id="17773" />
+      <listitem open="0" type="815" id="17776" />
+      <listitem open="0" type="815" id="17778" />
+      <listitem open="0" type="815" id="17779" />
+      <listitem open="0" type="815" id="17782" />
+      <listitem open="0" type="815" id="17783" />
+      <listitem open="0" type="815" id="17785" />
+      <listitem open="0" type="815" id="17787" />
+      <listitem open="0" type="815" id="17789" />
+      <listitem open="0" type="815" id="17791" />
+      <listitem open="0" type="815" id="17793" />
+      <listitem open="0" type="815" id="17795" />
+      <listitem open="0" type="815" id="17797" />
+      <listitem open="0" type="815" id="17798" />
+      <listitem open="0" type="815" id="17800" />
+      <listitem open="0" type="815" id="17801" />
+      <listitem open="0" type="815" id="17802" />
+      <listitem open="0" type="815" id="17803" />
+      <listitem open="0" type="815" id="17805" />
+      <listitem open="0" type="815" id="17806" />
+      <listitem open="0" type="815" id="17809" />
+      <listitem open="0" type="815" id="17811" />
+      <listitem open="0" type="815" id="17817" />
+      <listitem open="0" type="815" id="17821" />
+      <listitem open="0" type="815" id="17822" />
+      <listitem open="0" type="815" id="17826" />
+      <listitem open="0" type="815" id="17832" />
+      <listitem open="0" type="815" id="17836" />
+     </listitem>
+     <listitem open="1" type="813" id="8449" />
+     <listitem open="1" type="813" id="8450" />
+     <listitem open="1" type="813" id="8451" />
+     <listitem open="1" type="813" id="8452" />
+     <listitem open="1" type="813" id="8448" />
+     <listitem open="1" type="813" id="8455" />
+     <listitem open="1" type="813" id="8454" />
+     <listitem open="1" type="813" id="8453" />
+     <listitem open="1" type="813" id="8456" />
+     <listitem open="1" type="813" id="8459" />
+     <listitem open="1" type="813" id="8457" />
+     <listitem open="1" type="813" id="8447" />
+     <listitem open="1" type="813" id="8460" />
+     <listitem open="1" type="813" id="2682" >
+      <listitem open="0" type="814" id="2695" />
+      <listitem open="0" type="815" id="2689" />
+      <listitem open="0" type="815" id="2694" />
+      <listitem open="0" type="816" id="2683" />
+     </listitem>
+     <listitem open="1" type="813" id="2696" >
+      <listitem open="0" type="814" id="2704" />
+      <listitem open="0" type="815" id="2700" />
+      <listitem open="0" type="815" id="2703" />
+     </listitem>
+     <listitem open="1" type="813" id="8464" />
+     <listitem open="1" type="813" id="8446" />
+     <listitem open="1" type="813" id="8443" />
+     <listitem open="1" type="813" id="8444" />
+     <listitem open="1" type="813" id="8445" />
+     <listitem open="1" type="813" id="8441" />
+     <listitem open="1" type="813" id="8377" >
+      <listitem open="0" type="814" id="17740" />
+      <listitem open="0" type="814" id="17741" />
+      <listitem open="0" type="814" id="17742" />
+      <listitem open="0" type="814" id="17743" />
+      <listitem open="0" type="814" id="17744" />
+      <listitem open="0" type="815" id="17684" />
+      <listitem open="0" type="815" id="17686" />
+      <listitem open="0" type="815" id="17687" />
+      <listitem open="0" type="815" id="17688" />
+      <listitem open="0" type="815" id="17689" />
+      <listitem open="0" type="815" id="17690" />
+      <listitem open="0" type="815" id="17691" />
+      <listitem open="0" type="815" id="17693" />
+      <listitem open="0" type="815" id="17695" />
+      <listitem open="0" type="815" id="17697" />
+      <listitem open="0" type="815" id="17701" />
+      <listitem open="0" type="815" id="17703" />
+      <listitem open="0" type="815" id="17705" />
+      <listitem open="0" type="815" id="17707" />
+      <listitem open="0" type="815" id="17709" />
+      <listitem open="0" type="815" id="17711" />
+      <listitem open="0" type="815" id="17714" />
+      <listitem open="0" type="815" id="17716" />
+      <listitem open="0" type="815" id="17717" />
+      <listitem open="0" type="815" id="17718" />
+      <listitem open="0" type="815" id="17721" />
+      <listitem open="0" type="815" id="17724" />
+      <listitem open="0" type="815" id="17726" />
+      <listitem open="0" type="815" id="17727" />
+      <listitem open="0" type="815" id="17729" />
+      <listitem open="0" type="815" id="17730" />
+      <listitem open="0" type="815" id="17732" />
+      <listitem open="0" type="815" id="17733" />
+      <listitem open="0" type="815" id="17735" />
+      <listitem open="0" type="815" id="17736" />
+      <listitem open="0" type="815" id="17738" />
+      <listitem open="0" type="815" id="17739" />
+     </listitem>
+     <listitem open="1" type="813" id="8472" >
+      <listitem open="0" type="814" id="8473" />
+      <listitem open="0" type="814" id="8474" />
+     </listitem>
+     <listitem open="0" type="813" id="17818" />
+     <listitem open="1" type="813" id="8400" />
+     <listitem open="1" type="813" id="8404" />
+     <listitem open="0" type="813" id="17658" />
+     <listitem open="0" type="813" id="17828" />
+     <listitem open="0" type="813" id="19418" />
+     <listitem open="0" type="813" id="17833" />
+     <listitem open="0" type="813" id="17655" />
+     <listitem open="1" type="813" id="8490" />
+     <listitem open="0" type="813" id="17746" />
+     <listitem open="1" type="818" id="2684" >
+      <listitem open="1" type="813" id="2755" />
+      <listitem open="0" type="813" id="17645" />
+      <listitem open="0" type="813" id="17649" />
+      <listitem open="1" type="813" id="2685" />
+      <listitem open="1" type="813" id="2690" />
+      <listitem open="0" type="813" id="17625" />
+      <listitem open="0" type="813" id="17639" />
+      <listitem open="0" type="813" id="17629" />
+     </listitem>
+     <listitem open="1" type="818" id="2491" >
+      <listitem open="1" type="813" id="2749" />
+      <listitem open="1" type="813" id="2679" />
+      <listitem open="1" type="813" id="2492" />
+      <listitem open="1" type="813" id="8465" />
+     </listitem>
+     <listitem open="1" type="830" label="Datatypes" >
+      <listitem open="0" type="829" id="17723" />
+      <listitem open="1" type="829" id="8488" />
+      <listitem open="0" type="829" id="17677" />
+      <listitem open="1" type="829" id="8500" />
+      <listitem open="1" type="829" id="8467" />
+      <listitem open="1" type="829" id="8497" />
+      <listitem open="1" type="829" id="8471" />
+      <listitem open="1" type="829" id="8507" />
+      <listitem open="1" type="829" id="8486" />
+      <listitem open="0" type="829" id="17838" />
+      <listitem open="1" type="829" id="2551" />
+      <listitem open="1" type="829" id="8481" />
+      <listitem open="1" type="829" id="2658" />
+      <listitem open="1" type="829" id="2660" />
+      <listitem open="1" type="829" id="2753" />
+      <listitem open="0" type="829" id="17634" />
+      <listitem open="1" type="829" id="8580" />
+      <listitem open="1" type="829" id="8484" />
+      <listitem open="1" type="829" id="8382" />
+      <listitem open="1" type="829" id="8469" />
+      <listitem open="1" type="829" id="8505" />
+      <listitem open="1" type="829" id="2471" />
+      <listitem open="1" type="829" id="2470" />
+      <listitem open="0" type="829" id="19402" />
+      <listitem open="1" type="829" id="8369" />
+      <listitem open="1" type="829" id="2493" />
+      <listitem open="0" type="829" id="17699" />
+      <listitem open="1" type="829" id="2473" />
+      <listitem open="0" type="829" id="17819" />
+      <listitem open="1" type="829" id="2472" />
+      <listitem open="1" type="829" id="2468" />
+      <listitem open="0" type="829" id="17668" />
+      <listitem open="0" type="829" id="17659" />
+      <listitem open="1" type="829" id="2474" />
+      <listitem open="0" type="829" id="17829" />
+      <listitem open="0" type="829" id="17646" />
+      <listitem open="0" type="829" id="17650" />
+      <listitem open="1" type="829" id="2746" />
+      <listitem open="1" type="829" id="2691" />
+      <listitem open="0" type="829" id="17640" />
+      <listitem open="0" type="829" id="19419" />
+      <listitem open="0" type="829" id="17834" />
+      <listitem open="1" type="829" id="2475" />
+      <listitem open="1" type="829" id="2750" />
+      <listitem open="1" type="829" id="2680" />
+      <listitem open="1" type="829" id="8466" />
+      <listitem open="1" type="829" id="8470" />
+      <listitem open="0" type="829" id="17840" />
+      <listitem open="1" type="829" id="8468" />
+      <listitem open="1" type="829" id="2476" />
+      <listitem open="0" type="829" id="17656" />
+      <listitem open="0" type="829" id="17747" />
+      <listitem open="0" type="829" id="19368" />
+      <listitem open="1" type="829" id="2479" />
+     </listitem>
+     <listitem open="1" type="831" id="8372" />
+     <listitem open="0" type="831" id="17680" />
+    </listitem>
+    <listitem open="1" type="802" label="Use Case View" />
+    <listitem open="1" type="821" label="Component View" />
+    <listitem open="1" type="827" label="Deployment View" />
+    <listitem open="1" type="836" label="Entity Relationship Model" />
+   </listitem>
+  </listview>
+  <codegeneration>
+   <codegenerator language="Cpp" >
+    <classifiercodedocument writeOutCode="true" package="" id="2477" parent_class="2477" fileExt=".cpp" fileName="guiframework" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;guiframework.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2478" tag="operation_2478" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2480" tag="operation_2480" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2481" tag="operation_2481" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Parent class to child class" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2483" tag="operation_2483" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2485" tag="operation_2485" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2487" tag="operation_2487" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2489" tag="operation_2489" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2495" tag="operation_2495" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2498" tag="operation_2498" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2500" tag="operation_2500" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2502" tag="operation_2502" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2504" tag="operation_2504" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2505" tag="operation_2505" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2506" tag="operation_2506" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2507" tag="operation_2507" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2509" tag="operation_2509" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2510" tag="operation_2510" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2511" tag="operation_2511" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Child class to parent class" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2513" tag="operation_2513" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2515" tag="operation_2515" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2517" tag="operation_2517" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2519" tag="operation_2519" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2521" tag="operation_2521" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2523" tag="operation_2523" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2526" tag="operation_2526" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2528" tag="operation_2528" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2530" tag="operation_2530" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2532" tag="operation_2532" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2533" tag="operation_2533" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2534" tag="operation_2534" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2535" tag="operation_2535" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2536" tag="operation_2536" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2539" tag="operation_2539" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2540" tag="operation_2540" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2543" tag="hblock_tag_0" canDelete="false" classfield_id="2543" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2543" tag="hblock_tag_1" canDelete="false" classfield_id="2543" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiframework.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2543" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2543" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2543" tag="hblock_tag_0" canDelete="false" classfield_id="2543" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2543" tag="hblock_tag_1" canDelete="false" classfield_id="2543" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="2492" parent_class="2492" fileExt=".cpp" fileName="string" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			string.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="2679" parent_class="2679" fileExt=".cpp" fileName="map" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;map.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			map.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="2749" parent_class="2749" fileExt=".cpp" fileName="list" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;list.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			list.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="8465" parent_class="8465" fileExt=".cpp" fileName="vector" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;vector.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2544" parent_class="2544" fileExt=".cpp" fileName="guiserver" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;guiserver.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2708" tag="operation_2708" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// GUIServer constructor" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2709" tag="operation_2709" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// GUIServer destructor" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2710" tag="operation_2710" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// exec loop" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2711" tag="operation_2711" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2713" tag="operation_2713" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2714" tag="operation_2714" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2716" tag="operation_2716" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2717" tag="operation_2717" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Reimplementation of virtual functions" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2719" tag="operation_2719" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2721" tag="operation_2721" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2723" tag="operation_2723" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2725" tag="operation_2725" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2728" tag="operation_2728" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2731" tag="operation_2731" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2733" tag="operation_2733" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2735" tag="operation_2735" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2737" tag="operation_2737" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2738" tag="operation_2738" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2739" tag="operation_2739" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2740" tag="operation_2740" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2742" tag="operation_2742" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2743" tag="operation_2743" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2744" tag="operation_2744" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2747" tag="hblock_tag_0" canDelete="false" classfield_id="2747" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2747" tag="hblock_tag_1" canDelete="false" classfield_id="2747" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2748" tag="hblock_tag_2" canDelete="false" classfield_id="2748" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2748" tag="hblock_tag_3" canDelete="false" classfield_id="2748" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2751" tag="hblock_tag_4" canDelete="false" classfield_id="2751" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2751" tag="hblock_tag_5" canDelete="false" classfield_id="2751" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2752" tag="hblock_tag_6" canDelete="false" classfield_id="2752" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2752" tag="hblock_tag_7" canDelete="false" classfield_id="2752" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2754" tag="hblock_tag_8" canDelete="false" classfield_id="2754" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2754" tag="hblock_tag_9" canDelete="false" classfield_id="2754" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2756" tag="hblock_tag_10" canDelete="false" classfield_id="2756" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2756" tag="hblock_tag_11" canDelete="false" classfield_id="2756" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiserver.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2747" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2747" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2747" tag="hblock_tag_0" canDelete="false" classfield_id="2747" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2747" tag="hblock_tag_1" canDelete="false" classfield_id="2747" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2748" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2748" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2748" tag="hblock_tag_2" canDelete="false" classfield_id="2748" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2748" tag="hblock_tag_3" canDelete="false" classfield_id="2748" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2751" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2751" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2751" tag="hblock_tag_4" canDelete="false" classfield_id="2751" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2751" tag="hblock_tag_5" canDelete="false" classfield_id="2751" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2752" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2752" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2752" tag="hblock_tag_6" canDelete="false" classfield_id="2752" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2752" tag="hblock_tag_7" canDelete="false" classfield_id="2752" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2754" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2754" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2754" tag="hblock_tag_8" canDelete="false" classfield_id="2754" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2754" tag="hblock_tag_9" canDelete="false" classfield_id="2754" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2756" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2756" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2756" tag="hblock_tag_10" canDelete="false" classfield_id="2756" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2756" tag="hblock_tag_11" canDelete="false" classfield_id="2756" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2545" parent_class="2545" fileExt=".cpp" fileName="request" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;request.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2546" tag="operation_2546" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2549" tag="operation_2549" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2550" tag="operation_2550" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2553" tag="operation_2553" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2556" tag="hblock_tag_0" canDelete="false" classfield_id="2556" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2556" tag="hblock_tag_1" canDelete="false" classfield_id="2556" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2557" tag="hblock_tag_2" canDelete="false" classfield_id="2557" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2557" tag="hblock_tag_3" canDelete="false" classfield_id="2557" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			request.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2556" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2556" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2556" tag="hblock_tag_0" canDelete="false" classfield_id="2556" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2556" tag="hblock_tag_1" canDelete="false" classfield_id="2556" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2557" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2557" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2557" tag="hblock_tag_2" canDelete="false" classfield_id="2557" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2557" tag="hblock_tag_3" canDelete="false" classfield_id="2557" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="15024" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15024" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2558" parent_class="2558" fileExt=".cpp" fileName="requestglobalcall" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestglobalcall.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2562" tag="operation_2562" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2565" tag="operation_2565" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2566" tag="hblock_tag_0" canDelete="false" classfield_id="2566" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2566" tag="hblock_tag_1" canDelete="false" classfield_id="2566" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestglobalcall.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2566" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2566" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2566" tag="hblock_tag_0" canDelete="false" classfield_id="2566" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2566" tag="hblock_tag_1" canDelete="false" classfield_id="2566" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2567" parent_class="2567" fileExt=".cpp" fileName="requestcall" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestcall.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2571" tag="operation_2571" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2574" tag="operation_2574" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2576" tag="hblock_tag_0" canDelete="false" classfield_id="2576" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2576" tag="hblock_tag_1" canDelete="false" classfield_id="2576" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2577" tag="hblock_tag_2" canDelete="false" classfield_id="2577" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2577" tag="hblock_tag_3" canDelete="false" classfield_id="2577" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestcall.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2576" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2576" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2576" tag="hblock_tag_0" canDelete="false" classfield_id="2576" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2576" tag="hblock_tag_1" canDelete="false" classfield_id="2576" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2577" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2577" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2577" tag="hblock_tag_2" canDelete="false" classfield_id="2577" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2577" tag="hblock_tag_3" canDelete="false" classfield_id="2577" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2578" parent_class="2578" fileExt=".cpp" fileName="requestanswer" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestanswer.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2582" tag="operation_2582" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestanswer.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2585" parent_class="2585" fileExt=".cpp" fileName="requestrefuse" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestrefuse.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2589" tag="operation_2589" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestrefuse.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2592" parent_class="2592" fileExt=".cpp" fileName="requesthold" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requesthold.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2596" tag="operation_2596" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requesthold.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2599" parent_class="2599" fileExt=".cpp" fileName="requestunhold" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestunhold.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2603" tag="operation_2603" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestunhold.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2606" parent_class="2606" fileExt=".cpp" fileName="requesttransfer" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requesttransfer.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2610" tag="operation_2610" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requesttransfer.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2613" parent_class="2613" fileExt=".cpp" fileName="requestglobal" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestglobal.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2617" tag="operation_2617" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2620" tag="operation_2620" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2621" tag="operation_2621" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestglobal.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2623" parent_class="2623" fileExt=".cpp" fileName="requestmute" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestmute.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2627" tag="operation_2627" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestmute.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2630" parent_class="2630" fileExt=".cpp" fileName="requestunmute" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestunmute.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2634" tag="operation_2634" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestunmute.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2637" parent_class="2637" fileExt=".cpp" fileName="requestquit" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestquit.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2641" tag="operation_2641" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestquit.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2644" parent_class="2644" fileExt=".cpp" fileName="requestsyntaxerror" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestsyntaxerror.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2648" tag="operation_2648" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2651" tag="operation_2651" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2652" tag="operation_2652" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestsyntaxerror.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2654" parent_class="2654" fileExt=".cpp" fileName="requestcreatorbase" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestcreatorbase.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2655" tag="operation_2655" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2659" tag="operation_2659" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestcreatorbase.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2661" parent_class="2661" fileExt=".cpp" fileName="requestcreator" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestcreator.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2666" tag="operation_2666" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2669" tag="operation_2669" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestcreator.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2670" parent_class="2670" fileExt=".cpp" fileName="requestfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2671" tag="operation_2671" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2673" tag="operation_2673" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2677" tag="operation_2677" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2681" tag="hblock_tag_0" canDelete="false" classfield_id="2681" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2681" tag="hblock_tag_1" canDelete="false" classfield_id="2681" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestfactory.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2681" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2681" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2681" tag="hblock_tag_0" canDelete="false" classfield_id="2681" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2681" tag="hblock_tag_1" canDelete="false" classfield_id="2681" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2682" parent_class="2682" fileExt=".cpp" fileName="tcpsessionreader" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsessionreader.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2689" tag="operation_2689" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2694" tag="operation_2694" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2695" tag="hblock_tag_0" canDelete="false" classfield_id="2695" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2695" tag="hblock_tag_1" canDelete="false" classfield_id="2695" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsessionreader.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2695" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2695" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2695" tag="hblock_tag_0" canDelete="false" classfield_id="2695" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2695" tag="hblock_tag_1" canDelete="false" classfield_id="2695" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="2685" parent_class="2685" fileExt=".cpp" fileName="tcpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsession.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="2690" parent_class="2690" fileExt=".cpp" fileName="tcpsocket" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsocket.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsocket.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="2755" parent_class="2755" fileExt=".cpp" fileName="mutex" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;mutex.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			mutex.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="2696" parent_class="2696" fileExt=".cpp" fileName="tcpsessionwriter" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsessionwriter.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="2700" tag="operation_2700" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="2703" tag="operation_2703" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="2704" tag="hblock_tag_0" canDelete="false" classfield_id="2704" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2704" tag="hblock_tag_1" canDelete="false" classfield_id="2704" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsessionwriter.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2704" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2704" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2704" tag="hblock_tag_0" canDelete="false" classfield_id="2704" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2704" tag="hblock_tag_1" canDelete="false" classfield_id="2704" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8368" parent_class="8368" fileExt=".cpp" fileName="audiodevice" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiodevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="8370" tag="hblock_tag_0" canDelete="false" classfield_id="8370" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8370" tag="hblock_tag_1" canDelete="false" classfield_id="8370" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8371" tag="hblock_tag_2" canDelete="false" classfield_id="8371" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8371" tag="hblock_tag_3" canDelete="false" classfield_id="8371" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiodevice.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8370" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8370" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8370" tag="hblock_tag_0" canDelete="false" classfield_id="8370" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8370" tag="hblock_tag_1" canDelete="false" classfield_id="8370" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8371" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8371" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8371" tag="hblock_tag_2" canDelete="false" classfield_id="8371" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8371" tag="hblock_tag_3" canDelete="false" classfield_id="8371" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8372" parent_class="8372" fileExt=".cpp" fileName="calltype" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;calltype.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			calltype.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8377" parent_class="8377" fileExt=".cpp" fileName="voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="17684" tag="operation_17684" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17686" tag="operation_17686" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17687" tag="operation_17687" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Pure virtual functions" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17688" tag="operation_17688" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17689" tag="operation_17689" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17690" tag="operation_17690" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17691" tag="operation_17691" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17693" tag="operation_17693" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17695" tag="operation_17695" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17697" tag="operation_17697" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17701" tag="operation_17701" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17703" tag="operation_17703" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17705" tag="operation_17705" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17707" tag="operation_17707" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17709" tag="operation_17709" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17711" tag="operation_17711" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17714" tag="operation_17714" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17716" tag="operation_17716" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17717" tag="operation_17717" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17718" tag="operation_17718" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17721" tag="operation_17721" canDelete="false" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17724" tag="operation_17724" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17726" tag="operation_17726" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17727" tag="operation_17727" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17729" tag="operation_17729" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17730" tag="operation_17730" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17732" tag="operation_17732" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17733" tag="operation_17733" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17735" tag="operation_17735" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17736" tag="operation_17736" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17738" tag="operation_17738" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17739" tag="operation_17739" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="17740" tag="hblock_tag_0" canDelete="false" classfield_id="17740" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17740" tag="hblock_tag_1" canDelete="false" classfield_id="17740" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17741" tag="hblock_tag_2" canDelete="false" classfield_id="17741" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17741" tag="hblock_tag_3" canDelete="false" classfield_id="17741" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17742" tag="hblock_tag_4" canDelete="false" classfield_id="17742" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17742" tag="hblock_tag_5" canDelete="false" classfield_id="17742" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17743" tag="hblock_tag_6" canDelete="false" classfield_id="17743" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17743" tag="hblock_tag_7" canDelete="false" classfield_id="17743" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17744" tag="hblock_tag_8" canDelete="false" classfield_id="17744" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17744" tag="hblock_tag_9" canDelete="false" classfield_id="17744" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17740" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17740" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17740" tag="hblock_tag_0" canDelete="false" classfield_id="17740" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17740" tag="hblock_tag_1" canDelete="false" classfield_id="17740" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17741" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17741" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17741" tag="hblock_tag_2" canDelete="false" classfield_id="17741" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17741" tag="hblock_tag_3" canDelete="false" classfield_id="17741" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17742" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17742" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17742" tag="hblock_tag_4" canDelete="false" classfield_id="17742" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17742" tag="hblock_tag_5" canDelete="false" classfield_id="17742" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17743" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17743" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17743" tag="hblock_tag_6" canDelete="false" classfield_id="17743" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17743" tag="hblock_tag_7" canDelete="false" classfield_id="17743" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17744" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17744" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17744" tag="hblock_tag_8" canDelete="false" classfield_id="17744" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17744" tag="hblock_tag_9" canDelete="false" classfield_id="17744" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17749" field_type="2490471" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8378" parent_class="8378" fileExt=".cpp" fileName="call" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;call.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="8379" tag="operation_8379" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Constructor" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8384" tag="operation_8384" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Destructor" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8385" tag="operation_8385" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Handle call-id" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8386" tag="operation_8386" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8388" tag="operation_8388" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor and modifior of VoIPLink" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8389" tag="operation_8389" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8391" tag="operation_8391" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor and modifior of status" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8392" tag="operation_8392" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8394" tag="operation_8394" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Handle id name and id number" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8395" tag="operation_8395" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8397" tag="operation_8397" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8398" tag="operation_8398" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8401" tag="operation_8401" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Handle state" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8402" tag="operation_8402" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8405" tag="operation_8405" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Handle type of call (incoming or outoing)" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8406" tag="operation_8406" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8408" tag="operation_8408" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8409" tag="operation_8409" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8410" tag="operation_8410" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8411" tag="operation_8411" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8412" tag="operation_8412" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8413" tag="operation_8413" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8414" tag="operation_8414" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8415" tag="operation_8415" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8416" tag="operation_8416" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8417" tag="operation_8417" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8418" tag="operation_8418" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8419" tag="operation_8419" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8420" tag="operation_8420" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8421" tag="operation_8421" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8422" tag="operation_8422" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8425" tag="operation_8425" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8426" tag="operation_8426" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8427" tag="operation_8427" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8428" tag="operation_8428" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8429" tag="operation_8429" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8430" tag="operation_8430" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8432" tag="operation_8432" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8433" tag="operation_8433" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="8434" tag="hblock_tag_0" canDelete="false" classfield_id="8434" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8434" tag="hblock_tag_1" canDelete="false" classfield_id="8434" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8435" tag="hblock_tag_2" canDelete="false" classfield_id="8435" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8435" tag="hblock_tag_3" canDelete="false" classfield_id="8435" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8436" tag="hblock_tag_4" canDelete="false" classfield_id="8436" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8436" tag="hblock_tag_5" canDelete="false" classfield_id="8436" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8437" tag="hblock_tag_6" canDelete="false" classfield_id="8437" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8437" tag="hblock_tag_7" canDelete="false" classfield_id="8437" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8438" tag="hblock_tag_8" canDelete="false" classfield_id="8438" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8438" tag="hblock_tag_9" canDelete="false" classfield_id="8438" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8439" tag="hblock_tag_10" canDelete="false" classfield_id="8439" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8439" tag="hblock_tag_11" canDelete="false" classfield_id="8439" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8440" tag="hblock_tag_12" canDelete="false" classfield_id="8440" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8440" tag="hblock_tag_13" canDelete="false" classfield_id="8440" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			call.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8434" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8434" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8434" tag="hblock_tag_0" canDelete="false" classfield_id="8434" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8434" tag="hblock_tag_1" canDelete="false" classfield_id="8434" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8435" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8435" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8435" tag="hblock_tag_2" canDelete="false" classfield_id="8435" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8435" tag="hblock_tag_3" canDelete="false" classfield_id="8435" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8436" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8436" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8436" tag="hblock_tag_4" canDelete="false" classfield_id="8436" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8436" tag="hblock_tag_5" canDelete="false" classfield_id="8436" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8437" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8437" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8437" tag="hblock_tag_6" canDelete="false" classfield_id="8437" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8437" tag="hblock_tag_7" canDelete="false" classfield_id="8437" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8438" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8438" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8438" tag="hblock_tag_8" canDelete="false" classfield_id="8438" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8438" tag="hblock_tag_9" canDelete="false" classfield_id="8438" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8439" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8439" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8439" tag="hblock_tag_10" canDelete="false" classfield_id="8439" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8439" tag="hblock_tag_11" canDelete="false" classfield_id="8439" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8440" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8440" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8440" tag="hblock_tag_12" canDelete="false" classfield_id="8440" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8440" tag="hblock_tag_13" canDelete="false" classfield_id="8440" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8400" parent_class="8400" fileExt=".cpp" fileName="enum callstate" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;enum callstate.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			enum callstate.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8404" parent_class="8404" fileExt=".cpp" fileName="enum calltype" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;enum calltype.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			enum calltype.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8441" parent_class="8441" fileExt=".cpp" fileName="uint8" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;uint8.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint8.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8443" parent_class="8443" fileExt=".cpp" fileName="uint16" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;uint16.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint16.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8444" parent_class="8444" fileExt=".cpp" fileName="uint32" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;uint32.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint32.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8445" parent_class="8445" fileExt=".cpp" fileName="uint64" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;uint64.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint64.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8446" parent_class="8446" fileExt=".cpp" fileName="uint128" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;uint128.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint128.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8447" parent_class="8447" fileExt=".cpp" fileName="stunmsghdr" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunmsghdr.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmsghdr.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8448" parent_class="8448" fileExt=".cpp" fileName="stunatrhdr" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatrhdr.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrhdr.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8449" parent_class="8449" fileExt=".cpp" fileName="stunaddress4" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunaddress4.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunaddress4.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8450" parent_class="8450" fileExt=".cpp" fileName="stunatraddress4" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatraddress4.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatraddress4.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8451" parent_class="8451" fileExt=".cpp" fileName="stunatrchangerequest" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatrchangerequest.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrchangerequest.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8452" parent_class="8452" fileExt=".cpp" fileName="stunatrerror" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatrerror.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrerror.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8453" parent_class="8453" fileExt=".cpp" fileName="stunatrunknown" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatrunknown.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrunknown.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8454" parent_class="8454" fileExt=".cpp" fileName="stunatrstring" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatrstring.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrstring.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8455" parent_class="8455" fileExt=".cpp" fileName="stunatrintegrity" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunatrintegrity.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrintegrity.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8456" parent_class="8456" fileExt=".cpp" fileName="stunhmacstatus" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunhmacstatus.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunhmacstatus.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8457" parent_class="8457" fileExt=".cpp" fileName="stunmessage" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunmessage.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmessage.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8458" parent_class="8458" fileExt=".cpp" fileName="nattype" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;nattype.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			nattype.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8459" parent_class="8459" fileExt=".cpp" fileName="stunmediarelay" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunmediarelay.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmediarelay.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8460" parent_class="8460" fileExt=".cpp" fileName="stunserverinfo" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunserverinfo.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunserverinfo.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8461" parent_class="8461" fileExt=".cpp" fileName="audiolayer" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiolayer.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiolayer.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8462" parent_class="8462" fileExt=".cpp" fileName="codecdescriptor" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;codecdescriptor.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			codecdescriptor.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8463" parent_class="8463" fileExt=".cpp" fileName="error" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;error.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			error.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8464" parent_class="8464" fileExt=".cpp" fileName="tonegenerator" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tonegenerator.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tonegenerator.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8472" parent_class="8472" fileExt=".cpp" fileName="device_t" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;device_t.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="8473" tag="hblock_tag_0" canDelete="false" classfield_id="8473" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8473" tag="hblock_tag_1" canDelete="false" classfield_id="8473" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8474" tag="hblock_tag_2" canDelete="false" classfield_id="8474" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8474" tag="hblock_tag_3" canDelete="false" classfield_id="8474" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			device_t.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8473" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8473" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8473" tag="hblock_tag_0" canDelete="false" classfield_id="8473" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8473" tag="hblock_tag_1" canDelete="false" classfield_id="8473" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8474" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8474" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8474" tag="hblock_tag_2" canDelete="false" classfield_id="8474" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8474" tag="hblock_tag_3" canDelete="false" classfield_id="8474" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8475" parent_class="8475" fileExt=".cpp" fileName="managerimpl" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;managerimpl.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="8476" tag="operation_8476" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8477" tag="operation_8477" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8478" tag="operation_8478" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Init a new VoIPLink, audio codec and audio driver" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8479" tag="operation_8479" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8480" tag="operation_8480" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Set the graphic user interface" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8483" tag="operation_8483" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to tonegenerator" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8485" tag="operation_8485" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to error" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8487" tag="operation_8487" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to audiodriver" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8489" tag="operation_8489" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to number of calls " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8491" tag="operation_8491" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Modifior of number of calls " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8493" tag="operation_8493" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to current call id " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8494" tag="operation_8494" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Modifior of current call id " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8496" tag="operation_8496" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to the Call vector " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8498" tag="operation_8498" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to the Call with the id 'id' " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8501" tag="operation_8501" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Handle codec number" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8502" tag="operation_8502" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8504" tag="operation_8504" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="// Accessor to VoIPLinkVector" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8506" tag="operation_8506" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8508" tag="operation_8508" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8509" tag="operation_8509" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8511" tag="operation_8511" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Attribute a new random id for a new call &amp;#010;and check if it's already attributed to existing calls. &amp;#010;If not exists, returns 'id' otherwise return 0 " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8512" tag="operation_8512" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Add a new call at the end of the CallVector with identifiant 'id'" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8515" tag="operation_8515" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Erase the Call(id) from the CallVector" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8517" tag="operation_8517" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Functions which occur with a user's action" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8519" tag="operation_8519" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8521" tag="operation_8521" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8523" tag="operation_8523" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8525" tag="operation_8525" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8527" tag="operation_8527" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8529" tag="operation_8529" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8532" tag="operation_8532" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8534" tag="operation_8534" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8536" tag="operation_8536" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8538" tag="operation_8538" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8539" tag="operation_8539" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8540" tag="operation_8540" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8541" tag="operation_8541" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8542" tag="operation_8542" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8545" tag="operation_8545" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8546" tag="operation_8546" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Handle choice of the DTMF-send-way&amp;#010;&amp;#010;@param   id: callid of the line.&amp;#010;@param   code: pressed key." />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8549" tag="operation_8549" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8551" tag="operation_8551" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8553" tag="operation_8553" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8555" tag="operation_8555" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8557" tag="operation_8557" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8560" tag="operation_8560" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8563" tag="operation_8563" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8565" tag="operation_8565" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8567" tag="operation_8567" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8568" tag="operation_8568" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8570" tag="operation_8570" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8571" tag="operation_8571" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8572" tag="operation_8572" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Handle audio sounds heard by a caller while they wait for their &amp;#010;connection to a called party to be completed." />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8574" tag="operation_8574" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Handle played music when an incoming call occurs" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8576" tag="operation_8576" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8578" tag="operation_8578" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Notification of incoming call when you are already busy" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8579" tag="operation_8579" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Get information about firewall &amp;#010;@param	stunSvrAddr: stun server" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8582" tag="operation_8582" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8583" tag="operation_8583" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8584" tag="operation_8584" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8585" tag="operation_8585" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8586" tag="operation_8586" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8587" tag="operation_8587" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8589" tag="operation_8589" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8590" tag="operation_8590" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8592" tag="operation_8592" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8593" tag="operation_8593" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8595" tag="operation_8595" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8596" tag="operation_8596" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8597" tag="operation_8597" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8599" tag="operation_8599" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Functions about audio device" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8601" tag="operation_8601" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8602" tag="operation_8602" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8604" tag="operation_8604" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Init default values for the different fields" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8605" tag="operation_8605" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Returns the number of calls in the vector" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8606" tag="operation_8606" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Create .PROGNAME directory in home user and create &amp;#010;configuration tree from the settings file if this file exists.&amp;#010;&amp;#010;@return	0 if creating file failed&amp;#010;		1 if config-file exists&amp;#010;		2 if file doesn't exist yet." />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8607" tag="operation_8607" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Initialize audiocodec" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8608" tag="operation_8608" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Initialize audiodriver" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8609" tag="operation_8609" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Initialize zeroconf module and scanning" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="8610" tag="operation_8610" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Init the Gui interface (after setting it) inside setGui" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="8611" tag="hblock_tag_0" canDelete="false" classfield_id="8611" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@return the value of _tone" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8611" tag="hblock_tag_1" canDelete="false" classfield_id="8611" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@param value the value of _tone" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8612" tag="hblock_tag_2" canDelete="false" classfield_id="8612" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8612" tag="hblock_tag_3" canDelete="false" classfield_id="8612" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8613" tag="hblock_tag_4" canDelete="false" classfield_id="8613" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8613" tag="hblock_tag_5" canDelete="false" classfield_id="8613" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8614" tag="hblock_tag_6" canDelete="false" classfield_id="8614" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8614" tag="hblock_tag_7" canDelete="false" classfield_id="8614" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8615" tag="hblock_tag_8" canDelete="false" classfield_id="8615" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@return the value of _voIPLinkVector" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8615" tag="hblock_tag_9" canDelete="false" classfield_id="8615" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@param value the value of _voIPLinkVector" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8616" tag="hblock_tag_10" canDelete="false" classfield_id="8616" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _callVector&amp;#010;Vector of calls&amp;#010;@return the value of _callVector" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8616" tag="hblock_tag_11" canDelete="false" classfield_id="8616" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _callVector&amp;#010;Vector of calls&amp;#010;@param value the value of _callVector" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8617" tag="hblock_tag_12" canDelete="false" classfield_id="8617" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@return the value of _codecDescVector" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8617" tag="hblock_tag_13" canDelete="false" classfield_id="8617" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@param value the value of _codecDescVector" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8618" tag="hblock_tag_14" canDelete="false" classfield_id="8618" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@return the value of _mutex" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8618" tag="hblock_tag_15" canDelete="false" classfield_id="8618" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@param value the value of _mutex" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8619" tag="hblock_tag_16" canDelete="false" classfield_id="8619" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8619" tag="hblock_tag_17" canDelete="false" classfield_id="8619" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8620" tag="hblock_tag_18" canDelete="false" classfield_id="8620" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8620" tag="hblock_tag_19" canDelete="false" classfield_id="8620" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8621" tag="hblock_tag_20" canDelete="false" classfield_id="8621" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _startTime&amp;#010;For the call timer&amp;#010;@return the value of _startTime" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8621" tag="hblock_tag_21" canDelete="false" classfield_id="8621" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _startTime&amp;#010;For the call timer&amp;#010;@param value the value of _startTime" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8622" tag="hblock_tag_22" canDelete="false" classfield_id="8622" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8622" tag="hblock_tag_23" canDelete="false" classfield_id="8622" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8623" tag="hblock_tag_24" canDelete="false" classfield_id="8623" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@return the value of _path" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8623" tag="hblock_tag_25" canDelete="false" classfield_id="8623" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@param value the value of _path" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8624" tag="hblock_tag_26" canDelete="false" classfield_id="8624" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8624" tag="hblock_tag_27" canDelete="false" classfield_id="8624" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8625" tag="hblock_tag_28" canDelete="false" classfield_id="8625" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8625" tag="hblock_tag_29" canDelete="false" classfield_id="8625" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8626" tag="hblock_tag_30" canDelete="false" classfield_id="8626" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8626" tag="hblock_tag_31" canDelete="false" classfield_id="8626" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8627" tag="hblock_tag_32" canDelete="false" classfield_id="8627" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8627" tag="hblock_tag_33" canDelete="false" classfield_id="8627" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8628" tag="hblock_tag_34" canDelete="false" classfield_id="8628" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8628" tag="hblock_tag_35" canDelete="false" classfield_id="8628" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8629" tag="hblock_tag_36" canDelete="false" classfield_id="8629" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8629" tag="hblock_tag_37" canDelete="false" classfield_id="8629" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8630" tag="hblock_tag_38" canDelete="false" classfield_id="8630" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@return the value of _spkr_volume" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8630" tag="hblock_tag_39" canDelete="false" classfield_id="8630" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@param value the value of _spkr_volume" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8631" tag="hblock_tag_40" canDelete="false" classfield_id="8631" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8631" tag="hblock_tag_41" canDelete="false" classfield_id="8631" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8632" tag="hblock_tag_42" canDelete="false" classfield_id="8632" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@return the value of _firewallPort" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8632" tag="hblock_tag_43" canDelete="false" classfield_id="8632" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@param value the value of _firewallPort" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8633" tag="hblock_tag_44" canDelete="false" classfield_id="8633" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8633" tag="hblock_tag_45" canDelete="false" classfield_id="8633" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8634" tag="hblock_tag_46" canDelete="false" classfield_id="8634" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@return the value of _loaded" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8634" tag="hblock_tag_47" canDelete="false" classfield_id="8634" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@param value the value of _loaded" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="8635" tag="hblock_tag_48" canDelete="false" classfield_id="8635" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@return the value of _useZeroconf" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="8635" tag="hblock_tag_49" canDelete="false" classfield_id="8635" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@param value the value of _useZeroconf" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			managerimpl.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8611" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="/////////////////////// Private variables/////////////////////" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8611" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8611" tag="hblock_tag_0" canDelete="false" classfield_id="8611" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@return the value of _tone" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8611" tag="hblock_tag_1" canDelete="false" classfield_id="8611" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@param value the value of _tone" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8612" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8612" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8612" tag="hblock_tag_2" canDelete="false" classfield_id="8612" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8612" tag="hblock_tag_3" canDelete="false" classfield_id="8612" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8613" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8613" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8613" tag="hblock_tag_4" canDelete="false" classfield_id="8613" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8613" tag="hblock_tag_5" canDelete="false" classfield_id="8613" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8614" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8614" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8614" tag="hblock_tag_6" canDelete="false" classfield_id="8614" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8614" tag="hblock_tag_7" canDelete="false" classfield_id="8614" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8615" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Vector of VoIPLink" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8615" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8615" tag="hblock_tag_8" canDelete="false" classfield_id="8615" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@return the value of _voIPLinkVector" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8615" tag="hblock_tag_9" canDelete="false" classfield_id="8615" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@param value the value of _voIPLinkVector" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8616" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Vector of calls" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8616" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8616" tag="hblock_tag_10" canDelete="false" classfield_id="8616" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _callVector&amp;#010;Vector of calls&amp;#010;@return the value of _callVector" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8616" tag="hblock_tag_11" canDelete="false" classfield_id="8616" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _callVector&amp;#010;Vector of calls&amp;#010;@param value the value of _callVector" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8617" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Vector of CodecDescriptor" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8617" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8617" tag="hblock_tag_12" canDelete="false" classfield_id="8617" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@return the value of _codecDescVector" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8617" tag="hblock_tag_13" canDelete="false" classfield_id="8617" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@param value the value of _codecDescVector" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8618" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Mutex to protect access to code section" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8618" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8618" tag="hblock_tag_14" canDelete="false" classfield_id="8618" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@return the value of _mutex" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8618" tag="hblock_tag_15" canDelete="false" classfield_id="8618" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@param value the value of _mutex" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8619" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8619" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8619" tag="hblock_tag_16" canDelete="false" classfield_id="8619" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8619" tag="hblock_tag_17" canDelete="false" classfield_id="8619" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8620" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8620" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8620" tag="hblock_tag_18" canDelete="false" classfield_id="8620" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8620" tag="hblock_tag_19" canDelete="false" classfield_id="8620" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8621" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="For the call timer" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8621" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8621" tag="hblock_tag_20" canDelete="false" classfield_id="8621" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _startTime&amp;#010;For the call timer&amp;#010;@return the value of _startTime" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8621" tag="hblock_tag_21" canDelete="false" classfield_id="8621" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _startTime&amp;#010;For the call timer&amp;#010;@param value the value of _startTime" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8622" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8622" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8622" tag="hblock_tag_22" canDelete="false" classfield_id="8622" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8622" tag="hblock_tag_23" canDelete="false" classfield_id="8622" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8623" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Path of the ConfigFile " />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8623" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8623" tag="hblock_tag_24" canDelete="false" classfield_id="8623" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@return the value of _path" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8623" tag="hblock_tag_25" canDelete="false" classfield_id="8623" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@param value the value of _path" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8624" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8624" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8624" tag="hblock_tag_26" canDelete="false" classfield_id="8624" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8624" tag="hblock_tag_27" canDelete="false" classfield_id="8624" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8625" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8625" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8625" tag="hblock_tag_28" canDelete="false" classfield_id="8625" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8625" tag="hblock_tag_29" canDelete="false" classfield_id="8625" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8626" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8626" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8626" tag="hblock_tag_30" canDelete="false" classfield_id="8626" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8626" tag="hblock_tag_31" canDelete="false" classfield_id="8626" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8627" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8627" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8627" tag="hblock_tag_32" canDelete="false" classfield_id="8627" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8627" tag="hblock_tag_33" canDelete="false" classfield_id="8627" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8628" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8628" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8628" tag="hblock_tag_34" canDelete="false" classfield_id="8628" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8628" tag="hblock_tag_35" canDelete="false" classfield_id="8628" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8629" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8629" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8629" tag="hblock_tag_36" canDelete="false" classfield_id="8629" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8629" tag="hblock_tag_37" canDelete="false" classfield_id="8629" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8630" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// To handle volume control" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8630" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8630" tag="hblock_tag_38" canDelete="false" classfield_id="8630" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@return the value of _spkr_volume" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8630" tag="hblock_tag_39" canDelete="false" classfield_id="8630" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@param value the value of _spkr_volume" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8631" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8631" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8631" tag="hblock_tag_40" canDelete="false" classfield_id="8631" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8631" tag="hblock_tag_41" canDelete="false" classfield_id="8631" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8632" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// To handle firewall" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8632" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8632" tag="hblock_tag_42" canDelete="false" classfield_id="8632" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@return the value of _firewallPort" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8632" tag="hblock_tag_43" canDelete="false" classfield_id="8632" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@param value the value of _firewallPort" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8633" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8633" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8633" tag="hblock_tag_44" canDelete="false" classfield_id="8633" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8633" tag="hblock_tag_45" canDelete="false" classfield_id="8633" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8634" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// Variables used in exception" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8634" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8634" tag="hblock_tag_46" canDelete="false" classfield_id="8634" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@return the value of _loaded" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8634" tag="hblock_tag_47" canDelete="false" classfield_id="8634" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@param value the value of _loaded" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8635" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// look if zeroconf scanning should run or not" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8635" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8635" tag="hblock_tag_48" canDelete="false" classfield_id="8635" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@return the value of _useZeroconf" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8635" tag="hblock_tag_49" canDelete="false" classfield_id="8635" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@param value the value of _useZeroconf" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="8490" parent_class="8490" fileExt=".cpp" fileName="unsigned int" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;unsigned int.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			unsigned int.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="14791" parent_class="14791" fileExt=".cpp" fileName="responsemessage" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;responsemessage.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="15608" tag="hblock_tag_0" canDelete="false" classfield_id="15608" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="15608" tag="hblock_tag_1" canDelete="false" classfield_id="15608" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="15609" tag="hblock_tag_2" canDelete="false" classfield_id="15609" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="15609" tag="hblock_tag_3" canDelete="false" classfield_id="15609" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17010" tag="hblock_tag_4" canDelete="false" classfield_id="17010" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="16654" tag="operation_16654" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="16655" tag="operation_16655" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="1" parent_id="17010" tag="hblock_tag_5" canDelete="false" classfield_id="17010" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			responsemessage.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="15608" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15608" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15608" tag="hblock_tag_0" canDelete="false" classfield_id="15608" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15608" tag="hblock_tag_1" canDelete="false" classfield_id="15608" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="15609" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15609" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15609" tag="hblock_tag_2" canDelete="false" classfield_id="15609" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15609" tag="hblock_tag_3" canDelete="false" classfield_id="15609" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17010" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17010" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17010" tag="hblock_tag_4" canDelete="false" classfield_id="17010" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17010" tag="hblock_tag_5" canDelete="false" classfield_id="17010" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="15024" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15024" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <codedocument writeOutCode="false" package="" id="Makefile_DOC" fileExt="" fileName="Makefile" >
+     <textblocks/>
+     <header>
+      <codecomment tag="" />
+     </header>
+    </codedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17623" parent_class="17623" fileExt=".cpp" fileName="sipcall" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipcall.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="19369" tag="operation_19369" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19372" tag="operation_19372" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="19373" tag="hblock_tag_0" canDelete="false" classfield_id="19373" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19373" tag="hblock_tag_1" canDelete="false" classfield_id="19373" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19374" tag="hblock_tag_2" canDelete="false" classfield_id="19374" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@return the value of enable_audio" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19374" tag="hblock_tag_3" canDelete="false" classfield_id="19374" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@param value the value of enable_audio" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="19375" tag="operation_19375" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Store information about incoming call and negociate payload" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19377" tag="operation_19377" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Use to answer to a ONHOLD/OFFHOLD event " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19379" tag="operation_19379" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Use to answer to an incoming call " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19381" tag="operation_19381" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19383" tag="operation_19383" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19385" tag="operation_19385" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Manage local audio port for each sipcall" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19387" tag="operation_19387" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19388" tag="operation_19388" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Manage id, did (dialog-id), cid (call-id) and tid (transaction-id) &amp;#010;for each sipcall" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19390" tag="operation_19390" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19391" tag="operation_19391" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19393" tag="operation_19393" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19394" tag="operation_19394" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19396" tag="operation_19396" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19397" tag="operation_19397" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19399" tag="operation_19399" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19400" tag="operation_19400" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Manage remote sdp audio port" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19401" tag="operation_19401" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19403" tag="operation_19403" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Manage audio codec" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19404" tag="operation_19404" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19406" tag="operation_19406" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19407" tag="operation_19407" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19409" tag="operation_19409" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19410" tag="operation_19410" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19411" tag="operation_19411" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19412" tag="operation_19412" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19413" tag="operation_19413" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="19416" tag="operation_19416" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="19421" tag="hblock_tag_4" canDelete="false" classfield_id="19421" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _cdv" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19421" tag="hblock_tag_5" canDelete="false" classfield_id="19421" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _cdv" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19422" tag="hblock_tag_6" canDelete="false" classfield_id="19422" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19422" tag="hblock_tag_7" canDelete="false" classfield_id="19422" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19423" tag="hblock_tag_8" canDelete="false" classfield_id="19423" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19423" tag="hblock_tag_9" canDelete="false" classfield_id="19423" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19424" tag="hblock_tag_10" canDelete="false" classfield_id="19424" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _cid&amp;#010;// call id&amp;#010;@return the value of _cid" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19424" tag="hblock_tag_11" canDelete="false" classfield_id="19424" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _cid&amp;#010;// call id&amp;#010;@param value the value of _cid" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19425" tag="hblock_tag_12" canDelete="false" classfield_id="19425" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _did&amp;#010;// dialog id&amp;#010;@return the value of _did" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19425" tag="hblock_tag_13" canDelete="false" classfield_id="19425" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _did&amp;#010;// dialog id&amp;#010;@param value the value of _did" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19426" tag="hblock_tag_14" canDelete="false" classfield_id="19426" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _tid&amp;#010;// transaction id&amp;#010;@return the value of _tid" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19426" tag="hblock_tag_15" canDelete="false" classfield_id="19426" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _tid&amp;#010;// transaction id&amp;#010;@param value the value of _tid" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19427" tag="hblock_tag_16" canDelete="false" classfield_id="19427" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@return the value of _standby" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19427" tag="hblock_tag_17" canDelete="false" classfield_id="19427" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@param value the value of _standby" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19428" tag="hblock_tag_18" canDelete="false" classfield_id="19428" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19428" tag="hblock_tag_19" canDelete="false" classfield_id="19428" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19429" tag="hblock_tag_20" canDelete="false" classfield_id="19429" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19429" tag="hblock_tag_21" canDelete="false" classfield_id="19429" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19430" tag="hblock_tag_22" canDelete="false" classfield_id="19430" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19430" tag="hblock_tag_23" canDelete="false" classfield_id="19430" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19431" tag="hblock_tag_24" canDelete="false" classfield_id="19431" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19431" tag="hblock_tag_25" canDelete="false" classfield_id="19431" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19432" tag="hblock_tag_26" canDelete="false" classfield_id="19432" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19432" tag="hblock_tag_27" canDelete="false" classfield_id="19432" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19433" tag="hblock_tag_28" canDelete="false" classfield_id="19433" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19433" tag="hblock_tag_29" canDelete="false" classfield_id="19433" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19434" tag="hblock_tag_30" canDelete="false" classfield_id="19434" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19434" tag="hblock_tag_31" canDelete="false" classfield_id="19434" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19435" tag="hblock_tag_32" canDelete="false" classfield_id="19435" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19435" tag="hblock_tag_33" canDelete="false" classfield_id="19435" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19436" tag="hblock_tag_34" canDelete="false" classfield_id="19436" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _local_sendrecv" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19436" tag="hblock_tag_35" canDelete="false" classfield_id="19436" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _local_sendrecv" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="19437" tag="hblock_tag_36" canDelete="false" classfield_id="19437" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _remote_sendrecv" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="19437" tag="hblock_tag_37" canDelete="false" classfield_id="19437" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _remote_sendrecv" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipcall.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:11&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="19373" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19373" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19373" tag="hblock_tag_0" canDelete="false" classfield_id="19373" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19373" tag="hblock_tag_1" canDelete="false" classfield_id="19373" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19374" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="1 started, -1 stopped" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19374" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19374" tag="hblock_tag_2" canDelete="false" classfield_id="19374" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@return the value of enable_audio" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19374" tag="hblock_tag_3" canDelete="false" classfield_id="19374" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@param value the value of enable_audio" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19421" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="///////////////////////////// Private member variables///////////////////////////" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19421" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19421" tag="hblock_tag_4" canDelete="false" classfield_id="19421" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _cdv" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19421" tag="hblock_tag_5" canDelete="false" classfield_id="19421" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _cdv" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19422" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19422" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19422" tag="hblock_tag_6" canDelete="false" classfield_id="19422" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19422" tag="hblock_tag_7" canDelete="false" classfield_id="19422" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19423" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19423" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19423" tag="hblock_tag_8" canDelete="false" classfield_id="19423" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19423" tag="hblock_tag_9" canDelete="false" classfield_id="19423" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19424" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// call id" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19424" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19424" tag="hblock_tag_10" canDelete="false" classfield_id="19424" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _cid&amp;#010;// call id&amp;#010;@return the value of _cid" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19424" tag="hblock_tag_11" canDelete="false" classfield_id="19424" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _cid&amp;#010;// call id&amp;#010;@param value the value of _cid" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19425" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// dialog id" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19425" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19425" tag="hblock_tag_12" canDelete="false" classfield_id="19425" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _did&amp;#010;// dialog id&amp;#010;@return the value of _did" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19425" tag="hblock_tag_13" canDelete="false" classfield_id="19425" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _did&amp;#010;// dialog id&amp;#010;@param value the value of _did" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19426" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// transaction id" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19426" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19426" tag="hblock_tag_14" canDelete="false" classfield_id="19426" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _tid&amp;#010;// transaction id&amp;#010;@return the value of _tid" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19426" tag="hblock_tag_15" canDelete="false" classfield_id="19426" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _tid&amp;#010;// transaction id&amp;#010;@param value the value of _tid" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19427" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// wait for a cid and did when outgoing call is made" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19427" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19427" tag="hblock_tag_16" canDelete="false" classfield_id="19427" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@return the value of _standby" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19427" tag="hblock_tag_17" canDelete="false" classfield_id="19427" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@param value the value of _standby" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19428" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19428" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19428" tag="hblock_tag_18" canDelete="false" classfield_id="19428" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19428" tag="hblock_tag_19" canDelete="false" classfield_id="19428" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19429" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19429" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19429" tag="hblock_tag_20" canDelete="false" classfield_id="19429" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19429" tag="hblock_tag_21" canDelete="false" classfield_id="19429" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19430" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19430" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19430" tag="hblock_tag_22" canDelete="false" classfield_id="19430" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19430" tag="hblock_tag_23" canDelete="false" classfield_id="19430" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19431" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19431" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19431" tag="hblock_tag_24" canDelete="false" classfield_id="19431" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19431" tag="hblock_tag_25" canDelete="false" classfield_id="19431" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19432" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19432" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19432" tag="hblock_tag_26" canDelete="false" classfield_id="19432" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19432" tag="hblock_tag_27" canDelete="false" classfield_id="19432" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19433" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19433" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19433" tag="hblock_tag_28" canDelete="false" classfield_id="19433" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19433" tag="hblock_tag_29" canDelete="false" classfield_id="19433" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19434" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19434" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19434" tag="hblock_tag_30" canDelete="false" classfield_id="19434" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19434" tag="hblock_tag_31" canDelete="false" classfield_id="19434" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19435" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19435" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19435" tag="hblock_tag_32" canDelete="false" classfield_id="19435" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19435" tag="hblock_tag_33" canDelete="false" classfield_id="19435" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19436" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19436" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19436" tag="hblock_tag_34" canDelete="false" classfield_id="19436" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _local_sendrecv" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19436" tag="hblock_tag_35" canDelete="false" classfield_id="19436" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _local_sendrecv" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19437" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19437" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19437" tag="hblock_tag_36" canDelete="false" classfield_id="19437" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _remote_sendrecv" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19437" tag="hblock_tag_37" canDelete="false" classfield_id="19437" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _remote_sendrecv" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17624" parent_class="17624" fileExt=".cpp" fileName="audiortprtx" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiortprtx.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="17633" tag="operation_17633" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17638" tag="operation_17638" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="17641" tag="hblock_tag_0" canDelete="false" classfield_id="17641" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of time&amp;#010;// For incoming call notification &amp;#010;@return the value of time" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17641" tag="hblock_tag_1" canDelete="false" classfield_id="17641" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of time&amp;#010;// For incoming call notification &amp;#010;@param value the value of time" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="17642" tag="operation_17642" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="17643" tag="hblock_tag_2" canDelete="false" classfield_id="17643" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17643" tag="hblock_tag_3" canDelete="false" classfield_id="17643" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17644" tag="hblock_tag_4" canDelete="false" classfield_id="17644" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17644" tag="hblock_tag_5" canDelete="false" classfield_id="17644" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17647" tag="hblock_tag_6" canDelete="false" classfield_id="17647" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17647" tag="hblock_tag_7" canDelete="false" classfield_id="17647" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17648" tag="hblock_tag_8" canDelete="false" classfield_id="17648" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17648" tag="hblock_tag_9" canDelete="false" classfield_id="17648" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17651" tag="hblock_tag_10" canDelete="false" classfield_id="17651" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17651" tag="hblock_tag_11" canDelete="false" classfield_id="17651" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17652" tag="hblock_tag_12" canDelete="false" classfield_id="17652" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17652" tag="hblock_tag_13" canDelete="false" classfield_id="17652" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="17653" tag="operation_17653" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17654" tag="operation_17654" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17664" tag="operation_17664" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiortprtx.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17626" field_type="6750318" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17626" tag="" canDelete="false" writeOutText="false" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17626" tag="" canDelete="false" writeOutText="false" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17626" tag="" canDelete="false" writeOutText="false" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17626" tag="" canDelete="false" writeOutText="false" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17626" tag="" canDelete="false" writeOutText="false" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17630" field_type="2097195" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17641" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// For incoming call notification " />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17641" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17641" tag="hblock_tag_0" canDelete="false" classfield_id="17641" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of time&amp;#010;// For incoming call notification &amp;#010;@return the value of time" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17641" tag="hblock_tag_1" canDelete="false" classfield_id="17641" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of time&amp;#010;// For incoming call notification &amp;#010;@param value the value of time" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17643" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17643" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17643" tag="hblock_tag_2" canDelete="false" classfield_id="17643" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17643" tag="hblock_tag_3" canDelete="false" classfield_id="17643" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17644" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17644" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17644" tag="hblock_tag_4" canDelete="false" classfield_id="17644" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17644" tag="hblock_tag_5" canDelete="false" classfield_id="17644" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17647" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17647" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17647" tag="hblock_tag_6" canDelete="false" classfield_id="17647" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17647" tag="hblock_tag_7" canDelete="false" classfield_id="17647" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17648" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17648" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17648" tag="hblock_tag_8" canDelete="false" classfield_id="17648" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17648" tag="hblock_tag_9" canDelete="false" classfield_id="17648" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17651" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17651" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17651" tag="hblock_tag_10" canDelete="false" classfield_id="17651" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17651" tag="hblock_tag_11" canDelete="false" classfield_id="17651" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17652" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17652" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17652" tag="hblock_tag_12" canDelete="false" classfield_id="17652" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17652" tag="hblock_tag_13" canDelete="false" classfield_id="17652" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="17625" parent_class="17625" fileExt=".cpp" fileName="thread" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;thread.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="17626" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17626" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="17626" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="17626" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="17626" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			thread.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:21&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17626" field_type="0" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17626" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17626" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17626" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17626" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17626" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="17629" parent_class="17629" fileExt=".cpp" fileName="timerport" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;timerport.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			timerport.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17630" field_type="7077997" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17630" tag="" canDelete="false" writeOutText="false" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17634" parent_class="17634" fileExt=".cpp" fileName="sipcall*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipcall*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			SipCall*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="17639" parent_class="17639" fileExt=".cpp" fileName="time" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;time.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			Time.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17640" parent_class="17640" fileExt=".cpp" fileName="ost::time*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;ost::time*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			ost::Time*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="17645" parent_class="17645" fileExt=".cpp" fileName="rtpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;rtpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			RTPSession.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17646" parent_class="17646" fileExt=".cpp" fileName="ost::rtpsession*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;ost::rtpsession*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			ost::RTPSession*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="17649" parent_class="17649" fileExt=".cpp" fileName="symmetricrtpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;symmetricrtpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			SymmetricRTPSession.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17650" parent_class="17650" fileExt=".cpp" fileName="ost::symmetricrtpsession*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;ost::symmetricrtpsession*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			ost::SymmetricRTPSession*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17655" parent_class="17655" fileExt=".cpp" fileName="unsigned char" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;unsigned char.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			unsigned char.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17656" parent_class="17656" fileExt=".cpp" fileName="unsigned char*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;unsigned char*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			unsigned char*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17658" parent_class="17658" fileExt=".cpp" fileName="int16" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;int16.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int16.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17659" parent_class="17659" fileExt=".cpp" fileName="int16*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;int16*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int16*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17668" parent_class="17668" fileExt=".cpp" fileName="int&amp;" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;int&amp;.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int&amp;.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17670" parent_class="17670" fileExt=".cpp" fileName="audiortp" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiortp.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="17671" tag="operation_17671" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17672" tag="operation_17672" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17673" tag="operation_17673" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17675" tag="operation_17675" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="17678" tag="hblock_tag_0" canDelete="false" classfield_id="17678" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17678" tag="hblock_tag_1" canDelete="false" classfield_id="17678" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17679" tag="hblock_tag_2" canDelete="false" classfield_id="17679" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17679" tag="hblock_tag_3" canDelete="false" classfield_id="17679" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiortp.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17678" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17678" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17678" tag="hblock_tag_0" canDelete="false" classfield_id="17678" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17678" tag="hblock_tag_1" canDelete="false" classfield_id="17678" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17679" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17679" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17679" tag="hblock_tag_2" canDelete="false" classfield_id="17679" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17679" tag="hblock_tag_3" canDelete="false" classfield_id="17679" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17677" parent_class="17677" fileExt=".cpp" fileName="audiortprtx*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiortprtx*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			AudioRtpRTX*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17680" parent_class="17680" fileExt=".cpp" fileName="voiplinktype" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplinktype.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinktype.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17683" parent_class="17683" fileExt=".cpp" fileName="audiocodec" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiocodec.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			AudioCodec.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17699" parent_class="17699" fileExt=".cpp" fileName="const string&amp;" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;const string&amp;.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			const string&amp;.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17723" parent_class="17723" fileExt=".cpp" fileName="audiocodec*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiocodec*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			AudioCodec*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17745" parent_class="17745" fileExt=".cpp" fileName="eventthread" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;eventthread.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			EventThread.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17746" parent_class="17746" fileExt=".cpp" fileName="vector" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;vector.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17747" parent_class="17747" fileExt=".cpp" fileName="vector&lt; codecdescriptor * >" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;vector&lt; codecdescriptor * >.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector&lt; CodecDescriptor * >.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17748" parent_class="17748" fileExt=".cpp" fileName="sipvoiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipvoiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="17752" tag="operation_17752" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17754" tag="operation_17754" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17755" tag="operation_17755" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17756" tag="operation_17756" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17757" tag="operation_17757" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17758" tag="operation_17758" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17759" tag="operation_17759" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17760" tag="operation_17760" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17763" tag="operation_17763" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17765" tag="operation_17765" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17767" tag="operation_17767" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17769" tag="operation_17769" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17771" tag="operation_17771" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17773" tag="operation_17773" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17776" tag="operation_17776" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17778" tag="operation_17778" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17779" tag="operation_17779" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17782" tag="operation_17782" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="To handle the local port" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17783" tag="operation_17783" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17785" tag="operation_17785" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Add a new SipCall at the end of the SipCallVector with identifiant 'id'" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17787" tag="operation_17787" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17789" tag="operation_17789" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Erase the SipCall(id) from the SipCallVector" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17791" tag="operation_17791" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Return a pointer to the SipCall with identifiant 'id'" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17793" tag="operation_17793" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Accessor to the audio codec of SipCall with identifiant 'id'" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17795" tag="operation_17795" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17797" tag="operation_17797" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17798" tag="operation_17798" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17800" tag="operation_17800" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17801" tag="operation_17801" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="If you are behind a NAT, you have to use STUN server, specified in &amp;#010;STUN configuration(you can change this one by default) to give you an &amp;#010;public IP address and assign a port number.&amp;#010;&amp;#010;Return 0 if an error occured and 1 if no error." />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17802" tag="operation_17802" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="To Store the local IP address, and allow to know if the network is &amp;#010;available.&amp;#010;&amp;#010;Return -1 if an error occured and 0 if no error" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17803" tag="operation_17803" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Return -1 if an error occured and 0 if no error" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17805" tag="operation_17805" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Allow the authentication when you want register&amp;#010;Return -1 if an error occured and 0 if no error " />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17806" tag="operation_17806" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Build a sip address from the user configuration&amp;#010;Example: &quot;Display user name&quot; &lt;sip:user@host.com>&amp;#010;Return the result in a string" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17809" tag="operation_17809" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Build a sip address with the number that you want to call&amp;#010;Example: sip:124@domain.com&amp;#010;Return the result in a string" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17811" tag="operation_17811" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Beginning point to make outgoing call.&amp;#010;Check the 'from' and 'to' url.&amp;#010;Allocate local audio port.&amp;#010;Build SDP body.&amp;#010;Return -1 if an error occured and 0 if no error" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17817" tag="operation_17817" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Look for call with same cid/did &amp;#010;Return the id of the found call" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17821" tag="operation_17821" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17822" tag="operation_17822" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Return true if payload is already in the rtpmap and false if not" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17826" tag="operation_17826" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="To build sdp with 200 OK when answered call" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17832" tag="operation_17832" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="To build sdp when call is on-hold" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="17836" tag="operation_17836" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="To build sdp when call is off-hold" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="17839" tag="hblock_tag_0" canDelete="false" classfield_id="17839" >
+         <header>
+          <cppcodedocumentation tag="" text="Get the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _evThread" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17839" tag="hblock_tag_1" canDelete="false" classfield_id="17839" >
+         <header>
+          <cppcodedocumentation tag="" text="Set the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _evThread" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17841" tag="hblock_tag_2" canDelete="false" classfield_id="17841" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17841" tag="hblock_tag_3" canDelete="false" classfield_id="17841" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17842" tag="hblock_tag_4" canDelete="false" classfield_id="17842" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17842" tag="hblock_tag_5" canDelete="false" classfield_id="17842" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17843" tag="hblock_tag_6" canDelete="false" classfield_id="17843" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17843" tag="hblock_tag_7" canDelete="false" classfield_id="17843" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17844" tag="hblock_tag_8" canDelete="false" classfield_id="17844" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17844" tag="hblock_tag_9" canDelete="false" classfield_id="17844" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17845" tag="hblock_tag_10" canDelete="false" classfield_id="17845" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17845" tag="hblock_tag_11" canDelete="false" classfield_id="17845" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17846" tag="hblock_tag_12" canDelete="false" classfield_id="17846" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17846" tag="hblock_tag_13" canDelete="false" classfield_id="17846" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:45&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17749" field_type="6619252" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17749" tag="" canDelete="false" writeOutText="false" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17839" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="///////////////////////////// Private member variables///////////////////////////" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17839" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17839" tag="hblock_tag_0" canDelete="false" classfield_id="17839" >
+        <header>
+         <cppcodedocumentation tag="" text="Get the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _evThread" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17839" tag="hblock_tag_1" canDelete="false" classfield_id="17839" >
+        <header>
+         <cppcodedocumentation tag="" text="Set the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _evThread" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17841" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17841" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17841" tag="hblock_tag_2" canDelete="false" classfield_id="17841" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17841" tag="hblock_tag_3" canDelete="false" classfield_id="17841" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17842" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17842" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17842" tag="hblock_tag_4" canDelete="false" classfield_id="17842" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17842" tag="hblock_tag_5" canDelete="false" classfield_id="17842" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17843" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17843" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17843" tag="hblock_tag_6" canDelete="false" classfield_id="17843" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17843" tag="hblock_tag_7" canDelete="false" classfield_id="17843" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17844" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17844" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17844" tag="hblock_tag_8" canDelete="false" classfield_id="17844" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17844" tag="hblock_tag_9" canDelete="false" classfield_id="17844" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17845" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17845" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17845" tag="hblock_tag_10" canDelete="false" classfield_id="17845" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17845" tag="hblock_tag_11" canDelete="false" classfield_id="17845" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17846" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17846" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17846" tag="hblock_tag_12" canDelete="false" classfield_id="17846" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17846" tag="hblock_tag_13" canDelete="false" classfield_id="17846" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17818" parent_class="17818" fileExt=".cpp" fileName="exosip_event_t" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;exosip_event_t.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			eXosip_event_t.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17819" parent_class="17819" fileExt=".cpp" fileName="exosip_event_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;exosip_event_t*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			eXosip_event_t*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17828" parent_class="17828" fileExt=".cpp" fileName="osip_message_t" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;osip_message_t.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			osip_message_t.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17829" parent_class="17829" fileExt=".cpp" fileName="osip_message_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;osip_message_t*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			osip_message_t*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17833" parent_class="17833" fileExt=".cpp" fileName="sdp_message_t" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sdp_message_t.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_message_t.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17834" parent_class="17834" fileExt=".cpp" fileName="sdp_message_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sdp_message_t*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_message_t*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17838" parent_class="17838" fileExt=".cpp" fileName="eventthread*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;eventthread*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			EventThread*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17840" parent_class="17840" fileExt=".cpp" fileName="std::vector&lt; sipcall * >" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;std::vector&lt; sipcall * >.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			std::vector&lt; SipCall * >.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="19368" parent_class="19368" fileExt=".cpp" fileName="vector&lt; codecdescriptor *, allocator &lt; codecdescriptor * > >" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;vector&lt; codecdescriptor *, allocator &lt; codecdescriptor * > >.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector&lt; CodecDescriptor *, allocator &lt; CodecDescriptor * > >.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="19402" parent_class="19402" fileExt=".cpp" fileName="char*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;char*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			char*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="19418" parent_class="19418" fileExt=".cpp" fileName="sdp_media_t" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sdp_media_t.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_media_t.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="19419" parent_class="19419" fileExt=".cpp" fileName="sdp_media_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sdp_media_t*.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_media_t*.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2477" parent_class="2477" fileExt=".h" fileName="guiframework" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef GUIFRAMEWORK_H&amp;#010;#define GUIFRAMEWORK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2477" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class GuiFramework&amp;#010; Copyright (C) 2004-2005 Savoir-Faire Linux inc.&amp;#010; Author: Laurielle Lea &lt;laurielle.lea@savoirfairelinux.com>&amp;#010;                                                                             &amp;#010; This program is free software; you can redistribute it and/or modify&amp;#010; it under the terms of the GNU General Public License as published by&amp;#010; the Free Software Foundation; either version 2 of the License, or&amp;#010; (at your option) any later version.&amp;#010;                                                                             &amp;#010; This program is distributed in the hope that it will be useful,&amp;#010; but WITHOUT ANY WARRANTY; without even the implied warranty of&amp;#010; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&amp;#010; GNU General Public License for more details.&amp;#010;                                                                             &amp;#010; You should have received a copy of the GNU General Public License&amp;#010; along with this program; if not, write to the Free Software&amp;#010;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="GuiFramework ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2478" tag="operation_2478" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2480" tag="operation_2480" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2481" tag="operation_2481" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2483" tag="operation_2483" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2485" tag="operation_2485" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2487" tag="operation_2487" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2489" tag="operation_2489" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2495" tag="operation_2495" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2498" tag="operation_2498" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param error " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2500" tag="operation_2500" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param status " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2502" tag="operation_2502" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2504" tag="operation_2504" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2505" tag="operation_2505" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2506" tag="operation_2506" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2507" tag="operation_2507" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2509" tag="operation_2509" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2510" tag="operation_2510" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2511" tag="operation_2511" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2513" tag="operation_2513" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2515" tag="operation_2515" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2517" tag="operation_2517" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2519" tag="operation_2519" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2521" tag="operation_2521" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2523" tag="operation_2523" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2526" tag="operation_2526" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2528" tag="operation_2528" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2530" tag="operation_2530" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2532" tag="operation_2532" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2533" tag="operation_2533" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2534" tag="operation_2534" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2535" tag="operation_2535" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2536" tag="operation_2536" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2539" tag="operation_2539" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2540" tag="operation_2540" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param code " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2543" tag="tblock_0" canDelete="false" indentLevel="1" text=" std.string _message;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2543" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2543" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2543" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2543" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //GUIFRAMEWORK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiframework.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2543" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2543" tag="tblock_0" canDelete="false" indentLevel="1" text=" std.string _message;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2543" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2543" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2543" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2543" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="cppheader2492" parent_class="2492" fileExt=".h" fileName="string" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STRING_H&amp;#010;#define STRING_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2492" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class string&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="string ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STRING_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			string.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="cppheader2679" parent_class="2679" fileExt=".h" fileName="map" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef MAP_H&amp;#010;#define MAP_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2679" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class map&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="map ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //MAP_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			map.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="cppheader2749" parent_class="2749" fileExt=".h" fileName="list" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef LIST_H&amp;#010;#define LIST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2749" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class list&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="list ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //LIST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			list.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="std" id="cppheader8465" parent_class="8465" fileExt=".h" fileName="vector" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VECTOR_H&amp;#010;#define VECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8465" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class vector&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="vector ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is std&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2544" parent_class="2544" fileExt=".h" fileName="guiserver" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef GUISERVER_H&amp;#010;#define GUISERVER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;guiframework.h&quot;&amp;#010;#include &quot;requestfactory.h&quot;&amp;#010;#include &quot;tcpsession.h&quot;&amp;#010;#include &quot;string.h&quot;&amp;#010;#include &quot;list.h&quot;&amp;#010;#include &quot;mutex.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2544" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class GUIServer&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="GUIServer ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2708" tag="operation_2708" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2709" tag="operation_2709" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2710" tag="operation_2710" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2711" tag="operation_2711" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param request " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2713" tag="operation_2713" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2714" tag="operation_2714" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param response " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2716" tag="operation_2716" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2717" tag="operation_2717" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2719" tag="operation_2719" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2721" tag="operation_2721" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2723" tag="operation_2723" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2725" tag="operation_2725" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2728" tag="operation_2728" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2731" tag="operation_2731" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param error " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2733" tag="operation_2733" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param status " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2735" tag="operation_2735" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2737" tag="operation_2737" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2738" tag="operation_2738" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2739" tag="operation_2739" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2740" tag="operation_2740" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2742" tag="operation_2742" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2743" tag="operation_2743" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2744" tag="operation_2744" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2747" tag="tblock_0" canDelete="false" indentLevel="1" text=" ost::TCPSession* sessionIn;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2748" tag="tblock_1" canDelete="false" indentLevel="1" text=" ost::TCPSession* sessionOut;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2751" tag="tblock_2" canDelete="false" indentLevel="1" text=" std::list&lt; Request * > _requests;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2752" tag="tblock_3" canDelete="false" indentLevel="1" text=" std.list _responses;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2754" tag="tblock_4" canDelete="false" indentLevel="1" text=" RequestFactory* _factory;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2756" tag="tblock_5" canDelete="false" indentLevel="1" text=" ost.Mutex _mutex;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2747" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2747" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2747" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="2747" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2748" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="2748" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2748" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="2748" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2751" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="2751" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2751" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="2751" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2752" tag="hblock_tag_11" canDelete="false" indentLevel="1" classfield_id="2752" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2752" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="2752" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2754" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="2754" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2754" tag="hblock_tag_14" canDelete="false" indentLevel="1" classfield_id="2754" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2756" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="2756" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2756" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="2756" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //GUISERVER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiserver.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2747" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2747" tag="tblock_0" canDelete="false" indentLevel="1" text=" ost::TCPSession* sessionIn;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2747" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2747" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2747" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="2747" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2748" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2748" tag="tblock_1" canDelete="false" indentLevel="1" text=" ost::TCPSession* sessionOut;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2748" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="2748" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2748" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="2748" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2751" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2751" tag="tblock_2" canDelete="false" indentLevel="1" text=" std::list&lt; Request * > _requests;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2751" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="2751" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2751" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="2751" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2752" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2752" tag="tblock_3" canDelete="false" indentLevel="1" text=" std.list _responses;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2752" tag="hblock_tag_11" canDelete="false" indentLevel="1" classfield_id="2752" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2752" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="2752" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2754" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2754" tag="tblock_4" canDelete="false" indentLevel="1" text=" RequestFactory* _factory;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2754" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="2754" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2754" tag="hblock_tag_14" canDelete="false" indentLevel="1" classfield_id="2754" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2756" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2756" tag="tblock_5" canDelete="false" indentLevel="1" text=" ost.Mutex _mutex;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2756" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="2756" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2756" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="2756" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2545" parent_class="2545" fileExt=".h" fileName="request" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUEST_H&amp;#010;#define REQUEST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2545" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Request&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="15024" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ResponseMessage ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Request ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2546" tag="operation_2546" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2549" tag="operation_2549" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2550" tag="operation_2550" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param gui " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2553" tag="operation_2553" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param code &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2556" tag="tblock_1" canDelete="false" indentLevel="1" text=" std.string _sequenceId;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2557" tag="tblock_2" canDelete="false" indentLevel="1" text=" std.string _arg;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2556" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="2556" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2556" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="2556" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2557" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="2557" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2557" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="2557" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUEST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			request.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2556" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2556" tag="tblock_1" canDelete="false" indentLevel="1" text=" std.string _sequenceId;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2556" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="2556" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2556" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="2556" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2557" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2557" tag="tblock_2" canDelete="false" indentLevel="1" text=" std.string _arg;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2557" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="2557" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2557" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="2557" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="15024" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15024" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" ResponseMessage ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2558" parent_class="2558" fileExt=".h" fileName="requestglobalcall" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTGLOBALCALL_H&amp;#010;#define REQUESTGLOBALCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;request.h&quot;&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2558" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestGlobalCall&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestGlobalCall ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2562" tag="operation_2562" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2565" tag="operation_2565" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2566" tag="tblock_0" canDelete="false" indentLevel="1" text=" std.string _callid;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2566" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2566" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2566" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2566" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTGLOBALCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestglobalcall.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2566" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2566" tag="tblock_0" canDelete="false" indentLevel="1" text=" std.string _callid;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2566" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2566" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2566" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2566" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2567" parent_class="2567" fileExt=".h" fileName="requestcall" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTCALL_H&amp;#010;#define REQUESTCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;requestglobalcall.h&quot;&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2567" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestCall&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestCall ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2571" tag="operation_2571" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2574" tag="operation_2574" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param gui " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2576" tag="tblock_0" canDelete="false" indentLevel="1" text=" std.string _destination;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2577" tag="tblock_1" canDelete="false" indentLevel="1" text=" std.string _account;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2576" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2576" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2576" tag="hblock_tag_2" canDelete="false" indentLevel="1" classfield_id="2576" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2577" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="2577" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2577" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="2577" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestcall.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2576" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2576" tag="tblock_0" canDelete="false" indentLevel="1" text=" std.string _destination;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2576" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2576" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2576" tag="hblock_tag_2" canDelete="false" indentLevel="1" classfield_id="2576" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2577" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2577" tag="tblock_1" canDelete="false" indentLevel="1" text=" std.string _account;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2577" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="2577" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2577" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="2577" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2578" parent_class="2578" fileExt=".h" fileName="requestanswer" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTANSWER_H&amp;#010;#define REQUESTANSWER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;requestglobalcall.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2578" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestAnswer&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestAnswer ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2582" tag="operation_2582" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTANSWER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestanswer.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2585" parent_class="2585" fileExt=".h" fileName="requestrefuse" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTREFUSE_H&amp;#010;#define REQUESTREFUSE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2585" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestRefuse&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestRefuse ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2589" tag="operation_2589" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTREFUSE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestrefuse.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2592" parent_class="2592" fileExt=".h" fileName="requesthold" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTHOLD_H&amp;#010;#define REQUESTHOLD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2592" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestHold&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestHold ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2596" tag="operation_2596" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTHOLD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requesthold.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2599" parent_class="2599" fileExt=".h" fileName="requestunhold" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTUNHOLD_H&amp;#010;#define REQUESTUNHOLD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2599" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestUnhold&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestUnhold ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2603" tag="operation_2603" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTUNHOLD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestunhold.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2606" parent_class="2606" fileExt=".h" fileName="requesttransfer" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTTRANSFER_H&amp;#010;#define REQUESTTRANSFER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2606" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestTransfer&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestTransfer ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2610" tag="operation_2610" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTTRANSFER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requesttransfer.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2613" parent_class="2613" fileExt=".h" fileName="requestglobal" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTGLOBAL_H&amp;#010;#define REQUESTGLOBAL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;request.h&quot;&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2613" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestGlobal&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestGlobal ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2617" tag="operation_2617" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2620" tag="operation_2620" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2621" tag="operation_2621" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param gui " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTGLOBAL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestglobal.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2623" parent_class="2623" fileExt=".h" fileName="requestmute" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTMUTE_H&amp;#010;#define REQUESTMUTE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2623" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestMute&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestMute ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2627" tag="operation_2627" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTMUTE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestmute.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2630" parent_class="2630" fileExt=".h" fileName="requestunmute" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTUNMUTE_H&amp;#010;#define REQUESTUNMUTE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2630" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestUnmute&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestUnmute ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2634" tag="operation_2634" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTUNMUTE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestunmute.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2637" parent_class="2637" fileExt=".h" fileName="requestquit" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTQUIT_H&amp;#010;#define REQUESTQUIT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2637" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestQuit&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestQuit ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2641" tag="operation_2641" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTQUIT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestquit.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2644" parent_class="2644" fileExt=".h" fileName="requestsyntaxerror" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTSYNTAXERROR_H&amp;#010;#define REQUESTSYNTAXERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2644" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestSyntaxError&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestSyntaxError ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2648" tag="operation_2648" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2651" tag="operation_2651" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2652" tag="operation_2652" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param gui " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTSYNTAXERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestsyntaxerror.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2654" parent_class="2654" fileExt=".h" fileName="requestcreatorbase" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTCREATORBASE_H&amp;#010;#define REQUESTCREATORBASE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2654" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestCreatorBase&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestCreatorBase ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2655" tag="operation_2655" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2659" tag="operation_2659" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTCREATORBASE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestcreatorbase.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2661" parent_class="2661" fileExt=".h" fileName="requestcreator" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTCREATOR_H&amp;#010;#define REQUESTCREATOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;requestcreatorbase.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2661" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestCreator&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestCreator ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2666" tag="operation_2666" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2669" tag="operation_2669" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTCREATOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestcreator.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2670" parent_class="2670" fileExt=".h" fileName="requestfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTFACTORY_H&amp;#010;#define REQUESTFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2670" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestFactory&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestFactory ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2671" tag="operation_2671" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param requestLine " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2673" tag="operation_2673" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param requestname &amp;#010;@param sequenceId &amp;#010;@param arg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2677" tag="operation_2677" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param requestname " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2681" tag="tblock_0" canDelete="false" indentLevel="1" text=" std::map&lt; std :: string, RequestCreatorBase * > mRequests;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2681" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2681" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2681" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2681" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestfactory.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2681" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2681" tag="tblock_0" canDelete="false" indentLevel="1" text=" std::map&lt; std :: string, RequestCreatorBase * > mRequests;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2681" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2681" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2681" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2681" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2682" parent_class="2682" fileExt=".h" fileName="tcpsessionreader" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSESSIONREADER_H&amp;#010;#define TCPSESSIONREADER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;guiserver.h&quot;&amp;#010;#include &quot;tcpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" text="using ::TCPSessionReader;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2682" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSessionReader&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSessionReader ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2689" tag="operation_2689" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param server &amp;#010;@param gui " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2694" tag="operation_2694" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2695" tag="tblock_0" canDelete="false" indentLevel="1" text=" GUIServer* _gui;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2695" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2695" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2695" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2695" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSESSIONREADER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsessionreader.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2695" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2695" tag="tblock_0" canDelete="false" indentLevel="1" text=" GUIServer* _gui;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2695" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2695" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2695" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2695" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader2685" parent_class="2685" fileExt=".h" fileName="tcpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSESSION_H&amp;#010;#define TCPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2685" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSession&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSession ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsession.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader2690" parent_class="2690" fileExt=".h" fileName="tcpsocket" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSOCKET_H&amp;#010;#define TCPSOCKET_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2690" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSocket&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSocket ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSOCKET_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsocket.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader2755" parent_class="2755" fileExt=".h" fileName="mutex" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef MUTEX_H&amp;#010;#define MUTEX_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2755" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Mutex&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Mutex ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //MUTEX_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			mutex.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader2696" parent_class="2696" fileExt=".h" fileName="tcpsessionwriter" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSESSIONWRITER_H&amp;#010;#define TCPSESSIONWRITER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;guiserver.h&quot;&amp;#010;#include &quot;tcpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" text="using ::TCPSessionWriter;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="2696" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSessionWriter&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSessionWriter ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="2700" tag="operation_2700" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param server &amp;#010;@param gui " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="2703" tag="operation_2703" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2704" tag="tblock_0" canDelete="false" indentLevel="1" text=" GUIServer* _gui;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2704" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2704" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2704" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2704" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSESSIONWRITER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsessionwriter.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2704" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2704" tag="tblock_0" canDelete="false" indentLevel="1" text=" GUIServer* _gui;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2704" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="2704" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2704" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="2704" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8368" parent_class="8368" fileExt=".h" fileName="audiodevice" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIODEVICE_H&amp;#010;#define AUDIODEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8368" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioDevice&amp;#010; Copyright (C) 2004-2005 Savoir-Faire Linux inc.&amp;#010; Author:  Jean-Philippe Barrette-LaPierre &amp;#010;             &lt;jean-philippe.barrette-lapierre@savoirfairelinux.com> &amp;#010;&amp;#010; This program is free software; you can redistribute it and/or modify&amp;#010; it under the terms of the GNU General Public License as published by&amp;#010; the Free Software Foundation; either version 2 of the License, or&amp;#010; (at your option) any later version.&amp;#010;                                                                             &amp;#010; This program is distributed in the hope that it will be useful,&amp;#010; but WITHOUT ANY WARRANTY; without even the implied warranty of&amp;#010; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&amp;#010; GNU General Public License for more details.&amp;#010;                                                                             &amp;#010; You should have received a copy of the GNU General Public License&amp;#010; along with this program; if not, write to the Free Software&amp;#010;  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="8370" tag="tblock_0" canDelete="false" indentLevel="1" text=" const char* hostApiName;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8371" tag="tblock_1" canDelete="false" indentLevel="1" text=" const char* deviceName;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioDevice ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="8370" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8370" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8370" tag="hblock_tag_2" canDelete="false" indentLevel="1" classfield_id="8370" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8371" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="8371" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8371" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="8371" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIODEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiodevice.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8370" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8370" tag="tblock_0" canDelete="false" indentLevel="1" text=" const char* hostApiName;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8370" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8370" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8370" tag="hblock_tag_2" canDelete="false" indentLevel="1" classfield_id="8370" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8371" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8371" tag="tblock_1" canDelete="false" indentLevel="1" text=" const char* deviceName;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8371" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="8371" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8371" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="8371" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8372" parent_class="8372" fileExt=".h" fileName="calltype" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CALLTYPE_H&amp;#010;#define CALLTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8372" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class CallType&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="CallType ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CALLTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			calltype.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8377" parent_class="8377" fileExt=".h" fileName="voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINK_H&amp;#010;#define VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplinktype.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8377" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17684" tag="operation_17684" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17686" tag="operation_17686" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17687" tag="operation_17687" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="// Pure virtual functions" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17688" tag="operation_17688" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17689" tag="operation_17689" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17690" tag="operation_17690" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17691" tag="operation_17691" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17693" tag="operation_17693" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17695" tag="operation_17695" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17697" tag="operation_17697" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to_url " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17701" tag="operation_17701" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17703" tag="operation_17703" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17705" tag="operation_17705" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17707" tag="operation_17707" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17709" tag="operation_17709" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17711" tag="operation_17711" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17714" tag="operation_17714" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17716" tag="operation_17716" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17717" tag="operation_17717" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17718" tag="operation_17718" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param code " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17721" tag="operation_17721" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17724" tag="operation_17724" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17726" tag="operation_17726" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17727" tag="operation_17727" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param type " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17729" tag="operation_17729" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17730" tag="operation_17730" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param fullname " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17732" tag="operation_17732" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17733" tag="operation_17733" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param hostname " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17735" tag="operation_17735" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17736" tag="operation_17736" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param ipAdress " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17738" tag="operation_17738" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="17740" tag="tblock_0" canDelete="false" indentLevel="1" text=" short _id;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17741" tag="tblock_2" canDelete="false" indentLevel="1" text=" VoIPLinkType _type;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17742" tag="tblock_5" canDelete="false" indentLevel="1" text=" string _fullname;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17743" tag="tblock_8" canDelete="false" indentLevel="1" text=" string _hostname;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17744" tag="tblock_11" canDelete="false" indentLevel="1" text=" string _localIpAddress;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="17740" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17740" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17740" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17740" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17741" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17741" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17741" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17741" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17742" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="17742" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17742" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="17742" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17743" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="17743" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17743" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="17743" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17744" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17744" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17744" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17744" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17739" tag="operation_17739" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17740" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17740" tag="tblock_0" canDelete="false" indentLevel="1" text=" short _id;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17740" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17740" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17740" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17740" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17741" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17741" tag="tblock_2" canDelete="false" indentLevel="1" text=" VoIPLinkType _type;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17741" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17741" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17741" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17741" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17742" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17742" tag="tblock_5" canDelete="false" indentLevel="1" text=" string _fullname;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17742" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="17742" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17742" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="17742" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17743" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17743" tag="tblock_8" canDelete="false" indentLevel="1" text=" string _hostname;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17743" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="17743" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17743" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="17743" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17744" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17744" tag="tblock_11" canDelete="false" indentLevel="1" text=" string _localIpAddress;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17744" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17744" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17744" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17744" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17749" field_type="6619250" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SipVoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8378" parent_class="8378" fileExt=".h" fileName="call" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CALL_H&amp;#010;#define CALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;calltype.h&quot;&amp;#010;#include &quot;string.h&quot;&amp;#010;#include &quot;enum callstate.h&quot;&amp;#010;#include &quot;enum calltype.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8378" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Call&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Call ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="8379" tag="operation_8379" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8384" tag="operation_8384" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8385" tag="operation_8385" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8386" tag="operation_8386" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8388" tag="operation_8388" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8389" tag="operation_8389" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param voIPLink " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8391" tag="operation_8391" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8392" tag="operation_8392" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param status " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8394" tag="operation_8394" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8395" tag="operation_8395" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callerId_name " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8397" tag="operation_8397" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8398" tag="operation_8398" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callerId_number " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8401" tag="operation_8401" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8402" tag="operation_8402" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param state " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8405" tag="operation_8405" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8406" tag="operation_8406" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param type " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8408" tag="operation_8408" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8409" tag="operation_8409" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8410" tag="operation_8410" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8411" tag="operation_8411" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8412" tag="operation_8412" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8413" tag="operation_8413" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8414" tag="operation_8414" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8415" tag="operation_8415" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8416" tag="operation_8416" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8417" tag="operation_8417" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8418" tag="operation_8418" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8419" tag="operation_8419" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8420" tag="operation_8420" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8421" tag="operation_8421" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8422" tag="operation_8422" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8425" tag="operation_8425" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8426" tag="operation_8426" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8427" tag="operation_8427" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8428" tag="operation_8428" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8429" tag="operation_8429" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8430" tag="operation_8430" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8432" tag="operation_8432" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="8434" tag="tblock_0" canDelete="false" indentLevel="1" text=" VoIPLink* _voIPLink;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8435" tag="tblock_1" canDelete="false" indentLevel="1" text=" short _id;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8436" tag="tblock_2" canDelete="false" indentLevel="1" text=" enum CallState _state;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8437" tag="tblock_3" canDelete="false" indentLevel="1" text=" enum CallType _type;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8438" tag="tblock_4" canDelete="false" indentLevel="1" text=" std.string _callerIdName;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8439" tag="tblock_5" canDelete="false" indentLevel="1" text=" std.string _callerIdNumber;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8440" tag="tblock_6" canDelete="false" indentLevel="1" text=" std.string _status;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="8434" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8434" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8434" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="8434" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8435" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="8435" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8435" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="8435" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8436" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="8436" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8436" tag="hblock_tag_11" canDelete="false" indentLevel="1" classfield_id="8436" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8437" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="8437" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8437" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="8437" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8438" tag="hblock_tag_14" canDelete="false" indentLevel="1" classfield_id="8438" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8438" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="8438" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8439" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="8439" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8439" tag="hblock_tag_17" canDelete="false" indentLevel="1" classfield_id="8439" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8440" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="8440" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8440" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="8440" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="8433" tag="operation_8433" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			call.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8434" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8434" tag="tblock_0" canDelete="false" indentLevel="1" text=" VoIPLink* _voIPLink;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8434" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8434" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8434" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="8434" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8435" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8435" tag="tblock_1" canDelete="false" indentLevel="1" text=" short _id;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8435" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="8435" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8435" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="8435" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8436" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8436" tag="tblock_2" canDelete="false" indentLevel="1" text=" enum CallState _state;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8436" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="8436" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8436" tag="hblock_tag_11" canDelete="false" indentLevel="1" classfield_id="8436" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8437" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8437" tag="tblock_3" canDelete="false" indentLevel="1" text=" enum CallType _type;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8437" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="8437" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8437" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="8437" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8438" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8438" tag="tblock_4" canDelete="false" indentLevel="1" text=" std.string _callerIdName;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8438" tag="hblock_tag_14" canDelete="false" indentLevel="1" classfield_id="8438" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8438" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="8438" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8439" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8439" tag="tblock_5" canDelete="false" indentLevel="1" text=" std.string _callerIdNumber;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8439" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="8439" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8439" tag="hblock_tag_17" canDelete="false" indentLevel="1" classfield_id="8439" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8440" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8440" tag="tblock_6" canDelete="false" indentLevel="1" text=" std.string _status;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8440" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="8440" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8440" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="8440" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8400" parent_class="8400" fileExt=".h" fileName="enum callstate" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ENUM_CALLSTATE_H&amp;#010;#define ENUM_CALLSTATE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8400" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class enum CallState&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="enum CallState ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ENUM_CALLSTATE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			enum callstate.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8404" parent_class="8404" fileExt=".h" fileName="enum calltype" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ENUM_CALLTYPE_H&amp;#010;#define ENUM_CALLTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8404" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class enum CallType&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="enum CallType ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ENUM_CALLTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			enum calltype.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8441" parent_class="8441" fileExt=".h" fileName="uint8" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UINT8_H&amp;#010;#define UINT8_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8441" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class UInt8&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="UInt8 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UINT8_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint8.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8443" parent_class="8443" fileExt=".h" fileName="uint16" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UINT16_H&amp;#010;#define UINT16_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8443" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class UInt16&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="UInt16 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UINT16_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint16.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8444" parent_class="8444" fileExt=".h" fileName="uint32" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UINT32_H&amp;#010;#define UINT32_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8444" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class UInt32&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="UInt32 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UINT32_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint32.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8445" parent_class="8445" fileExt=".h" fileName="uint64" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UINT64_H&amp;#010;#define UINT64_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8445" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class UInt64&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="UInt64 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UINT64_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint64.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8446" parent_class="8446" fileExt=".h" fileName="uint128" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UINT128_H&amp;#010;#define UINT128_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8446" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class UInt128&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="UInt128 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UINT128_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			uint128.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8447" parent_class="8447" fileExt=".h" fileName="stunmsghdr" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNMSGHDR_H&amp;#010;#define STUNMSGHDR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8447" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunMsgHdr&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunMsgHdr ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNMSGHDR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmsghdr.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8448" parent_class="8448" fileExt=".h" fileName="stunatrhdr" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRHDR_H&amp;#010;#define STUNATRHDR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8448" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrHdr&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrHdr ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRHDR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrhdr.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8449" parent_class="8449" fileExt=".h" fileName="stunaddress4" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNADDRESS4_H&amp;#010;#define STUNADDRESS4_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8449" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAddress4&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAddress4 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNADDRESS4_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunaddress4.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8450" parent_class="8450" fileExt=".h" fileName="stunatraddress4" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRADDRESS4_H&amp;#010;#define STUNATRADDRESS4_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8450" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrAddress4&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrAddress4 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRADDRESS4_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatraddress4.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8451" parent_class="8451" fileExt=".h" fileName="stunatrchangerequest" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRCHANGEREQUEST_H&amp;#010;#define STUNATRCHANGEREQUEST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8451" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrChangeRequest&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrChangeRequest ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRCHANGEREQUEST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrchangerequest.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8452" parent_class="8452" fileExt=".h" fileName="stunatrerror" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRERROR_H&amp;#010;#define STUNATRERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8452" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrError&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrError ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrerror.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8453" parent_class="8453" fileExt=".h" fileName="stunatrunknown" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRUNKNOWN_H&amp;#010;#define STUNATRUNKNOWN_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8453" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrUnknown&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrUnknown ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRUNKNOWN_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrunknown.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8454" parent_class="8454" fileExt=".h" fileName="stunatrstring" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRSTRING_H&amp;#010;#define STUNATRSTRING_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8454" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrString&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrString ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRSTRING_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrstring.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8455" parent_class="8455" fileExt=".h" fileName="stunatrintegrity" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNATRINTEGRITY_H&amp;#010;#define STUNATRINTEGRITY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8455" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunAtrIntegrity&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunAtrIntegrity ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNATRINTEGRITY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunatrintegrity.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8456" parent_class="8456" fileExt=".h" fileName="stunhmacstatus" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNHMACSTATUS_H&amp;#010;#define STUNHMACSTATUS_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8456" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunHmacStatus&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunHmacStatus ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNHMACSTATUS_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunhmacstatus.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8457" parent_class="8457" fileExt=".h" fileName="stunmessage" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNMESSAGE_H&amp;#010;#define STUNMESSAGE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8457" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunMessage&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunMessage ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNMESSAGE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmessage.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8458" parent_class="8458" fileExt=".h" fileName="nattype" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef NATTYPE_H&amp;#010;#define NATTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8458" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class NatType&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="NatType ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //NATTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			nattype.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8459" parent_class="8459" fileExt=".h" fileName="stunmediarelay" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNMEDIARELAY_H&amp;#010;#define STUNMEDIARELAY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8459" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunMediaRelay&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunMediaRelay ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNMEDIARELAY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmediarelay.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8460" parent_class="8460" fileExt=".h" fileName="stunserverinfo" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNSERVERINFO_H&amp;#010;#define STUNSERVERINFO_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8460" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunServerInfo&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunServerInfo ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNSERVERINFO_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunserverinfo.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8461" parent_class="8461" fileExt=".h" fileName="audiolayer" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOLAYER_H&amp;#010;#define AUDIOLAYER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8461" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioLayer&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioLayer ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOLAYER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiolayer.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8462" parent_class="8462" fileExt=".h" fileName="codecdescriptor" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CODECDESCRIPTOR_H&amp;#010;#define CODECDESCRIPTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8462" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class CodecDescriptor&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="CodecDescriptor ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CODECDESCRIPTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			codecdescriptor.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8463" parent_class="8463" fileExt=".h" fileName="error" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ERROR_H&amp;#010;#define ERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8463" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Error&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Error ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ERROR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			error.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8464" parent_class="8464" fileExt=".h" fileName="tonegenerator" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TONEGENERATOR_H&amp;#010;#define TONEGENERATOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8464" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ToneGenerator&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ToneGenerator ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TONEGENERATOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tonegenerator.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8472" parent_class="8472" fileExt=".h" fileName="device_t" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef DEVICE_T_H&amp;#010;#define DEVICE_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8472" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class device_t&amp;#010;Structure for audio device" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="8473" tag="tblock_0" canDelete="false" indentLevel="1" text=" const char* hostApiName;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8474" tag="tblock_1" canDelete="false" indentLevel="1" text=" const char* deviceName;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="device_t ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="8473" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8473" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8473" tag="hblock_tag_2" canDelete="false" indentLevel="1" classfield_id="8473" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8474" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="8474" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8474" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="8474" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //DEVICE_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			device_t.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8473" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8473" tag="tblock_0" canDelete="false" indentLevel="1" text=" const char* hostApiName;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8473" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8473" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8473" tag="hblock_tag_2" canDelete="false" indentLevel="1" classfield_id="8473" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8474" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8474" tag="tblock_1" canDelete="false" indentLevel="1" text=" const char* deviceName;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8474" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="8474" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8474" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="8474" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8475" parent_class="8475" fileExt=".h" fileName="managerimpl" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef MANAGERIMPL_H&amp;#010;#define MANAGERIMPL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;guiframework.h&quot;&amp;#010;#include &quot;unsigned int.h&quot;&amp;#010;#include &quot;enum calltype.h&quot;&amp;#010;#include &quot;string.h&quot;&amp;#010;#include &quot;audiodevice.h&quot;&amp;#010;#include &quot;mutex.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8475" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ManagerImpl&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ManagerImpl ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="8476" tag="operation_8476" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8477" tag="operation_8477" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8478" tag="operation_8478" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8479" tag="operation_8479" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8480" tag="operation_8480" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8483" tag="operation_8483" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8485" tag="operation_8485" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8487" tag="operation_8487" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8489" tag="operation_8489" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8491" tag="operation_8491" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8493" tag="operation_8493" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8494" tag="operation_8494" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8496" tag="operation_8496" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8498" tag="operation_8498" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8501" tag="operation_8501" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8502" tag="operation_8502" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param nb_codec " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8504" tag="operation_8504" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8506" tag="operation_8506" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8508" tag="operation_8508" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8509" tag="operation_8509" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param b " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8511" tag="operation_8511" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8512" tag="operation_8512" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8515" tag="operation_8515" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8517" tag="operation_8517" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8519" tag="operation_8519" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8521" tag="operation_8521" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8523" tag="operation_8523" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8525" tag="operation_8525" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8527" tag="operation_8527" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8529" tag="operation_8529" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8532" tag="operation_8532" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8534" tag="operation_8534" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8536" tag="operation_8536" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8538" tag="operation_8538" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8539" tag="operation_8539" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8540" tag="operation_8540" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8541" tag="operation_8541" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8542" tag="operation_8542" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8545" tag="operation_8545" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8546" tag="operation_8546" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8549" tag="operation_8549" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8551" tag="operation_8551" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8553" tag="operation_8553" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8555" tag="operation_8555" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8557" tag="operation_8557" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8560" tag="operation_8560" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param message " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8563" tag="operation_8563" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param error " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8565" tag="operation_8565" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param status " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8567" tag="operation_8567" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8568" tag="operation_8568" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8570" tag="operation_8570" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8571" tag="operation_8571" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8572" tag="operation_8572" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8574" tag="operation_8574" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8576" tag="operation_8576" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param var " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8578" tag="operation_8578" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8579" tag="operation_8579" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8582" tag="operation_8582" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8583" tag="operation_8583" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8584" tag="operation_8584" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8585" tag="operation_8585" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8586" tag="operation_8586" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8587" tag="operation_8587" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param spkr_vol " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8589" tag="operation_8589" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8590" tag="operation_8590" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param mic_vol " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8592" tag="operation_8592" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8593" tag="operation_8593" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param port " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8595" tag="operation_8595" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8596" tag="operation_8596" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8597" tag="operation_8597" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param l " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8599" tag="operation_8599" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8601" tag="operation_8601" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8602" tag="operation_8602" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8604" tag="operation_8604" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="8611" tag="tblock_0" canDelete="false" indentLevel="1" text=" ToneGenerator* _tone;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="/////////////////////// Private variables/////////////////////" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8612" tag="tblock_1" canDelete="false" indentLevel="1" text=" Error* _error;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8613" tag="tblock_2" canDelete="false" indentLevel="1" text=" GuiFramework* _gui;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8614" tag="tblock_3" canDelete="false" indentLevel="1" text=" AudioLayer* _audiodriverPA;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8615" tag="tblock_4" canDelete="false" indentLevel="1" text=" VoIPLinkVector _voIPLinkVector;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Vector of VoIPLink" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8616" tag="tblock_5" canDelete="false" indentLevel="1" text=" CallVector _callVector;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Vector of calls" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8617" tag="tblock_6" canDelete="false" indentLevel="1" text=" CodecDescriptorVector _codecDescVector;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Vector of CodecDescriptor" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8618" tag="tblock_7" canDelete="false" indentLevel="1" text=" ost.Mutex _mutex;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Mutex to protect access to code section" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8619" tag="tblock_8" canDelete="false" indentLevel="1" text=" unsigned int _nCalls;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8620" tag="tblock_9" canDelete="false" indentLevel="1" text=" short _currentCallId;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8621" tag="tblock_10" canDelete="false" indentLevel="1" text=" unsigned int _startTime;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="For the call timer" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8622" tag="tblock_11" canDelete="false" indentLevel="1" text=" unsigned int _endTime;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8623" tag="tblock_12" canDelete="false" indentLevel="1" text=" std.string _path;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Path of the ConfigFile " />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8624" tag="tblock_13" canDelete="false" indentLevel="1" text=" int _exist;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8625" tag="tblock_14" canDelete="false" indentLevel="1" text=" unsigned int _nCodecs;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8626" tag="tblock_15" canDelete="false" indentLevel="1" text=" bool _zonetone;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8627" tag="tblock_16" canDelete="false" indentLevel="1" text=" bool _congestion;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8628" tag="tblock_17" canDelete="false" indentLevel="1" text=" bool _ringback;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8629" tag="tblock_18" canDelete="false" indentLevel="1" text=" bool _ringtone;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8630" tag="tblock_19" canDelete="false" indentLevel="1" text=" int _spkr_volume;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// To handle volume control" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8631" tag="tblock_20" canDelete="false" indentLevel="1" text=" int _mic_volume;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8632" tag="tblock_21" canDelete="false" indentLevel="1" text=" int _firewallPort;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// To handle firewall" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8633" tag="tblock_22" canDelete="false" indentLevel="1" text=" std.string _firewallAddr;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8634" tag="tblock_23" canDelete="false" indentLevel="1" text=" bool _loaded;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// Variables used in exception" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="8635" tag="tblock_24" canDelete="false" indentLevel="1" text=" int _useZeroconf;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// look if zeroconf scanning should run or not" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="8611" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8611" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@return the value of _tone" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8611" tag="hblock_tag_25" canDelete="false" indentLevel="1" classfield_id="8611" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@param value the value of _tone" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8612" tag="hblock_tag_26" canDelete="false" indentLevel="1" classfield_id="8612" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8612" tag="hblock_tag_27" canDelete="false" indentLevel="1" classfield_id="8612" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8613" tag="hblock_tag_28" canDelete="false" indentLevel="1" classfield_id="8613" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8613" tag="hblock_tag_29" canDelete="false" indentLevel="1" classfield_id="8613" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8614" tag="hblock_tag_30" canDelete="false" indentLevel="1" classfield_id="8614" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8614" tag="hblock_tag_31" canDelete="false" indentLevel="1" classfield_id="8614" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8615" tag="hblock_tag_32" canDelete="false" indentLevel="1" classfield_id="8615" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@return the value of _voIPLinkVector" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8615" tag="hblock_tag_33" canDelete="false" indentLevel="1" classfield_id="8615" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@param value the value of _voIPLinkVector" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8616" tag="hblock_tag_34" canDelete="false" indentLevel="1" classfield_id="8616" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _callVector&amp;#010;Vector of calls&amp;#010;@return the value of _callVector" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8616" tag="hblock_tag_35" canDelete="false" indentLevel="1" classfield_id="8616" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _callVector&amp;#010;Vector of calls&amp;#010;@param value the value of _callVector" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8617" tag="hblock_tag_36" canDelete="false" indentLevel="1" classfield_id="8617" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@return the value of _codecDescVector" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8617" tag="hblock_tag_37" canDelete="false" indentLevel="1" classfield_id="8617" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@param value the value of _codecDescVector" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8618" tag="hblock_tag_38" canDelete="false" indentLevel="1" classfield_id="8618" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@return the value of _mutex" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8618" tag="hblock_tag_39" canDelete="false" indentLevel="1" classfield_id="8618" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@param value the value of _mutex" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8619" tag="hblock_tag_40" canDelete="false" indentLevel="1" classfield_id="8619" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8619" tag="hblock_tag_41" canDelete="false" indentLevel="1" classfield_id="8619" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8620" tag="hblock_tag_42" canDelete="false" indentLevel="1" classfield_id="8620" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8620" tag="hblock_tag_43" canDelete="false" indentLevel="1" classfield_id="8620" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8621" tag="hblock_tag_44" canDelete="false" indentLevel="1" classfield_id="8621" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _startTime&amp;#010;For the call timer&amp;#010;@return the value of _startTime" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8621" tag="hblock_tag_45" canDelete="false" indentLevel="1" classfield_id="8621" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _startTime&amp;#010;For the call timer&amp;#010;@param value the value of _startTime" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8622" tag="hblock_tag_46" canDelete="false" indentLevel="1" classfield_id="8622" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8622" tag="hblock_tag_47" canDelete="false" indentLevel="1" classfield_id="8622" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8623" tag="hblock_tag_48" canDelete="false" indentLevel="1" classfield_id="8623" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@return the value of _path" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8623" tag="hblock_tag_49" canDelete="false" indentLevel="1" classfield_id="8623" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@param value the value of _path" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8624" tag="hblock_tag_50" canDelete="false" indentLevel="1" classfield_id="8624" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8624" tag="hblock_tag_51" canDelete="false" indentLevel="1" classfield_id="8624" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8625" tag="hblock_tag_52" canDelete="false" indentLevel="1" classfield_id="8625" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8625" tag="hblock_tag_53" canDelete="false" indentLevel="1" classfield_id="8625" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8626" tag="hblock_tag_54" canDelete="false" indentLevel="1" classfield_id="8626" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8626" tag="hblock_tag_55" canDelete="false" indentLevel="1" classfield_id="8626" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8627" tag="hblock_tag_56" canDelete="false" indentLevel="1" classfield_id="8627" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8627" tag="hblock_tag_57" canDelete="false" indentLevel="1" classfield_id="8627" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8628" tag="hblock_tag_58" canDelete="false" indentLevel="1" classfield_id="8628" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8628" tag="hblock_tag_59" canDelete="false" indentLevel="1" classfield_id="8628" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8629" tag="hblock_tag_60" canDelete="false" indentLevel="1" classfield_id="8629" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8629" tag="hblock_tag_61" canDelete="false" indentLevel="1" classfield_id="8629" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8630" tag="hblock_tag_62" canDelete="false" indentLevel="1" classfield_id="8630" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@return the value of _spkr_volume" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8630" tag="hblock_tag_63" canDelete="false" indentLevel="1" classfield_id="8630" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@param value the value of _spkr_volume" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8631" tag="hblock_tag_64" canDelete="false" indentLevel="1" classfield_id="8631" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8631" tag="hblock_tag_65" canDelete="false" indentLevel="1" classfield_id="8631" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8632" tag="hblock_tag_66" canDelete="false" indentLevel="1" classfield_id="8632" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@return the value of _firewallPort" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8632" tag="hblock_tag_67" canDelete="false" indentLevel="1" classfield_id="8632" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@param value the value of _firewallPort" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8633" tag="hblock_tag_68" canDelete="false" indentLevel="1" classfield_id="8633" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8633" tag="hblock_tag_69" canDelete="false" indentLevel="1" classfield_id="8633" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8634" tag="hblock_tag_70" canDelete="false" indentLevel="1" classfield_id="8634" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@return the value of _loaded" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8634" tag="hblock_tag_71" canDelete="false" indentLevel="1" classfield_id="8634" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@param value the value of _loaded" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="8635" tag="hblock_tag_72" canDelete="false" indentLevel="1" classfield_id="8635" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@return the value of _useZeroconf" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="8635" tag="hblock_tag_73" canDelete="false" indentLevel="1" classfield_id="8635" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@param value the value of _useZeroconf" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="8605" tag="operation_8605" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8606" tag="operation_8606" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8607" tag="operation_8607" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8608" tag="operation_8608" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8609" tag="operation_8609" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="8610" tag="operation_8610" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //MANAGERIMPL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			managerimpl.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="8611" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="/////////////////////// Private variables/////////////////////" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8611" tag="tblock_0" canDelete="false" indentLevel="1" text=" ToneGenerator* _tone;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="/////////////////////// Private variables/////////////////////" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8611" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="8611" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@return the value of _tone" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8611" tag="hblock_tag_25" canDelete="false" indentLevel="1" classfield_id="8611" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _tone&amp;#010;/////////////////////// Private variables/////////////////////&amp;#010;@param value the value of _tone" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8612" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8612" tag="tblock_1" canDelete="false" indentLevel="1" text=" Error* _error;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8612" tag="hblock_tag_26" canDelete="false" indentLevel="1" classfield_id="8612" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8612" tag="hblock_tag_27" canDelete="false" indentLevel="1" classfield_id="8612" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8613" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8613" tag="tblock_2" canDelete="false" indentLevel="1" text=" GuiFramework* _gui;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8613" tag="hblock_tag_28" canDelete="false" indentLevel="1" classfield_id="8613" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8613" tag="hblock_tag_29" canDelete="false" indentLevel="1" classfield_id="8613" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8614" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8614" tag="tblock_3" canDelete="false" indentLevel="1" text=" AudioLayer* _audiodriverPA;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8614" tag="hblock_tag_30" canDelete="false" indentLevel="1" classfield_id="8614" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8614" tag="hblock_tag_31" canDelete="false" indentLevel="1" classfield_id="8614" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8615" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Vector of VoIPLink" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8615" tag="tblock_4" canDelete="false" indentLevel="1" text=" VoIPLinkVector _voIPLinkVector;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Vector of VoIPLink" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8615" tag="hblock_tag_32" canDelete="false" indentLevel="1" classfield_id="8615" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@return the value of _voIPLinkVector" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8615" tag="hblock_tag_33" canDelete="false" indentLevel="1" classfield_id="8615" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _voIPLinkVector&amp;#010;Vector of VoIPLink&amp;#010;@param value the value of _voIPLinkVector" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8616" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Vector of calls" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8616" tag="tblock_5" canDelete="false" indentLevel="1" text=" CallVector _callVector;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Vector of calls" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8616" tag="hblock_tag_34" canDelete="false" indentLevel="1" classfield_id="8616" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _callVector&amp;#010;Vector of calls&amp;#010;@return the value of _callVector" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8616" tag="hblock_tag_35" canDelete="false" indentLevel="1" classfield_id="8616" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _callVector&amp;#010;Vector of calls&amp;#010;@param value the value of _callVector" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8617" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Vector of CodecDescriptor" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8617" tag="tblock_6" canDelete="false" indentLevel="1" text=" CodecDescriptorVector _codecDescVector;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Vector of CodecDescriptor" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8617" tag="hblock_tag_36" canDelete="false" indentLevel="1" classfield_id="8617" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@return the value of _codecDescVector" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8617" tag="hblock_tag_37" canDelete="false" indentLevel="1" classfield_id="8617" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _codecDescVector&amp;#010;Vector of CodecDescriptor&amp;#010;@param value the value of _codecDescVector" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8618" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Mutex to protect access to code section" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8618" tag="tblock_7" canDelete="false" indentLevel="1" text=" ost.Mutex _mutex;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Mutex to protect access to code section" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8618" tag="hblock_tag_38" canDelete="false" indentLevel="1" classfield_id="8618" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@return the value of _mutex" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8618" tag="hblock_tag_39" canDelete="false" indentLevel="1" classfield_id="8618" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _mutex&amp;#010;Mutex to protect access to code section&amp;#010;@param value the value of _mutex" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8619" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8619" tag="tblock_8" canDelete="false" indentLevel="1" text=" unsigned int _nCalls;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8619" tag="hblock_tag_40" canDelete="false" indentLevel="1" classfield_id="8619" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8619" tag="hblock_tag_41" canDelete="false" indentLevel="1" classfield_id="8619" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8620" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8620" tag="tblock_9" canDelete="false" indentLevel="1" text=" short _currentCallId;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8620" tag="hblock_tag_42" canDelete="false" indentLevel="1" classfield_id="8620" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8620" tag="hblock_tag_43" canDelete="false" indentLevel="1" classfield_id="8620" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8621" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="For the call timer" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8621" tag="tblock_10" canDelete="false" indentLevel="1" text=" unsigned int _startTime;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="For the call timer" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8621" tag="hblock_tag_44" canDelete="false" indentLevel="1" classfield_id="8621" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _startTime&amp;#010;For the call timer&amp;#010;@return the value of _startTime" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8621" tag="hblock_tag_45" canDelete="false" indentLevel="1" classfield_id="8621" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _startTime&amp;#010;For the call timer&amp;#010;@param value the value of _startTime" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8622" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8622" tag="tblock_11" canDelete="false" indentLevel="1" text=" unsigned int _endTime;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8622" tag="hblock_tag_46" canDelete="false" indentLevel="1" classfield_id="8622" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8622" tag="hblock_tag_47" canDelete="false" indentLevel="1" classfield_id="8622" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8623" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="Path of the ConfigFile " />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8623" tag="tblock_12" canDelete="false" indentLevel="1" text=" std.string _path;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Path of the ConfigFile " />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8623" tag="hblock_tag_48" canDelete="false" indentLevel="1" classfield_id="8623" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@return the value of _path" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8623" tag="hblock_tag_49" canDelete="false" indentLevel="1" classfield_id="8623" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _path&amp;#010;Path of the ConfigFile &amp;#010;@param value the value of _path" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8624" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8624" tag="tblock_13" canDelete="false" indentLevel="1" text=" int _exist;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8624" tag="hblock_tag_50" canDelete="false" indentLevel="1" classfield_id="8624" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8624" tag="hblock_tag_51" canDelete="false" indentLevel="1" classfield_id="8624" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8625" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8625" tag="tblock_14" canDelete="false" indentLevel="1" text=" unsigned int _nCodecs;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8625" tag="hblock_tag_52" canDelete="false" indentLevel="1" classfield_id="8625" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8625" tag="hblock_tag_53" canDelete="false" indentLevel="1" classfield_id="8625" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8626" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8626" tag="tblock_15" canDelete="false" indentLevel="1" text=" bool _zonetone;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8626" tag="hblock_tag_54" canDelete="false" indentLevel="1" classfield_id="8626" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8626" tag="hblock_tag_55" canDelete="false" indentLevel="1" classfield_id="8626" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8627" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8627" tag="tblock_16" canDelete="false" indentLevel="1" text=" bool _congestion;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8627" tag="hblock_tag_56" canDelete="false" indentLevel="1" classfield_id="8627" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8627" tag="hblock_tag_57" canDelete="false" indentLevel="1" classfield_id="8627" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8628" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8628" tag="tblock_17" canDelete="false" indentLevel="1" text=" bool _ringback;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8628" tag="hblock_tag_58" canDelete="false" indentLevel="1" classfield_id="8628" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8628" tag="hblock_tag_59" canDelete="false" indentLevel="1" classfield_id="8628" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8629" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8629" tag="tblock_18" canDelete="false" indentLevel="1" text=" bool _ringtone;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8629" tag="hblock_tag_60" canDelete="false" indentLevel="1" classfield_id="8629" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8629" tag="hblock_tag_61" canDelete="false" indentLevel="1" classfield_id="8629" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8630" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// To handle volume control" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8630" tag="tblock_19" canDelete="false" indentLevel="1" text=" int _spkr_volume;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// To handle volume control" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8630" tag="hblock_tag_62" canDelete="false" indentLevel="1" classfield_id="8630" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@return the value of _spkr_volume" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8630" tag="hblock_tag_63" canDelete="false" indentLevel="1" classfield_id="8630" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _spkr_volume&amp;#010;// To handle volume control&amp;#010;@param value the value of _spkr_volume" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8631" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8631" tag="tblock_20" canDelete="false" indentLevel="1" text=" int _mic_volume;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8631" tag="hblock_tag_64" canDelete="false" indentLevel="1" classfield_id="8631" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8631" tag="hblock_tag_65" canDelete="false" indentLevel="1" classfield_id="8631" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8632" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// To handle firewall" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8632" tag="tblock_21" canDelete="false" indentLevel="1" text=" int _firewallPort;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// To handle firewall" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8632" tag="hblock_tag_66" canDelete="false" indentLevel="1" classfield_id="8632" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@return the value of _firewallPort" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8632" tag="hblock_tag_67" canDelete="false" indentLevel="1" classfield_id="8632" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _firewallPort&amp;#010;// To handle firewall&amp;#010;@param value the value of _firewallPort" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8633" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8633" tag="tblock_22" canDelete="false" indentLevel="1" text=" std.string _firewallAddr;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8633" tag="hblock_tag_68" canDelete="false" indentLevel="1" classfield_id="8633" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8633" tag="hblock_tag_69" canDelete="false" indentLevel="1" classfield_id="8633" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8634" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// Variables used in exception" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8634" tag="tblock_23" canDelete="false" indentLevel="1" text=" bool _loaded;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// Variables used in exception" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8634" tag="hblock_tag_70" canDelete="false" indentLevel="1" classfield_id="8634" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@return the value of _loaded" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8634" tag="hblock_tag_71" canDelete="false" indentLevel="1" classfield_id="8634" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _loaded&amp;#010;// Variables used in exception&amp;#010;@param value the value of _loaded" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="8635" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// look if zeroconf scanning should run or not" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="8635" tag="tblock_24" canDelete="false" indentLevel="1" text=" int _useZeroconf;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// look if zeroconf scanning should run or not" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="8635" tag="hblock_tag_72" canDelete="false" indentLevel="1" classfield_id="8635" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@return the value of _useZeroconf" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="8635" tag="hblock_tag_73" canDelete="false" indentLevel="1" classfield_id="8635" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _useZeroconf&amp;#010;// look if zeroconf scanning should run or not&amp;#010;@param value the value of _useZeroconf" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader8490" parent_class="8490" fileExt=".h" fileName="unsigned int" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UNSIGNED_INT_H&amp;#010;#define UNSIGNED_INT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="8490" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class unsigned int&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="unsigned int ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UNSIGNED_INT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			unsigned int.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader14791" parent_class="14791" fileExt=".h" fileName="responsemessage" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef RESPONSEMESSAGE_H&amp;#010;#define RESPONSEMESSAGE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;string.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="14791" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ResponseMessage&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="15024" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Request ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ResponseMessage ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="16654" tag="operation_16654" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="16655" tag="operation_16655" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="15608" tag="tblock_1" canDelete="false" indentLevel="1" text=" string message;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="15609" tag="tblock_2" canDelete="false" indentLevel="1" text=" string seq;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17010" tag="tblock_3" canDelete="false" indentLevel="1" text=" string code;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="15608" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="15608" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="15608" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="15608" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="15609" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="15609" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="15609" tag="hblock_tag_11" canDelete="false" indentLevel="1" classfield_id="15609" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17010" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17010" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17010" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17010" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //RESPONSEMESSAGE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			responsemessage.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:04&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="15608" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15608" tag="tblock_1" canDelete="false" indentLevel="1" text=" string message;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15608" tag="hblock_tag_8" canDelete="false" indentLevel="1" classfield_id="15608" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15608" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="15608" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="15609" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15609" tag="tblock_2" canDelete="false" indentLevel="1" text=" string seq;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15609" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="15609" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15609" tag="hblock_tag_11" canDelete="false" indentLevel="1" classfield_id="15609" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17010" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17010" tag="tblock_3" canDelete="false" indentLevel="1" text=" string code;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17010" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17010" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17010" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17010" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="15024" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15024" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Request ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15024" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15024" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15024" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15024" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15024" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15024" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17623" parent_class="17623" fileExt=".h" fileName="sipcall" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPCALL_H&amp;#010;#define SIPCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17623" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipCall&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="19373" tag="tblock_0" canDelete="false" indentLevel="1" text=" int payload;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19374" tag="tblock_2" canDelete="false" indentLevel="1" text=" int enable_audio;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="1 started, -1 stopped" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipCall ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="19373" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="19373" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19373" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="19373" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19374" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="19374" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@return the value of enable_audio" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19374" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="19374" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@param value the value of enable_audio" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="19369" tag="operation_19369" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param cdv " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19372" tag="operation_19372" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19375" tag="operation_19375" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Store information about incoming call and negociate payload" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19377" tag="operation_19377" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Use to answer to a ONHOLD/OFFHOLD event " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19379" tag="operation_19379" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Use to answer to an incoming call " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19381" tag="operation_19381" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19383" tag="operation_19383" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19385" tag="operation_19385" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Manage local audio port for each sipcall" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19387" tag="operation_19387" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19388" tag="operation_19388" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Manage id, did (dialog-id), cid (call-id) and tid (transaction-id) &amp;#010;for each sipcall" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19390" tag="operation_19390" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19391" tag="operation_19391" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param did " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19393" tag="operation_19393" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19394" tag="operation_19394" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param cid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19396" tag="operation_19396" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19397" tag="operation_19397" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param tid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19399" tag="operation_19399" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19400" tag="operation_19400" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Manage remote sdp audio port" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19401" tag="operation_19401" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19403" tag="operation_19403" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Manage audio codec" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19404" tag="operation_19404" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param ac " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19406" tag="operation_19406" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19407" tag="operation_19407" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param standby " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19409" tag="operation_19409" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="19421" tag="tblock_5" canDelete="false" indentLevel="1" text=" CodecDescriptorVector* _cdv;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="///////////////////////////// Private member variables///////////////////////////" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19422" tag="tblock_8" canDelete="false" indentLevel="1" text=" AudioCodec* _audiocodec;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19423" tag="tblock_11" canDelete="false" indentLevel="1" text=" short _id;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19424" tag="tblock_14" canDelete="false" indentLevel="1" text=" int _cid;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// call id" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19425" tag="tblock_17" canDelete="false" indentLevel="1" text=" int _did;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// dialog id" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19426" tag="tblock_20" canDelete="false" indentLevel="1" text=" int _tid;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// transaction id" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19427" tag="tblock_23" canDelete="false" indentLevel="1" text=" bool _standby;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// wait for a cid and did when outgoing call is made" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19428" tag="tblock_26" canDelete="false" indentLevel="1" text=" int _status_code;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19429" tag="tblock_29" canDelete="false" indentLevel="1" text=" char* _reason_phrase;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19430" tag="tblock_32" canDelete="false" indentLevel="1" text=" char* _textinfo;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19431" tag="tblock_35" canDelete="false" indentLevel="1" text=" char* _remote_uri;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19432" tag="tblock_38" canDelete="false" indentLevel="1" text=" char* _remote_sdp_audio_ip;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19433" tag="tblock_41" canDelete="false" indentLevel="1" text=" int _state;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19434" tag="tblock_44" canDelete="false" indentLevel="1" text=" int _local_audio_port;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19435" tag="tblock_47" canDelete="false" indentLevel="1" text=" int _remote_sdp_audio_port;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19436" tag="tblock_50" canDelete="false" indentLevel="1" text=" int _local_sendrecv;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="19437" tag="tblock_53" canDelete="false" indentLevel="1" text=" int _remote_sendrecv;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="19421" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="19421" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _cdv" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19421" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="19421" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _cdv" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19422" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="19422" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19422" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="19422" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19423" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="19423" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19423" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="19423" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19424" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="19424" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _cid&amp;#010;// call id&amp;#010;@return the value of _cid" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19424" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="19424" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _cid&amp;#010;// call id&amp;#010;@param value the value of _cid" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19425" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="19425" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _did&amp;#010;// dialog id&amp;#010;@return the value of _did" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19425" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="19425" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _did&amp;#010;// dialog id&amp;#010;@param value the value of _did" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19426" tag="hblock_tag_21" canDelete="false" indentLevel="1" classfield_id="19426" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _tid&amp;#010;// transaction id&amp;#010;@return the value of _tid" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19426" tag="hblock_tag_22" canDelete="false" indentLevel="1" classfield_id="19426" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _tid&amp;#010;// transaction id&amp;#010;@param value the value of _tid" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19427" tag="hblock_tag_24" canDelete="false" indentLevel="1" classfield_id="19427" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@return the value of _standby" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19427" tag="hblock_tag_25" canDelete="false" indentLevel="1" classfield_id="19427" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@param value the value of _standby" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19428" tag="hblock_tag_27" canDelete="false" indentLevel="1" classfield_id="19428" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19428" tag="hblock_tag_28" canDelete="false" indentLevel="1" classfield_id="19428" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19429" tag="hblock_tag_30" canDelete="false" indentLevel="1" classfield_id="19429" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19429" tag="hblock_tag_31" canDelete="false" indentLevel="1" classfield_id="19429" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19430" tag="hblock_tag_33" canDelete="false" indentLevel="1" classfield_id="19430" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19430" tag="hblock_tag_34" canDelete="false" indentLevel="1" classfield_id="19430" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19431" tag="hblock_tag_36" canDelete="false" indentLevel="1" classfield_id="19431" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19431" tag="hblock_tag_37" canDelete="false" indentLevel="1" classfield_id="19431" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19432" tag="hblock_tag_39" canDelete="false" indentLevel="1" classfield_id="19432" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19432" tag="hblock_tag_40" canDelete="false" indentLevel="1" classfield_id="19432" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19433" tag="hblock_tag_42" canDelete="false" indentLevel="1" classfield_id="19433" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19433" tag="hblock_tag_43" canDelete="false" indentLevel="1" classfield_id="19433" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19434" tag="hblock_tag_45" canDelete="false" indentLevel="1" classfield_id="19434" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19434" tag="hblock_tag_46" canDelete="false" indentLevel="1" classfield_id="19434" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19435" tag="hblock_tag_48" canDelete="false" indentLevel="1" classfield_id="19435" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19435" tag="hblock_tag_49" canDelete="false" indentLevel="1" classfield_id="19435" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19436" tag="hblock_tag_51" canDelete="false" indentLevel="1" classfield_id="19436" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _local_sendrecv" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19436" tag="hblock_tag_52" canDelete="false" indentLevel="1" classfield_id="19436" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _local_sendrecv" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="19437" tag="hblock_tag_54" canDelete="false" indentLevel="1" classfield_id="19437" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _remote_sendrecv" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="19437" tag="hblock_tag_55" canDelete="false" indentLevel="1" classfield_id="19437" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _remote_sendrecv" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="19410" tag="operation_19410" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19411" tag="operation_19411" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19412" tag="operation_19412" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19413" tag="operation_19413" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param remote_sdp &amp;#010;@param msg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="19416" tag="operation_19416" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param sdp &amp;#010;@param med " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPCALL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipcall.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:11&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="19373" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19373" tag="tblock_0" canDelete="false" indentLevel="1" text=" int payload;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19373" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="19373" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19373" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="19373" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19374" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="1 started, -1 stopped" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19374" tag="tblock_2" canDelete="false" indentLevel="1" text=" int enable_audio;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="1 started, -1 stopped" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19374" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="19374" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@return the value of enable_audio" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19374" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="19374" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of enable_audio&amp;#010;1 started, -1 stopped&amp;#010;@param value the value of enable_audio" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19421" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="///////////////////////////// Private member variables///////////////////////////" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19421" tag="tblock_5" canDelete="false" indentLevel="1" text=" CodecDescriptorVector* _cdv;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="///////////////////////////// Private member variables///////////////////////////" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19421" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="19421" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _cdv" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19421" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="19421" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _cdv&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _cdv" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19422" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19422" tag="tblock_8" canDelete="false" indentLevel="1" text=" AudioCodec* _audiocodec;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19422" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="19422" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19422" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="19422" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19423" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19423" tag="tblock_11" canDelete="false" indentLevel="1" text=" short _id;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19423" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="19423" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19423" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="19423" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19424" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// call id" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19424" tag="tblock_14" canDelete="false" indentLevel="1" text=" int _cid;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// call id" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19424" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="19424" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _cid&amp;#010;// call id&amp;#010;@return the value of _cid" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19424" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="19424" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _cid&amp;#010;// call id&amp;#010;@param value the value of _cid" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19425" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// dialog id" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19425" tag="tblock_17" canDelete="false" indentLevel="1" text=" int _did;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// dialog id" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19425" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="19425" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _did&amp;#010;// dialog id&amp;#010;@return the value of _did" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19425" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="19425" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _did&amp;#010;// dialog id&amp;#010;@param value the value of _did" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19426" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// transaction id" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19426" tag="tblock_20" canDelete="false" indentLevel="1" text=" int _tid;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// transaction id" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19426" tag="hblock_tag_21" canDelete="false" indentLevel="1" classfield_id="19426" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _tid&amp;#010;// transaction id&amp;#010;@return the value of _tid" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19426" tag="hblock_tag_22" canDelete="false" indentLevel="1" classfield_id="19426" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _tid&amp;#010;// transaction id&amp;#010;@param value the value of _tid" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19427" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// wait for a cid and did when outgoing call is made" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19427" tag="tblock_23" canDelete="false" indentLevel="1" text=" bool _standby;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// wait for a cid and did when outgoing call is made" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19427" tag="hblock_tag_24" canDelete="false" indentLevel="1" classfield_id="19427" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@return the value of _standby" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19427" tag="hblock_tag_25" canDelete="false" indentLevel="1" classfield_id="19427" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _standby&amp;#010;// wait for a cid and did when outgoing call is made&amp;#010;@param value the value of _standby" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19428" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19428" tag="tblock_26" canDelete="false" indentLevel="1" text=" int _status_code;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19428" tag="hblock_tag_27" canDelete="false" indentLevel="1" classfield_id="19428" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19428" tag="hblock_tag_28" canDelete="false" indentLevel="1" classfield_id="19428" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19429" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19429" tag="tblock_29" canDelete="false" indentLevel="1" text=" char* _reason_phrase;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19429" tag="hblock_tag_30" canDelete="false" indentLevel="1" classfield_id="19429" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19429" tag="hblock_tag_31" canDelete="false" indentLevel="1" classfield_id="19429" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19430" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19430" tag="tblock_32" canDelete="false" indentLevel="1" text=" char* _textinfo;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19430" tag="hblock_tag_33" canDelete="false" indentLevel="1" classfield_id="19430" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19430" tag="hblock_tag_34" canDelete="false" indentLevel="1" classfield_id="19430" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19431" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19431" tag="tblock_35" canDelete="false" indentLevel="1" text=" char* _remote_uri;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19431" tag="hblock_tag_36" canDelete="false" indentLevel="1" classfield_id="19431" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19431" tag="hblock_tag_37" canDelete="false" indentLevel="1" classfield_id="19431" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19432" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19432" tag="tblock_38" canDelete="false" indentLevel="1" text=" char* _remote_sdp_audio_ip;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19432" tag="hblock_tag_39" canDelete="false" indentLevel="1" classfield_id="19432" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19432" tag="hblock_tag_40" canDelete="false" indentLevel="1" classfield_id="19432" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19433" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19433" tag="tblock_41" canDelete="false" indentLevel="1" text=" int _state;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19433" tag="hblock_tag_42" canDelete="false" indentLevel="1" classfield_id="19433" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19433" tag="hblock_tag_43" canDelete="false" indentLevel="1" classfield_id="19433" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19434" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19434" tag="tblock_44" canDelete="false" indentLevel="1" text=" int _local_audio_port;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19434" tag="hblock_tag_45" canDelete="false" indentLevel="1" classfield_id="19434" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19434" tag="hblock_tag_46" canDelete="false" indentLevel="1" classfield_id="19434" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19435" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19435" tag="tblock_47" canDelete="false" indentLevel="1" text=" int _remote_sdp_audio_port;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19435" tag="hblock_tag_48" canDelete="false" indentLevel="1" classfield_id="19435" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19435" tag="hblock_tag_49" canDelete="false" indentLevel="1" classfield_id="19435" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19436" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19436" tag="tblock_50" canDelete="false" indentLevel="1" text=" int _local_sendrecv;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19436" tag="hblock_tag_51" canDelete="false" indentLevel="1" classfield_id="19436" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _local_sendrecv" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19436" tag="hblock_tag_52" canDelete="false" indentLevel="1" classfield_id="19436" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _local_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _local_sendrecv" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="19437" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="19437" tag="tblock_53" canDelete="false" indentLevel="1" text=" int _remote_sendrecv;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="_SENDRECV, _SENDONLY, _RECVONLY" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="19437" tag="hblock_tag_54" canDelete="false" indentLevel="1" classfield_id="19437" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@return the value of _remote_sendrecv" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="19437" tag="hblock_tag_55" canDelete="false" indentLevel="1" classfield_id="19437" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _remote_sendrecv&amp;#010;_SENDRECV, _SENDONLY, _RECVONLY&amp;#010;@param value the value of _remote_sendrecv" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17624" parent_class="17624" fileExt=".h" fileName="audiortprtx" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIORTPRTX_H&amp;#010;#define AUDIORTPRTX_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" text="using ::AudioRtpRTX;&amp;#010;using ::AudioRtpRTX;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17624" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioRtpRTX&amp;#010;///////////////////////////////////////////////////////////////////////////////// Two pair of sockets///////////////////////////////////////////////////////////////////////////////" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="17641" tag="tblock_0" canDelete="false" indentLevel="1" text=" ost::Time* time;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="// For incoming call notification " />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioRtpRTX ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="17641" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17641" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of time&amp;#010;// For incoming call notification &amp;#010;@return the value of time" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17641" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17641" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of time&amp;#010;// For incoming call notification &amp;#010;@param value the value of time" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17633" tag="operation_17633" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  &amp;#010;@param  &amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17638" tag="operation_17638" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17642" tag="operation_17642" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="17643" tag="tblock_2" canDelete="false" indentLevel="1" text=" SipCall* _ca;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17644" tag="tblock_5" canDelete="false" indentLevel="1" text=" AudioLayer* _audioDevice;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17647" tag="tblock_8" canDelete="false" indentLevel="1" text=" ost::RTPSession* _sessionSend;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17648" tag="tblock_11" canDelete="false" indentLevel="1" text=" ost::RTPSession* _sessionRecv;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17651" tag="tblock_14" canDelete="false" indentLevel="1" text=" ost::SymmetricRTPSession* _session;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17652" tag="tblock_17" canDelete="false" indentLevel="1" text=" bool _sym;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="17643" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17643" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17643" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17643" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17644" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="17644" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17644" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="17644" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17647" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="17647" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17647" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="17647" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17648" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17648" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17648" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17648" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17651" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="17651" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17651" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="17651" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17652" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="17652" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17652" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="17652" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17653" tag="operation_17653" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17654" tag="operation_17654" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  &amp;#010;@param  &amp;#010;@param  &amp;#010;@param  &amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17664" tag="operation_17664" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  &amp;#010;@param  &amp;#010;@param  &amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIORTPRTX_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiortprtx.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17626" field_type="7077983" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Thread ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17630" field_type="7471215" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TimerPort ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17641" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="// For incoming call notification " />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17641" tag="tblock_0" canDelete="false" indentLevel="1" text=" ost::Time* time;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="// For incoming call notification " />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17641" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17641" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of time&amp;#010;// For incoming call notification &amp;#010;@return the value of time" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17641" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17641" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of time&amp;#010;// For incoming call notification &amp;#010;@param value the value of time" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17643" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17643" tag="tblock_2" canDelete="false" indentLevel="1" text=" SipCall* _ca;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17643" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17643" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17643" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17643" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17644" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17644" tag="tblock_5" canDelete="false" indentLevel="1" text=" AudioLayer* _audioDevice;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17644" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="17644" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17644" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="17644" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17647" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17647" tag="tblock_8" canDelete="false" indentLevel="1" text=" ost::RTPSession* _sessionSend;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17647" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="17647" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17647" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="17647" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17648" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17648" tag="tblock_11" canDelete="false" indentLevel="1" text=" ost::RTPSession* _sessionRecv;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17648" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17648" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17648" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17648" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17651" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17651" tag="tblock_14" canDelete="false" indentLevel="1" text=" ost::SymmetricRTPSession* _session;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17651" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="17651" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17651" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="17651" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17652" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17652" tag="tblock_17" canDelete="false" indentLevel="1" text=" bool _sym;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17652" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="17652" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17652" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="17652" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader17625" parent_class="17625" fileExt=".h" fileName="thread" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef THREAD_H&amp;#010;#define THREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17625" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Thread&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Thread ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //THREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			thread.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17626" field_type="7077983" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioRtpRTX ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17626" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17626" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader17629" parent_class="17629" fileExt=".h" fileName="timerport" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TIMERPORT_H&amp;#010;#define TIMERPORT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17629" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TimerPort&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TimerPort ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TIMERPORT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			timerport.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17630" field_type="5505106" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioRtpRTX ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17630" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17630" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17634" parent_class="17634" fileExt=".h" fileName="sipcall*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPCALL*_H&amp;#010;#define SIPCALL*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17634" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipCall*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipCall* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPCALL*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			SipCall*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader17639" parent_class="17639" fileExt=".h" fileName="time" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TIME_H&amp;#010;#define TIME_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17639" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Time&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Time ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TIME_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			Time.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17640" parent_class="17640" fileExt=".h" fileName="ost::time*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OST::TIME*_H&amp;#010;#define OST::TIME*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17640" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ost::Time*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ost::Time* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OST::TIME*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			ost::Time*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader17645" parent_class="17645" fileExt=".h" fileName="rtpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef RTPSESSION_H&amp;#010;#define RTPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17645" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RTPSession&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RTPSession ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //RTPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			RTPSession.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17646" parent_class="17646" fileExt=".h" fileName="ost::rtpsession*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OST::RTPSESSION*_H&amp;#010;#define OST::RTPSESSION*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17646" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ost::RTPSession*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ost::RTPSession* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OST::RTPSESSION*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			ost::RTPSession*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="ost" id="cppheader17649" parent_class="17649" fileExt=".h" fileName="symmetricrtpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SYMMETRICRTPSESSION_H&amp;#010;#define SYMMETRICRTPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17649" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SymmetricRTPSession&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SymmetricRTPSession ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SYMMETRICRTPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			SymmetricRTPSession.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is ost&amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17650" parent_class="17650" fileExt=".h" fileName="ost::symmetricrtpsession*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OST::SYMMETRICRTPSESSION*_H&amp;#010;#define OST::SYMMETRICRTPSESSION*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17650" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ost::SymmetricRTPSession*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ost::SymmetricRTPSession* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OST::SYMMETRICRTPSESSION*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			ost::SymmetricRTPSession*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17655" parent_class="17655" fileExt=".h" fileName="unsigned char" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UNSIGNED_CHAR_H&amp;#010;#define UNSIGNED_CHAR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17655" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class unsigned char&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="unsigned char ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UNSIGNED_CHAR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			unsigned char.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17656" parent_class="17656" fileExt=".h" fileName="unsigned char*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef UNSIGNED_CHAR*_H&amp;#010;#define UNSIGNED_CHAR*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17656" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class unsigned char*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="unsigned char* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //UNSIGNED_CHAR*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			unsigned char*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17658" parent_class="17658" fileExt=".h" fileName="int16" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef INT16_H&amp;#010;#define INT16_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17658" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class int16&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="int16 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //INT16_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int16.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17659" parent_class="17659" fileExt=".h" fileName="int16*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef INT16*_H&amp;#010;#define INT16*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17659" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class int16*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="int16* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //INT16*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int16*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17668" parent_class="17668" fileExt=".h" fileName="int&amp;" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef INT&amp;_H&amp;#010;#define INT&amp;_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17668" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class int&amp;&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="int&amp; ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //INT&amp;_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			int&amp;.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17670" parent_class="17670" fileExt=".h" fileName="audiortp" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIORTP_H&amp;#010;#define AUDIORTP_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17670" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioRtp&amp;#010;///////////////////////////////////////////////////////////////////////////////// Main class rtp///////////////////////////////////////////////////////////////////////////////" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioRtp ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17671" tag="operation_17671" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17672" tag="operation_17672" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17673" tag="operation_17673" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17675" tag="operation_17675" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="17678" tag="tblock_0" canDelete="false" indentLevel="1" text=" AudioRtpRTX* _RTXThread;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17679" tag="tblock_2" canDelete="false" indentLevel="1" text=" bool _symetric;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="17678" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17678" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17678" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17678" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17679" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17679" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17679" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17679" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIORTP_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiortp.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17678" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17678" tag="tblock_0" canDelete="false" indentLevel="1" text=" AudioRtpRTX* _RTXThread;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17678" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17678" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17678" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17678" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17679" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17679" tag="tblock_2" canDelete="false" indentLevel="1" text=" bool _symetric;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17679" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17679" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17679" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17679" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17677" parent_class="17677" fileExt=".h" fileName="audiortprtx*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIORTPRTX*_H&amp;#010;#define AUDIORTPRTX*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17677" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioRtpRTX*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioRtpRTX* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIORTPRTX*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			AudioRtpRTX*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17680" parent_class="17680" fileExt=".h" fileName="voiplinktype" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINKTYPE_H&amp;#010;#define VOIPLINKTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17680" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLinkType&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLinkType ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINKTYPE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinktype.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17683" parent_class="17683" fileExt=".h" fileName="audiocodec" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOCODEC_H&amp;#010;#define AUDIOCODEC_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17683" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioCodec&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioCodec ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOCODEC_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			AudioCodec.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17699" parent_class="17699" fileExt=".h" fileName="const string&amp;" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CONST_STRING&amp;_H&amp;#010;#define CONST_STRING&amp;_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17699" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class const string&amp;&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="const string&amp; ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CONST_STRING&amp;_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			const string&amp;.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17723" parent_class="17723" fileExt=".h" fileName="audiocodec*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOCODEC*_H&amp;#010;#define AUDIOCODEC*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17723" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioCodec*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioCodec* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOCODEC*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			AudioCodec*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17745" parent_class="17745" fileExt=".h" fileName="eventthread" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef EVENTTHREAD_H&amp;#010;#define EVENTTHREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17745" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class EventThread&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="EventThread ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //EVENTTHREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			EventThread.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17746" parent_class="17746" fileExt=".h" fileName="vector" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VECTOR_H&amp;#010;#define VECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17746" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class vector&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="vector ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VECTOR_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17747" parent_class="17747" fileExt=".h" fileName="vector&lt; codecdescriptor * >" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VECTOR&lt;_CODECDESCRIPTOR_*_>_H&amp;#010;#define VECTOR&lt;_CODECDESCRIPTOR_*_>_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17747" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class vector&lt; CodecDescriptor * >&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="vector&lt; CodecDescriptor * > ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VECTOR&lt;_CODECDESCRIPTOR_*_>_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector&lt; CodecDescriptor * >.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:22&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17748" parent_class="17748" fileExt=".h" fileName="sipvoiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPVOIPLINK_H&amp;#010;#define SIPVOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;audiortp.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17748" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipVoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipVoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17752" tag="operation_17752" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17754" tag="operation_17754" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17755" tag="operation_17755" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17756" tag="operation_17756" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17757" tag="operation_17757" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17758" tag="operation_17758" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17759" tag="operation_17759" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17760" tag="operation_17760" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to_url " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17763" tag="operation_17763" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17765" tag="operation_17765" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17767" tag="operation_17767" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17769" tag="operation_17769" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17771" tag="operation_17771" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17773" tag="operation_17773" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param to " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17776" tag="operation_17776" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17778" tag="operation_17778" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17779" tag="operation_17779" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param id &amp;#010;@param code " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17782" tag="operation_17782" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="To handle the local port" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17783" tag="operation_17783" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param  " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17785" tag="operation_17785" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Add a new SipCall at the end of the SipCallVector with identifiant 'id'" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17787" tag="operation_17787" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param callid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17789" tag="operation_17789" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Erase the SipCall(id) from the SipCallVector" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17791" tag="operation_17791" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Return a pointer to the SipCall with identifiant 'id'" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17793" tag="operation_17793" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Accessor to the audio codec of SipCall with identifiant 'id'" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17795" tag="operation_17795" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param cid " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17797" tag="operation_17797" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17798" tag="operation_17798" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param nMsg " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17800" tag="operation_17800" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="17839" tag="tblock_0" canDelete="false" indentLevel="1" text=" EventThread* _evThread;" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="///////////////////////////// Private member variables///////////////////////////" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17841" tag="tblock_2" canDelete="false" indentLevel="1" text=" std::vector&lt; SipCall * > _sipcallVector;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17842" tag="tblock_5" canDelete="false" indentLevel="1" text=" AudioRtp _audiortp;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17843" tag="tblock_8" canDelete="false" indentLevel="1" text=" int _localPort;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17844" tag="tblock_11" canDelete="false" indentLevel="1" text=" int _cid;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17845" tag="tblock_14" canDelete="false" indentLevel="1" text=" int _reg_id;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17846" tag="tblock_17" canDelete="false" indentLevel="1" text=" int _nMsgVoicemail;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="17839" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17839" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _evThread" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17839" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17839" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _evThread" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17841" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17841" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17841" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17841" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17842" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="17842" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17842" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="17842" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17843" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="17843" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17843" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="17843" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17844" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17844" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17844" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17844" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17845" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="17845" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17845" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="17845" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17846" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="17846" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17846" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="17846" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="17801" tag="operation_17801" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="If you are behind a NAT, you have to use STUN server, specified in &amp;#010;STUN configuration(you can change this one by default) to give you an &amp;#010;public IP address and assign a port number.&amp;#010;&amp;#010;Return 0 if an error occured and 1 if no error." />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17802" tag="operation_17802" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="To Store the local IP address, and allow to know if the network is &amp;#010;available.&amp;#010;&amp;#010;Return -1 if an error occured and 0 if no error" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17803" tag="operation_17803" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Return -1 if an error occured and 0 if no error" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17805" tag="operation_17805" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Allow the authentication when you want register&amp;#010;Return -1 if an error occured and 0 if no error " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17806" tag="operation_17806" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Build a sip address from the user configuration&amp;#010;Example: &quot;Display user name&quot; &lt;sip:user@host.com>&amp;#010;Return the result in a string" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17809" tag="operation_17809" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Build a sip address with the number that you want to call&amp;#010;Example: sip:124@domain.com&amp;#010;Return the result in a string" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17811" tag="operation_17811" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Beginning point to make outgoing call.&amp;#010;Check the 'from' and 'to' url.&amp;#010;Allocate local audio port.&amp;#010;Build SDP body.&amp;#010;Return -1 if an error occured and 0 if no error" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17817" tag="operation_17817" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Look for call with same cid/did &amp;#010;Return the id of the found call" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17821" tag="operation_17821" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17822" tag="operation_17822" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Return true if payload is already in the rtpmap and false if not" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17826" tag="operation_17826" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="To build sdp with 200 OK when answered call" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17832" tag="operation_17832" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="To build sdp when call is on-hold" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="17836" tag="operation_17836" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="To build sdp when call is off-hold" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPVOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:45&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="17749" field_type="7012462" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17749" tag="" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17749" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17839" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" text="///////////////////////////// Private member variables///////////////////////////" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17839" tag="tblock_0" canDelete="false" indentLevel="1" text=" EventThread* _evThread;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="///////////////////////////// Private member variables///////////////////////////" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17839" tag="hblock_tag_0" canDelete="false" indentLevel="1" classfield_id="17839" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Get the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@return the value of _evThread" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17839" tag="hblock_tag_1" canDelete="false" indentLevel="1" classfield_id="17839" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" text="Set the value of _evThread&amp;#010;///////////////////////////// Private member variables///////////////////////////&amp;#010;@param value the value of _evThread" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17841" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17841" tag="tblock_2" canDelete="false" indentLevel="1" text=" std::vector&lt; SipCall * > _sipcallVector;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17841" tag="hblock_tag_3" canDelete="false" indentLevel="1" classfield_id="17841" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17841" tag="hblock_tag_4" canDelete="false" indentLevel="1" classfield_id="17841" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17842" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17842" tag="tblock_5" canDelete="false" indentLevel="1" text=" AudioRtp _audiortp;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17842" tag="hblock_tag_6" canDelete="false" indentLevel="1" classfield_id="17842" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17842" tag="hblock_tag_7" canDelete="false" indentLevel="1" classfield_id="17842" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17843" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17843" tag="tblock_8" canDelete="false" indentLevel="1" text=" int _localPort;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17843" tag="hblock_tag_9" canDelete="false" indentLevel="1" classfield_id="17843" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17843" tag="hblock_tag_10" canDelete="false" indentLevel="1" classfield_id="17843" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17844" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17844" tag="tblock_11" canDelete="false" indentLevel="1" text=" int _cid;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17844" tag="hblock_tag_12" canDelete="false" indentLevel="1" classfield_id="17844" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17844" tag="hblock_tag_13" canDelete="false" indentLevel="1" classfield_id="17844" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17845" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17845" tag="tblock_14" canDelete="false" indentLevel="1" text=" int _reg_id;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17845" tag="hblock_tag_15" canDelete="false" indentLevel="1" classfield_id="17845" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17845" tag="hblock_tag_16" canDelete="false" indentLevel="1" classfield_id="17845" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17846" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17846" tag="tblock_17" canDelete="false" indentLevel="1" text=" int _nMsgVoicemail;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17846" tag="hblock_tag_18" canDelete="false" indentLevel="1" classfield_id="17846" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17846" tag="hblock_tag_19" canDelete="false" indentLevel="1" classfield_id="17846" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17818" parent_class="17818" fileExt=".h" fileName="exosip_event_t" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef EXOSIP_EVENT_T_H&amp;#010;#define EXOSIP_EVENT_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17818" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class eXosip_event_t&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="eXosip_event_t ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //EXOSIP_EVENT_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			eXosip_event_t.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17819" parent_class="17819" fileExt=".h" fileName="exosip_event_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef EXOSIP_EVENT_T*_H&amp;#010;#define EXOSIP_EVENT_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17819" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class eXosip_event_t*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="eXosip_event_t* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //EXOSIP_EVENT_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			eXosip_event_t*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17828" parent_class="17828" fileExt=".h" fileName="osip_message_t" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OSIP_MESSAGE_T_H&amp;#010;#define OSIP_MESSAGE_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17828" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class osip_message_t&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="osip_message_t ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OSIP_MESSAGE_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			osip_message_t.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17829" parent_class="17829" fileExt=".h" fileName="osip_message_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OSIP_MESSAGE_T*_H&amp;#010;#define OSIP_MESSAGE_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17829" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class osip_message_t*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="osip_message_t* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OSIP_MESSAGE_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			osip_message_t*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17833" parent_class="17833" fileExt=".h" fileName="sdp_message_t" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SDP_MESSAGE_T_H&amp;#010;#define SDP_MESSAGE_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17833" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class sdp_message_t&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="sdp_message_t ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SDP_MESSAGE_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_message_t.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17834" parent_class="17834" fileExt=".h" fileName="sdp_message_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SDP_MESSAGE_T*_H&amp;#010;#define SDP_MESSAGE_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17834" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class sdp_message_t*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="sdp_message_t* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SDP_MESSAGE_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_message_t*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17838" parent_class="17838" fileExt=".h" fileName="eventthread*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef EVENTTHREAD*_H&amp;#010;#define EVENTTHREAD*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17838" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class EventThread*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="EventThread* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //EVENTTHREAD*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			EventThread*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17840" parent_class="17840" fileExt=".h" fileName="std::vector&lt; sipcall * >" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STD::VECTOR&lt;_SIPCALL_*_>_H&amp;#010;#define STD::VECTOR&lt;_SIPCALL_*_>_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17840" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class std::vector&lt; SipCall * >&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="std::vector&lt; SipCall * > ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STD::VECTOR&lt;_SIPCALL_*_>_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			std::vector&lt; SipCall * >.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:08:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader19368" parent_class="19368" fileExt=".h" fileName="vector&lt; codecdescriptor *, allocator &lt; codecdescriptor * > >" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VECTOR&lt;_CODECDESCRIPTOR_*,_ALLOCATOR_&lt;_CODECDESCRIPTOR_*_>_>_H&amp;#010;#define VECTOR&lt;_CODECDESCRIPTOR_*,_ALLOCATOR_&lt;_CODECDESCRIPTOR_*_>_>_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="19368" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class vector&lt; CodecDescriptor *, allocator &lt; CodecDescriptor * > >&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="vector&lt; CodecDescriptor *, allocator &lt; CodecDescriptor * > > ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VECTOR&lt;_CODECDESCRIPTOR_*,_ALLOCATOR_&lt;_CODECDESCRIPTOR_*_>_>_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			vector&lt; CodecDescriptor *, allocator &lt; CodecDescriptor * > >.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader19402" parent_class="19402" fileExt=".h" fileName="char*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CHAR*_H&amp;#010;#define CHAR*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="19402" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class char*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="char* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CHAR*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			char*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader19418" parent_class="19418" fileExt=".h" fileName="sdp_media_t" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SDP_MEDIA_T_H&amp;#010;#define SDP_MEDIA_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="19418" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class sdp_media_t&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="sdp_media_t ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SDP_MEDIA_T_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_media_t.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader19419" parent_class="19419" fileExt=".h" fileName="sdp_media_t*" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SDP_MEDIA_T*_H&amp;#010;#define SDP_MEDIA_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="19419" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class sdp_media_t*&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="sdp_media_t* ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SDP_MEDIA_T*_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sdp_media_t*.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Wed Sep 21 2005 at 16:09:10&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+   </codegenerator>
+  </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/doc/sflphone-server2.xmi b/doc/sflphone-server2.xmi
new file mode 100644
index 0000000000000000000000000000000000000000..e0f1332c0126c2ccc0c7f58934c59a3058bb6698
--- /dev/null
+++ b/doc/sflphone-server2.xmi
@@ -0,0 +1,6899 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2005-09-27T16:09:40" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.4.2</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" >
+   <UML:Namespace.ownedElement>
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="3" isRoot="false" isAbstract="false" name="datatype" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2" isRoot="false" isAbstract="false" name="int" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="4" isRoot="false" isAbstract="false" name="char" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="5" isRoot="false" isAbstract="false" name="bool" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="6" isRoot="false" isAbstract="false" name="float" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="7" isRoot="false" isAbstract="false" name="double" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8" isRoot="false" isAbstract="false" name="long" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="9" isRoot="false" isAbstract="false" name="short" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="10" isRoot="false" isAbstract="false" name="string" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="98" isRoot="false" isAbstract="false" name="void" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="11" isRoot="false" isAbstract="false" name="GUIServer" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="19" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="97" isRoot="false" isAbstract="false" name="list" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="155" type="5" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="146" isRoot="false" isAbstract="false" name="sendItem" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="12" isRoot="false" isAbstract="false" name="GUIFramework" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="13" isRoot="false" isAbstract="false" name="RequestManager" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="14" isRoot="false" isAbstract="false" name="Request" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="15" isRoot="false" isAbstract="false" name="RequestFactory" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="16" isRoot="false" isAbstract="false" name="TCPSessionIO" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="22" />
+      <UML:Generalization xmi.idref="47" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="17" isRoot="false" isAbstract="false" name="TCPStream" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="18" isRoot="false" isAbstract="false" name="SessionIO" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="37" isRoot="false" isAbstract="false" name="TCPSocket" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="65" isRoot="false" isAbstract="false" name="TCPSession" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="70" />
+      <UML:Generalization xmi.idref="74" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="66" isRoot="false" isAbstract="false" name="TCPStreamPool" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="67" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="73" isRoot="false" isAbstract="false" name="Thread" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="83" isRoot="false" isAbstract="false" name="ObjectPool" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="92" isRoot="false" isAbstract="false" name="RequestList" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="94" isRoot="false" isAbstract="false" name="ManagerImpl" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="100" isRoot="false" isAbstract="false" name="list" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="156" type="5" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Generalization isSpecification="false" child="11" visibility="public" xmi.id="19" parent="12" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="16" visibility="public" xmi.id="22" parent="17" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="25" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="26" aggregation="composite" type="11" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="27" aggregation="none" type="13" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="28" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="29" aggregation="composite" type="13" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="30" aggregation="none" type="15" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="31" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="32" aggregation="none" type="15" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="33" aggregation="none" type="14" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="34" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="35" aggregation="none" type="14" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="36" aggregation="none" type="11" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="38" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="39" aggregation="composite" type="18" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="40" aggregation="none" type="37" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="41" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="42" aggregation="composite" type="18" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="43" aggregation="none" type="16" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="44" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="45" aggregation="shared" type="18" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="46" aggregation="none" type="16" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="16" visibility="public" xmi.id="47" parent="18" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="50" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="51" aggregation="composite" type="17" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="52" aggregation="none" type="16" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="53" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="54" aggregation="shared" type="16" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="55" aggregation="none" type="17" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="56" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="57" aggregation="composite" type="37" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="58" aggregation="none" type="16" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="59" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="60" aggregation="composite" type="16" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="61" aggregation="none" type="37" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="62" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="63" aggregation="shared" type="13" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="64" aggregation="none" type="18" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="66" visibility="public" xmi.id="67" parent="65" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="65" visibility="public" xmi.id="70" parent="17" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="65" visibility="public" xmi.id="74" parent="73" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="77" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="78" aggregation="shared" type="16" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="79" aggregation="none" type="16" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="80" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="81" aggregation="shared" type="16" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="82" aggregation="none" type="66" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="84" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="85" aggregation="composite" type="66" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="86" aggregation="none" type="83" name="" multiplicity="2" />
+     </UML:Association.connection>
+    </UML:Association>
+   </UML:Namespace.ownedElement>
+  </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+  <docsettings viewid="91" documentation="" uniqueid="156" />
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="0" usefillcolor="1" snapx="10" canvaswidth="840" snapy="10" showatts="1" xmi.id="1" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="900000" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="554" >
+    <widgets>
+     <classwidget usesdiagramfillcolour="1" width="87" showattsigs="601" usesdiagramusefillcolour="1" x="95" linecolour="none" y="170" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="11" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="103" showattsigs="601" usesdiagramusefillcolour="1" x="80" linecolour="none" y="53" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="12" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="112" showattsigs="601" usesdiagramusefillcolour="1" x="293" linecolour="none" y="169" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="13" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="60" showattsigs="601" usesdiagramusefillcolour="1" x="103" linecolour="none" y="242" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="14" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="106" showattsigs="601" usesdiagramusefillcolour="1" x="295" linecolour="none" y="242" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="15" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="100" showattsigs="601" usesdiagramusefillcolour="1" x="489" linecolour="none" y="236" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="16" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="79" showattsigs="601" usesdiagramusefillcolour="1" x="613" linecolour="none" y="167" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="17" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="73" showattsigs="601" usesdiagramusefillcolour="0" x="503" linecolour="#ff0000" y="169" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="18" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="79" showattsigs="601" usesdiagramusefillcolour="1" x="422" linecolour="none" y="318" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="37" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="85" showattsigs="601" usesdiagramusefillcolour="1" x="664" linecolour="none" y="239" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="65" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="108" showattsigs="601" usesdiagramusefillcolour="0" x="557" linecolour="#ff0000" y="317" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="66" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="52" showattsigs="601" usesdiagramusefillcolour="1" x="736" linecolour="none" y="167" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="73" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="78" showattsigs="601" usesdiagramusefillcolour="1" x="572" linecolour="none" y="397" showopsigs="600" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="83" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans,10,-1,5,75,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="12" widgetaid="11" xmi.id="19" >
+      <linepath>
+       <startpoint startx="138" starty="170" />
+       <endpoint endx="131" endy="86" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="13" widgetaid="11" xmi.id="25" >
+      <linepath>
+       <startpoint startx="182" starty="199" />
+       <endpoint endx="293" endy="185" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="15" widgetaid="13" xmi.id="28" >
+      <linepath>
+       <startpoint startx="349" starty="202" />
+       <endpoint endx="348" endy="242" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="14" widgetaid="15" xmi.id="31" >
+      <linepath>
+       <startpoint startx="295" starty="258" />
+       <endpoint endx="163" endy="258" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="11" widgetaid="14" xmi.id="34" >
+      <linepath>
+       <startpoint startx="133" starty="242" />
+       <endpoint endx="138" endy="229" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="37" widgetaid="16" xmi.id="59" >
+      <linepath>
+       <startpoint startx="522" starty="269" />
+       <endpoint endx="461" endy="318" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="18" widgetaid="13" xmi.id="62" >
+      <linepath>
+       <startpoint startx="405" starty="185" />
+       <endpoint endx="503" endy="185" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="65" widgetaid="66" xmi.id="67" >
+      <linepath>
+       <startpoint startx="629" starty="317" />
+       <endpoint endx="706" endy="272" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="17" widgetaid="65" xmi.id="70" >
+      <linepath>
+       <startpoint startx="692" starty="239" />
+       <endpoint endx="652" endy="200" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="73" widgetaid="65" xmi.id="74" >
+      <linepath>
+       <startpoint startx="720" starty="239" />
+       <endpoint endx="762" endy="200" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="18" widgetaid="16" xmi.id="47" >
+      <linepath>
+       <startpoint startx="539" starty="236" />
+       <endpoint endx="539" endy="202" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="2" totalcountb="3" indexb="1" widgetbid="66" widgetaid="16" xmi.id="80" >
+      <linepath>
+       <startpoint startx="555" starty="269" />
+       <endpoint endx="593" endy="317" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="83" widgetaid="66" xmi.id="84" >
+      <linepath>
+       <startpoint startx="611" starty="350" />
+       <endpoint endx="611" endy="397" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="15" usesdiagramusefillcolour="1" x="613" linecolour="none" y="374" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="89" text="2" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+    </associations>
+   </diagram>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="0" usefillcolor="1" snapx="10" canvaswidth="750" snapy="10" showatts="1" xmi.id="91" documentation="" type="403" showops="1" showpackage="0" name="list" localid="899997" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="586" >
+    <widgets>
+     <objectwidget usesdiagramfillcolour="1" width="91" usesdiagramusefillcolour="1" x="35" linecolour="none" y="48" instancename="" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="27" usefillcolor="1" isinstance="0" xmi.id="92" decon="0" localid="899999" multipleinstance="0" drawasactor="0" font="Sans,10,-1,5,50,0,1,0,0,0" />
+     <objectwidget usesdiagramfillcolour="1" width="83" usesdiagramusefillcolour="1" x="213" linecolour="none" y="48" instancename="" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="27" usefillcolor="1" isinstance="0" xmi.id="11" decon="0" localid="899998" multipleinstance="0" drawasactor="0" font="Sans,10,-1,5,50,0,1,0,0,0" />
+     <objectwidget usesdiagramfillcolour="1" width="97" usesdiagramusefillcolour="1" x="365" linecolour="none" y="48" instancename="" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="27" usefillcolor="1" isinstance="0" xmi.id="94" decon="0" localid="899997" multipleinstance="0" drawasactor="0" font="Sans,10,-1,5,50,0,1,0,0,0" />
+    </widgets>
+    <messages>
+     <messagewidget usesdiagramfillcolour="1" width="182" usesdiagramusefillcolour="1" x="80" linecolour="none" y="122" operation="97" linewidth="none" usesdiagramlinewidth="1" widgetbid="899998" usesdiagramlinecolour="1" fillcolour="none" height="141" usefillcolor="1" seqnum="" textid="96" widgetaid="899999" isinstance="0" xmi.id="93" sequencemessagetype="1000" font="Sans,10,-1,5,50,0,0,0,0,0" >
+      <floatingtext usesdiagramfillcolour="1" width="41" usesdiagramusefillcolour="1" x="85" linecolour="none" y="101" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="704" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="96" text=": list()" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </messagewidget>
+     <messagewidget usesdiagramfillcolour="1" width="167" usesdiagramusefillcolour="1" x="254" linecolour="none" y="136" operation="100" linewidth="none" usesdiagramlinewidth="1" widgetbid="899997" usesdiagramlinecolour="1" fillcolour="none" height="105" usefillcolor="1" seqnum="" textid="99" widgetaid="899998" isinstance="0" xmi.id="95" sequencemessagetype="1000" font="Sans,10,-1,5,50,0,0,0,0,0" >
+      <floatingtext usesdiagramfillcolour="1" width="41" usesdiagramusefillcolour="1" x="259" linecolour="none" y="115" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="704" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="99" text=": list()" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </messagewidget>
+     <messagewidget usesdiagramfillcolour="1" width="157" usesdiagramusefillcolour="1" x="255" linecolour="none" y="161" operation="146" linewidth="none" usesdiagramlinewidth="1" widgetbid="899998" usesdiagramlinecolour="1" fillcolour="none" height="8" usefillcolor="1" seqnum="" textid="145" widgetaid="899997" isinstance="0" xmi.id="117" sequencemessagetype="1001" font="Sans,10,-1,5,50,0,0,0,0,0" >
+      <floatingtext usesdiagramfillcolour="1" width="78" usesdiagramusefillcolour="1" x="260" linecolour="none" y="140" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="704" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="145" text=": sendItem()" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     </messagewidget>
+     <messagewidget usesdiagramfillcolour="1" width="157" usesdiagramusefillcolour="1" x="255" linecolour="none" y="186" operation="" linewidth="none" usesdiagramlinewidth="1" widgetbid="899998" usesdiagramlinecolour="1" fillcolour="none" height="8" usefillcolor="1" seqnum="" widgetaid="899997" isinstance="0" xmi.id="122" sequencemessagetype="1001" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     <messagewidget usesdiagramfillcolour="1" width="157" usesdiagramusefillcolour="1" x="255" linecolour="none" y="170" operation="" linewidth="none" usesdiagramlinewidth="1" widgetbid="899998" usesdiagramlinecolour="1" fillcolour="none" height="8" usefillcolor="1" seqnum="" widgetaid="899997" isinstance="0" xmi.id="127" sequencemessagetype="1001" font="Sans,10,-1,5,50,0,0,0,0,0" />
+     <messagewidget usesdiagramfillcolour="1" width="157" usesdiagramusefillcolour="1" x="255" linecolour="none" y="202" operation="" linewidth="none" usesdiagramlinewidth="1" widgetbid="899998" usesdiagramlinecolour="1" fillcolour="none" height="8" usefillcolor="1" seqnum="" widgetaid="899997" isinstance="0" xmi.id="132" sequencemessagetype="1001" font="Sans,10,-1,5,50,0,0,0,0,0" />
+    </messages>
+    <associations/>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" label="Views" >
+    <listitem open="1" type="801" label="Logical View" >
+     <listitem open="1" type="813" id="12" />
+     <listitem open="1" type="813" id="11" >
+      <listitem open="0" type="815" id="97" />
+      <listitem open="0" type="815" id="146" />
+     </listitem>
+     <listitem open="1" type="813" id="94" >
+      <listitem open="0" type="815" id="100" />
+     </listitem>
+     <listitem open="1" type="813" id="83" />
+     <listitem open="1" type="813" id="14" />
+     <listitem open="1" type="813" id="15" />
+     <listitem open="1" type="813" id="92" />
+     <listitem open="1" type="813" id="13" />
+     <listitem open="1" type="813" id="18" />
+     <listitem open="1" type="813" id="65" />
+     <listitem open="1" type="813" id="16" />
+     <listitem open="1" type="813" id="37" />
+     <listitem open="1" type="813" id="17" />
+     <listitem open="1" type="813" id="66" />
+     <listitem open="1" type="813" id="73" />
+     <listitem open="1" type="830" label="Datatypes" >
+      <listitem open="1" type="829" id="5" />
+      <listitem open="1" type="829" id="4" />
+      <listitem open="1" type="829" id="7" />
+      <listitem open="1" type="829" id="6" />
+      <listitem open="1" type="829" id="2" />
+      <listitem open="1" type="829" id="8" />
+      <listitem open="1" type="829" id="9" />
+      <listitem open="1" type="829" id="10" />
+      <listitem open="1" type="829" id="98" />
+     </listitem>
+    </listitem>
+    <listitem open="1" type="802" label="Use Case View" />
+    <listitem open="1" type="821" label="Component View" />
+    <listitem open="1" type="827" label="Deployment View" />
+    <listitem open="1" type="836" label="Entity Relationship Model" />
+   </listitem>
+  </listview>
+  <codegeneration>
+   <codegenerator language="Cpp" >
+    <classifiercodedocument writeOutCode="true" package="" id="11" parent_class="11" fileExt=".cpp" fileName="guiserver" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;guiserver.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="97" tag="operation_97" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="146" tag="operation_146" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiserver.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 16:08:03&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="25" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="25" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="12" parent_class="12" fileExt=".cpp" fileName="guiframework" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;guiframework.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiframework.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="13" parent_class="13" fileExt=".cpp" fileName="requestmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestmanager.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="62" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="62" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="25" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="25" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="28" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="28" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="14" parent_class="14" fileExt=".cpp" fileName="request" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;request.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			request.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 15:53:33&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="15" parent_class="15" fileExt=".cpp" fileName="requestfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;requestfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestfactory.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 15:53:24&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="28" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="28" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="16" parent_class="16" fileExt=".cpp" fileName="tcpsessionio" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsessionio.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_24" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_25" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_26" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_27" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_28" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_29" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_30" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_31" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_32" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_33" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_34" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_35" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_36" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_37" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_38" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_39" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_40" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_41" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_42" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_43" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_44" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsessionio.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="44" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="44" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="53" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="53" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="77" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="77" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="77" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="77" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="80" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="80" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_24" canDelete="false" writeOutText="false" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="41" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="41" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_25" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_26" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_27" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_28" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_29" canDelete="false" writeOutText="false" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="50" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="50" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_30" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_31" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_32" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_33" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_34" canDelete="false" writeOutText="false" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="56" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="56" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_35" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_36" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_37" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_38" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_39" canDelete="false" writeOutText="false" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="59" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="59" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_40" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_41" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_42" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_43" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_44" canDelete="false" writeOutText="false" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="17" parent_class="17" fileExt=".cpp" fileName="tcpstream" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpstream.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpstream.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="53" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="53" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="50" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="50" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="18" parent_class="18" fileExt=".cpp" fileName="sessionio" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sessionio.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sessionio.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="44" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="44" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="62" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="62" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="38" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="38" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="41" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="41" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="37" parent_class="37" fileExt=".cpp" fileName="tcpsocket" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsocket.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsocket.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="38" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="38" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="56" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="56" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="59" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="59" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="65" parent_class="65" fileExt=".cpp" fileName="tcpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsession.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="66" parent_class="66" fileExt=".cpp" fileName="tcpstreampool" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;tcpstreampool.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpstreampool.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="80" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="80" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="84" field_type="4" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="84" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="73" parent_class="73" fileExt=".cpp" fileName="thread" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;thread.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			thread.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="83" parent_class="83" fileExt=".cpp" fileName="objectpool" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;objectpool.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			objectpool.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 15:54:21&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="84" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="84" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <codedocument writeOutCode="false" package="" id="Makefile_DOC" fileExt="" fileName="Makefile" >
+     <textblocks/>
+     <header>
+      <codecomment tag="" />
+     </header>
+    </codedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="98" parent_class="98" fileExt=".cpp" fileName="void" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;void.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			void.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 16:05:44&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader11" parent_class="11" fileExt=".h" fileName="guiserver" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef GUISERVER_H&amp;#010;#define GUISERVER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="11" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class GUIServer&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="25" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" RequestManager ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="GUIServer ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="97" tag="operation_97" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="146" tag="operation_146" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //GUISERVER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiserver.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 16:08:03&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="25" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="25" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" RequestManager ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader12" parent_class="12" fileExt=".h" fileName="guiframework" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef GUIFRAMEWORK_H&amp;#010;#define GUIFRAMEWORK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="12" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class GUIFramework&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="GUIFramework ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //GUIFRAMEWORK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			guiframework.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader13" parent_class="13" fileExt=".h" fileName="requestmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTMANAGER_H&amp;#010;#define REQUESTMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="13" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestManager&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="62" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="25" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" GUIServer ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="28" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" RequestFactory ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestManager ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestmanager.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="62" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="62" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" SessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="25" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="25" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" GUIServer ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="25" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="25" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="25" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="25" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="25" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="25" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="28" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="28" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" RequestFactory ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader14" parent_class="14" fileExt=".h" fileName="request" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUEST_H&amp;#010;#define REQUEST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="14" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Request&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Request ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUEST_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			request.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 15:53:33&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader15" parent_class="15" fileExt=".h" fileName="requestfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef REQUESTFACTORY_H&amp;#010;#define REQUESTFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="15" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class RequestFactory&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="28" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" RequestManager ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="RequestFactory ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //REQUESTFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			requestfactory.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 15:53:24&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="28" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="28" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" RequestManager ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="28" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="28" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="28" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="28" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="28" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="28" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader16" parent_class="16" fileExt=".h" fileName="tcpsessionio" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSESSIONIO_H&amp;#010;#define TCPSESSIONIO_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;sessionio.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="16" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSessionIO&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="44" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="53" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPStream ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="77" tag="tblock_42" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="77" tag="tblock_41" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="80" tag="tblock_4" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPStreamPool ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="41" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="50" tag="tblock_6" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPStream ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="56" tag="tblock_7" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSocket ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="59" tag="tblock_8" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSocket ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSessionIO ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_25" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_26" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_27" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_28" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_29" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_30" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_31" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_32" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_33" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_34" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_35" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_36" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_37" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_38" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_39" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_40" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_41" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_42" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_43" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_44" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_45" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_46" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_47" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_48" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_49" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_50" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_51" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_52" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSESSIONIO_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsessionio.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="44" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="44" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="53" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="53" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPStream ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="77" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="77" tag="tblock_42" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="77" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="77" tag="tblock_41" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="77" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="77" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="77" tag="hblock_tag_25" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="77" tag="hblock_tag_26" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="77" tag="hblock_tag_27" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="77" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="80" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="80" tag="tblock_4" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPStreamPool ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_28" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_29" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_30" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_31" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_32" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="41" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="41" tag="tblock_5" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_33" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_34" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_35" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_36" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_37" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="50" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="50" tag="tblock_6" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPStream ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_38" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_39" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_40" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_41" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_42" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="56" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="56" tag="tblock_7" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSocket ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_43" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_44" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_45" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_46" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_47" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="59" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="59" tag="tblock_8" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSocket ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_48" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_49" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_50" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_51" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_52" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader17" parent_class="17" fileExt=".h" fileName="tcpstream" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSTREAM_H&amp;#010;#define TCPSTREAM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="17" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPStream&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="53" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="50" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPStream ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSTREAM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpstream.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="53" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="53" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="53" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="53" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="53" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="53" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="53" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="53" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="50" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="50" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="50" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="50" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="50" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="50" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="50" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="50" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader18" parent_class="18" fileExt=".h" fileName="sessionio" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SESSIONIO_H&amp;#010;#define SESSIONIO_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="18" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SessionIO&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="44" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="62" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" RequestManager ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="38" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSocket ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="41" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SessionIO ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SESSIONIO_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sessionio.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="44" field_type="3" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="44" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="44" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="44" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="44" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="44" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="44" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="44" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="62" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="62" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" RequestManager ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="62" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="62" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="62" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="62" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="62" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="62" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="38" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="38" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSocket ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="41" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="41" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="41" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="41" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="41" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="41" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="41" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="41" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader37" parent_class="37" fileExt=".h" fileName="tcpsocket" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSOCKET_H&amp;#010;#define TCPSOCKET_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="37" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSocket&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="38" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="56" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="59" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSocket ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSOCKET_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsocket.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="38" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="38" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" SessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="38" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="38" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="38" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="38" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="38" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="38" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="56" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="56" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="56" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="56" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="56" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="56" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="56" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="56" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="59" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="59" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="59" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="59" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="59" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="59" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="59" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="59" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader65" parent_class="65" fileExt=".h" fileName="tcpsession" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSESSION_H&amp;#010;#define TCPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;tcpstream.h&quot;&amp;#010;#include &quot;thread.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="65" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPSession&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPSession ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpsession.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:02&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader66" parent_class="66" fileExt=".h" fileName="tcpstreampool" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef TCPSTREAMPOOL_H&amp;#010;#define TCPSTREAMPOOL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &lt;vector>&amp;#010;#include &quot;tcpsession.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="66" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class TCPStreamPool&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="80" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="84" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="TCPStreamPool ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //TCPSTREAMPOOL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			tcpstreampool.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:03&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="80" field_type="3" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="80" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPSessionIO ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="80" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="80" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="80" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="80" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="80" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="80" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="84" field_type="4" initialValue=" new vector( )" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="84" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" vector Vector;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader73" parent_class="73" fileExt=".h" fileName="thread" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef THREAD_H&amp;#010;#define THREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="73" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Thread&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Thread ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //THREAD_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			thread.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 09:05:03&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader83" parent_class="83" fileExt=".h" fileName="objectpool" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OBJECTPOOL_H&amp;#010;#define OBJECTPOOL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="83" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class ObjectPool&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="84" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPStreamPool ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="ObjectPool ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OBJECTPOOL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			objectpool.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 15:54:21&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="84" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="84" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" TCPStreamPool ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="84" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="84" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="84" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="84" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="84" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="84" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader98" parent_class="98" fileExt=".h" fileName="void" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOID_H&amp;#010;#define VOID_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="98" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class void&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="void ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOID_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			void.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Tue Sep 27 2005 at 16:05:44&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+   </codegenerator>
+  </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/doc/sflphone-uml.xmi b/doc/sflphone-uml.xmi
new file mode 100644
index 0000000000000000000000000000000000000000..3a6c2b38348ea1e8d7161928056e954b1ed9eb96
--- /dev/null
+++ b/doc/sflphone-uml.xmi
@@ -0,0 +1,10688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2005-09-22T09:38:35" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.4.2</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" >
+   <UML:Namespace.ownedElement>
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="3" isRoot="false" isAbstract="false" name="datatype" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="55" isRoot="false" isAbstract="false" name="void" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2" isRoot="false" isAbstract="false" name="int" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="4" isRoot="false" isAbstract="false" name="char" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="5" isRoot="false" isAbstract="false" name="bool" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="6" isRoot="false" isAbstract="false" name="float" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="7" isRoot="false" isAbstract="false" name="double" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="8" isRoot="false" isAbstract="false" name="long" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="9" isRoot="false" isAbstract="false" name="short" />
+    <UML:DataType stereotype="3" isSpecification="false" isLeaf="false" visibility="public" xmi.id="10" isRoot="false" isAbstract="false" name="string" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="54" isRoot="false" isAbstract="false" name="class" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="11" isRoot="false" isAbstract="false" name="SipVoIPManager" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="237" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="12" isRoot="false" isAbstract="false" name="SipVoIPLink" >
+     <UML:ModelElement.templateParameter>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="67" isRoot="false" type="54" isAbstract="false" name="NatPolicy" />
+     </UML:ModelElement.templateParameter>
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="142" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Namespace.ownedElement>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="67" isRoot="false" type="54" isAbstract="false" name="NatPolicy" />
+     </UML:Namespace.ownedElement>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="13" isRoot="false" isAbstract="false" name="VoIPManager" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="584" isRoot="false" isAbstract="false" name="addLinkType" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="585" isRoot="false" value="" type="10" isAbstract="false" name="name" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="588" isRoot="false" value="" type="28" isAbstract="false" name="link" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="14" isRoot="false" isAbstract="false" name="LinkManagerBaseProxy" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="22" isRoot="false" isAbstract="false" name="IAX2VoIPManager" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="230" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="24" isRoot="false" isAbstract="false" name="IAX2VoIPLink" >
+     <UML:ModelElement.templateParameter>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="78" isRoot="false" type="54" isAbstract="false" name="NatPolicy" />
+     </UML:ModelElement.templateParameter>
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="135" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Namespace.ownedElement>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="78" isRoot="false" type="54" isAbstract="false" name="NatPolicy" />
+     </UML:Namespace.ownedElement>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="28" isRoot="false" isAbstract="false" name="VoIPLinkManager" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="37" isRoot="false" isAbstract="false" name="initialize" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="38" isRoot="false" isAbstract="false" name="terminate" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="34" isRoot="false" isAbstract="false" name="LinkManagerProxy" >
+     <UML:ModelElement.templateParameter>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="35" isRoot="false" type="54" isAbstract="false" name="LinkManagerType" />
+     </UML:ModelElement.templateParameter>
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="36" />
+      <UML:Generalization xmi.idref="662" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Namespace.ownedElement>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="35" isRoot="false" type="54" isAbstract="false" name="LinkManagerType" />
+     </UML:Namespace.ownedElement>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="40" isRoot="false" isAbstract="false" name="AccountManager" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="43" isRoot="false" isAbstract="false" name="createSession" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2572" type="42" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="947" isRoot="false" value="" type="10" isAbstract="false" name="name" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="44" isRoot="false" value="" type="41" isAbstract="false" name="account" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="46" isRoot="false" isAbstract="false" name="listSessions" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2573" type="42" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="41" isRoot="false" isAbstract="false" name="Account" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="1056" isRoot="false" initialValue="" type="1035" isAbstract="false" name="mVoIPFactory" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="2247" isRoot="false" initialValue="" type="1167" isAbstract="false" name="mAudioSystemFactory" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="42" isRoot="false" isAbstract="false" name="Session" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="48" isRoot="false" isAbstract="false" name="AudioSystem" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="49" isRoot="false" isAbstract="false" name="AudioDevice" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="51" isRoot="false" isAbstract="false" name="MasquaradeSystem" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="52" isRoot="false" isAbstract="false" name="StunMasquaradeSystem" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="53" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="91" isRoot="false" isAbstract="false" name="NatNormal" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="94" isRoot="false" isAbstract="false" name="NatStun" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="132" isRoot="false" isAbstract="false" name="VoIPLink" >
+     <UML:ModelElement.templateParameter>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="169" isRoot="false" type="54" isAbstract="false" name="NatPolicy" />
+     </UML:ModelElement.templateParameter>
+     <UML:Namespace.ownedElement>
+      <UML:TemplateParameter isSpecification="false" isLeaf="false" visibility="public" xmi.id="169" isRoot="false" type="54" isAbstract="false" name="NatPolicy" />
+     </UML:Namespace.ownedElement>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="346" isRoot="false" isAbstract="false" name="PortAudioDevice" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="386" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="349" isRoot="false" isAbstract="false" name="OpenAlDevice" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="393" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="352" isRoot="false" isAbstract="false" name="OpenAlSystem" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="355" isRoot="false" isAbstract="false" name="PortAudioSystem" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="556" isRoot="false" isAbstract="false" name="Singleton" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="694" isRoot="false" isAbstract="false" name="AccountBuilder" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="700" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2574" type="41" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="701" isRoot="false" value="" type="10" isAbstract="false" name="listOfConfValues" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="717" isRoot="false" isAbstract="false" name="VoIPLinkBuilder" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="735" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2575" type="132" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="736" isRoot="false" value="" type="10" isAbstract="false" name="listOfConfValues" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="721" isRoot="false" isAbstract="false" name="AudioSystemBuilder" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="757" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="758" isRoot="false" value="" type="10" isAbstract="false" name="listOfConfValues" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="1035" isRoot="false" isAbstract="false" name="VoIPLinkFactory" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="1077" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2576" type="132" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="1167" isRoot="false" isAbstract="false" name="AudioSystemFactory" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="1341" isRoot="false" isAbstract="false" name="SipVoIPLinkFactory" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="1412" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="1638" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2577" type="12" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="1488" isRoot="false" isAbstract="false" name="IAX2VoIPLinkFactory" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="1547" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="1598" isRoot="false" isAbstract="false" name="create" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="2578" type="24" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="1520" isRoot="false" isAbstract="false" name="VoIPLinkFactoryBase_1" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="1521" isRoot="false" isAbstract="false" name="create" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="15" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="26" aggregation="composite" type="13" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="27" aggregation="none" type="14" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="17" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="28" aggregation="composite" type="14" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="29" aggregation="none" type="13" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="11" visibility="public" xmi.id="21" parent="19" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="25" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="30" aggregation="none" type="12" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="31" aggregation="none" type="11" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="26" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="32" aggregation="none" type="24" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="33" aggregation="none" type="22" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="34" visibility="public" xmi.id="36" parent="14" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="45" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="36" aggregation="none" type="42" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="37" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="52" visibility="public" xmi.id="53" parent="51" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="24" visibility="public" xmi.id="135" parent="132" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="12" visibility="public" xmi.id="142" parent="132" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="180" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="181" aggregation="none" type="94" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="182" aggregation="none" type="132" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="187" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="188" aggregation="none" type="91" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="189" aggregation="none" type="132" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="22" visibility="public" xmi.id="230" parent="28" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="11" visibility="public" xmi.id="237" parent="28" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="330" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="331" aggregation="none" type="132" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="332" aggregation="none" type="42" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="358" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="359" aggregation="none" type="346" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="360" aggregation="none" type="355" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="365" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="366" aggregation="none" type="349" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="367" aggregation="none" type="352" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="372" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="373" aggregation="none" type="352" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="374" aggregation="none" type="48" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="379" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="380" aggregation="none" type="355" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="381" aggregation="none" type="48" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="346" visibility="public" xmi.id="386" parent="49" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="349" visibility="public" xmi.id="393" parent="49" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="406" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="407" aggregation="none" type="48" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="408" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="415" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="416" aggregation="none" type="48" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="417" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="422" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="423" aggregation="none" type="49" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="424" aggregation="none" type="42" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="498" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="499" aggregation="composite" type="42" name="" multiplicity="1" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="500" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="515" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="516" aggregation="composite" type="42" name="" multiplicity="*" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="517" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="532" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="533" aggregation="composite" type="132" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="534" aggregation="none" type="42" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="541" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="542" aggregation="composite" type="49" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="543" aggregation="none" type="42" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="601" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="602" aggregation="none" type="28" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="603" aggregation="none" type="34" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="610" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="611" aggregation="none" type="34" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="612" aggregation="none" type="28" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="645" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="646" aggregation="none" type="34" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="647" aggregation="none" type="28" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="34" visibility="public" xmi.id="662" parent="28" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="677" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="678" aggregation="composite" type="34" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="679" aggregation="none" type="13" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="791" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="792" aggregation="none" type="41" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="793" aggregation="none" type="694" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="802" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="803" aggregation="none" type="717" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="804" aggregation="none" type="694" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="813" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="814" aggregation="none" type="721" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="815" aggregation="none" type="694" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="868" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="869" aggregation="none" type="41" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="870" aggregation="none" type="694" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1108" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1109" aggregation="none" type="1035" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1110" aggregation="none" type="132" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1178" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1179" aggregation="none" type="1167" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1180" aggregation="none" type="49" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1283" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1284" aggregation="none" type="1035" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1285" aggregation="none" type="132" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="1341" visibility="public" xmi.id="1412" parent="1035" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1475" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1476" aggregation="none" type="1341" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1477" aggregation="none" type="132" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="1488" visibility="public" xmi.id="1547" parent="1035" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1565" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1566" aggregation="none" type="1488" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1567" aggregation="none" type="132" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1617" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1618" aggregation="none" type="1488" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1619" aggregation="none" type="24" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="1716" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="1717" aggregation="none" type="1341" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="1718" aggregation="none" type="12" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="2223" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2224" aggregation="composite" type="1167" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2225" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="2262" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2263" aggregation="composite" type="1167" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2264" aggregation="none" type="41" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+   </UML:Namespace.ownedElement>
+  </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+  <docsettings viewid="1" documentation="" uniqueid="2578" />
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="1467" snapy="10" showatts="1" xmi.id="1" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="850" >
+    <widgets>
+     <classwidget usesdiagramfillcolour="1" width="113" showattsigs="601" usesdiagramusefillcolour="1" x="321" linecolour="none" y="491" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="11" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="121" showattsigs="601" usesdiagramusefillcolour="0" x="384" linecolour="#ff0000" y="414" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="55" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="12" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="345" showattsigs="601" usesdiagramusefillcolour="0" x="75" linecolour="#ff0000" y="792" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="13" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="121" showattsigs="601" usesdiagramusefillcolour="1" x="83" linecolour="none" y="487" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="22" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="129" showattsigs="601" usesdiagramusefillcolour="0" x="38" linecolour="#ff0000" y="389" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="55" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="24" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="186" linecolour="#ff0000" y="560" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="28" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="182" showattsigs="601" usesdiagramusefillcolour="0" x="156" linecolour="#ff0000" y="665" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="55" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="34" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="381" showattsigs="601" usesdiagramusefillcolour="0" x="395" linecolour="#ff0000" y="15" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="40" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="290" showattsigs="601" usesdiagramusefillcolour="0" x="549" linecolour="#ff0000" y="178" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="41" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="58" showattsigs="601" usesdiagramusefillcolour="1" x="616" linecolour="none" y="347" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="42" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="92" showattsigs="601" usesdiagramusefillcolour="1" x="927" linecolour="none" y="779" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="48" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="88" showattsigs="601" usesdiagramusefillcolour="1" x="912" linecolour="none" y="537" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="49" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="101" showattsigs="601" usesdiagramusefillcolour="0" x="243" linecolour="#ff0000" y="344" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="55" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="132" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="113" showattsigs="601" usesdiagramusefillcolour="1" x="788" linecolour="none" y="607" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="346" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="97" showattsigs="601" usesdiagramusefillcolour="1" x="1027" linecolour="none" y="624" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="349" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="101" showattsigs="601" usesdiagramusefillcolour="1" x="1025" linecolour="none" y="695" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="352" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="117" showattsigs="601" usesdiagramusefillcolour="1" x="785" linecolour="none" y="697" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="355" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="282" showattsigs="601" usesdiagramusefillcolour="0" x="888" linecolour="#ff0000" y="86" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="694" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="288" showattsigs="601" usesdiagramusefillcolour="1" x="1175" linecolour="none" y="207" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="717" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="219" showattsigs="601" usesdiagramusefillcolour="0" x="919" linecolour="#ff0000" y="207" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="721" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="136" showattsigs="601" usesdiagramusefillcolour="0" x="206" linecolour="#ff0000" y="187" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="1035" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="140" showattsigs="601" usesdiagramusefillcolour="1" x="898" linecolour="none" y="385" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="1167" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="157" showattsigs="601" usesdiagramusefillcolour="1" x="308" linecolour="none" y="291" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="1341" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="165" showattsigs="601" usesdiagramusefillcolour="0" x="74" linecolour="#ff0000" y="289" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="42" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="1488" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="11" widgetaid="12" xmi.id="25" >
+      <linepath>
+       <startpoint startx="444" starty="469" />
+       <endpoint endx="377" endy="491" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="22" widgetaid="24" xmi.id="26" >
+      <linepath>
+       <startpoint startx="102" starty="444" />
+       <endpoint endx="143" endy="487" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="132" widgetaid="24" xmi.id="135" >
+      <linepath>
+       <startpoint startx="167" starty="416" />
+       <endpoint endx="243" endy="371" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="3" indexb="2" widgetbid="132" widgetaid="12" xmi.id="142" >
+      <linepath>
+       <startpoint startx="424" starty="414" />
+       <endpoint endx="344" endy="380" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="28" widgetaid="22" xmi.id="230" >
+      <linepath>
+       <startpoint startx="143" starty="520" />
+       <endpoint endx="226" endy="560" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="28" widgetaid="11" xmi.id="237" >
+      <linepath>
+       <startpoint startx="377" starty="524" />
+       <endpoint endx="266" endy="560" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="355" widgetaid="346" xmi.id="358" >
+      <linepath>
+       <startpoint startx="844" starty="640" />
+       <endpoint endx="843" endy="697" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="352" widgetaid="349" xmi.id="365" >
+      <linepath>
+       <startpoint startx="1075" starty="657" />
+       <endpoint endx="1075" endy="695" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="48" widgetaid="352" xmi.id="372" >
+      <linepath>
+       <startpoint startx="1075" starty="728" />
+       <endpoint endx="988" endy="779" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="48" widgetaid="355" xmi.id="379" >
+      <linepath>
+       <startpoint startx="843" starty="730" />
+       <endpoint endx="957" endy="779" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="49" widgetaid="346" xmi.id="386" >
+      <linepath>
+       <startpoint startx="844" starty="607" />
+       <endpoint endx="941" endy="570" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="49" widgetaid="349" xmi.id="393" >
+      <linepath>
+       <startpoint startx="1075" starty="624" />
+       <endpoint endx="970" endy="570" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="41" widgetaid="42" xmi.id="515" >
+      <linepath>
+       <startpoint startx="645" starty="347" />
+       <endpoint endx="645" endy="237" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="13" usesdiagramusefillcolour="1" x="646" linecolour="none" y="326" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="21" usefillcolor="1" pretext="" isinstance="0" xmi.id="2457" text="*" font="Sans Serif,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="42" widgetaid="132" xmi.id="532" >
+      <linepath>
+       <startpoint startx="344" starty="362" />
+       <endpoint endx="616" endy="363" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="42" widgetaid="49" xmi.id="541" >
+      <linepath>
+       <startpoint startx="941" starty="537" />
+       <endpoint endx="645" endy="380" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="28" widgetaid="34" xmi.id="662" >
+      <linepath>
+       <startpoint startx="247" starty="665" />
+       <endpoint endx="246" endy="619" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="13" widgetaid="34" xmi.id="677" >
+      <linepath>
+       <startpoint startx="247" starty="720" />
+       <endpoint endx="247" endy="792" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="694" widgetaid="717" xmi.id="802" >
+      <linepath>
+       <startpoint startx="1319" starty="207" />
+       <endpoint endx="1099" endy="128" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="694" widgetaid="721" xmi.id="813" >
+      <linepath>
+       <startpoint startx="1028" starty="207" />
+       <endpoint endx="1029" endy="128" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="694" widgetaid="41" xmi.id="868" >
+      <linepath>
+       <startpoint startx="694" starty="178" />
+       <endpoint endx="958" endy="128" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="1035" widgetaid="41" xmi.id="1056" type="510" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="549" starty="207" />
+       <endpoint endx="342" endy="208" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="16" usesdiagramusefillcolour="1" x="348" linecolour="none" y="206" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="2458" text="" font="Sans Serif,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="49" widgetaid="1167" xmi.id="1178" >
+      <linepath>
+       <startpoint startx="968" starty="418" />
+       <endpoint endx="970" endy="537" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="1035" widgetaid="1341" xmi.id="1412" >
+      <linepath>
+       <startpoint startx="386" starty="291" />
+       <endpoint endx="296" endy="229" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="1035" widgetaid="1488" xmi.id="1547" >
+      <linepath>
+       <startpoint startx="156" starty="289" />
+       <endpoint endx="251" endy="229" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="24" widgetaid="1488" xmi.id="1617" >
+      <linepath>
+       <startpoint startx="156" starty="331" />
+       <endpoint endx="102" endy="389" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="12" widgetaid="1341" xmi.id="1716" >
+      <linepath>
+       <startpoint startx="386" starty="333" />
+       <endpoint endx="464" endy="414" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="41" widgetaid="1167" xmi.id="2262" >
+      <linepath>
+       <startpoint startx="968" starty="385" />
+       <endpoint endx="742" endy="237" />
+      </linepath>
+     </assocwidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" label="Views" >
+    <listitem open="1" type="801" label="Logical View" >
+     <listitem open="1" type="813" id="41" >
+      <listitem open="0" type="814" id="1056" />
+      <listitem open="0" type="814" id="2247" />
+     </listitem>
+     <listitem open="1" type="813" id="694" >
+      <listitem open="0" type="815" id="700" />
+     </listitem>
+     <listitem open="1" type="813" id="40" >
+      <listitem open="0" type="815" id="43" />
+      <listitem open="0" type="815" id="46" />
+     </listitem>
+     <listitem open="1" type="813" id="49" />
+     <listitem open="1" type="813" id="48" />
+     <listitem open="1" type="813" id="721" >
+      <listitem open="0" type="815" id="757" />
+     </listitem>
+     <listitem open="1" type="813" id="1167" />
+     <listitem open="1" type="813" id="24" >
+      <listitem open="0" type="816" id="78" />
+     </listitem>
+     <listitem open="1" type="813" id="1488" >
+      <listitem open="0" type="815" id="1598" />
+     </listitem>
+     <listitem open="1" type="813" id="22" />
+     <listitem open="1" type="813" id="14" />
+     <listitem open="1" type="813" id="34" >
+      <listitem open="0" type="816" id="35" />
+     </listitem>
+     <listitem open="1" type="813" id="51" />
+     <listitem open="1" type="813" id="91" />
+     <listitem open="1" type="813" id="94" />
+     <listitem open="1" type="813" id="349" />
+     <listitem open="1" type="813" id="352" />
+     <listitem open="1" type="813" id="346" />
+     <listitem open="1" type="813" id="355" />
+     <listitem open="1" type="813" id="42" />
+     <listitem open="1" type="813" id="556" />
+     <listitem open="1" type="813" id="12" >
+      <listitem open="0" type="816" id="67" />
+     </listitem>
+     <listitem open="1" type="813" id="1341" >
+      <listitem open="0" type="815" id="1638" />
+     </listitem>
+     <listitem open="1" type="813" id="11" />
+     <listitem open="1" type="813" id="52" />
+     <listitem open="1" type="813" id="132" >
+      <listitem open="0" type="816" id="169" />
+     </listitem>
+     <listitem open="1" type="813" id="717" >
+      <listitem open="0" type="815" id="735" />
+     </listitem>
+     <listitem open="1" type="813" id="1035" >
+      <listitem open="0" type="815" id="1077" />
+     </listitem>
+     <listitem open="1" type="813" id="1520" >
+      <listitem open="0" type="815" id="1521" />
+     </listitem>
+     <listitem open="1" type="813" id="28" >
+      <listitem open="0" type="815" id="37" />
+      <listitem open="0" type="815" id="38" />
+     </listitem>
+     <listitem open="1" type="813" id="13" >
+      <listitem open="0" type="815" id="584" />
+     </listitem>
+     <listitem open="0" type="813" id="54" />
+     <listitem open="0" type="830" label="Datatypes" >
+      <listitem open="1" type="829" id="5" />
+      <listitem open="1" type="829" id="4" />
+      <listitem open="1" type="829" id="7" />
+      <listitem open="1" type="829" id="6" />
+      <listitem open="1" type="829" id="2" />
+      <listitem open="1" type="829" id="8" />
+      <listitem open="1" type="829" id="9" />
+      <listitem open="1" type="829" id="10" />
+      <listitem open="0" type="829" id="55" />
+     </listitem>
+    </listitem>
+    <listitem open="1" type="802" label="Use Case View" />
+    <listitem open="1" type="821" label="Component View" />
+    <listitem open="1" type="827" label="Deployment View" />
+    <listitem open="1" type="836" label="Entity Relationship Model" />
+   </listitem>
+  </listview>
+  <codegeneration>
+   <codegenerator language="Cpp" >
+    <classifiercodedocument writeOutCode="true" package="" id="54" parent_class="54" fileExt=".cpp" fileName="class" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;class.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			class.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="11" parent_class="11" fileExt=".cpp" fileName="sipvoipmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipvoipmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoipmanager.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:28&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="12" parent_class="12" fileExt=".cpp" fileName="sipvoiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipvoiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="13" parent_class="13" fileExt=".cpp" fileName="voipmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voipmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeoperation parent_id="584" tag="operation_584" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voipmanager.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:57&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="15" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="677" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="677" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="14" parent_class="14" fileExt=".cpp" fileName="linkmanagerbaseproxy" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;linkmanagerbaseproxy.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			linkmanagerbaseproxy.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="15" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="22" parent_class="22" fileExt=".cpp" fileName="iax2voipmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;iax2voipmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			iax2voipmanager.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:27&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="24" parent_class="24" fileExt=".cpp" fileName="iax2voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;iax2voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			iax2voiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:26&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="28" parent_class="28" fileExt=".cpp" fileName="voiplinkmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplinkmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="37" tag="operation_37" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="38" tag="operation_38" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkmanager.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:29&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="34" parent_class="34" fileExt=".cpp" fileName="linkmanagerproxy" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;linkmanagerproxy.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			linkmanagerproxy.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:54&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="677" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="677" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="40" parent_class="40" fileExt=".cpp" fileName="accountmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;accountmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="43" tag="operation_43" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+        <codeoperation parent_id="46" tag="operation_46" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			accountmanager.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="41" parent_class="41" fileExt=".cpp" fileName="account" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;account.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="1056" tag="hblock_tag_0" canDelete="false" classfield_id="1056" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="1056" tag="hblock_tag_1" canDelete="false" classfield_id="1056" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2247" tag="hblock_tag_2" canDelete="false" classfield_id="2247" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2247" tag="hblock_tag_3" canDelete="false" classfield_id="2247" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			account.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="1056" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="1056" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="1056" tag="hblock_tag_0" canDelete="false" classfield_id="1056" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="1056" tag="hblock_tag_1" canDelete="false" classfield_id="1056" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2247" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2247" tag="" canDelete="false" indentLevel="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2247" tag="hblock_tag_2" canDelete="false" classfield_id="2247" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2247" tag="hblock_tag_3" canDelete="false" classfield_id="2247" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="498" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="498" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="515" field_type="4" initialValue=" new vector( )" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="515" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2223" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2223" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2262" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2262" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_20" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_21" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_22" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_23" canDelete="false" writeOutText="false" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="42" parent_class="42" fileExt=".cpp" fileName="session" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;session.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			session.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:46&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="498" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="498" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="515" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="515" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="532" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="532" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_10" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_11" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_12" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_13" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_14" canDelete="false" writeOutText="false" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="541" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="541" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_15" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_16" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_17" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_18" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_19" canDelete="false" writeOutText="false" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="48" parent_class="48" fileExt=".cpp" fileName="audiosystem" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiosystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiosystem.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="49" parent_class="49" fileExt=".cpp" fileName="audiodevice" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiodevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiodevice.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="541" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="541" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="51" parent_class="51" fileExt=".cpp" fileName="masquaradesystem" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;masquaradesystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			masquaradesystem.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="52" parent_class="52" fileExt=".cpp" fileName="stunmasquaradesystem" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;stunmasquaradesystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmasquaradesystem.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="91" parent_class="91" fileExt=".cpp" fileName="natnormal" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;natnormal.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			natnormal.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="94" parent_class="94" fileExt=".cpp" fileName="natstun" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;natstun.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			natstun.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="132" parent_class="132" fileExt=".cpp" fileName="voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplink.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:25&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="532" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="532" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="346" parent_class="346" fileExt=".cpp" fileName="portaudiodevice" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;portaudiodevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			portaudiodevice.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="349" parent_class="349" fileExt=".cpp" fileName="openaldevice" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;openaldevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			openaldevice.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="352" parent_class="352" fileExt=".cpp" fileName="openalsystem" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;openalsystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			openalsystem.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="355" parent_class="355" fileExt=".cpp" fileName="portaudiosystem" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;portaudiosystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			portaudiosystem.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="556" parent_class="556" fileExt=".cpp" fileName="singleton" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;singleton.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			singleton.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="694" parent_class="694" fileExt=".cpp" fileName="accountbuilder" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;accountbuilder.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="700" tag="operation_700" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			accountbuilder.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="717" parent_class="717" fileExt=".cpp" fileName="voiplinkbuilder" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplinkbuilder.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="735" tag="operation_735" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkbuilder.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="721" parent_class="721" fileExt=".cpp" fileName="audiosystembuilder" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiosystembuilder.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="757" tag="operation_757" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiosystembuilder.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="1035" parent_class="1035" fileExt=".cpp" fileName="voiplinkfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplinkfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="1077" tag="operation_1077" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkfactory.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="1167" parent_class="1167" fileExt=".cpp" fileName="audiosystemfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;audiosystemfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+        <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeaccessormethod>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiosystemfactory.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2223" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2223" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_0" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_1" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_2" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_3" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_4" canDelete="false" writeOutText="false" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2262" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2262" tag="" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text="FIX ME;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_5" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_6" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_7" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_8" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_9" canDelete="false" writeOutText="false" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="1341" parent_class="1341" fileExt=".cpp" fileName="sipvoiplinkfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;sipvoiplinkfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="1638" tag="operation_1638" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplinkfactory.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="1488" parent_class="1488" fileExt=".cpp" fileName="iax2voiplinkfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;iax2voiplinkfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="1598" tag="operation_1598" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			iax2voiplinkfactory.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="1520" parent_class="1520" fileExt=".cpp" fileName="voiplinkfactorybase_1" >
+     <textblocks>
+      <codeblockwithcomments tag="includes" text="#include &quot;voiplinkfactorybase_1.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="constructionMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Constructors/Destructors" />
+       </header>
+       <textblocks/>
+      </hierarchicalcodeblock>
+      <hierarchicalcodeblock tag="otherMethodsBlock" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" text="Methods" />
+       </header>
+       <textblocks>
+        <codeoperation parent_id="1521" tag="operation_1521" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" />
+         </header>
+        </codeoperation>
+       </textblocks>
+      </hierarchicalcodeblock>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkfactorybase_1.cpp - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.cpp&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <codedocument writeOutCode="false" package="" id="Makefile_DOC" fileExt="" fileName="Makefile" >
+     <textblocks/>
+     <header>
+      <codecomment tag="" />
+     </header>
+    </codedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader54" parent_class="54" fileExt=".h" fileName="class" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef CLASS_H&amp;#010;#define CLASS_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="54" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class class&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="class ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //CLASS_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			class.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader11" parent_class="11" fileExt=".h" fileName="sipvoipmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPVOIPMANAGER_H&amp;#010;#define SIPVOIPMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;sipvoiplink.h&quot;&amp;#010;#include &quot;voiplinkmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="11" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipVoIPManager&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipVoIPManager ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPVOIPMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoipmanager.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:28&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader12" parent_class="12" fileExt=".h" fileName="sipvoiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPVOIPLINK_H&amp;#010;#define SIPVOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;sipvoipmanager.h&quot;&amp;#010;#include &quot;voiplink.h&quot;&amp;#010;#include &quot;sipvoiplinkfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="12" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipVoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipVoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPVOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:23&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader13" parent_class="13" fileExt=".h" fileName="voipmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPMANAGER_H&amp;#010;#define VOIPMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplinkmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="13" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPManager&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="15" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" LinkManagerBaseProxy ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" LinkManagerBaseProxy ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="677" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" LinkManagerProxy ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPManager ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="584" tag="operation_584" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param name &amp;#010;@param link " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voipmanager.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:57&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="15" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" LinkManagerBaseProxy ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" LinkManagerBaseProxy ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="677" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="677" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" LinkManagerProxy ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader14" parent_class="14" fileExt=".h" fileName="linkmanagerbaseproxy" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef LINKMANAGERBASEPROXY_H&amp;#010;#define LINKMANAGERBASEPROXY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="14" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class LinkManagerBaseProxy&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="15" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" VoIPManager ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="17" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPManager ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="LinkManagerBaseProxy ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //LINKMANAGERBASEPROXY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			linkmanagerbaseproxy.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="15" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="15" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" VoIPManager ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="15" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="15" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="15" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="15" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="15" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="15" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="17" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="17" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPManager ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="17" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="17" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="17" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="17" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="17" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="17" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader22" parent_class="22" fileExt=".h" fileName="iax2voipmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef IAX2VOIPMANAGER_H&amp;#010;#define IAX2VOIPMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;iax2voiplink.h&quot;&amp;#010;#include &quot;voiplinkmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="22" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class IAX2VoIPManager&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="IAX2VoIPManager ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //IAX2VOIPMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			iax2voipmanager.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:27&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader24" parent_class="24" fileExt=".h" fileName="iax2voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef IAX2VOIPLINK_H&amp;#010;#define IAX2VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;iax2voipmanager.h&quot;&amp;#010;#include &quot;voiplink.h&quot;&amp;#010;#include &quot;iax2voiplinkfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="24" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class IAX2VoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="IAX2VoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //IAX2VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			iax2voiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:26&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader28" parent_class="28" fileExt=".h" fileName="voiplinkmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINKMANAGER_H&amp;#010;#define VOIPLINKMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="28" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLinkManager&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLinkManager ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="37" tag="operation_37" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="38" tag="operation_38" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINKMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkmanager.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:29&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader34" parent_class="34" fileExt=".h" fileName="linkmanagerproxy" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef LINKMANAGERPROXY_H&amp;#010;#define LINKMANAGERPROXY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplinkmanager.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="34" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class LinkManagerProxy&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="677" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPManager ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="LinkManagerProxy ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //LINKMANAGERPROXY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			linkmanagerproxy.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:54&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="677" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="677" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" VoIPManager ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="677" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="677" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="677" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="677" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="677" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="677" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader40" parent_class="40" fileExt=".h" fileName="accountmanager" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ACCOUNTMANAGER_H&amp;#010;#define ACCOUNTMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;session.h&quot;&amp;#010;#include &quot;account.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="40" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AccountManager&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AccountManager ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="43" tag="operation_43" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param name &amp;#010;@param account " />
+                 </header>
+                </codeoperation>
+                <codeoperation parent_id="46" tag="operation_46" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ACCOUNTMANAGER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			accountmanager.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader41" parent_class="41" fileExt=".h" fileName="account" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ACCOUNT_H&amp;#010;#define ACCOUNT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &lt;vector>&amp;#010;#include &quot;accountbuilder.h&quot;&amp;#010;#include &quot;voiplinkfactory.h&quot;&amp;#010;#include &quot;audiosystemfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="41" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Account&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="498" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Session ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="515" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" vector Vector;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2223" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioSystemFactory ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2262" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioSystemFactory ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Account ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="1056" tag="tblock_4" canDelete="false" indentLevel="1" text=" VoIPLinkFactory mVoIPFactory;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2247" tag="tblock_5" canDelete="false" indentLevel="1" text=" AudioSystemFactory mAudioSystemFactory;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="1056" tag="hblock_tag_25" canDelete="false" indentLevel="1" classfield_id="1056" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="1056" tag="hblock_tag_26" canDelete="false" indentLevel="1" classfield_id="1056" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2247" tag="hblock_tag_27" canDelete="false" indentLevel="1" classfield_id="2247" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2247" tag="hblock_tag_28" canDelete="false" indentLevel="1" classfield_id="2247" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ACCOUNT_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			account.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="1056" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="1056" tag="tblock_4" canDelete="false" indentLevel="1" text=" VoIPLinkFactory mVoIPFactory;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="1056" tag="hblock_tag_25" canDelete="false" indentLevel="1" classfield_id="1056" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="1056" tag="hblock_tag_26" canDelete="false" indentLevel="1" classfield_id="1056" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2247" field_type="0" initialValue="" role_id="-1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2247" tag="tblock_5" canDelete="false" indentLevel="1" text=" AudioSystemFactory mAudioSystemFactory;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2247" tag="hblock_tag_27" canDelete="false" indentLevel="1" classfield_id="2247" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2247" tag="hblock_tag_28" canDelete="false" indentLevel="1" classfield_id="2247" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="498" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="498" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" Session ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="515" field_type="4" initialValue=" new vector( )" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="515" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" vector Vector;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2223" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2223" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioSystemFactory ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2262" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2262" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioSystemFactory ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_23" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_24" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader42" parent_class="42" fileExt=".h" fileName="session" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SESSION_H&amp;#010;#define SESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="42" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Session&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="498" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="515" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="532" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" VoIPLink ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="541" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioDevice ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Session ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SESSION_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			session.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:46&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="498" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="498" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="498" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="498" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="498" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="498" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="498" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="498" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="515" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="515" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="515" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="515" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="515" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="515" tag="hblock_tag_11" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="515" tag="hblock_tag_12" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="515" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="532" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="532" tag="tblock_2" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" VoIPLink ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_13" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_14" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_15" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_16" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_17" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="541" field_type="4" initialValue="" role_id="0" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="541" tag="tblock_3" canDelete="false" writeOutText="false" indentLevel="1" role_id="1" text=" AudioDevice ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_18" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_19" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_20" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_21" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_22" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="1" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader48" parent_class="48" fileExt=".h" fileName="audiosystem" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOSYSTEM_H&amp;#010;#define AUDIOSYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;openalsystem.h&quot;&amp;#010;#include &quot;portaudiosystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="48" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioSystem&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioSystem ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOSYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiosystem.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader49" parent_class="49" fileExt=".h" fileName="audiodevice" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIODEVICE_H&amp;#010;#define AUDIODEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;audiosystemfactory.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="49" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioDevice&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="541" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Session ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioDevice ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIODEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiodevice.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="541" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="541" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Session ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="541" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="541" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="541" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="541" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="541" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="541" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader51" parent_class="51" fileExt=".h" fileName="masquaradesystem" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef MASQUARADESYSTEM_H&amp;#010;#define MASQUARADESYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="51" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class MasquaradeSystem&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="MasquaradeSystem ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //MASQUARADESYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			masquaradesystem.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader52" parent_class="52" fileExt=".h" fileName="stunmasquaradesystem" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef STUNMASQUARADESYSTEM_H&amp;#010;#define STUNMASQUARADESYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="52" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class StunMasquaradeSystem&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="StunMasquaradeSystem ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //STUNMASQUARADESYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			stunmasquaradesystem.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader91" parent_class="91" fileExt=".h" fileName="natnormal" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef NATNORMAL_H&amp;#010;#define NATNORMAL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="91" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class NatNormal&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="NatNormal ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //NATNORMAL_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			natnormal.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader94" parent_class="94" fileExt=".h" fileName="natstun" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef NATSTUN_H&amp;#010;#define NATSTUN_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="94" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class NatStun&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="NatStun ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //NATSTUN_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			natstun.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader132" parent_class="132" fileExt=".h" fileName="voiplink" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINK_H&amp;#010;#define VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="132" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLink&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="532" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Session ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLink ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINK_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplink.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:37:25&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="532" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="532" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Session ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="532" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="532" tag="hblock_tag_1" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="532" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="532" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="532" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="532" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader346" parent_class="346" fileExt=".h" fileName="portaudiodevice" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef PORTAUDIODEVICE_H&amp;#010;#define PORTAUDIODEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;portaudiosystem.h&quot;&amp;#010;#include &quot;audiodevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="346" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class PortAudioDevice&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="PortAudioDevice ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //PORTAUDIODEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			portaudiodevice.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader349" parent_class="349" fileExt=".h" fileName="openaldevice" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OPENALDEVICE_H&amp;#010;#define OPENALDEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;openalsystem.h&quot;&amp;#010;#include &quot;audiodevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="349" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class OpenAlDevice&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="OpenAlDevice ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OPENALDEVICE_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			openaldevice.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader352" parent_class="352" fileExt=".h" fileName="openalsystem" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef OPENALSYSTEM_H&amp;#010;#define OPENALSYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;openaldevice.h&quot;&amp;#010;#include &quot;audiosystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="352" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class OpenAlSystem&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="OpenAlSystem ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //OPENALSYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			openalsystem.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader355" parent_class="355" fileExt=".h" fileName="portaudiosystem" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef PORTAUDIOSYSTEM_H&amp;#010;#define PORTAUDIOSYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;portaudiodevice.h&quot;&amp;#010;#include &quot;audiosystem.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="355" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class PortAudioSystem&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="PortAudioSystem ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //PORTAUDIOSYSTEM_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			portaudiosystem.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader556" parent_class="556" fileExt=".h" fileName="singleton" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SINGLETON_H&amp;#010;#define SINGLETON_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="556" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class Singleton&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="Singleton ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SINGLETON_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			singleton.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader694" parent_class="694" fileExt=".h" fileName="accountbuilder" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef ACCOUNTBUILDER_H&amp;#010;#define ACCOUNTBUILDER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplinkbuilder.h&quot;&amp;#010;#include &quot;audiosystembuilder.h&quot;&amp;#010;#include &quot;account.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="694" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AccountBuilder&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AccountBuilder ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="700" tag="operation_700" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param listOfConfValues " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //ACCOUNTBUILDER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			accountbuilder.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader717" parent_class="717" fileExt=".h" fileName="voiplinkbuilder" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINKBUILDER_H&amp;#010;#define VOIPLINKBUILDER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;accountbuilder.h&quot;&amp;#010;#include &quot;voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="717" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLinkBuilder&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLinkBuilder ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="735" tag="operation_735" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param listOfConfValues " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINKBUILDER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkbuilder.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader721" parent_class="721" fileExt=".h" fileName="audiosystembuilder" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOSYSTEMBUILDER_H&amp;#010;#define AUDIOSYSTEMBUILDER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;accountbuilder.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="721" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioSystemBuilder&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioSystemBuilder ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="757" tag="operation_757" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="&amp;#010;@param listOfConfValues " />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOSYSTEMBUILDER_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiosystembuilder.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader1035" parent_class="1035" fileExt=".h" fileName="voiplinkfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINKFACTORY_H&amp;#010;#define VOIPLINKFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="1035" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLinkFactory&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLinkFactory ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="1077" tag="operation_1077" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINKFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkfactory.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader1167" parent_class="1167" fileExt=".h" fileName="audiosystemfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef AUDIOSYSTEMFACTORY_H&amp;#010;#define AUDIOSYSTEMFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;audiodevice.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="1167" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class AudioSystemFactory&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks>
+              <ccfdeclarationcodeblock parent_id="2223" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+              <ccfdeclarationcodeblock parent_id="2262" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+               <header>
+                <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+               </header>
+              </ccfdeclarationcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="AudioSystemFactory ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks>
+                  <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                  <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+                   <header>
+                    <cppcodedocumentation tag="" indentLevel="1" />
+                   </header>
+                  </codeaccessormethod>
+                 </textblocks>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //AUDIOSYSTEMFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			audiosystemfactory.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields>
+      <codeclassfield parent_id="2223" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2223" tag="tblock_0" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2223" tag="hblock_tag_0" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2223" tag="hblock_tag_2" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2223" tag="hblock_tag_3" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2223" tag="hblock_tag_4" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2223" tag="hblock_tag_5" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2223" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+      <codeclassfield parent_id="2262" field_type="4" initialValue="" role_id="1" writeOutMethods="true" listClassName="" >
+       <header>
+        <cppcodedocumentation tag="" />
+       </header>
+       <ccfdeclarationcodeblock parent_id="2262" tag="tblock_1" canDelete="false" writeOutText="false" indentLevel="1" role_id="0" text=" Account ;" >
+        <header>
+         <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+        </header>
+       </ccfdeclarationcodeblock>
+       <codeaccessormethod accessType="0" parent_id="2262" tag="hblock_tag_6" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="1" parent_id="2262" tag="hblock_tag_7" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="2" parent_id="2262" tag="hblock_tag_8" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="3" parent_id="2262" tag="hblock_tag_9" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+       <codeaccessormethod accessType="4" parent_id="2262" tag="hblock_tag_10" canDelete="false" writeOutText="false" indentLevel="1" classfield_id="2262" role_id="0" >
+        <header>
+         <cppcodedocumentation tag="" indentLevel="1" />
+        </header>
+       </codeaccessormethod>
+      </codeclassfield>
+     </classfields>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader1341" parent_class="1341" fileExt=".h" fileName="sipvoiplinkfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef SIPVOIPLINKFACTORY_H&amp;#010;#define SIPVOIPLINKFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplinkfactory.h&quot;&amp;#010;#include &quot;sipvoiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="1341" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class SipVoIPLinkFactory&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="SipVoIPLinkFactory ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="1638" tag="operation_1638" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //SIPVOIPLINKFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			sipvoiplinkfactory.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader1488" parent_class="1488" fileExt=".h" fileName="iax2voiplinkfactory" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef IAX2VOIPLINKFACTORY_H&amp;#010;#define IAX2VOIPLINKFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;#include &quot;voiplinkfactory.h&quot;&amp;#010;#include &quot;iax2voiplink.h&quot;&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="1488" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class IAX2VoIPLinkFactory&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="IAX2VoIPLinkFactory ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="1598" tag="operation_1598" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //IAX2VOIPLINKFACTORY_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			iax2voiplinkfactory.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+    <classifiercodedocument writeOutCode="true" package="" id="cppheader1520" parent_class="1520" fileExt=".h" fileName="voiplinkfactorybase_1" >
+     <textblocks>
+      <codeblockwithcomments tag="hashDefBlock" text="#ifndef VOIPLINKFACTORYBASE_1_H&amp;#010;#define VOIPLINKFACTORYBASE_1_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="includes" text="#include &lt;string>&amp;#010;" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <codeblockwithcomments tag="using" writeOutText="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+      <hierarchicalcodeblock tag="namespace" canDelete="false" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" text="Namespace" />
+       </header>
+       <textblocks>
+        <codeblockwithcomments tag="enums" writeOutText="false" >
+         <header>
+          <cppcodedocumentation tag="" writeOutText="false" />
+         </header>
+        </codeblockwithcomments>
+        <cppheaderclassdeclarationblock parent_id="1520" tag="classDeclarationBlock" canDelete="false" >
+         <header>
+          <cppcodedocumentation tag="" text="Class VoIPLinkFactoryBase_1&amp;#010;" />
+         </header>
+         <textblocks>
+          <hierarchicalcodeblock tag="publicBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Public stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="publicFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="pubMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks>
+                <codeblockwithcomments tag="emptyconstructor" writeOutText="false" indentLevel="1" text="VoIPLinkFactoryBase_1 ( ) { }" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" text="Empty Constructor" />
+                 </header>
+                </codeblockwithcomments>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="pubStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="pubRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks>
+                <codeoperation parent_id="1521" tag="operation_1521" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" indentLevel="1" />
+                 </header>
+                </codeoperation>
+               </textblocks>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="protectedBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Protected stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="protectedFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="protMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="protStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="protRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+          <hierarchicalcodeblock tag="privateBlock" canDelete="false" >
+           <header>
+            <cppcodedocumentation tag="" text="Private stuff" />
+           </header>
+           <textblocks>
+            <hierarchicalcodeblock tag="privateFieldsDecl" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" text="Fields" />
+             </header>
+             <textblocks/>
+            </hierarchicalcodeblock>
+            <hierarchicalcodeblock tag="privMethodsBlock" canDelete="false" indentLevel="1" >
+             <header>
+              <cppcodedocumentation tag="" indentLevel="1" />
+             </header>
+             <textblocks>
+              <hierarchicalcodeblock tag="constructionMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Constructors" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="accessorMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Accessor Methods" />
+               </header>
+               <textblocks>
+                <hierarchicalcodeblock tag="privStaticAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+                <hierarchicalcodeblock tag="privRegularAccessorMethods" canDelete="false" indentLevel="1" >
+                 <header>
+                  <cppcodedocumentation tag="" writeOutText="false" indentLevel="1" />
+                 </header>
+                 <textblocks/>
+                </hierarchicalcodeblock>
+               </textblocks>
+              </hierarchicalcodeblock>
+              <hierarchicalcodeblock tag="operationMethods" canDelete="false" indentLevel="1" >
+               <header>
+                <cppcodedocumentation tag="" indentLevel="1" text="Operations" />
+               </header>
+               <textblocks/>
+              </hierarchicalcodeblock>
+             </textblocks>
+            </hierarchicalcodeblock>
+           </textblocks>
+          </hierarchicalcodeblock>
+         </textblocks>
+        </cppheaderclassdeclarationblock>
+       </textblocks>
+      </hierarchicalcodeblock>
+      <codeblockwithcomments tag="hashDefBlockEnd" text="#endif //VOIPLINKFACTORYBASE_1_H" >
+       <header>
+        <cppcodedocumentation tag="" writeOutText="false" />
+       </header>
+      </codeblockwithcomments>
+     </textblocks>
+     <header>
+      <codecomment tag="" text="/************************************************************************&amp;#010;  			voiplinkfactorybase_1.h - Copyright ymorin&amp;#010;&amp;#010;Here you can write a license for your code, some comments or any other&amp;#010;information you want to have in your generated code. To to this simply&amp;#010;configure the &quot;headings&quot; directory in uml to point to a directory&amp;#010;where you have your heading files.&amp;#010;&amp;#010;or you can just replace the contents of this file with your own.&amp;#010;If you want to do this, this file is located at&amp;#010;&amp;#010;/usr/share/apps/umbrello/headings/heading.h&amp;#010;&amp;#010;-->Code Generators searches for heading files based on the file extension&amp;#010;   i.e. it will look for a file name ending in &quot;.h&quot; to include in C++ header&amp;#010;   files, and for a file name ending in &quot;.java&quot; to include in all generated&amp;#010;   java code.&amp;#010;   If you name the file &quot;heading.&lt;extension>&quot;, Code Generator will always&amp;#010;   choose this file even if there are other files with the same extension in the&amp;#010;   directory. If you name the file something else, it must be the only one with that&amp;#010;   extension in the directory to guarantee that Code Generator will choose it.&amp;#010;&amp;#010;you can use variables in your heading files which are replaced at generation&amp;#010;time. possible variables are : author, date, time, filename and filepath.&amp;#010;just write %variable_name%&amp;#010;&amp;#010;This file was generated on Thu Sep 22 2005 at 09:36:34&amp;#010;The original location of this file is &amp;#010;**************************************************************************/&amp;#010;" />
+     </header>
+     <classfields/>
+    </classifiercodedocument>
+   </codegenerator>
+  </codegeneration>
+ </XMI.extensions>
+</XMI>
diff --git a/doc/sflphonegui-uml.png b/doc/sflphonegui-uml.png
new file mode 100644
index 0000000000000000000000000000000000000000..87f85060a9cd716931f1a1db9227e07fd11ca022
Binary files /dev/null and b/doc/sflphonegui-uml.png differ
diff --git a/doc/sflphonegui-uml.xmi b/doc/sflphonegui-uml.xmi
new file mode 100644
index 0000000000000000000000000000000000000000..d7a75d10b5a5ec6e7ee251959c99aef8ea4daebc
--- /dev/null
+++ b/doc/sflphonegui-uml.xmi
@@ -0,0 +1,911 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="http://schema.omg.org/spec/UML/1.3" verified="false" timestamp="2005-10-02T03:23:52" xmi.version="1.2" >
+ <XMI.header>
+  <XMI.documentation>
+   <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+   <XMI.exporterVersion>1.4.2</XMI.exporterVersion>
+   <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+  </XMI.documentation>
+  <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+  <UML:Model isSpecification="false" isLeaf="false" isRoot="false" isAbstract="false" >
+   <UML:Namespace.ownedElement>
+    <UML:Stereotype isSpecification="false" isLeaf="false" visibility="public" xmi.id="2459" isRoot="false" isAbstract="false" name="datatype" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2458" isRoot="false" isAbstract="false" name="int" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2460" isRoot="false" isAbstract="false" name="char" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2461" isRoot="false" isAbstract="false" name="bool" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2462" isRoot="false" isAbstract="false" name="float" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2463" isRoot="false" isAbstract="false" name="double" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2464" isRoot="false" isAbstract="false" name="long" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2465" isRoot="false" isAbstract="false" name="short" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2466" isRoot="false" isAbstract="false" name="string" />
+    <UML:DataType stereotype="2459" isSpecification="false" isLeaf="false" visibility="public" xmi.id="2470" isRoot="false" isAbstract="false" name="void" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5654" isRoot="false" isAbstract="false" name="T" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2467" isRoot="false" isAbstract="false" name="Session" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2569" isRoot="false" isAbstract="false" name="connect" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="3437" isRoot="false" isAbstract="false" name="disconnect" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2834" isRoot="false" isAbstract="false" name="getAccount" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16394" type="2521" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2835" isRoot="false" value="" type="2466" isAbstract="false" name="name" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2556" isRoot="false" isAbstract="false" name="version" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16395" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2611" isRoot="false" isAbstract="false" name="listConfig" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16396" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2655" isRoot="false" isAbstract="false" name="setOption" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16397" type="2466" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2656" isRoot="false" value="" type="2466" isAbstract="false" name="name" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2660" isRoot="false" value="" type="2466" isAbstract="false" name="value" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2670" isRoot="false" isAbstract="false" name="getOption" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16398" type="2466" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2671" isRoot="false" value="" type="2466" isAbstract="false" name="name" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2687" isRoot="false" isAbstract="false" name="saveConfig" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16399" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2700" isRoot="false" isAbstract="false" name="listAudioDevices" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16400" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2716" isRoot="false" isAbstract="false" name="listAudioCodecs" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16401" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2826" isRoot="false" isAbstract="false" name="listAccounts" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16402" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="15090" isRoot="false" isAbstract="false" name="handleevents" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16403" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2468" isRoot="false" isAbstract="false" name="Call" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="10679" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mSessionId" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="10720" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mAccountId" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="10761" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mId" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="10455" isRoot="false" isAbstract="false" name="Call" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="10577" isRoot="false" value="" type="2466" isAbstract="false" name="sessionId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="10618" isRoot="false" value="" type="2466" isAbstract="false" name="accountId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="10456" isRoot="false" value="" type="2466" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2487" isRoot="false" isAbstract="false" name="hangup" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2490" isRoot="false" isAbstract="false" name="cancel" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2493" isRoot="false" isAbstract="false" name="answer" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2496" isRoot="false" isAbstract="false" name="hold" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2499" isRoot="false" isAbstract="false" name="unhold" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2506" isRoot="false" isAbstract="false" name="refuse" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2509" isRoot="false" isAbstract="false" name="sendDtmf" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="2513" isRoot="false" value="" type="2460" isAbstract="false" name="code" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2521" isRoot="false" isAbstract="false" name="Account" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="11065" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mSessionId" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="11106" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mId" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="10882" isRoot="false" isAbstract="false" name="Account" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="10883" isRoot="false" value="" type="2466" isAbstract="false" name="sessionId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="10904" isRoot="false" value="" type="2466" isAbstract="false" name="id" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2524" isRoot="false" isAbstract="false" name="call" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16404" type="2468" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="10314" isRoot="false" value="" type="2466" isAbstract="false" name="to" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2794" isRoot="false" isAbstract="false" name="register" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="2807" isRoot="false" isAbstract="false" name="unregister" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2585" isRoot="false" isAbstract="false" name="ConfigEntry" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="2591" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mVariableName" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="2596" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mType" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="2599" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mDefault" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="public" xmi.id="2602" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mValue" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="2999" isRoot="false" isAbstract="true" name="CallRelatedRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="9023" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="13323" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mCallId" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="11779" isRoot="false" isAbstract="false" name="CallRequest" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11780" isRoot="false" value="" type="2466" isAbstract="false" name="sequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11801" isRoot="false" value="" type="2466" isAbstract="false" name="callId" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="3156" isRoot="false" isAbstract="true" name="onSuccess" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="3186" isRoot="false" value="" type="2468" isAbstract="false" name="call" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="3166" isRoot="false" value="" type="2466" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="3176" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="12898" isRoot="false" isAbstract="true" name="onEntry" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="12899" isRoot="false" value="" type="2468" isAbstract="false" name="call" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="12920" isRoot="false" value="" type="2466" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="12941" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="3083" isRoot="false" isAbstract="true" name="onError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="3711" isRoot="false" value="" type="2468" isAbstract="false" name="call" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="3721" isRoot="false" value="" type="2466" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="3731" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="3600" isRoot="false" isAbstract="false" name="TaskFactory" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="4219" isRoot="false" isAbstract="false" name="createHoldTask" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16405" type="3814" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="7283" isRoot="false" isAbstract="false" name="addTask" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="7284" isRoot="false" value="" type="2466" isAbstract="false" name="command" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="3611" isRoot="false" isAbstract="false" name="TaskManager" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="3927" isRoot="false" initialValue="" type="3600" isAbstract="false" name="mFactory" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="4600" isRoot="false" isAbstract="false" name="getTaskFactory" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16406" type="3600" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="3804" isRoot="false" isAbstract="false" name="new_class" />
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="3814" isRoot="false" isAbstract="false" name="HoldRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="3851" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4129" isRoot="false" isAbstract="false" name="ApplicationTaskFactory" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="4171" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4821" isRoot="false" isAbstract="false" name="UnHoldRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5029" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4844" isRoot="false" isAbstract="false" name="CancelRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5004" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4856" isRoot="false" isAbstract="false" name="AnswerRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="4979" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4868" isRoot="false" isAbstract="false" name="HangupRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="4954" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4880" isRoot="false" isAbstract="false" name="RefuseRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="4929" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="4892" isRoot="false" isAbstract="false" name="SendDtmfRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="4904" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5065" isRoot="false" isAbstract="false" name="ClientListTask" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="9867" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="5143" isRoot="false" isAbstract="false" name="onEntry" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6531" isRoot="false" value="" type="2467" isAbstract="false" name="client" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5144" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5156" isRoot="false" value="" type="2458" isAbstract="false" name="index" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5179" isRoot="false" value="" type="2466" isAbstract="false" name="value" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="5224" isRoot="false" isAbstract="false" name="onEnd" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6576" isRoot="false" value="" type="2467" isAbstract="false" name="client" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5225" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5237" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="5304" isRoot="false" isAbstract="false" name="onError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6621" isRoot="false" value="" type="2467" isAbstract="false" name="client" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5305" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="5317" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5428" isRoot="false" isAbstract="false" name="ListConfigRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5440" />
+      <UML:Generalization xmi.idref="14017" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5465" isRoot="false" isAbstract="false" name="ListAudioDevicesRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5584" />
+      <UML:Generalization xmi.idref="14060" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5477" isRoot="false" isAbstract="false" name="ListAudioCodecsRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5534" />
+      <UML:Generalization xmi.idref="13974" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5489" isRoot="false" isAbstract="false" name="ListAccountsRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5559" />
+      <UML:Generalization xmi.idref="14103" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5667" isRoot="false" isAbstract="false" name="AccountRelatedRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="9684" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="13364" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mAccoundId" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="6118" isRoot="false" isAbstract="false" name="onError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6119" isRoot="false" value="" type="2521" isAbstract="false" name="account" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6131" isRoot="false" value="" type="2466" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6143" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="6331" isRoot="false" isAbstract="false" name="onSuccess" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6332" isRoot="false" value="" type="2521" isAbstract="false" name="account" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6355" isRoot="false" value="" type="2466" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6367" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="13506" isRoot="false" isAbstract="false" name="onEntry" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="13507" isRoot="false" value="" type="2521" isAbstract="false" name="account" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="13528" isRoot="false" value="" type="2466" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="13549" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5679" isRoot="false" isAbstract="false" name="RegisterRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5758" />
+      <UML:Generalization xmi.idref="5794" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5691" isRoot="false" isAbstract="false" name="UnregisterRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="5819" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5921" isRoot="false" isAbstract="false" name="SessionRelatedRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="14506" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="6401" isRoot="false" isAbstract="false" name="onError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6402" isRoot="false" value="" type="2467" isAbstract="false" name="client" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6414" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6426" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="6471" isRoot="false" isAbstract="false" name="onStatus" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6472" isRoot="false" value="" type="2467" isAbstract="false" name="client" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6484" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6496" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="13870" isRoot="false" isAbstract="false" name="onEntry" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="13871" isRoot="false" value="" type="2467" isAbstract="false" name="client" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="13892" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="13913" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="5999" isRoot="false" isAbstract="false" name="SetOptionRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="6092" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="6011" isRoot="false" isAbstract="false" name="GetOptionRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="6067" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="6732" isRoot="false" isAbstract="false" name="Requester" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="6951" isRoot="false" initialValue="" type="2470" isAbstract="false" name="mapSeqToCommand&lt; string, Command>" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="6799" isRoot="false" isAbstract="false" name="sendCallCommand" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16407" type="2466" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8075" isRoot="false" value="" type="2466" isAbstract="false" name="sessionId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8118" isRoot="false" value="" type="2466" isAbstract="false" name="callId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6800" isRoot="false" value="" type="2466" isAbstract="false" name="command" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="6812" isRoot="false" value="" type="2466" isAbstract="false" name="listOfParam" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8161" isRoot="false" isAbstract="false" name="sendAccountCommand" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16408" type="2466" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8176" isRoot="false" value="" type="2466" isAbstract="false" name="sessionId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8191" isRoot="false" value="" type="2466" isAbstract="false" name="accountId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8206" isRoot="false" value="" type="2466" isAbstract="false" name="command" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8221" isRoot="false" value="" type="2466" isAbstract="false" name="listOfArgs" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="7123" isRoot="false" isAbstract="false" name="receiveAnswer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="7137" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="7124" isRoot="false" value="" type="2466" isAbstract="false" name="noSeq" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="7150" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="16168" isRoot="false" isAbstract="false" name="receiveAnswer" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="16169" isRoot="false" value="" type="2466" isAbstract="false" name="answer" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="8297" isRoot="false" isAbstract="false" name="createSessionId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16409" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="8386" isRoot="false" isAbstract="false" name="createCallId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16410" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="private" xmi.id="8406" isRoot="false" isAbstract="false" name="createRequestId" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16411" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="6858" isRoot="false" isAbstract="false" name="Command" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="6881" isRoot="false" initialValue="" type="2466" isAbstract="false" name="NoSeq" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="7025" isRoot="false" initialValue="" type="2466" isAbstract="false" name="command" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="7050" isRoot="false" initialValue="" type="2466" isAbstract="false" name="listOfarguments" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="6926" isRoot="false" isAbstract="false" name="toString" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16412" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="7723" isRoot="false" isAbstract="false" name="SFLPhoneClient" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="7763" isRoot="false" isAbstract="false" name="handleEvents" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="7764" isRoot="false" value="false" type="2461" isAbstract="false" name="detach" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="8547" isRoot="false" isAbstract="false" name="Request" >
+     <UML:Classifier.feature>
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8588" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mSequenceId" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8937" isRoot="false" initialValue="" type="2466" isAbstract="false" name="mCommand" />
+      <UML:Attribute isSpecification="false" isLeaf="false" visibility="private" xmi.id="8980" isRoot="false" initialValue="" type="2466" isAbstract="false" name="listOfArgs" />
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8669" isRoot="false" isAbstract="false" name="Request" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8690" isRoot="false" value="" type="2466" isAbstract="false" name="mSequenceId" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8711" isRoot="false" value="" type="2466" isAbstract="false" name="command" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="8732" isRoot="false" value="" type="2466" isAbstract="false" name="listOfArgs" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="11696" isRoot="false" isAbstract="true" name="onSuccess" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11697" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11718" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="12691" isRoot="false" isAbstract="true" name="onEntry" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="12692" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="12713" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="11593" isRoot="false" isAbstract="true" name="onError" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11594" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11635" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="8893" isRoot="false" isAbstract="false" name="toString" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter kind="return" xmi.id="16413" type="2466" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="11167" isRoot="false" isAbstract="false" name="SessionSender" >
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="11208" isRoot="false" isAbstract="false" name="send" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="11209" isRoot="false" value="" type="8547" isAbstract="false" name="request" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="16087" isRoot="false" isAbstract="false" name="run" />
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="14744" isRoot="false" isAbstract="false" name="CallRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="14764" />
+     </UML:GeneralizableElement.generalization>
+    </UML:Class>
+    <UML:Class isSpecification="false" isLeaf="false" visibility="public" xmi.id="15208" isRoot="false" isAbstract="false" name="GetEventsRequest" >
+     <UML:GeneralizableElement.generalization>
+      <UML:Generalization xmi.idref="15329" />
+     </UML:GeneralizableElement.generalization>
+     <UML:Classifier.feature>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="15392" isRoot="false" isAbstract="false" name="onCall" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15393" isRoot="false" value="" type="2466" isAbstract="false" name="call" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15414" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15435" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="15698" isRoot="false" isAbstract="false" name="onNewMessage" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15699" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15720" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+      <UML:Operation isSpecification="false" isLeaf="false" visibility="public" xmi.id="15781" isRoot="false" isAbstract="false" name="onHangup" >
+       <UML:BehavioralFeature.parameter>
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15802" isRoot="false" value="" type="2468" isAbstract="false" name="call" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15823" isRoot="false" value="" type="2458" isAbstract="false" name="code" />
+        <UML:Parameter isSpecification="false" isLeaf="false" visibility="private" xmi.id="15844" isRoot="false" value="" type="2466" isAbstract="false" name="message" />
+       </UML:BehavioralFeature.parameter>
+      </UML:Operation>
+     </UML:Classifier.feature>
+    </UML:Class>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="2539" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="2540" aggregation="none" type="2521" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2541" aggregation="none" type="2468" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Association isSpecification="false" visibility="public" xmi.id="2899" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="2900" aggregation="none" type="2467" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="2901" aggregation="none" type="2521" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="3814" visibility="public" xmi.id="3851" parent="2999" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="3955" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="3956" aggregation="composite" type="3600" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="3957" aggregation="none" type="3611" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="4129" visibility="public" xmi.id="4171" parent="3600" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="4892" visibility="public" xmi.id="4904" parent="2999" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="4880" visibility="public" xmi.id="4929" parent="2999" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="4868" visibility="public" xmi.id="4954" parent="2999" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="4856" visibility="public" xmi.id="4979" parent="2999" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="4844" visibility="public" xmi.id="5004" parent="2999" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="4821" visibility="public" xmi.id="5029" parent="2999" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5428" visibility="public" xmi.id="5440" parent="5065" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5477" visibility="public" xmi.id="5534" parent="5065" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5489" visibility="public" xmi.id="5559" parent="5065" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5465" visibility="public" xmi.id="5584" parent="5065" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5679" visibility="public" xmi.id="5758" parent="5691" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5679" visibility="public" xmi.id="5794" parent="5667" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5691" visibility="public" xmi.id="5819" parent="5667" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="6011" visibility="public" xmi.id="6067" parent="5921" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5999" visibility="public" xmi.id="6092" parent="5921" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="2999" visibility="public" xmi.id="9023" parent="8547" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5667" visibility="public" xmi.id="9684" parent="8547" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5065" visibility="public" xmi.id="9867" parent="8547" discriminator="" name="" />
+    <UML:Association isSpecification="false" visibility="public" xmi.id="10070" name="" >
+     <UML:Association.connection>
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="false" xmi.id="10071" aggregation="none" type="6732" name="" />
+      <UML:AssociationEnd isSpecification="false" visibility="public" changeability="changeable" isNavigable="true" xmi.id="10072" aggregation="none" type="8547" name="" />
+     </UML:Association.connection>
+    </UML:Association>
+    <UML:Generalization isSpecification="false" child="5477" visibility="public" xmi.id="13974" parent="5921" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5428" visibility="public" xmi.id="14017" parent="5921" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5465" visibility="public" xmi.id="14060" parent="5921" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5489" visibility="public" xmi.id="14103" parent="5921" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="5921" visibility="public" xmi.id="14506" parent="8547" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="14744" visibility="public" xmi.id="14764" parent="5667" discriminator="" name="" />
+    <UML:Generalization isSpecification="false" child="15208" visibility="public" xmi.id="15329" parent="8547" discriminator="" name="" />
+   </UML:Namespace.ownedElement>
+  </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+  <docsettings viewid="2457" documentation="" uniqueid="16413" />
+  <diagrams>
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" linewidth="0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="2450" snapy="10" showatts="1" xmi.id="2457" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="900000" showstereotype="0" showscope="1" snapcsgrid="0" font="Sans Serif,10,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="1049" >
+    <widgets>
+     <classwidget usesdiagramfillcolour="0" width="309" showattsigs="601" usesdiagramusefillcolour="0" x="1775" linecolour="#ff0000" y="104" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="229" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2467" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="347" showattsigs="601" usesdiagramusefillcolour="0" x="1757" linecolour="#ff0000" y="535" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="204" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2468" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="257" showattsigs="601" usesdiagramusefillcolour="0" x="1804" linecolour="#ff0000" y="359" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="119" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2521" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="158" showattsigs="601" usesdiagramusefillcolour="0" x="2211" linecolour="#ff0000" y="172" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="93" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2585" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="353" showattsigs="601" usesdiagramusefillcolour="0" x="248" linecolour="#ff0000" y="200" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="102" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="2999" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,1,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="216" showattsigs="601" usesdiagramusefillcolour="1" x="2230" linecolour="none" y="471" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="3600" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="207" showattsigs="601" usesdiagramusefillcolour="0" x="2234" linecolour="#ff0000" y="376" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="51" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="3611" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="89" showattsigs="601" usesdiagramusefillcolour="1" x="91" linecolour="none" y="249" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="3814" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="106" showattsigs="601" usesdiagramusefillcolour="1" x="91" linecolour="none" y="100" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="4821" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="103" showattsigs="601" usesdiagramusefillcolour="1" x="664" linecolour="none" y="208" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="4844" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="107" showattsigs="601" usesdiagramusefillcolour="1" x="666" linecolour="none" y="263" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="4856" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="108" showattsigs="601" usesdiagramusefillcolour="1" x="594" linecolour="none" y="134" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="4868" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="102" showattsigs="601" usesdiagramusefillcolour="1" x="452" linecolour="none" y="97" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="4880" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="121" showattsigs="601" usesdiagramusefillcolour="1" x="281" linecolour="none" y="94" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="4892" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="124" showattsigs="601" usesdiagramusefillcolour="1" x="885" linecolour="none" y="838" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5428" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="168" showattsigs="601" usesdiagramusefillcolour="1" x="724" linecolour="none" y="765" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5465" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="166" showattsigs="601" usesdiagramusefillcolour="1" x="1193" linecolour="none" y="783" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5477" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="141" showattsigs="601" usesdiagramusefillcolour="1" x="1275" linecolour="none" y="620" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5489" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="407" showattsigs="601" usesdiagramusefillcolour="0" x="158" linecolour="#ff0000" y="638" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="85" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5667" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="111" showattsigs="601" usesdiagramusefillcolour="1" x="450" linecolour="none" y="767" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5679" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="124" showattsigs="601" usesdiagramusefillcolour="1" x="147" linecolour="none" y="764" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5691" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="358" showattsigs="601" usesdiagramusefillcolour="0" x="858" linecolour="#ff0000" y="650" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="76" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5921" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="122" showattsigs="601" usesdiagramusefillcolour="1" x="1071" linecolour="none" y="834" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="5999" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="124" showattsigs="601" usesdiagramusefillcolour="1" x="1291" linecolour="none" y="697" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="6011" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="684" showattsigs="601" usesdiagramusefillcolour="0" x="278" linecolour="#ff0000" y="892" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="153" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="6732" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="155" showattsigs="601" usesdiagramusefillcolour="1" x="2165" linecolour="none" y="271" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="85" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="6858" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="0" width="449" showattsigs="601" usesdiagramusefillcolour="0" x="396" linecolour="#ff0000" y="429" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="153" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="8547" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="168" showattsigs="601" usesdiagramusefillcolour="1" x="2169" linecolour="none" y="38" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="59" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="11167" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="85" showattsigs="601" usesdiagramusefillcolour="1" x="316" linecolour="none" y="793" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="33" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="14744" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+     <classwidget usesdiagramfillcolour="1" width="329" showattsigs="601" usesdiagramusefillcolour="1" x="979" linecolour="none" y="290" showopsigs="601" linewidth="none" usesdiagramlinewidth="1" usesdiagramlinecolour="1" fillcolour="none" height="76" usefillcolor="1" showpubliconly="0" showattributes="1" isinstance="0" xmi.id="15208" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Sans Serif,10,-1,5,75,0,0,0,0,0" />
+    </widgets>
+    <messages/>
+    <associations>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="2468" widgetaid="2521" xmi.id="2539" >
+      <linepath>
+       <startpoint startx="1932" starty="478" />
+       <endpoint endx="1930" endy="535" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="2521" widgetaid="2467" xmi.id="2899" >
+      <linepath>
+       <startpoint startx="1929" starty="333" />
+       <endpoint endx="1932" endy="359" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="2999" widgetaid="3814" xmi.id="3851" >
+      <linepath>
+       <startpoint startx="180" starty="265" />
+       <endpoint endx="248" endy="251" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" visibilityB="200" totalcountb="2" indexb="1" widgetbid="3600" widgetaid="3611" xmi.id="3927" type="510" changeabilityA="900" changeabilityB="900" visibilityA="200" >
+      <linepath>
+       <startpoint startx="2337" starty="427" />
+       <endpoint endx="2338" endy="471" />
+      </linepath>
+      <floatingtext usesdiagramfillcolour="1" width="71" usesdiagramusefillcolour="1" x="2272" linecolour="none" y="450" linewidth="none" usesdiagramlinewidth="1" posttext="" usesdiagramlinecolour="1" role="710" fillcolour="none" height="21" usefillcolor="1" pretext="+" isinstance="0" xmi.id="16392" text="mFactory" font="Sans Serif,10,-1,5,50,0,0,0,0,0" />
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="2" widgetbid="2999" widgetaid="4892" xmi.id="4904" >
+      <linepath>
+       <startpoint startx="341" starty="127" />
+       <endpoint endx="389" endy="200" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="3" widgetbid="2999" widgetaid="4880" xmi.id="4929" >
+      <linepath>
+       <startpoint startx="503" starty="130" />
+       <endpoint endx="459" endy="200" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="4" widgetbid="2999" widgetaid="4868" xmi.id="4954" >
+      <linepath>
+       <startpoint startx="648" starty="167" />
+       <endpoint endx="530" endy="200" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="2999" widgetaid="4856" xmi.id="4979" >
+      <linepath>
+       <startpoint startx="666" starty="279" />
+       <endpoint endx="601" endy="268" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="2999" widgetaid="4844" xmi.id="5004" >
+      <linepath>
+       <startpoint startx="664" starty="224" />
+       <endpoint endx="601" endy="234" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="1" widgetbid="2999" widgetaid="4821" xmi.id="5029" >
+      <linepath>
+       <startpoint startx="144" starty="133" />
+       <endpoint endx="318" endy="200" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="5667" widgetaid="5679" xmi.id="5794" >
+      <linepath>
+       <startpoint startx="505" starty="767" />
+       <endpoint endx="463" endy="723" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="5667" widgetaid="5691" xmi.id="5819" >
+      <linepath>
+       <startpoint startx="209" starty="764" />
+       <endpoint endx="259" endy="723" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="5921" widgetaid="6011" xmi.id="6067" >
+      <linepath>
+       <startpoint startx="1291" starty="713" />
+       <endpoint endx="1216" endy="700" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="3" widgetbid="5921" widgetaid="5999" xmi.id="6092" >
+      <linepath>
+       <startpoint startx="1132" starty="834" />
+       <endpoint endx="1072" endy="726" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="8547" widgetaid="2999" xmi.id="9023" >
+      <linepath>
+       <startpoint startx="424" starty="302" />
+       <endpoint endx="620" endy="429" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="8547" widgetaid="5667" xmi.id="9684" >
+      <linepath>
+       <startpoint startx="361" starty="638" />
+       <endpoint endx="508" endy="582" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="8547" widgetaid="6732" xmi.id="10070" >
+      <linepath>
+       <startpoint startx="620" starty="892" />
+       <endpoint endx="620" endy="582" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="4" widgetbid="5921" widgetaid="5477" xmi.id="13974" >
+      <linepath>
+       <startpoint startx="1276" starty="783" />
+       <endpoint endx="1144" endy="726" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="2" widgetbid="5921" widgetaid="5428" xmi.id="14017" >
+      <linepath>
+       <startpoint startx="947" starty="838" />
+       <endpoint endx="1001" endy="726" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="5" indexb="1" widgetbid="5921" widgetaid="5465" xmi.id="14060" >
+      <linepath>
+       <startpoint startx="808" starty="765" />
+       <endpoint endx="929" endy="726" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="5921" widgetaid="5489" xmi.id="14103" >
+      <linepath>
+       <startpoint startx="1275" starty="636" />
+       <endpoint endx="1216" endy="675" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="8547" widgetaid="5921" xmi.id="14506" >
+      <linepath>
+       <startpoint startx="1037" starty="650" />
+       <endpoint endx="732" endy="582" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="5667" widgetaid="14744" xmi.id="14764" >
+      <linepath>
+       <startpoint startx="358" starty="793" />
+       <endpoint endx="361" endy="723" />
+      </linepath>
+     </assocwidget>
+     <assocwidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="8547" widgetaid="15208" xmi.id="15329" >
+      <linepath>
+       <startpoint startx="1143" starty="366" />
+       <endpoint endx="845" endy="505" />
+      </linepath>
+     </assocwidget>
+    </associations>
+   </diagram>
+  </diagrams>
+  <listview>
+   <listitem open="1" type="800" label="Views" >
+    <listitem open="1" type="801" label="Logical View" >
+     <listitem open="1" type="813" id="2521" >
+      <listitem open="0" type="814" id="11065" />
+      <listitem open="0" type="814" id="11106" />
+      <listitem open="0" type="815" id="10882" />
+      <listitem open="0" type="815" id="2524" />
+      <listitem open="0" type="815" id="2794" />
+      <listitem open="0" type="815" id="2807" />
+     </listitem>
+     <listitem open="1" type="813" id="5667" >
+      <listitem open="0" type="814" id="13364" />
+      <listitem open="0" type="815" id="6118" />
+      <listitem open="0" type="815" id="6331" />
+      <listitem open="0" type="815" id="13506" />
+     </listitem>
+     <listitem open="1" type="813" id="4856" />
+     <listitem open="1" type="813" id="4129" />
+     <listitem open="1" type="813" id="2468" >
+      <listitem open="0" type="814" id="10679" />
+      <listitem open="0" type="814" id="10720" />
+      <listitem open="0" type="814" id="10761" />
+      <listitem open="0" type="815" id="10455" />
+      <listitem open="0" type="815" id="2487" />
+      <listitem open="0" type="815" id="2490" />
+      <listitem open="0" type="815" id="2493" />
+      <listitem open="0" type="815" id="2496" />
+      <listitem open="0" type="815" id="2499" />
+      <listitem open="0" type="815" id="2506" />
+      <listitem open="0" type="815" id="2509" />
+     </listitem>
+     <listitem open="1" type="813" id="2999" >
+      <listitem open="0" type="814" id="13323" />
+      <listitem open="0" type="815" id="11779" />
+      <listitem open="0" type="815" id="3156" />
+      <listitem open="0" type="815" id="12898" />
+      <listitem open="0" type="815" id="3083" />
+     </listitem>
+     <listitem open="1" type="813" id="14744" />
+     <listitem open="1" type="813" id="4844" />
+     <listitem open="1" type="813" id="5065" >
+      <listitem open="0" type="815" id="5143" />
+      <listitem open="0" type="815" id="5224" />
+      <listitem open="0" type="815" id="5304" />
+     </listitem>
+     <listitem open="1" type="813" id="6858" >
+      <listitem open="0" type="814" id="6881" />
+      <listitem open="0" type="814" id="7025" />
+      <listitem open="0" type="814" id="7050" />
+      <listitem open="0" type="815" id="6926" />
+     </listitem>
+     <listitem open="1" type="813" id="2585" >
+      <listitem open="0" type="814" id="2591" />
+      <listitem open="0" type="814" id="2596" />
+      <listitem open="0" type="814" id="2599" />
+      <listitem open="0" type="814" id="2602" />
+     </listitem>
+     <listitem open="1" type="813" id="15208" >
+      <listitem open="0" type="815" id="15392" />
+      <listitem open="0" type="815" id="15698" />
+      <listitem open="0" type="815" id="15781" />
+     </listitem>
+     <listitem open="1" type="813" id="6011" />
+     <listitem open="1" type="813" id="4868" />
+     <listitem open="1" type="813" id="3814" />
+     <listitem open="1" type="813" id="5489" />
+     <listitem open="1" type="813" id="5477" />
+     <listitem open="1" type="813" id="5465" />
+     <listitem open="1" type="813" id="5428" />
+     <listitem open="1" type="813" id="4880" />
+     <listitem open="1" type="813" id="5679" />
+     <listitem open="1" type="813" id="8547" >
+      <listitem open="0" type="814" id="8588" />
+      <listitem open="0" type="814" id="8937" />
+      <listitem open="0" type="814" id="8980" />
+      <listitem open="0" type="815" id="8669" />
+      <listitem open="0" type="815" id="11696" />
+      <listitem open="0" type="815" id="12691" />
+      <listitem open="0" type="815" id="11593" />
+      <listitem open="0" type="815" id="8893" />
+     </listitem>
+     <listitem open="1" type="813" id="6732" >
+      <listitem open="0" type="814" id="6951" />
+      <listitem open="0" type="815" id="6799" />
+      <listitem open="0" type="815" id="8161" />
+      <listitem open="0" type="815" id="7123" />
+      <listitem open="0" type="815" id="16168" />
+      <listitem open="0" type="815" id="8297" />
+      <listitem open="0" type="815" id="8386" />
+      <listitem open="0" type="815" id="8406" />
+     </listitem>
+     <listitem open="1" type="813" id="7723" >
+      <listitem open="0" type="815" id="7763" />
+     </listitem>
+     <listitem open="1" type="813" id="4892" />
+     <listitem open="1" type="813" id="2467" >
+      <listitem open="0" type="815" id="2569" />
+      <listitem open="0" type="815" id="3437" />
+      <listitem open="0" type="815" id="2834" />
+      <listitem open="0" type="815" id="2556" />
+      <listitem open="0" type="815" id="2611" />
+      <listitem open="0" type="815" id="2655" />
+      <listitem open="0" type="815" id="2670" />
+      <listitem open="0" type="815" id="2687" />
+      <listitem open="0" type="815" id="2700" />
+      <listitem open="0" type="815" id="2716" />
+      <listitem open="0" type="815" id="2826" />
+      <listitem open="0" type="815" id="15090" />
+     </listitem>
+     <listitem open="1" type="813" id="5921" >
+      <listitem open="0" type="815" id="6401" />
+      <listitem open="0" type="815" id="6471" />
+      <listitem open="0" type="815" id="13870" />
+     </listitem>
+     <listitem open="1" type="813" id="11167" >
+      <listitem open="0" type="815" id="11208" />
+      <listitem open="0" type="815" id="16087" />
+     </listitem>
+     <listitem open="1" type="813" id="5999" />
+     <listitem open="0" type="813" id="5654" />
+     <listitem open="1" type="813" id="3600" >
+      <listitem open="0" type="815" id="4219" />
+      <listitem open="0" type="815" id="7283" />
+     </listitem>
+     <listitem open="1" type="813" id="3611" >
+      <listitem open="0" type="814" id="3927" />
+      <listitem open="0" type="815" id="4600" />
+     </listitem>
+     <listitem open="1" type="813" id="4821" />
+     <listitem open="1" type="813" id="5691" />
+     <listitem open="1" type="813" id="3804" />
+     <listitem open="1" type="830" label="Datatypes" >
+      <listitem open="1" type="829" id="2461" />
+      <listitem open="1" type="829" id="2460" />
+      <listitem open="1" type="829" id="2463" />
+      <listitem open="1" type="829" id="2462" />
+      <listitem open="1" type="829" id="2458" />
+      <listitem open="1" type="829" id="2464" />
+      <listitem open="1" type="829" id="2465" />
+      <listitem open="1" type="829" id="2466" />
+      <listitem open="1" type="829" id="2470" />
+     </listitem>
+    </listitem>
+    <listitem open="1" type="802" label="Use Case View" />
+    <listitem open="1" type="821" label="Component View" />
+    <listitem open="1" type="827" label="Deployment View" />
+    <listitem open="1" type="836" label="Entity Relationship Model" />
+   </listitem>
+  </listview>
+  <codegeneration/>
+ </XMI.extensions>
+</XMI>
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..72f64586eb06c1dcd9ca6107ea0872d509d76ef4
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,3 @@
+
+SUBDIRS = eXosip2
+
diff --git a/include/eXosip2/Makefile.am b/include/eXosip2/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..5344a8b4c47d96f6e9df2dcc2533bd64b940e157
--- /dev/null
+++ b/include/eXosip2/Makefile.am
@@ -0,0 +1,6 @@
+
+
+noinst_HEADERS= eXosip.h eX_setup.h \
+eX_register.h eX_call.h eX_options.h eX_refer.h \
+eX_subscribe.h eX_publish.h eX_message.h
+
diff --git a/include/eXosip2/eX_call.h b/include/eXosip2/eX_call.h
new file mode 100644
index 0000000000000000000000000000000000000000..b42d47b85220aaff8e85918b8c45276bcfe8b781
--- /dev/null
+++ b/include/eXosip2/eX_call.h
@@ -0,0 +1,231 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_CALL_H__
+#define __EX_CALL_H__
+
+#include <osipparser2/osip_parser.h>
+#include <osipparser2/sdp_message.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_call.h
+ * @brief eXosip call API
+ *
+ * This file provide the API needed to control calls. You can
+ * use it to:
+ *
+ * <ul>
+ * <li>build initial invite.</li>
+ * <li>send initial invite.</li>
+ * <li>build request within the call.</li>
+ * <li>send request within the call.</li>
+ * </ul>
+ *
+ * This API can be used to build the following messages:
+ * <pre>
+ *    INVITE, INFO, OPTIONS, REFER, UPDATE, NOTIFY
+ * </pre>
+ */
+
+/**
+ * @defgroup eXosip2_call eXosip2 INVITE and Call Management
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+  struct eXosip_call_t;
+
+/**
+ * Set a new application context for an existing call
+ *
+ * @param id       call-id or dialog-id of call
+ * @param reference New application context.
+ */
+  int eXosip_call_set_reference(int id, void *reference);
+
+/**
+ * Build a default INVITE message for a new call.
+ * 
+ * @param invite    Pointer for the SIP element to hold.
+ * @param to        SIP url for callee.
+ * @param from      SIP url for caller.
+ * @param route     Route header for INVITE. (optionnal)
+ * @param subject   Subject for the call.
+ */
+  int eXosip_call_build_initial_invite(osip_message_t **invite, const char *to,
+				       const char *from, const char *route,
+				       const char *subject);
+
+/**
+ * Initiate a call.
+ * 
+ * @param invite          SIP INVITE message to send.
+ */
+  int eXosip_call_send_initial_invite(osip_message_t *invite);
+
+/**
+ * Build a default request within a call. (INVITE, OPTIONS, INFO, REFER)
+ * 
+ * @param did          dialog id of call.
+ * @param method       request type to build.
+ * @param request      The sip request to build.
+ */
+  int eXosip_call_build_request(int did, const char *method,
+				osip_message_t **request);
+
+/**
+ * Build a default ACK for a 200ok received.
+ * 
+ * @param did          dialog id of call.
+ * @param ack          The sip request to build.
+ */
+  int eXosip_call_build_ack(int did, osip_message_t **ack);
+
+/**
+ * Send the ACK for the 200ok received..
+ * 
+ * @param did          dialog id of call.
+ * @param ack          SIP ACK message to send.
+ */
+  int eXosip_call_send_ack(int did, osip_message_t *ack);
+
+/**
+ * Build a default REFER for a call transfer.
+ * 
+ * @param did          dialog id of call.
+ * @param refer_to     url for call transfer (Refer-To header).
+ * @param request      The sip request to build.
+ */
+  int eXosip_call_build_refer(int did, const char *refer_to, osip_message_t **request);
+
+/**
+ * Build a default INFO within a call.
+ * 
+ * @param did          dialog id of call.
+ * @param request      The sip request to build.
+ */
+  int eXosip_call_build_info(int did, osip_message_t **request);
+
+/**
+ * Build a default OPTIONS within a call.
+ * 
+ * @param did          dialog id of call.
+ * @param request      The sip request to build.
+ */
+  int eXosip_call_build_options(int did, osip_message_t **request);
+
+/**
+ * Build a default UPDATE within a call.
+ * 
+ * @param did          dialog id of call.
+ * @param request      The sip request to build.
+ */
+  int eXosip_call_build_update(int did, osip_message_t **request);
+
+/**
+ * Build a default NOTIFY within a call.
+ * 
+ * @param did                   dialog id of call.
+ * @param subscription_status   Subscription status of the request.
+ * @param request               The sip request to build.
+ */
+  int eXosip_call_build_notify(int did, int subscription_status, osip_message_t **request);
+
+/**
+ * send the request within call. (INVITE, OPTIONS, INFO, REFER, UPDATE)
+ * 
+ * @param did          dialog id of call.
+ * @param request      The sip request to send.
+ */
+  int eXosip_call_send_request(int did, osip_message_t *request);
+
+/**
+ * Build default Answer for request.
+ * 
+ * @param tid          id of transaction to answer.
+ * @param status       Status code to use.
+ * @param answer       The sip answer to build.
+ */
+  int eXosip_call_build_answer(int tid, int status, osip_message_t **answer);
+
+/**
+ * Send Answer for invite.
+ * 
+ * @param tid          id of transaction to answer.
+ * @param status       response status if answer is NULL. (not allowed for 2XX)
+ * @param answer       The sip answer to send.
+ */
+  int eXosip_call_send_answer(int tid, int status, osip_message_t *answer);
+
+/**
+ * Terminate a call.
+ * send CANCEL, BYE or 603 Decline.
+ * 
+ * @param cid          call id of call.
+ * @param did          dialog id of call.
+ */
+  int eXosip_call_terminate(int cid, int did);
+
+/**
+ * Build a PRACK for invite.
+ * 
+ * @param tid          id of the invite transaction.
+ * @param prack        The sip prack to build.
+ */
+  int eXosip_call_build_prack(int tid, osip_message_t **prack);
+
+/**
+ * Send a PRACK for invite.
+ * 
+ * @param tid          id of the invite transaction.
+ * @param prack        The sip prack to send.
+ */
+  int eXosip_call_send_prack(int tid, osip_message_t *prack);
+
+/**
+ * Send a NOTIFY containing the information about a call transfer.
+ * 
+ * THIS METHOD WILL BE REPLACED or REMOVED, please use the
+ * new API to build NOTIFY.
+ * 
+ * @param did                  dialog id of call.
+ * @param subscription_status  the subscription status.
+ * @param body                 the body to attach to NOTIFY.
+ */
+  int eXosip_transfer_send_notify(int did, int subscription_status, char *body);
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_message.h b/include/eXosip2/eX_message.h
new file mode 100644
index 0000000000000000000000000000000000000000..13f4a61ea4fb0d21f261101b353c51a87c1064a4
--- /dev/null
+++ b/include/eXosip2/eX_message.h
@@ -0,0 +1,108 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_MESSAGE_H__
+#define __EX_MESSAGE_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_message.h
+ * @brief eXosip message request API
+ *
+ * This file provide the API needed to control MESSAGE requests. You can
+ * use it to:
+ *
+ * <ul>
+ * <li>build MESSAGE requests.</li>
+ * <li>send MESSAGE requests.</li>
+ * <li>build MESSAGE answers.</li>
+ * <li>send MESSAGE answers.</li>
+ * </ul>
+ */
+
+/**
+ * @defgroup eXosip2_message eXosip2 MESSAGE and messaging services outside of dialog
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * Build a default MESSAGE message.
+ * 
+ * This method will be updated to send any message outside of dialog
+ * In this later case, you'll specify the method to use in the second
+ * argument.
+ *
+ * By now, use this method only for the "MESSAGE" request.
+ *
+ * @param message   Pointer for the SIP request to build.
+ * @param method    request method. ("MESSAGE")
+ * @param to        SIP url for callee.
+ * @param from      SIP url for caller.
+ * @param route     Route header for INVITE. (optionnal)
+ */
+  int eXosip_message_build_request(osip_message_t **message, const char *method,
+				   const char *to, const char *from,
+				   const char *route);
+
+/**
+ * Send an MESSAGE request.
+ * 
+ * @param message          SIP MESSAGE message to send.
+ */
+  int eXosip_message_send_request(osip_message_t *message);
+
+/**
+ * Build answer for an MESSAGE request.
+ * 
+ * @param tid             id of MESSAGE transaction.
+ * @param status          status for SIP answer to build.
+ * @param answer          The SIP answer to build.
+ */
+  int eXosip_message_build_answer(int tid, int status, osip_message_t **answer);
+
+/**
+ * Send answer for an MESSAGE request.
+ * 
+ * @param tid             id of MESSAGE transaction.
+ * @param status          status for SIP answer to send.
+ * @param answer          The SIP answer to send. (default will be sent if NULL)
+ */
+  int eXosip_message_send_answer(int tid, int status, osip_message_t *answer);
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_options.h b/include/eXosip2/eX_options.h
new file mode 100644
index 0000000000000000000000000000000000000000..a8325e96337e30a648c63bed9ea49cc8cca67f9c
--- /dev/null
+++ b/include/eXosip2/eX_options.h
@@ -0,0 +1,100 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_OPTIONS_H__
+#define __EX_OPTIONS_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_options.h
+ * @brief eXosip options request API
+ *
+ * This file provide the API needed to control OPTIONS requests. You can
+ * use it to:
+ *
+ * <ul>
+ * <li>build OPTIONS requests.</li>
+ * <li>send OPTIONS requests.</li>
+ * <li>build OPTIONS answers.</li>
+ * <li>send OPTIONS answers.</li>
+ * </ul>
+ */
+
+/**
+ * @defgroup eXosip2_options eXosip2 OPTIONS and UA capabilities Management
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * Build a default OPTIONS message.
+ * 
+ * @param options   Pointer for the SIP request to build.
+ * @param to        SIP url for callee.
+ * @param from      SIP url for caller.
+ * @param route     Route header for INVITE. (optionnal)
+ */
+  int eXosip_options_build_request(osip_message_t **options, const char *to,
+				   const char *from, const char *route);
+
+/**
+ * Send an OPTIONS request.
+ * 
+ * @param options          SIP OPTIONS message to send.
+ */
+  int eXosip_options_send_request(osip_message_t *options);
+
+/**
+ * Build answer for an OPTIONS request.
+ * 
+ * @param tid             id of OPTIONS transaction.
+ * @param status          status for SIP answer to build.
+ * @param answer          The SIP answer to build.
+ */
+  int eXosip_options_build_answer(int tid, int status, osip_message_t **answer);
+
+/**
+ * Send answer for an OPTIONS request.
+ * 
+ * @param tid             id of OPTIONS transaction.
+ * @param status          status for SIP answer to send.
+ * @param answer          The SIP answer to send. (default will be sent if NULL)
+ */
+  int eXosip_options_send_answer(int tid, int status, osip_message_t *answer);
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_publish.h b/include/eXosip2/eX_publish.h
new file mode 100644
index 0000000000000000000000000000000000000000..ebc9ccead1be909b4538738eb12c9d59e788249b
--- /dev/null
+++ b/include/eXosip2/eX_publish.h
@@ -0,0 +1,92 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_PUBLISH_H__
+#define __EX_PUBLISH_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_publish.h
+ * @brief eXosip publish request API
+ *
+ * This file provide the API needed to control PUBLISH requests. You can
+ * use it to:
+ *
+ * <ul>
+ * <li>build PUBLISH requests.</li>
+ * <li>send PUBLISH requests.</li>
+ * </ul>
+ */
+
+/**
+ * @defgroup eXosip2_publish eXosip2 Publication Management
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * build publication for a user. (PUBLISH request)
+ * 
+ * @param message   returned published request.
+ * @param to        SIP url for callee.
+ * @param from      SIP url for caller.
+ * @param route     Route used for publication.
+ * @param event     SIP Event header.
+ * @param expires   SIP Expires header.
+ * @param ctype     Content-Type of body.
+ * @param body     body for publication.
+ */
+int eXosip_build_publish(osip_message_t **message,
+			 const char *to,
+			 const char *from,
+			 const char *route,
+			 const char *event,
+			 const char *expires,
+			 const char *ctype,
+			 const char *body);
+
+/**
+ * Send an Publication Message (PUBLISH request).
+ * 
+ * @param message is a ready to be sent publish message .
+ * @param sip_if_match is the SIP-If-Match header. (NULL for initial publication)
+ */
+int eXosip_publish (osip_message_t *message, const char *sip_if_match);
+
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_refer.h b/include/eXosip2/eX_refer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c46cf41efc4dff7f755ba265addc01cf5a8be63
--- /dev/null
+++ b/include/eXosip2/eX_refer.h
@@ -0,0 +1,84 @@
+
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_REFER_H__
+#define __EX_REFER_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_refer.h
+ * @brief eXosip transfer outside of calls API
+ *
+ * This file provide the API needed to request a blind transfer
+ * outside of any call.
+ *
+ * <ul>
+ * <li>build initial refer.</li>
+ * <li>send initial refer.</li>
+ * </ul>
+ *
+ */
+
+/**
+ * @defgroup eXosip2_refer eXosip2 REFER and blind tranfer Management outside of calls
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * Build a default REFER message for a blind transfer outside of any calls.
+ * 
+ * @param refer     Pointer for the SIP element to hold.
+ * @param refer_to  SIP url for transfer.
+ * @param from      SIP url for caller.
+ * @param to        SIP url for callee.
+ * @param route     Route header for REFER. (optionnal)
+ */
+int eXosip_refer_build_request(osip_message_t **refer, const char *refer_to,
+			       const char *from, const char *to,
+			       const char *route);
+
+/**
+ * Initiate a blind tranfer outside of any call.
+ * 
+ * @param refer     SIP REFER message to send.
+ */
+int eXosip_refer_send_request(osip_message_t *refer);
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_register.h b/include/eXosip2/eX_register.h
new file mode 100644
index 0000000000000000000000000000000000000000..e0919219a13532553f7eab0fe9372c5b4759cba1
--- /dev/null
+++ b/include/eXosip2/eX_register.h
@@ -0,0 +1,96 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_REGISTER_H__
+#define __EX_REGISTER_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+/**
+ * @file eX_register.h
+ * @brief eXosip registration API
+ *
+ * This file provide the API needed to control registrations. You can
+ * use it to:
+ *
+ * <ul>
+ * <li>build initial REGISTER.</li>
+ * <li>build REGISTER.</li>
+ * <li>send REGISTER.</li>
+ * </ul>
+ */
+
+/**
+ * @defgroup eXosip2_registration eXosip2 REGISTER and Registration Management
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+  struct eXosip_reg_t;
+
+/**
+ * Build initial REGISTER request.
+ * 
+ * @param from      SIP url for caller.
+ * @param proxy     Proxy used for registration.
+ * @param contact   Contact address. (optional)
+ * @param expires   The expires value for registration.
+ * @param reg       The SIP request to build.
+ */
+  int eXosip_register_build_initial_register(const char *from, const char *proxy,
+					     const char *contact, int expires,
+					     osip_message_t **reg);
+
+/**
+ * Build a new REGISTER request for an existing registration.
+ * 
+ * @param rid       A unique identifier for the registration context
+ * @param expires   The expires value for registration.
+ * @param reg       The SIP request to build.
+ */
+  int eXosip_register_build_register(int rid, int expires, osip_message_t **reg);
+
+/**
+ * Send a REGISTER request for an existing registration.
+ * 
+ * @param rid       A unique identifier for the registration context
+ * @param reg       The SIP request to build. (NULL for default REGISTER)
+ */
+  int eXosip_register_send_register(int rid, osip_message_t *reg);
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_setup.h b/include/eXosip2/eX_setup.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6681cc5523ddad0926d74622851be86567a4d4c
--- /dev/null
+++ b/include/eXosip2/eX_setup.h
@@ -0,0 +1,258 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_SETUP_H__
+#define __EX_SETUP_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_setup.h
+ * @brief eXosip setup API
+ *
+ * This file provide the API needed to setup and configure
+ * the SIP endpoint.
+ *
+ */
+
+/**
+ * @defgroup eXosip2_conf eXosip2 configuration API
+ * @ingroup eXosip2_setup
+ * @{
+ */
+
+/**
+ * Initiate the eXtented oSIP library.
+ * 
+ */
+  int eXosip_init(void);
+
+/**
+ * Release ressource used by the eXtented oSIP library.
+ * 
+ */
+  void eXosip_quit(void);
+
+typedef enum {
+    EXOSIP_OPT_UDP_KEEP_ALIVE = 1,
+    EXOSIP_OPT_UDP_LEARN_PORT = 2,
+    EXOSIP_OPT_SET_HTTP_TUNNEL_PORT = 3,
+    EXOSIP_OPT_SET_HTTP_TUNNEL_PROXY = 4,
+    EXOSIP_OPT_SET_HTTP_OUTBOUND_PROXY = 5 /* used for http tunnel ONLY */
+} eXosip_option;
+
+/**
+ * Set eXosip options.
+ * See eXosip_option for available options.
+ *
+ * @param opt     option to configure.
+ * @param value   value for options.
+ * 
+ */
+int eXosip_set_option(eXosip_option opt, void *value);
+
+/**
+ * Lock the eXtented oSIP library.
+ * 
+ */
+  int eXosip_lock(void);
+
+/**
+ * UnLock the eXtented oSIP library.
+ * 
+ */
+  int eXosip_unlock(void);
+
+/**
+ * Listen on a specified socket.
+ * 
+ * @param transport IPPROTO_UDP for udp. (soon to come: TCP/TLS?)
+ * @param addr      the address to bind (NULL for all interface)
+ * @param port      the listening port. (0 for random port)
+ * @param family    the IP family (AF_INET or AF_INET6).
+ * @param secure    0 for UDP or TCP, 1 for TLS (with TCP).
+ */
+  int eXosip_listen_addr(int transport, const char *addr, int port, int family,
+			 int secure);
+
+/**
+ * Listen on a specified socket.
+ * 
+ * @param transport IPPROTO_UDP for udp. (soon to come: TCP/TLS?)
+ * @param socket socket to use for listening to UDP sip messages.
+ * @param port the listening port for masquerading.
+ */
+  int eXosip_set_socket(int transport, int socket, int port);
+
+/**
+ * Set the SIP User-Agent: header string.
+ *
+ * @param user_agent the User-Agent header to insert in messages.
+ */
+  void eXosip_set_user_agent(const char *user_agent);
+
+/**
+ * Use IPv6 instead of IPv4.
+ * 
+ * @param ipv6_enable  This paramter should be set to 1 to enable IPv6 mode.
+ */
+  void eXosip_enable_ipv6(int ipv6_enable);
+
+/**
+ * This method is used to replace contact address with
+ * the public address of your NAT. The ip address should
+ * be retreived manually (fixed IP address) or with STUN.
+ * This address will only be used when the remote
+ * correspondant appears to be on an DIFFERENT LAN.
+ *
+ * @param public_address 	the ip address.
+ * 
+ * If set to NULL, then the local ip address will be guessed 
+ * automatically (returns to default mode).
+ */
+  void eXosip_masquerade_contact(const char *public_address, int port);
+
+#ifndef DOXYGEN
+
+/**
+ * Force eXosip to use a specific ip address in all
+ * contact and Via headers in SIP message.
+ * **PLEASE DO NOT USE: use eXosip_masquerade_contact instead**
+ *
+ * @param localip 	the ip address.
+ *
+ * If set to NULL, then the local ip address will be guessed 
+ * automatically (returns to default mode).
+ *
+ * ******LINPHONE specific methods******
+ *
+ */
+int eXosip_force_masquerade_contact(const char *localip);
+
+/**
+ * Wake Up the eXosip_event_wait method.
+ * 
+ */
+  void __eXosip_wakeup_event(void);
+
+#define REMOVE_ELEMENT(first_element, element)   \
+       if (element->parent==NULL)                \
+	{ first_element = element->next;         \
+          if (first_element!=NULL)               \
+          first_element->parent = NULL; }        \
+       else \
+        { element->parent->next = element->next; \
+          if (element->next!=NULL)               \
+	element->next->parent = element->parent; \
+	element->next = NULL;                    \
+	element->parent = NULL; }
+
+#define ADD_ELEMENT(first_element, element) \
+   if (first_element==NULL)                 \
+    {                                       \
+      first_element   = element;            \
+      element->next   = NULL;               \
+      element->parent = NULL;               \
+    }                                       \
+  else                                      \
+    {                                       \
+      element->next   = first_element;      \
+      element->parent = NULL;               \
+      element->next->parent = element;      \
+      first_element = element;              \
+    }
+
+#define APPEND_ELEMENT(type_of_element_t, first_element, element) \
+  if (first_element==NULL)                            \
+    { first_element = element;                        \
+      element->next   = NULL; /* useless */           \
+      element->parent = NULL; /* useless */ }         \
+  else                                                \
+    { type_of_element_t *f;                           \
+      for (f=first_element; f->next!=NULL; f=f->next) \
+         { }                                          \
+      f->next    = element;                           \
+      element->parent = f;                            \
+      element->next   = NULL;                         \
+    }
+
+#endif
+
+/** @} */
+
+
+/**
+ * @defgroup eXosip2_network eXosip2 network API
+ * @ingroup eXosip2_setup
+ * @{
+ */
+
+/**
+ * Modify the transport protocol used to send SIP message.
+ * 
+ * @param msg         The SIP message to modify
+ * @param transport   transport protocol to use ("UDP", "TCP" or "TLS")
+ */
+  int eXosip_transport_set(osip_message_t *msg, const char *transport);
+
+/**
+ * Find the current localip (interface with default route).
+ * 
+ * @param family    AF_INET or AF_INET6
+ * @param address   a string containing the local IP address.
+ * @param size      The size of the string
+ */
+  int eXosip_guess_localip(int family, char *address, int size);
+
+#ifndef DOXYGEN
+
+/**
+ * Find the interface to be used to reach the specified host.
+ * 
+ * @param ip    a string containing the local IP address.
+ * @param localip	the local ip address to be used to reach host.
+ *
+ * You usually don't need this function at all.
+ *
+ * ******LINPHONE specific methods******
+ *
+ */
+int eXosip_get_localip_for(const char *host, char *localip, int size);
+
+#endif
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eX_subscribe.h b/include/eXosip2/eX_subscribe.h
new file mode 100644
index 0000000000000000000000000000000000000000..55a581a0cb21f024ed0893e25c82fcd6d592b443
--- /dev/null
+++ b/include/eXosip2/eX_subscribe.h
@@ -0,0 +1,189 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EX_SUBSCRIBE_H__
+#define __EX_SUBSCRIBE_H__
+
+#include <osipparser2/osip_parser.h>
+#include <time.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @file eX_subscribe.h
+ * @brief eXosip subscribe request API
+ *
+ * This file provide the API needed to control SUBSCRIBE requests. You can
+ * use it to:
+ *
+ * <ul>
+ * <li>build SUBSCRIBE requests.</li>
+ * <li>send SUBSCRIBE requests.</li>
+ * <li>build SUBSCRIBE answers.</li>
+ * <li>send SUBSCRIBE answers.</li>
+ * </ul>
+ */
+
+/**
+ * @defgroup eXosip2_subscribe eXosip2 SUBSCRIBE and outgoing subscriptions
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+typedef enum eXosip_ss {
+  EXOSIP_SUBCRSTATE_UNKNOWN,      /**< unknown subscription-state */
+  EXOSIP_SUBCRSTATE_PENDING,      /**< pending subscription-state */
+  EXOSIP_SUBCRSTATE_ACTIVE,       /**< active subscription-state */
+  EXOSIP_SUBCRSTATE_TERMINATED    /**< terminated subscription-state */
+} eXosip_ss_t;
+
+typedef enum eXosip_ss_reason {
+  DEACTIVATED,                   /**< deactivated for subscription-state */
+  PROBATION,                     /**< probation for subscription-state */
+  REJECTED,                      /**< rejected for subscription-state */
+  TIMEOUT,                       /**< timeout for subscription-state */
+  GIVEUP,                        /**< giveup for subscription-state */
+  NORESOURCE                     /**< noresource for subscription-state */
+} eXosip_ss_reason_t;
+
+
+typedef enum eXosip_ss_status {
+  EXOSIP_NOTIFY_UNKNOWN,     /**< unknown state for subscription */
+  EXOSIP_NOTIFY_PENDING,     /**< subscription not yet accepted */
+  EXOSIP_NOTIFY_ONLINE,      /**< online status */
+  EXOSIP_NOTIFY_BUSY,        /**< busy status */
+  EXOSIP_NOTIFY_BERIGHTBACK, /**< be right back status */
+  EXOSIP_NOTIFY_AWAY,        /**< away status */
+  EXOSIP_NOTIFY_ONTHEPHONE,  /**< on the phone status */
+  EXOSIP_NOTIFY_OUTTOLUNCH,  /**< out to lunch status */
+  EXOSIP_NOTIFY_CLOSED       /**< closed status */
+} eXosip_ss_status_t;
+
+/**
+ * Build a default initial SUBSCRIBE request.
+ * 
+ * @param subscribe Pointer for the SIP request to build.
+ * @param to        SIP url for callee.
+ * @param from      SIP url for caller.
+ * @param route     Route header for SUBSCRIBE. (optionnal)
+ * @param event     Event header for SUBSCRIBE.
+ * @param expires   Expires header for SUBSCRIBE.
+ */
+  int eXosip_subscribe_build_initial_request(osip_message_t **subscribe,
+					     const char *to, const char *from,
+					     const char *route, const char *event,
+					     int expires);
+
+/**
+ * Send an initial SUBSCRIBE request.
+ * 
+ * @param subscribe          SIP SUBSCRIBE message to send.
+ */
+  int eXosip_subscribe_send_initial_request(osip_message_t *subscribe);
+
+/**
+ * Build a default new SUBSCRIBE message.
+ * 
+ * @param did      identifier of the subscription.
+ * @param sub      Pointer for the SIP request to build.
+ */
+  int eXosip_subscribe_build_refresh_request(int did, osip_message_t **sub);
+
+/**
+ * Send a new SUBSCRIBE request.
+ * 
+ * @param did          identifier of the subscription.
+ * @param sub          SIP SUBSCRIBE message to send.
+ */
+  int eXosip_subscribe_send_refresh_request(int did, osip_message_t *sub);
+
+/** @} */
+
+/**
+ * @defgroup eXosip2_notify eXosip2 SUBSCRIBE and incoming subscriptions
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * Build answer for an SUBSCRIBE request.
+ * 
+ * @param tid             id of SUBSCRIBE transaction.
+ * @param status          status for SIP answer to build.
+ * @param answer          The SIP answer to build.
+ */
+  int eXosip_insubscription_build_answer(int tid, int status,
+					 osip_message_t **answer);
+
+/**
+ * Send answer for an SUBSCRIBE request.
+ * 
+ * @param tid             id of SUBSCRIBE transaction.
+ * @param status          status for SIP answer to send.
+ * @param answer          The SIP answer to send. (default will be sent if NULL)
+ */
+  int eXosip_insubscription_send_answer(int tid, int status,
+					osip_message_t *answer);
+
+/**
+ * Build a request within subscription.
+ * 
+ * @param did             id of incoming subscription.
+ * @param method          request method to build.
+ * @param request         The SIP request to build.
+ */
+  int eXosip_insubscription_build_request(int did, const char *method,
+					  osip_message_t **request);
+
+/**
+ * Build a NOTIFY request within subscription.
+ * 
+ * @param did                  id of incoming subscription.
+ * @param subscription_status  subscription status (pending, active, terminated)
+ * @param subscription_reason  subscription reason
+ * @param request              The SIP request to build.
+ */
+  int eXosip_insubscription_build_notify(int did, int subscription_status,
+					 int subscription_reason,
+					 osip_message_t **request);
+
+/**
+ * Send a request within subscription.
+ * 
+ * @param did             id of incoming subscription.
+ * @param request         The SIP request to send.
+ */
+  int eXosip_insubscription_send_request(int did, osip_message_t *request);
+					  
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/include/eXosip2/eXosip.h b/include/eXosip2/eXosip.h
new file mode 100644
index 0000000000000000000000000000000000000000..a66cbeda236b97d2eb32b4b452cbf422e01482c7
--- /dev/null
+++ b/include/eXosip2/eXosip.h
@@ -0,0 +1,301 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EXOSIP_H__
+#define __EXOSIP_H__
+
+#include <eXosip2/eX_setup.h>
+#include <eXosip2/eX_register.h>
+#include <eXosip2/eX_call.h>
+#include <eXosip2/eX_options.h>
+#include <eXosip2/eX_subscribe.h>
+#include <eXosip2/eX_refer.h>
+#include <eXosip2/eX_message.h>
+#include <eXosip2/eX_publish.h>
+
+#include <osipparser2/osip_parser.h>
+#include <osipparser2/sdp_message.h>
+#include <time.h>
+
+/**
+ * @file eXosip.h
+ * @brief eXosip API
+ *
+ * eXosip is a high layer library for rfc3261: the SIP protocol.
+ * It offers a simple API to make it easy to use. eXosip2 offers
+ * great flexibility for implementing SIP endpoint like:
+ * <ul>
+ * <li>SIP User-Agents</li>
+ * <li>SIP Voicemail or IVR</li>
+ * <li>SIP B2BUA</li>
+ * <li>any SIP server acting as an endpoint (music server...)</li>
+ * </ul>
+ *
+ * If you need to implement proxy or complex SIP applications,
+ * you should consider using osip instead.
+ *
+ * Here are the eXosip capabilities:
+ * <pre>
+ *    REGISTER                 to handle registration.
+ *    INVITE/BYE               to start/stop VoIP sessions.
+ *    INFO                     to send DTMF within a VoIP sessions.
+ *    OPTIONS                  to simulate VoIP sessions.
+ *    re-INVITE                to modify VoIP sessions
+ *    REFER/NOTIFY             to transfer calls.
+ *    MESSAGE                  to send Instant Message.
+ *    SUBSCRIBE/NOTIFY         to handle presence capabilities.
+ * </pre>
+ * <P>
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+/**
+ * @defgroup eXosip2_authentication eXosip2 authentication API
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * Add authentication credentials. These are used when an outgoing
+ * request comes back with an authorization required response.
+ *
+ * @param username	username
+ * @param userid	login (usually equals the username)
+ * @param passwd	password
+ * @param ha1		currently ignored
+ * @param realm		realm within which credentials apply, or NULL
+ *			to apply credentials to unrecognized realms
+ */
+  int eXosip_add_authentication_info(const char *username, const char *userid,
+				     const char *passwd, const char *ha1,
+				     const char *realm);
+  
+/**
+ * Clear all authentication credentials stored in eXosip.
+ *
+ */
+  int eXosip_clear_authentication_info(void);
+
+/**
+ * Initiate some automatic actions:
+ *
+ *  Retry with credentials upon reception of 401/407.
+ *  Refresh REGISTER and SUBSCRIBE before the expiration delay.
+ *  Retry with Contact header upon reception of 3xx request.
+ * 
+ */
+  void eXosip_automatic_action(void);
+
+/** @} */
+  
+
+/**
+ * @defgroup eXosip2_sdp eXosip2 SDP helper API.
+ * @ingroup eXosip2_msg
+ * @{
+ */
+
+/**
+ * Get remote SDP body for the latest INVITE of call.
+ * 
+ * @param did          dialog id of call.
+ */
+  sdp_message_t *eXosip_get_remote_sdp(int did);
+
+/**
+ * Get local SDP body for the latest INVITE of call.
+ * 
+ * @param did          dialog id of call.
+ */
+  sdp_message_t *eXosip_get_local_sdp(int did);
+
+/**
+ * Get local SDP body for the given message.
+ * 
+ * @param message      message containing the SDP.
+ */
+  sdp_message_t *eXosip_get_sdp_info(osip_message_t *message);
+
+/**
+ * Get audio connection information for call.
+ * 
+ * @param sdp     sdp information.
+ */
+  sdp_connection_t *eXosip_get_audio_connection(sdp_message_t *sdp);
+
+/**
+ * Get audio media information for call.
+ * 
+ * @param sdp     sdp information.
+ */
+  sdp_media_t *eXosip_get_audio_media(sdp_message_t *sdp);
+
+/** @} */
+
+/**
+ * @defgroup eXosip2_event eXosip2 event API
+ * @ingroup eXosip2_setup
+ * @{
+ */
+
+/**
+ * Structure for event type description
+ * @var eXosip_event_type
+ */
+  typedef enum eXosip_event_type
+    {
+      /* REGISTER related events */
+      EXOSIP_REGISTRATION_NEW,         /**< announce new registration.       */
+      EXOSIP_REGISTRATION_SUCCESS,     /**< user is successfully registred.  */
+      EXOSIP_REGISTRATION_FAILURE,     /**< user is not registred.           */
+      EXOSIP_REGISTRATION_REFRESHED,   /**< registration has been refreshed. */
+      EXOSIP_REGISTRATION_TERMINATED,  /**< UA is not registred any more.    */
+      
+      /* INVITE related events within calls */
+      EXOSIP_CALL_INVITE,          /**< announce a new call                   */
+      EXOSIP_CALL_REINVITE,        /**< announce a new INVITE within call     */
+
+      EXOSIP_CALL_NOANSWER,        /**< announce no answer within the timeout */
+      EXOSIP_CALL_PROCEEDING,      /**< announce processing by a remote app   */
+      EXOSIP_CALL_RINGING,         /**< announce ringback                     */
+      EXOSIP_CALL_ANSWERED,        /**< announce start of call                */
+      EXOSIP_CALL_REDIRECTED,      /**< announce a redirection                */
+      EXOSIP_CALL_REQUESTFAILURE,  /**< announce a request failure            */
+      EXOSIP_CALL_SERVERFAILURE,   /**< announce a server failure             */
+      EXOSIP_CALL_GLOBALFAILURE,   /**< announce a global failure             */
+      EXOSIP_CALL_ACK,             /**< ACK received for 200ok to INVITE      */
+      
+      EXOSIP_CALL_CANCELLED,       /**< announce that call has been cancelled */
+      EXOSIP_CALL_TIMEOUT,         /**< announce that call has failed         */
+
+      /* request related events within calls (except INVITE) */
+      EXOSIP_CALL_MESSAGE_NEW,            /**< announce new incoming MESSAGE. */
+      EXOSIP_CALL_MESSAGE_PROCEEDING,     /**< announce a 1xx for MESSAGE. */
+      EXOSIP_CALL_MESSAGE_ANSWERED,       /**< announce a 200ok  */
+      EXOSIP_CALL_MESSAGE_REDIRECTED,     /**< announce a failure. */
+      EXOSIP_CALL_MESSAGE_REQUESTFAILURE, /**< announce a failure. */
+      EXOSIP_CALL_MESSAGE_SERVERFAILURE,  /**< announce a failure. */
+      EXOSIP_CALL_MESSAGE_GLOBALFAILURE,  /**< announce a failure. */
+
+      EXOSIP_CALL_CLOSED,          /**< a BYE was received for this call      */
+
+      /* for both UAS & UAC events */
+      EXOSIP_CALL_RELEASED,           /**< call context is cleared.            */
+      
+      /* response received for request outside calls */
+      EXOSIP_MESSAGE_NEW,            /**< announce new incoming MESSAGE. */
+      EXOSIP_MESSAGE_PROCEEDING,     /**< announce a 1xx for MESSAGE. */
+      EXOSIP_MESSAGE_ANSWERED,       /**< announce a 200ok  */
+      EXOSIP_MESSAGE_REDIRECTED,     /**< announce a failure. */
+      EXOSIP_MESSAGE_REQUESTFAILURE, /**< announce a failure. */
+      EXOSIP_MESSAGE_SERVERFAILURE,  /**< announce a failure. */
+      EXOSIP_MESSAGE_GLOBALFAILURE,  /**< announce a failure. */
+      
+      /* Presence and Instant Messaging */
+      EXOSIP_SUBSCRIPTION_UPDATE,       /**< announce incoming SUBSCRIBE.      */
+      EXOSIP_SUBSCRIPTION_CLOSED,       /**< announce end of subscription.     */
+      
+      EXOSIP_SUBSCRIPTION_NOANSWER,        /**< announce no answer              */
+      EXOSIP_SUBSCRIPTION_PROCEEDING,      /**< announce a 1xx                  */
+      EXOSIP_SUBSCRIPTION_ANSWERED,        /**< announce a 200ok                */
+      EXOSIP_SUBSCRIPTION_REDIRECTED,      /**< announce a redirection          */
+      EXOSIP_SUBSCRIPTION_REQUESTFAILURE,  /**< announce a request failure      */
+      EXOSIP_SUBSCRIPTION_SERVERFAILURE,   /**< announce a server failure       */
+      EXOSIP_SUBSCRIPTION_GLOBALFAILURE,   /**< announce a global failure       */
+      EXOSIP_SUBSCRIPTION_NOTIFY,          /**< announce new NOTIFY request     */
+      
+      EXOSIP_SUBSCRIPTION_RELEASED,        /**< call context is cleared.        */
+      
+      EXOSIP_IN_SUBSCRIPTION_NEW,          /**< announce new incoming SUBSCRIBE.*/
+      EXOSIP_IN_SUBSCRIPTION_RELEASED,     /**< announce end of subscription.   */
+      
+      EXOSIP_EVENT_COUNT                /**< MAX number of events              */
+    } eXosip_event_type_t;
+
+/**
+ * Structure for event description.
+ * @var eXosip_event_t
+ */
+  typedef struct eXosip_event eXosip_event_t;
+
+/**
+ * Structure for event description
+ * @struct eXosip_event
+ */
+  struct eXosip_event
+  {
+    eXosip_event_type_t type;               /**< type of the event */
+    char                textinfo[256];      /**< text description of event */ 
+    void               *external_reference; /**< external reference (for calls) */
+    
+    osip_message_t     *request;   /**< request within current transaction */
+    osip_message_t     *response;  /**< last response within current transaction */
+    osip_message_t     *ack;       /**< ack within current transaction */
+    
+    int tid; /**< unique id for transactions (to be used for answers) */
+    int did; /**< unique id for SIP dialogs */
+    
+    int rid; /**< unique id for registration */
+    int cid; /**< unique id for SIP calls (but multiple dialogs!) */
+    int sid; /**< unique id for outgoing subscriptions */
+    int nid; /**< unique id for incoming subscriptions */
+    
+    int ss_status;  /**< current Subscription-State for subscription */
+    int ss_reason;  /**< current Reason status for subscription */    
+  };
+  
+/**
+ * Free ressource in an eXosip event.
+ * 
+ * @param je    event to work on.
+ */
+void eXosip_event_free(eXosip_event_t *je);
+
+/**
+ * Wait for an eXosip event.
+ * 
+ * @param tv_s      timeout value (seconds).
+ * @param tv_ms     timeout value (mseconds).
+ */
+eXosip_event_t *eXosip_event_wait(int tv_s, int tv_ms);
+
+
+/**
+ * Wait for next eXosip event.
+ * 
+ */
+eXosip_event_t *eXosip_event_get(void);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/Makefile.am b/libs/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..3a9551dc4795ab32b5c53915cd29f88fd858c418
--- /dev/null
+++ b/libs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = eXosip2 portaudio stund utilspp
\ No newline at end of file
diff --git a/libs/eXosip2/Makefile.am b/libs/eXosip2/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..fa00a8cf622d88586bad1b1fca8aab1b8839d781
--- /dev/null
+++ b/libs/eXosip2/Makefile.am
@@ -0,0 +1,33 @@
+
+
+noinst_LTLIBRARIES = libeXosip2.la
+
+#
+# Other flags to add someday:
+#	-Wcast-qual
+#	-Wwrite-strings
+#	-Wstrict-prototypes
+#	-Werror
+#
+AM_CFLAGS = $(EXOSIP_CFLAGS) @CFLAGS@  
+noinst_HEADERS = eXosip2.h  inet_ntop.h  jpipe.h
+
+libeXosip2_la_SOURCES =      \
+eXosip.c         eXconf.c    \
+eXregister_api.c eXsubscription_api.c    \
+eXcall_api.c     eXoptions_api.c         \
+eXrefer_api.c    eXmessage_api.c         \
+eXinsubscription_api.c  eXpublish_api.c     \
+eXtransport.c    \
+inet_ntop.c      inet_ntop.h   \
+jrequest.c       jresponse.c   \
+jcallback.c      jdialog.c               udp.c        \
+jcall.c          jreg.c                  eXutils.c    \
+jnotify.c        jsubscribe.c            jevents.c    \
+misc.c           eXosip2.h     \
+jpipe.c          jpipe.h                 jauth.c      \
+sdp_offans.c     jpublish.c
+
+libeXosip2_la_LIBADD = -losip2  @EXOSIP_LIBS@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(includedir)
diff --git a/libs/eXosip2/eXcall_api.c b/libs/eXosip2/eXcall_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..76dc9a8fc73c438763817dba3f47a47d2725f6ba
--- /dev/null
+++ b/libs/eXosip2/eXcall_api.c
@@ -0,0 +1,1563 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+static int eXosip_create_transaction (eXosip_call_t * jc,
+                                      eXosip_dialog_t * jd,
+                                      osip_message_t * request);
+static int eXosip_create_cancel_transaction (eXosip_call_t * jc,
+                                             eXosip_dialog_t * jd,
+                                             osip_message_t * request);
+static int _eXosip_call_transaction_find (int tid, eXosip_call_t ** jc,
+                                          eXosip_dialog_t ** jd,
+                                          osip_transaction_t ** tr);
+
+static int
+eXosip_create_transaction (eXosip_call_t * jc,
+                           eXosip_dialog_t * jd, osip_message_t * request)
+{
+  osip_event_t *sipevent;
+  osip_transaction_t *tr;
+  int i;
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, request);
+  if (i != 0)
+    {
+      /* TODO: release the j_call.. */
+
+      osip_message_free (request);
+      return -1;
+    }
+
+  if (jd != NULL)
+    osip_list_add (jd->d_out_trs, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = tr->transactionid;
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+static int
+eXosip_create_cancel_transaction (eXosip_call_t * jc,
+                                  eXosip_dialog_t * jd, osip_message_t * request)
+{
+  osip_event_t *sipevent;
+  osip_transaction_t *tr;
+  int i;
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, request);
+  if (i != 0)
+    {
+      /* TODO: release the j_call.. */
+
+      osip_message_free (request);
+      return -2;
+    }
+
+  osip_list_add (eXosip.j_transactions, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+static int
+_eXosip_call_transaction_find (int tid, eXosip_call_t ** jc,
+                               eXosip_dialog_t ** jd, osip_transaction_t ** tr)
+{
+  for (*jc = eXosip.j_calls; *jc != NULL; *jc = (*jc)->next)
+    {
+      if ((*jc)->c_inc_tr != NULL && (*jc)->c_inc_tr->transactionid == tid)
+        {
+          *tr = (*jc)->c_inc_tr;
+          *jd = (*jc)->c_dialogs;
+          return 0;
+        }
+      if ((*jc)->c_out_tr != NULL && (*jc)->c_out_tr->transactionid == tid)
+        {
+          *tr = (*jc)->c_out_tr;
+          *jd = (*jc)->c_dialogs;
+          return 0;
+        }
+      for (*jd = (*jc)->c_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          osip_transaction_t *transaction;
+          int pos = 0;
+
+          while (!osip_list_eol ((*jd)->d_inc_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_inc_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+
+          pos = 0;
+          while (!osip_list_eol ((*jd)->d_out_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_out_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+        }
+    }
+  *jd = NULL;
+  *jc = NULL;
+  return -1;
+}
+
+int
+eXosip_call_set_reference (int id, void *reference)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  if (id > 0)
+    {
+      eXosip_call_dialog_find (id, &jc, &jd);
+      if (jc == NULL)
+        {
+          eXosip_call_find (id, &jc);
+        }
+    }
+  if (jc == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+  jc->external_reference = reference;
+  return 0;
+}
+
+/* this method can't be called unless the previous
+   INVITE transaction is over. */
+int
+eXosip_call_build_initial_invite (osip_message_t ** invite,
+                                  const char *to,
+                                  const char *from,
+                                  const char *route, const char *subject)
+{
+  int i;
+  osip_uri_param_t *uri_param = NULL;
+  osip_to_t *_to=NULL;
+
+  *invite = NULL;
+
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+  if (subject != NULL && *subject == '\0')
+    subject = NULL;
+
+  i = osip_to_init(&_to);
+  if (i!=0)
+    return -1;
+  
+  i = osip_to_parse(_to, to);
+  if (i!=0)
+    {
+      osip_to_free(_to);
+      return -1;
+    }
+
+  osip_uri_uparam_get_byname(_to->url, "transport", &uri_param);
+  if (uri_param != NULL && uri_param->gvalue != NULL)
+    {
+      i = generating_request_out_of_dialog (invite, "INVITE", to, uri_param->gvalue, from, route);      
+    }
+  else
+    {
+      if (eXosip.net_interfaces[0].net_socket>0)
+	i = generating_request_out_of_dialog (invite, "INVITE", to, "UDP", from, route);
+      else if (eXosip.net_interfaces[1].net_socket>0)
+	i = generating_request_out_of_dialog (invite, "INVITE", to, "TCP", from, route);
+      else
+	i = generating_request_out_of_dialog (invite, "INVITE", to, "UDP", from, route);
+    }
+  osip_to_free(_to);
+  if (i != 0)
+    return -1;
+
+  if (subject != NULL)
+    osip_message_set_subject (*invite, subject);
+
+  /* after this delay, we should send a CANCEL */
+  osip_message_set_expires (*invite, "120");
+  return 0;
+}
+
+int
+eXosip_call_send_initial_invite (osip_message_t * invite)
+{
+  eXosip_call_t *jc;
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  eXosip_call_init (&jc);
+
+  i = osip_transaction_init (&transaction, ICT, eXosip.j_osip, invite);
+  if (i != 0)
+    {
+      eXosip_call_free (jc);
+      osip_message_free (invite);
+      return -1;
+    }
+
+  jc->c_out_tr = transaction;
+
+  sipevent = osip_new_outgoing_sipmessage (invite);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  jc->external_reference = NULL;
+  ADD_ELEMENT (eXosip.j_calls, jc);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return jc->c_id;
+}
+
+int
+eXosip_call_build_ack (int did, osip_message_t ** _ack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  osip_message_t *ack;
+  char *transport;
+  int i;
+
+  *_ack = NULL;
+
+  if (did > 0)
+    {
+      eXosip_call_dialog_find (did, &jc, &jd);
+    }
+  if (jc == NULL || jd == NULL || jd->d_dialog == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+
+  tr = eXosip_find_last_invite (jc, jd);
+
+  if (tr == NULL || tr->orig_request == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No transaction for call?\n"));
+      return -1;
+    }
+
+  if (0 != osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: ACK are only sent for invite transactions\n"));
+      return -1;
+    }
+
+  transport = NULL;
+  transport = _eXosip_transport_protocol(tr->orig_request);
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (&ack, "ACK", jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (&ack, "ACK", jd->d_dialog, transport);
+
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  /* Fix CSeq Number when request has been exchanged during INVITE transactions */
+  if (tr->orig_request->cseq!=NULL && tr->orig_request->cseq->number!=NULL)
+    {
+      if (ack!=NULL && ack->cseq!=NULL && ack->cseq->number!=NULL)
+	{
+	  osip_free(ack->cseq->number);
+	  ack->cseq->number = osip_strdup(tr->orig_request->cseq->number);
+	}
+    }
+
+  /* copy all credentials from INVITE! */
+  {
+    int pos = 0;
+    int i;
+    osip_proxy_authorization_t *pa = NULL;
+
+    i = osip_message_get_proxy_authorization (tr->orig_request, pos, &pa);
+    while (i == 0 && pa != NULL)
+      {
+        osip_proxy_authorization_t *pa2;
+
+        i = osip_proxy_authorization_clone (pa, &pa2);
+        if (i != 0)
+          {
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                    "Error in credential from INVITE\n"));
+            break;
+          }
+        osip_list_add (ack->proxy_authorizations, pa2, -1);
+        pa = NULL;
+        pos++;
+        i = osip_message_get_proxy_authorization (tr->orig_request, pos, &pa);
+      }
+  }
+
+  *_ack = ack;
+  return 0;
+}
+
+int
+eXosip_call_send_ack (int did, osip_message_t * ack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  osip_route_t *route;
+  char *host;
+  int port;
+
+  if (did > 0)
+    {
+      eXosip_call_dialog_find (did, &jc, &jd);
+    }
+
+  if (jc == NULL || jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      if (ack != NULL)
+	osip_message_free (ack);
+      return -1;
+    }
+
+  if (ack == NULL)
+    {
+      int i;
+
+      i = eXosip_call_build_ack (did, &ack);
+      if (i != 0)
+        {
+          return -1;
+        }
+    }
+
+  osip_message_get_route (ack, 0, &route);
+  if (route != NULL)
+    {
+      osip_uri_param_t *lr_param=NULL;
+      osip_uri_uparam_get_byname (route->url, "lr", &lr_param);
+      if (lr_param==NULL)
+	route=NULL;
+    }
+
+  if (route != NULL)
+    {
+      port = 5060;
+      if (route->url->port != NULL)
+        port = osip_atoi (route->url->port);
+      host = route->url->host;
+  } else
+    {
+      port = 5060;
+      if (ack->req_uri->port != NULL)
+        port = osip_atoi (ack->req_uri->port);
+      host = ack->req_uri->host;
+    }
+
+  cb_snd_message (NULL, ack, host, port, -1);
+
+  if (jd->d_ack != NULL)
+    osip_message_free (jd->d_ack);
+  jd->d_ack = ack;
+  return 0;
+}
+
+int
+eXosip_call_build_request (int jid, const char *method, osip_message_t ** request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  osip_transaction_t *transaction;
+  char *transport;
+  int i;
+  
+  *request = NULL;
+  if (method == NULL || method[0] == '\0')
+    return -1;
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jd == NULL || jd->d_dialog == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+
+  transaction = NULL;
+  if (0 == osip_strcasecmp (method, "INVITE"))
+    {
+      transaction = eXosip_find_last_invite (jc, jd);
+  } else                        /* OPTIONS, UPDATE, INFO, REFER, ?... */
+    {
+      transaction = eXosip_find_last_transaction (jc, jd, method);
+    }
+
+  if (transaction != NULL)
+    {
+      if (0 != osip_strcasecmp (method, "INVITE"))
+        {
+          if (transaction->state != NICT_TERMINATED &&
+              transaction->state != NIST_TERMINATED &&
+              transaction->state != NICT_COMPLETED &&
+              transaction->state != NIST_COMPLETED)
+            return -1;
+      } else
+        {
+          if (transaction->state != ICT_TERMINATED &&
+              transaction->state != IST_TERMINATED &&
+              transaction->state != IST_CONFIRMED &&
+              transaction->state != ICT_COMPLETED)
+            return -1;
+        }
+    }
+
+  transport = NULL;
+  transaction = eXosip_find_last_invite (jc, jd);
+  if (transaction!=NULL && transaction->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(transaction->orig_request);
+
+  transaction = NULL;
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, transport);
+  if (i != 0)
+    return -2;
+
+  if (jc->response_auth!=NULL)
+    eXosip_add_authentication_information (*request, jc->response_auth);
+
+  return 0;
+}
+
+int
+eXosip_call_send_request (int jid, osip_message_t * request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+
+  int i;
+
+  if (request == NULL)
+    return -1;
+
+  if (request->sip_method == NULL)
+    {
+      osip_message_free (request);
+      return -1;
+    }
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      osip_message_free (request);
+      return -1;
+    }
+
+  transaction = NULL;
+  if (0 == osip_strcasecmp (request->sip_method, "INVITE"))
+    {
+      transaction = eXosip_find_last_invite (jc, jd);
+  } else                        /* OPTIONS, UPDATE, INFO, REFER, ?... */
+    {
+      transaction = eXosip_find_last_transaction (jc, jd, request->sip_method);
+    }
+
+  if (transaction != NULL)
+    {
+      if (0 != osip_strcasecmp (request->sip_method, "INVITE"))
+        {
+          if (transaction->state != NICT_TERMINATED &&
+              transaction->state != NIST_TERMINATED &&
+              transaction->state != NICT_COMPLETED &&
+              transaction->state != NIST_COMPLETED)
+	    {
+	      osip_message_free (request);
+	      return -1;
+	    }
+      } else
+        {
+          if (transaction->state != ICT_TERMINATED &&
+              transaction->state != IST_TERMINATED &&
+              transaction->state != IST_CONFIRMED &&
+              transaction->state != ICT_COMPLETED)
+	    {
+	      osip_message_free (request);
+	      return -1;
+	    }
+        }
+    }
+
+  transaction = NULL;
+  if (0 != osip_strcasecmp (request->sip_method, "INVITE"))
+    {
+      i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, request);
+  } else
+    {
+      i = osip_transaction_init (&transaction, ICT, eXosip.j_osip, request);
+    }
+
+  if (i != 0)
+    {
+      osip_message_free (request);
+      return -2;
+    }
+
+  osip_list_add (jd->d_out_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_call_build_refer (int did, const char *refer_to, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "REFER", request);
+  if (i != 0)
+    return -1;
+
+  if (refer_to == NULL || refer_to[0] == '\0')
+    return 0;
+
+  osip_message_set_header (*request, "Refer-to", refer_to);
+  return 0;
+}
+
+int
+eXosip_call_build_options (int did, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "OPTIONS", request);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_call_build_info (int did, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "INFO", request);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_call_build_update (int did, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "UPDATE", request);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_call_build_notify (int did, int subscription_status,
+                          osip_message_t ** request)
+{
+  char subscription_state[50];
+  char *tmp;
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "NOTIFY", request);
+  if (i != 0)
+    return -1;
+
+  if (subscription_status == EXOSIP_SUBCRSTATE_PENDING)
+    osip_strncpy (subscription_state, "pending;expires=", 16);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_ACTIVE)
+    osip_strncpy (subscription_state, "active;expires=", 15);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_TERMINATED)
+    {
+      int reason = NORESOURCE;
+
+      if (reason == DEACTIVATED)
+        osip_strncpy (subscription_state, "terminated;reason=deactivated", 29);
+      else if (reason == PROBATION)
+        osip_strncpy (subscription_state, "terminated;reason=probation", 27);
+      else if (reason == REJECTED)
+        osip_strncpy (subscription_state, "terminated;reason=rejected", 26);
+      else if (reason == TIMEOUT)
+        osip_strncpy (subscription_state, "terminated;reason=timeout", 25);
+      else if (reason == GIVEUP)
+        osip_strncpy (subscription_state, "terminated;reason=giveup", 24);
+      else if (reason == NORESOURCE)
+        osip_strncpy (subscription_state, "terminated;reason=noresource", 29);
+    }
+  tmp = subscription_state + strlen (subscription_state);
+  if (subscription_status != EXOSIP_SUBCRSTATE_TERMINATED)
+    sprintf (tmp, "%i", 180);
+  osip_message_set_header (*request, "Subscription-State", subscription_state);
+
+  return 0;
+}
+
+int
+eXosip_call_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  *answer = NULL;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (tr == NULL || jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+
+  if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      if (status > 100 && status < 200)
+        {
+          i = _eXosip_answer_invite_1xx (jc, jd, status, answer);
+      } else if (status > 199 && status < 300)
+        {
+          i = _eXosip_answer_invite_2xx (jc, jd, status, answer);
+      } else if (status > 300 && status < 699)
+        {
+          i = _eXosip_answer_invite_3456xx (jc, jd, status, answer);
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (101<status<699)\n"));
+          return -1;
+        }
+  } else
+    {
+      if (jd != NULL)
+        {
+          i =
+            _eXosip_build_response_default (answer, jd->d_dialog, status,
+                                            tr->orig_request);
+      } else
+        {
+          i =
+            _eXosip_build_response_default (answer, NULL, status,
+                                            tr->orig_request);
+        }
+      if (status>100 && status < 300 )
+	i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+    }
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for %s\n",
+                              tr->orig_request->sip_method));
+      return -1;
+    }
+  return 0;
+}
+
+int
+eXosip_call_send_answer (int tid, int status, osip_message_t * answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (jd == NULL || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here or no transaction for call\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+        {
+          if (status >= 100 && status <= 199)
+            {
+          } else if (status >= 300 && status <= 699)
+            {
+          } else
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: Wrong parameter?\n"));
+	      osip_message_free (answer);
+              return -1;
+            }
+        }
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED
+      || tr->state == IST_TERMINATED
+      || tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+        {
+          if (status < 200)
+            i = _eXosip_default_answer_invite_1xx (jc, jd, status);
+          else
+            i = _eXosip_default_answer_invite_3456xx (jc, jd, status);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot send response!\n"));
+              return -1;
+            }
+      } else
+        {
+          /* TODO */
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: a response must be given!\n"));
+          return -1;
+        }
+      return 0;
+  } else
+    {
+      i = 0;
+    }
+
+  if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      if (MSG_IS_STATUS_1XX (answer))
+        {
+          if (jd == NULL)
+            {
+              i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, answer);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: cannot create dialog!\n"));
+                  i = 0;
+              } else
+                {
+                  ADD_ELEMENT (jc->c_dialogs, jd);
+                }
+            }
+      } else if (MSG_IS_STATUS_2XX (answer))
+        {
+          if (jd == NULL)
+            {
+              i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, answer);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: cannot create dialog!\n"));
+		  osip_message_free (answer);
+                  return -1;
+                }
+              ADD_ELEMENT (jc->c_dialogs, jd);
+          } else
+            i = 0;
+
+          eXosip_dialog_set_200ok (jd, answer);
+          osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+      } else if (answer->status_code >= 300 && answer->status_code <= 699)
+        {
+          i = 0;
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (101<status<699)\n"));
+	  osip_message_free (answer);
+          return -1;
+        }
+      if (i != 0)
+	{
+	  osip_message_free (answer);
+	  return -1;
+	}
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  eXosip_update ();
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_call_terminate (int cid, int did)
+{
+  int i;
+  osip_transaction_t *tr;
+  osip_message_t *request = NULL;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  char *transport=NULL;
+
+  if (did > 0)
+    {
+      eXosip_call_dialog_find (did, &jc, &jd);
+      if (jd == NULL)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: No call here?\n"));
+          return -1;
+        }
+  } else
+    {
+      eXosip_call_find (cid, &jc);
+    }
+
+  if (jc == NULL)
+    {
+      return -1;
+    }
+
+  tr = eXosip_find_last_out_invite (jc, jd);
+  if (tr != NULL && tr->last_response != NULL
+      && MSG_IS_STATUS_1XX (tr->last_response))
+    {
+      i = generating_cancel (&request, tr->orig_request);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot terminate this call!\n"));
+          return -2;
+        }
+      i = eXosip_create_cancel_transaction (jc, jd, request);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot initiate SIP transaction!\n"));
+          return i;
+        }
+      if (jd != NULL)
+        {
+          osip_dialog_free (jd->d_dialog);
+          jd->d_dialog = NULL;
+          eXosip_update(); //AMD 30/09/05
+        }
+      return 0;
+    }
+
+  if (jd == NULL || jd->d_dialog == NULL)
+    {
+      /* Check if some dialog exists */
+      if (jd != NULL && jd->d_dialog != NULL)
+        {
+	  transport = NULL;
+	  if (tr!=NULL && tr->orig_request!=NULL)
+	    transport = _eXosip_transport_protocol(tr->orig_request);
+	  if (transport==NULL)
+	    i = generating_bye (&request, jd->d_dialog, "UDP");
+	  else
+	    i = generating_bye (&request, jd->d_dialog, transport);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot terminate this call!\n"));
+              return -2;
+            }
+
+	  if (jc->response_auth!=NULL)
+	    eXosip_add_authentication_information (request, jc->response_auth);
+
+          i = eXosip_create_transaction (jc, jd, request);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot initiate SIP transaction!\n"));
+              return -2;
+            }
+
+          osip_dialog_free (jd->d_dialog);
+          jd->d_dialog = NULL;
+          eXosip_update(); //AMD 30/09/05
+          return 0;
+        }
+
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No established dialog!\n"));
+      return -1;
+    }
+
+  if (tr == NULL)
+    {
+      /*this may not be enough if it's a re-INVITE! */
+      tr = eXosip_find_last_inc_invite (jc, jd);
+      if (tr != NULL && tr->last_response != NULL &&
+          MSG_IS_STATUS_1XX (tr->last_response))
+        {                       /* answer with 603 */
+          i = eXosip_call_send_answer (tr->transactionid, 603, NULL);
+          return i;
+        }
+    }
+
+  transport = NULL;
+  if (tr!=NULL && tr->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(tr->orig_request);
+  if (transport==NULL)
+    i = generating_bye (&request, jd->d_dialog, "UDP");
+  else
+    i = generating_bye (&request, jd->d_dialog, transport);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot terminate this call!\n"));
+      return -2;
+    }
+  if (jc->response_auth!=NULL)
+    eXosip_add_authentication_information (request, jc->response_auth);
+
+  i = eXosip_create_transaction (jc, jd, request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot initiate SIP transaction!\n"));
+      return -2;
+    }
+
+  osip_dialog_free (jd->d_dialog);
+  jd->d_dialog = NULL;
+  eXosip_update(); //AMD 30/09/05
+  return 0;
+}
+
+int
+eXosip_call_build_prack (int tid, osip_message_t ** prack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  osip_header_t *rseq;
+  char *transport;
+  int i;
+
+  *prack = NULL;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (jc == NULL || jd == NULL || jd->d_dialog == NULL
+      || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here or no transaction for call\n"));
+      return -1;
+    }
+
+  if (0 != osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    return -1;
+
+  /* PRACK are only send in the PROCEEDING state */
+  if (tr->state != ICT_PROCEEDING)
+    return -1;
+
+  if (tr->orig_request->cseq == NULL
+      || tr->orig_request->cseq->number == NULL
+      || tr->orig_request->cseq->method == NULL)
+    return -1;
+
+  transport = NULL;
+  if (tr!=NULL && tr->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(tr->orig_request);
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (prack, "PRACK", jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (prack, "PRACK", jd->d_dialog, transport);
+
+  if (i != 0)
+    return -2;
+
+  osip_message_header_get_byname (tr->last_response, "RSeq", 0, &rseq);
+  if (rseq != NULL && rseq->hvalue != NULL)
+    {
+      char tmp[128];
+
+      memset (tmp, '\0', sizeof (tmp));
+      snprintf (tmp, 127, "%s %s %s", rseq->hvalue,
+                tr->orig_request->cseq->number, tr->orig_request->cseq->method);
+      osip_message_set_header (*prack, "RAck", tmp);
+    }
+
+  return 0;
+}
+
+int
+eXosip_call_send_prack (int tid, osip_message_t * prack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  osip_event_t *sipevent;
+  int i;
+
+  if (prack == NULL)
+    return -1;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (jc == NULL || jd == NULL || jd->d_dialog == NULL
+      || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here or no transaction for call\n"));
+      osip_message_free (prack);
+      return -1;
+    }
+
+  if (0 != osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      osip_message_free (prack);
+      return -1;
+    }
+
+  /* PRACK are only send in the PROCEEDING state */
+  if (tr->state != ICT_PROCEEDING)
+    {
+      osip_message_free (prack);
+      return -1;
+    }
+
+  tr = NULL;
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, prack);
+
+  if (i != 0)
+    {
+      osip_message_free (prack);
+      return -2;
+    }
+
+  osip_list_add (jd->d_out_trs, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (prack);
+  sipevent->transactionid = tr->transactionid;
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+
+int
+_eXosip_call_redirect_request (eXosip_call_t * jc,
+                               eXosip_dialog_t * jd, osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  osip_contact_t *co;
+  int pos;
+  int i;
+  int protocol = IPPROTO_UDP;
+
+  if (jc == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  co = NULL;
+  pos = 0;
+  while (!osip_list_eol (out_tr->last_response->contacts, pos))
+    {
+      co = (osip_contact_t *) osip_list_get (out_tr->last_response->contacts, pos);
+      if (co != NULL && co->url != NULL && co->url->url_params != NULL)
+        {
+          /* check tranport? Only allow UDP, right now */
+          osip_uri_param_t *u_param;
+          int pos2;
+
+          u_param = NULL;
+          pos2 = 0;
+          while (!osip_list_eol (co->url->url_params, pos2))
+            {
+              u_param =
+                (osip_uri_param_t *) osip_list_get (co->url->url_params, pos2);
+              if (u_param == NULL || u_param->gname == NULL
+                  || u_param->gvalue == NULL)
+                {
+                  u_param = NULL;
+                  /* skip */
+              } else if (0 == osip_strcasecmp (u_param->gvalue, "transport"))
+                {
+                  if (0 == osip_strcasecmp (u_param->gvalue, "udp"))
+                    {
+#if 0
+                      /* remove the UDP parameter */
+                      osip_list_remove (co->url->url_params, pos2);
+                      osip_uri_param_free (u_param);
+#endif
+                      u_param = NULL;
+		      protocol=IPPROTO_UDP;
+                      break;    /* ok */
+                    }
+		  else if (0 == osip_strcasecmp (u_param->gvalue, "tcp"))
+		    {
+#if 0
+                      osip_list_remove (co->url->url_params, pos2);
+                      osip_uri_param_free (u_param);
+#endif
+		      protocol=IPPROTO_TCP;
+                      u_param = NULL;
+		    }
+                  break;
+                }
+              pos2++;
+            }
+
+          if (u_param == NULL || u_param->gname == NULL || u_param->gvalue == NULL)
+            {
+              break;            /* default is udp! */
+            }
+        }
+      pos++;
+      co = NULL;
+    }
+
+  if (co == NULL || co->url == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: contact header\n"));
+      return -1;
+    }
+
+  /* TODO:
+     remove extra parameter from new request-uri
+     check usual parameter like "transport"
+   */
+
+  /* replace request-uri with NEW contact address */
+  osip_uri_free (msg->req_uri);
+  msg->req_uri = NULL;
+  osip_uri_clone (co->url, &msg->req_uri);
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+
+  if (protocol==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+    }
+  else if (protocol==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  if (0 != osip_strcasecmp (msg->sip_method, "INVITE"))
+    {
+      i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+  } else
+    {
+      i = osip_transaction_init (&tr, ICT, eXosip.j_osip, msg);
+    }
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  if (out_tr == jc->c_out_tr)
+    {
+      /* replace with the new tr */
+      osip_list_add (eXosip.j_transactions, jc->c_out_tr, 0);
+      jc->c_out_tr = tr;
+
+      /* fix dialog issue */
+      if (jd!=NULL)
+      {
+        REMOVE_ELEMENT(jc->c_dialogs, jd);
+        eXosip_dialog_free(jd);
+        jd=NULL;
+      }
+    } else
+    {
+      /* add the new tr for the current dialog */
+      osip_list_add (jd->d_out_trs, tr, 0);
+    }
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_call_send_request_with_credential (eXosip_call_t * jc,
+                                           eXosip_dialog_t * jd,
+                                           osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  int i;
+  int pos;
+
+  if (jc == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  /* remove all previous authentication headers */
+  pos=0;
+  while (!osip_list_eol(msg->authorizations, pos))
+    {
+      osip_authorization_t *auth;
+      auth = (osip_authorization_t*)osip_list_get(msg->authorizations, pos);
+      osip_list_remove(msg->authorizations, pos);
+      osip_authorization_free(auth);
+      pos++;
+    }
+
+  pos=0;
+  while (!osip_list_eol(msg->proxy_authorizations, pos))
+    {
+      osip_proxy_authorization_t *auth;
+      auth = (osip_proxy_authorization_t*)osip_list_get(msg->proxy_authorizations, pos);
+      osip_list_remove(msg->proxy_authorizations, pos);
+      osip_authorization_free(auth);
+      pos++;
+    }
+
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+  i = _eXosip_find_protocol(out_tr->orig_request);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  if (0 != osip_strcasecmp (msg->sip_method, "INVITE"))
+    {
+      i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+  } else
+    {
+      i = osip_transaction_init (&tr, ICT, eXosip.j_osip, msg);
+    }
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  if (out_tr == jc->c_out_tr)
+    {
+      /* replace with the new tr */
+      osip_list_add (eXosip.j_transactions, jc->c_out_tr, 0);
+      jc->c_out_tr = tr;
+
+      /* fix dialog issue */
+      if (jd!=NULL)
+      {
+        REMOVE_ELEMENT(jc->c_dialogs, jd);
+        eXosip_dialog_free(jd);
+        jd=NULL;
+      }
+  } else
+    {
+      /* add the new tr for the current dialog */
+      osip_list_add (jd->d_out_trs, tr, 0);
+    }
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXconf.c b/libs/eXosip2/eXconf.c
new file mode 100644
index 0000000000000000000000000000000000000000..2e89e3ae209df08985e8db69167b099e3d29b9d4
--- /dev/null
+++ b/libs/eXosip2/eXconf.c
@@ -0,0 +1,803 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+#include <osip2/osip_mt.h>
+#include <osip2/osip_condv.h>
+
+extern eXosip_t eXosip;
+
+int ipv6_enable = 0;
+
+static void *_eXosip_thread (void *arg);
+static int _eXosip_execute (void);
+static void _eXosip_keep_alive(void);
+
+void
+eXosip_enable_ipv6 (int _ipv6_enable)
+{
+  ipv6_enable = _ipv6_enable;
+}
+
+void
+eXosip_masquerade_contact (const char *public_address, int port)
+{
+  if (public_address == NULL || public_address[0] == '\0')
+    {
+      memset (eXosip.net_interfaces[0].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[0].net_firewall_ip));
+      memset (eXosip.net_interfaces[1].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[1].net_firewall_ip));
+      memset (eXosip.net_interfaces[2].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[2].net_firewall_ip));
+      return;
+    }
+
+  snprintf (eXosip.net_interfaces[0].net_firewall_ip,
+	    sizeof (eXosip.net_interfaces[0].net_firewall_ip), "%s",
+            public_address);
+  snprintf (eXosip.net_interfaces[1].net_firewall_ip,
+	    sizeof (eXosip.net_interfaces[1].net_firewall_ip), "%s",
+            public_address);
+  snprintf (eXosip.net_interfaces[2].net_firewall_ip,
+	    sizeof (eXosip.net_interfaces[2].net_firewall_ip), "%s",
+            public_address);
+
+  if (port>0)
+    {
+      snprintf (eXosip.net_interfaces[0].net_port,
+		sizeof (eXosip.net_interfaces[0].net_port), "%i", port);
+      snprintf (eXosip.net_interfaces[1].net_port,
+		sizeof (eXosip.net_interfaces[1].net_port), "%i", port);
+      snprintf (eXosip.net_interfaces[2].net_port,
+		sizeof (eXosip.net_interfaces[2].net_port), "%i", port);
+    }
+  return;
+}
+
+int
+eXosip_force_masquerade_contact (const char *public_address)
+{
+  if (public_address == NULL || public_address[0] == '\0')
+    {
+      memset (eXosip.net_interfaces[0].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[0].net_firewall_ip));
+      memset (eXosip.net_interfaces[1].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[1].net_firewall_ip));
+      memset (eXosip.net_interfaces[2].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[2].net_firewall_ip));
+      eXosip.forced_localip = 0;
+      return 0;
+    }
+  eXosip.forced_localip = 1;
+  snprintf (eXosip.net_interfaces[0].net_firewall_ip, 50, "%s", public_address);
+  snprintf (eXosip.net_interfaces[1].net_firewall_ip, 50, "%s", public_address);
+  snprintf (eXosip.net_interfaces[2].net_firewall_ip, 50, "%s", public_address);
+  return 0;
+}
+
+int
+eXosip_guess_localip (int family, char *address, int size)
+{
+  return eXosip_guess_ip_for_via (family, address, size);
+}
+
+int
+eXosip_is_public_address (const char *c_address)
+{
+  return (0 != strncmp (c_address, "192.168", 7)
+          && 0 != strncmp (c_address, "10.", 3)
+          && 0 != strncmp (c_address, "172.16.", 7)
+          && 0 != strncmp (c_address, "172.17.", 7)
+          && 0 != strncmp (c_address, "172.18.", 7)
+          && 0 != strncmp (c_address, "172.19.", 7)
+          && 0 != strncmp (c_address, "172.20.", 7)
+          && 0 != strncmp (c_address, "172.21.", 7)
+          && 0 != strncmp (c_address, "172.22.", 7)
+          && 0 != strncmp (c_address, "172.23.", 7)
+          && 0 != strncmp (c_address, "172.24.", 7)
+          && 0 != strncmp (c_address, "172.25.", 7)
+          && 0 != strncmp (c_address, "172.26.", 7)
+          && 0 != strncmp (c_address, "172.27.", 7)
+          && 0 != strncmp (c_address, "172.28.", 7)
+          && 0 != strncmp (c_address, "172.29.", 7)
+          && 0 != strncmp (c_address, "172.30.", 7)
+          && 0 != strncmp (c_address, "172.31.", 7)
+          && 0 != strncmp (c_address, "169.254", 7));
+}
+
+void
+eXosip_set_user_agent (const char *user_agent)
+{
+  osip_free (eXosip.user_agent);
+  eXosip.user_agent = osip_strdup (user_agent);
+}
+
+void
+eXosip_kill_transaction (osip_list_t * transactions)
+{
+  osip_transaction_t *transaction;
+
+  if (!osip_list_eol (transactions, 0))
+    {
+      /* some transaction are still used by osip,
+         transaction should be released by modules! */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "module sfp: _osip_kill_transaction transaction should be released by modules!\n"));
+    }
+
+  while (!osip_list_eol (transactions, 0))
+    {
+      transaction = osip_list_get (transactions, 0);
+
+      __eXosip_delete_jinfo (transaction);
+      osip_transaction_free (transaction);
+    }
+}
+
+void
+eXosip_quit (void)
+{
+  jauthinfo_t *jauthinfo;
+  eXosip_call_t *jc;
+  eXosip_notify_t *jn;
+  eXosip_subscribe_t *js;
+  eXosip_reg_t *jreg;
+  eXosip_pub_t *jpub;
+  int i;
+  int pos;
+
+  eXosip.j_stop_ua = 1;         /* ask to quit the application */
+  __eXosip_wakeup ();
+  __eXosip_wakeup_event ();
+
+  i = osip_thread_join ((struct osip_thread *) eXosip.j_thread);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: can't terminate thread!\n"));
+    }
+  osip_free ((struct osip_thread *) eXosip.j_thread);
+
+  jpipe_close (eXosip.j_socketctl);
+  jpipe_close (eXosip.j_socketctl_event);
+
+  osip_free (eXosip.user_agent);
+
+  for (jc = eXosip.j_calls; jc != NULL; jc = eXosip.j_calls)
+    {
+      REMOVE_ELEMENT (eXosip.j_calls, jc);
+      eXosip_call_free (jc);
+    }
+
+  for (js = eXosip.j_subscribes; js != NULL; js = eXosip.j_subscribes)
+    {
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+    }
+
+  for (jn = eXosip.j_notifies; jn != NULL; jn = eXosip.j_notifies)
+    {
+      REMOVE_ELEMENT (eXosip.j_notifies, jn);
+      eXosip_notify_free (jn);
+    }
+
+  osip_mutex_destroy ((struct osip_mutex *) eXosip.j_mutexlock);
+  osip_cond_destroy ((struct osip_cond *) eXosip.j_cond);
+
+  if (eXosip.net_interfaces[0].net_socket)
+    {
+      close (eXosip.net_interfaces[0].net_socket);
+      eXosip.net_interfaces[0].net_socket = -1;
+    }
+  if (eXosip.net_interfaces[1].net_socket)
+    {
+      close (eXosip.net_interfaces[1].net_socket);
+      eXosip.net_interfaces[1].net_socket = -1;
+    }
+  if (eXosip.net_interfaces[2].net_socket)
+    {
+      close (eXosip.net_interfaces[2].net_socket);
+      eXosip.net_interfaces[2].net_socket = -1;
+    }
+
+  for (pos=0; pos<EXOSIP_MAX_SOCKETS; pos++)
+    {
+      if (eXosip.net_interfaces[0].net_socket_tab[pos].socket!=0)
+	close (eXosip.net_interfaces[0].net_socket_tab[pos].socket);
+      if (eXosip.net_interfaces[1].net_socket_tab[pos].socket!=0)
+	close (eXosip.net_interfaces[1].net_socket_tab[pos].socket);
+      if (eXosip.net_interfaces[2].net_socket_tab[pos].socket!=0)
+	close (eXosip.net_interfaces[2].net_socket_tab[pos].socket);
+    }
+
+  for (jreg = eXosip.j_reg; jreg != NULL; jreg = eXosip.j_reg)
+    {
+      REMOVE_ELEMENT (eXosip.j_reg, jreg);
+      eXosip_reg_free (jreg);
+    }
+
+  for (jpub = eXosip.j_pub; jpub != NULL; jpub = eXosip.j_pub)
+    {
+      REMOVE_ELEMENT (eXosip.j_pub, jpub);
+      _eXosip_pub_free (jpub);
+    }
+
+  while (!osip_list_eol (eXosip.j_transactions, 0))
+    {
+      osip_transaction_t *tr =
+        (osip_transaction_t *) osip_list_get (eXosip.j_transactions, 0);
+      if (tr->state == IST_TERMINATED || tr->state == ICT_TERMINATED
+          || tr->state == NICT_TERMINATED || tr->state == NIST_TERMINATED)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a terminated transaction\n"));
+          osip_list_remove (eXosip.j_transactions, 0);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+      } else
+        {
+          osip_list_remove (eXosip.j_transactions, 0);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+        }
+    }
+
+  osip_free (eXosip.j_transactions);
+
+  eXosip_kill_transaction (eXosip.j_osip->osip_ict_transactions);
+  eXosip_kill_transaction (eXosip.j_osip->osip_nict_transactions);
+  eXosip_kill_transaction (eXosip.j_osip->osip_ist_transactions);
+  eXosip_kill_transaction (eXosip.j_osip->osip_nist_transactions);
+  osip_release (eXosip.j_osip);
+
+  {
+    eXosip_event_t *ev;
+
+    for (ev = osip_fifo_tryget (eXosip.j_events); ev != NULL;
+         ev = osip_fifo_tryget (eXosip.j_events))
+      eXosip_event_free (ev);
+  }
+
+  osip_fifo_free (eXosip.j_events);
+
+  for (jauthinfo = eXosip.authinfos; jauthinfo != NULL;
+       jauthinfo = eXosip.authinfos)
+    {
+      REMOVE_ELEMENT (eXosip.authinfos, jauthinfo);
+      osip_free (jauthinfo);
+    }
+
+  return;
+}
+
+int eXosip_set_socket(int transport, int socket, int port)
+{
+  if (eXosip.net_interfaces[0].net_socket>0)
+    close(eXosip.net_interfaces[0].net_socket);
+
+  eXosip.net_interfaces[0].net_socket = socket;
+  snprintf (eXosip.net_interfaces[0].net_port,
+	    sizeof (eXosip.net_interfaces[0].net_port), "%i", port);
+
+  eXosip.j_thread = (void *) osip_thread_create (20000, _eXosip_thread, NULL);
+  if (eXosip.j_thread == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: Cannot start thread!\n"));
+      return -1;
+    }
+  return 0;
+}
+
+#ifdef IPV6_V6ONLY
+int setsockopt_ipv6only (int sock)
+{
+  int on = 1;
+
+  return setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+		    (char *)&on, sizeof(on));
+}
+#endif	/* IPV6_V6ONLY */
+
+int
+eXosip_listen_addr (int transport, const char *addr, int port, int family,
+		    int secure)
+{
+  int res;
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo *curinfo;
+  const char *node = addr;
+  int sock = -1;
+  struct eXosip_net *net_int;
+  char localip[256];
+
+  if (transport==IPPROTO_UDP)
+    net_int = &eXosip.net_interfaces[0];
+  else if (transport==IPPROTO_TCP)
+    net_int = &eXosip.net_interfaces[1];
+  else if (transport==IPPROTO_TCP && secure != 0)
+    net_int = &eXosip.net_interfaces[2];
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unknown protocol (use IPPROTO_UDP or IPPROTO_TCP!\n"));
+      return -1;
+    }
+
+  if (eXosip.http_port)
+  {
+      /* USE TUNNEL CAPABILITY */
+      transport=IPPROTO_TCP;
+  }
+
+  if (port < 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: port must be higher than 0!\n"));
+      return -1;
+    }
+
+  net_int->net_ip_family = family;
+  if (family == AF_INET6)
+    {
+      ipv6_enable = 1;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "IPv6 is enabled. Pls report bugs\n"));
+    }
+
+  eXosip_guess_localip (net_int->net_ip_family, localip,
+			sizeof (localip));
+  if (localip[0] == '\0')
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No ethernet interface found!\n"));
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: using 127.0.0.1 (debug mode)!\n"));
+      /* we should always fallback on something. The linphone user will surely
+         start linphone BEFORE setting its dial up connection. */
+    }
+
+  if (!node) {
+    node = ipv6_enable ? "::" : "0.0.0.0";
+  }
+
+
+  res = eXosip_get_addrinfo(&addrinfo, node, port, transport);
+  if (res)
+    return -1;
+    
+  for (curinfo = addrinfo; curinfo; curinfo = curinfo->ai_next)
+    {
+      socklen_t len;
+
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		   "eXosip: address for protocol %d (search %d)\n",
+		   curinfo->ai_protocol, transport));
+      if (curinfo->ai_protocol && curinfo->ai_protocol != transport)	
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Skipping protocol %d\n",
+		       curinfo->ai_protocol));
+	  continue;
+	}
+
+      sock = (int)socket(curinfo->ai_family, curinfo->ai_socktype,
+			 curinfo->ai_protocol);
+      if (sock < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot create socket!\n",
+		       strerror(errno)));
+	  continue;
+	}
+
+    if (eXosip.http_port)
+    {
+        break;
+    }
+
+      if (curinfo->ai_family == AF_INET6)
+	{
+#ifdef IPV6_V6ONLY
+	  if (setsockopt_ipv6only(sock))
+	    {
+	      close(sock);
+	      sock = -1;
+	      OSIP_TRACE (osip_trace
+			  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+			   "eXosip: Cannot set socket option!\n",
+			   strerror(errno)));
+	      continue;
+	    }
+#endif	/* IPV6_V6ONLY */
+	}
+      
+      res = bind (sock, curinfo->ai_addr, curinfo->ai_addrlen);
+      if (res < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot bind socket node:%s family:%d %s\n",
+		       node, curinfo->ai_family, strerror(errno)));
+	  close(sock);
+	  sock = -1;
+	  continue;
+	}
+      len = sizeof(net_int->ai_addr);
+      res = getsockname(sock, (struct sockaddr*)&net_int->ai_addr,
+			&len );
+      if (res!=0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot get socket name (%s)\n",
+		       strerror(errno)));
+	  memcpy(&net_int->ai_addr, curinfo->ai_addr, curinfo->ai_addrlen);
+	}
+
+      if (transport!=IPPROTO_UDP)
+	{
+	  res = listen(sock, SOMAXCONN);
+	  if (res < 0)
+	    {
+	      OSIP_TRACE (osip_trace
+			  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot bind socket node:%s family:%d %s\n",
+			   node, curinfo->ai_family, strerror(errno)));
+	      close(sock);
+	      sock = -1;
+	      continue;
+	    }
+        }
+      
+      break;
+    }
+
+  freeaddrinfo(addrinfo);
+
+  if (sock < 0)
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "eXosip: Cannot bind on port: %i\n",
+		   port));
+      return -1;
+    }
+
+  if (eXosip.http_port)
+      net_int->net_protocol = IPPROTO_UDP;
+  else
+      net_int->net_protocol = transport;
+  net_int->net_socket = sock;
+
+  if (port==0)
+    {
+      /* get port number from socket */
+      if (ipv6_enable == 0)
+	port = ntohs (((struct sockaddr_in*)&net_int->ai_addr)->sin_port);
+      else
+	port = ntohs (((struct sockaddr_in6*)&net_int->ai_addr)->sin6_port);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "eXosip: Binding on port %i!\n", port));
+    }
+
+  snprintf (net_int->net_port,
+	    sizeof (net_int->net_port) - 1, "%i", port);
+
+
+
+  if (eXosip.http_port)
+  {
+        /* only ipv4 */
+        struct sockaddr_in	_addr;
+	    char http_req[2048];
+	    char http_reply[2048];
+        int len;
+        _addr.sin_port = (unsigned short) htons(eXosip.http_port);
+        _addr.sin_addr.s_addr = inet_addr(eXosip.http_proxy);
+		_addr.sin_family = PF_INET;
+
+		if (connect(net_int->net_socket, (struct sockaddr *) &_addr, sizeof(_addr)) == -1)
+		{
+            OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                  "eXosip: Failed to connect to http server on %s:%i!\n", eXosip.http_proxy, port));
+			return -1;
+		}
+
+        sprintf(http_req, "GET / HTTP/1.1\r\nUdpHost: %s:%d\r\n\r\n", eXosip.http_outbound_proxy, 5060);
+
+		len = send(net_int->net_socket, http_req, (int) strlen(http_req), 0);
+
+		if (len < 0)
+			return -1;
+
+		osip_usleep(50000);
+
+		if ((len = recv(net_int->net_socket, http_reply, sizeof(http_reply), 0)) > 0)
+			http_reply[len] = '\0';
+		else
+			return -1;
+
+		if (strncmp(http_reply, "HTTP/1.0 200 OK\r\n", 17) == 0 || strncmp(http_reply, "HTTP/1.1 200 OK\r\n", 17) == 0)
+        {
+        }
+		else
+			return -1;
+  }
+
+  eXosip.j_thread = (void *) osip_thread_create (20000, _eXosip_thread, NULL);
+  if (eXosip.j_thread == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: Cannot start thread!\n"));
+      return -1;
+    }
+  return 0;
+}
+
+int
+eXosip_init (void)
+{
+  osip_t *osip;
+
+  memset (&eXosip, 0, sizeof (eXosip));
+
+#ifdef WIN32
+  /* Initializing windows socket library */
+  {
+    WORD wVersionRequested;
+    WSADATA wsaData;
+    int i;
+
+    wVersionRequested = MAKEWORD (1, 1);
+    i = WSAStartup (wVersionRequested, &wsaData);
+    if (i != 0)
+      {
+        OSIP_TRACE (osip_trace
+                    (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                     "eXosip: Unable to initialize WINSOCK, reason: %d\n", i));
+        /* return -1; It might be already initilized?? */
+      }
+  }
+#endif
+
+  eXosip.user_agent = osip_strdup ("eXosip/" EXOSIP_VERSION);
+
+  eXosip.j_calls = NULL;
+  eXosip.j_stop_ua = 0;
+  eXosip.j_thread = NULL;
+  eXosip.j_transactions = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (eXosip.j_transactions);
+  eXosip.j_reg = NULL;
+
+  eXosip.j_cond = (struct osip_cond *) osip_cond_init ();
+
+  eXosip.j_mutexlock = (struct osip_mutex *) osip_mutex_init ();
+
+  if (-1 == osip_init (&osip))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: Cannot initialize osip!\n"));
+      return -1;
+    }
+
+  osip_set_application_context (osip, &eXosip);
+
+  eXosip_set_callbacks (osip);
+
+  eXosip.j_osip = osip;
+
+  /* open a TCP socket to wake up the application when needed. */
+  eXosip.j_socketctl = jpipe ();
+  if (eXosip.j_socketctl == NULL)
+    return -1;
+
+  eXosip.j_socketctl_event = jpipe ();
+  if (eXosip.j_socketctl_event == NULL)
+    return -1;
+
+  /* To be changed in osip! */
+  eXosip.j_events = (osip_fifo_t *) osip_malloc (sizeof (osip_fifo_t));
+  osip_fifo_init (eXosip.j_events);
+
+  return 0;
+}
+
+
+static int
+_eXosip_execute (void)
+{
+  struct timeval lower_tv;
+  int i;
+
+  osip_timers_gettimeout (eXosip.j_osip, &lower_tv);
+  if (lower_tv.tv_sec > 15)
+    {
+      lower_tv.tv_sec = 15;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "eXosip: Reseting timer to 15s before waking up!\n"));
+  } else
+    {
+        /*  add a small amount of time on windows to avoid
+            waking up too early. (probably a bad time precision) */
+        if (lower_tv.tv_usec<900000)
+            lower_tv.tv_usec = 100000; /* add 10ms */
+        else 
+        {
+            lower_tv.tv_usec = 10000; /* add 10ms */
+            lower_tv.tv_sec++;
+        }
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "eXosip: timer sec:%i usec:%i!\n",
+                   lower_tv.tv_sec, lower_tv.tv_usec));
+    }
+  i = eXosip_read_message (1, lower_tv.tv_sec, lower_tv.tv_usec);
+
+  if (i == -2)
+    {
+      return -2;
+    }
+
+  eXosip_lock ();
+  osip_timers_ict_execute (eXosip.j_osip);
+  osip_timers_nict_execute (eXosip.j_osip);
+  osip_timers_ist_execute (eXosip.j_osip);
+  osip_timers_nist_execute (eXosip.j_osip);
+
+  osip_ict_execute (eXosip.j_osip);
+  osip_nict_execute (eXosip.j_osip);
+  osip_ist_execute (eXosip.j_osip);
+  osip_nist_execute (eXosip.j_osip);
+
+  /* free all Calls that are in the TERMINATED STATE? */
+  eXosip_release_terminated_calls ();
+  eXosip_release_terminated_registrations ();
+
+  eXosip_unlock ();
+
+
+  if (eXosip.keep_alive>0)
+  {
+      _eXosip_keep_alive();
+  }
+
+  return 0;
+}
+
+int eXosip_set_option(eXosip_option opt, void *value)
+{
+    int val;
+    char *tmp;
+	switch (opt) {
+		case EXOSIP_OPT_UDP_KEEP_ALIVE:
+            val = *((int*)value);
+            eXosip.keep_alive = val; /* value in ms */
+            break;
+		case EXOSIP_OPT_UDP_LEARN_PORT:
+            val = *((int*)value);
+            eXosip.learn_port = val; /* value in ms */
+            break;
+		case EXOSIP_OPT_SET_HTTP_TUNNEL_PORT:
+            val = *((int*)value);
+            eXosip.http_port = val; /* value in ms */
+            break;
+		case EXOSIP_OPT_SET_HTTP_TUNNEL_PROXY:
+            tmp = (char*)value;
+            memset(eXosip.http_proxy, '\0', sizeof(eXosip.http_proxy));
+            if (tmp!=NULL && tmp[0]!='\0')
+                strncpy(eXosip.http_proxy, tmp, sizeof(eXosip.http_proxy)); /* value in proxy:port */
+            break;
+		case EXOSIP_OPT_SET_HTTP_OUTBOUND_PROXY:
+            tmp = (char*)value;
+            memset(eXosip.http_outbound_proxy, '\0', sizeof(eXosip.http_outbound_proxy));
+            if (tmp!=NULL && tmp[0]!='\0')
+                strncpy(eXosip.http_outbound_proxy, tmp, sizeof(eXosip.http_outbound_proxy)); /* value in proxy:port */
+            break;
+            
+    }
+    return 0;
+}
+
+static void
+_eXosip_keep_alive(void)
+{
+    static struct timeval mtimer = { 0, 0 };
+
+    eXosip_reg_t *jr;
+    struct eXosip_net *net;
+    char buf[4] = "jaK";
+    struct timeval now;
+    osip_gettimeofday (&now, NULL);
+
+    if (mtimer.tv_sec==0 && mtimer.tv_usec==0)
+    {
+        /* first init */
+        osip_gettimeofday (&mtimer, NULL);
+	    add_gettimeofday (&mtimer, eXosip.keep_alive);
+    }
+
+    if (osip_timercmp (&now, &mtimer, <))
+    {
+        return; /* not yet time */
+    }
+
+    /* reset timer */
+    osip_gettimeofday (&mtimer, NULL);
+	add_gettimeofday (&mtimer, eXosip.keep_alive);
+
+    net = &eXosip.net_interfaces[0];
+    if (net == NULL)
+    {
+        return ;
+    }
+
+    for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+        if (jr->len>0)
+        {
+            if (sendto (net->net_socket, (const void *) buf, 4, 0,	 
+                (struct sockaddr *) &(jr->addr), jr->len )>0)
+            {
+                OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                            "eXosip: Keep Alive sent on UDP!\n"));
+            }
+        }
+    }
+}
+
+void *
+_eXosip_thread (void *arg)
+{
+  int i;
+
+  while (eXosip.j_stop_ua == 0)
+    {
+      i = _eXosip_execute ();
+      if (i == -2)
+        osip_thread_exit ();
+    }
+  osip_thread_exit ();
+  return NULL;
+}
+
diff --git a/libs/eXosip2/eXinsubscription_api.c b/libs/eXosip2/eXinsubscription_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..973cfef6c10b5ea71f8a69224ebdf99377ea26db
--- /dev/null
+++ b/libs/eXosip2/eXinsubscription_api.c
@@ -0,0 +1,567 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+static int _eXosip_insubscription_transaction_find (int tid,
+                                                    eXosip_notify_t ** jn,
+                                                    eXosip_dialog_t ** jd,
+                                                    osip_transaction_t ** tr);
+
+static int
+_eXosip_insubscription_transaction_find (int tid, eXosip_notify_t ** jn,
+                                         eXosip_dialog_t ** jd,
+                                         osip_transaction_t ** tr)
+{
+  for (*jn = eXosip.j_notifies; *jn != NULL; *jn = (*jn)->next)
+    {
+      if ((*jn)->n_inc_tr != NULL && (*jn)->n_inc_tr->transactionid == tid)
+        {
+          *tr = (*jn)->n_inc_tr;
+          *jd = (*jn)->n_dialogs;
+          return 0;
+        }
+      if ((*jn)->n_out_tr != NULL && (*jn)->n_out_tr->transactionid == tid)
+        {
+          *tr = (*jn)->n_out_tr;
+          *jd = (*jn)->n_dialogs;
+          return 0;
+        }
+      for (*jd = (*jn)->n_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          osip_transaction_t *transaction;
+          int pos = 0;
+
+          while (!osip_list_eol ((*jd)->d_inc_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_inc_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+
+          pos = 0;
+          while (!osip_list_eol ((*jd)->d_out_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_out_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+        }
+    }
+  *jd = NULL;
+  *jn = NULL;
+  return -1;
+}
+
+int
+eXosip_insubscription_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+  osip_transaction_t *tr = NULL;
+
+  *answer = NULL;
+
+  if (tid > 0)
+    {
+      _eXosip_insubscription_transaction_find (tid, &jn, &jd, &tr);
+    }
+  if (tr == NULL || jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      return -1;
+    }
+
+  if (status < 101 || status > 699)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: wrong status code (101<status<699)\n"));
+      return -1;
+    }
+
+  if (jd != NULL)
+    i =
+      _eXosip_build_response_default (answer, jd->d_dialog, status,
+                                      tr->orig_request);
+  else
+    i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for %s\n",
+                              tr->orig_request->sip_method));
+      return -1;
+    }
+
+  if (status >= 200 && status <= 299)
+    _eXosip_notify_add_expires_in_2XX_for_subscribe (jn, *answer);
+
+  if (status < 300)
+    i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+
+  return 0;
+}
+
+int
+eXosip_insubscription_send_answer (int tid, int status, osip_message_t * answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+
+  if (tid > 0)
+    {
+      _eXosip_insubscription_transaction_find (tid, &jn, &jd, &tr);
+    }
+  if (jd == NULL || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "SUBSCRIBE"))
+        {
+          if (status >= 101 && status <= 199)
+            {
+          } else if (status >= 300 && status <= 699)
+            {
+          } else
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: Wrong parameter?\n"));
+              return -1;
+            }
+        }
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "SUBSCRIBE"))
+        {
+          if (status < 200)
+            i = _eXosip_insubscription_answer_1xx (jn, jd, status);
+          else
+            i = _eXosip_insubscription_answer_3456xx (jn, jd, status);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot send response!\n"));
+              return -1;
+            }
+      } else
+        {
+          /* TODO */
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: a response must be given!\n"));
+          return -1;
+        }
+      return 0;
+  } else
+    {
+      i = 0;
+    }
+
+  if (0 == osip_strcasecmp (tr->orig_request->sip_method, "SUBSCRIBE"))
+    {
+      if (MSG_IS_STATUS_1XX (answer))
+        {
+      } else if (MSG_IS_STATUS_2XX (answer))
+        {
+          eXosip_dialog_set_200ok (jd, answer);
+          osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+      } else if (answer->status_code >= 300 && answer->status_code <= 699)
+        {
+          i = 0;
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (101<status<699)\n"));
+	  osip_message_free (answer);
+          return -1;
+        }
+      if (i != 0)
+        {
+	  osip_message_free (answer);
+	  return -1;
+	}
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  eXosip_update ();
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_insubscription_build_notify (int did, int subscription_status,
+                                    int subscription_reason,
+                                    osip_message_t ** request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+
+  char subscription_state[50];
+  char *tmp;
+  int now = time (NULL);
+
+  int i;
+
+  *request = NULL;
+  if (did > 0)
+    {
+      eXosip_notify_dialog_find (did, &jn, &jd);
+    }
+  if (jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      return -1;
+    }
+
+  i = eXosip_insubscription_build_request (did, "NOTIFY", request);
+  if (i != 0)
+    {
+      return i;
+    }
+#ifndef SUPPORT_MSN
+  if (subscription_status == EXOSIP_SUBCRSTATE_PENDING)
+    osip_strncpy (subscription_state, "pending;expires=", 16);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_ACTIVE)
+    osip_strncpy (subscription_state, "active;expires=", 15);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_TERMINATED)
+    {
+      if (subscription_reason == DEACTIVATED)
+        osip_strncpy (subscription_state, "terminated;reason=deactivated", 29);
+      else if (subscription_reason == PROBATION)
+        osip_strncpy (subscription_state, "terminated;reason=probation", 27);
+      else if (subscription_reason == REJECTED)
+        osip_strncpy (subscription_state, "terminated;reason=rejected", 26);
+      else if (subscription_reason == TIMEOUT)
+        osip_strncpy (subscription_state, "terminated;reason=timeout", 25);
+      else if (subscription_reason == GIVEUP)
+        osip_strncpy (subscription_state, "terminated;reason=giveup", 24);
+      else if (subscription_reason == NORESOURCE)
+        osip_strncpy (subscription_state, "terminated;reason=noresource", 28);
+      else
+        osip_strncpy (subscription_state, "terminated;reason=noresource", 28);
+  } else
+    osip_strncpy (subscription_state, "pending;expires=", 16);
+
+  tmp = subscription_state + strlen (subscription_state);
+  if (subscription_status != EXOSIP_SUBCRSTATE_TERMINATED)
+    sprintf (tmp, "%i", jn->n_ss_expires - now);
+  osip_message_set_header (*request, "Subscription-State", subscription_state);
+#endif
+
+  return 0;
+}
+
+int
+eXosip_insubscription_build_request (int did, const char *method,
+                                     osip_message_t ** request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+
+  osip_transaction_t *transaction;
+  char *transport;
+  int i;
+
+  *request = NULL;
+  if (method == NULL || method[0] == '\0')
+    return -1;
+
+  if (did > 0)
+    {
+      eXosip_notify_dialog_find (did, &jn, &jd);
+    }
+  if (jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_notify (jn, jd);
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+        return -1;
+    }
+
+  transport = NULL;
+  if (transaction==NULL)
+    transaction = jn->n_inc_tr;
+
+  if (transaction!=NULL && transaction->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(transaction->orig_request);
+
+  transaction = NULL;
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, transport);
+  if (i != 0)
+    return -2;
+
+  return 0;
+}
+
+int
+eXosip_insubscription_send_request (int did, osip_message_t * request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  if (request == NULL)
+    return -1;
+
+  if (did > 0)
+    {
+      eXosip_notify_dialog_find (did, &jn, &jd);
+    }
+  if (jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      osip_message_free (request);
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_notify (jn, jd);
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+        {
+          osip_message_free (request);
+          return -1;
+        }
+      transaction = NULL;
+    }
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, request);
+  if (i != 0)
+    {
+      osip_message_free (request);
+      return -1;
+    }
+
+  osip_list_add (jd->d_out_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, NULL, jn));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_insubscription_send_request_with_credential (eXosip_notify_t * jn,
+                                                     eXosip_dialog_t * jd,
+                                                     osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  int i;
+
+  if (jn == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+
+  if (out_tr == NULL)
+    {
+      out_tr = eXosip_find_last_out_notify (jn, jd);
+    }
+
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+
+  i = _eXosip_find_protocol(out_tr->orig_request);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  /* add the new tr for the current dialog */
+  osip_list_add (jd->d_out_trs, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (NULL, jd, NULL, jn));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXmessage_api.c b/libs/eXosip2/eXmessage_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..c21b649fffc954576478036e5c2fcabc3b35fdae
--- /dev/null
+++ b/libs/eXosip2/eXmessage_api.c
@@ -0,0 +1,196 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_message_build_request (osip_message_t ** message, const char *method,
+                              const char *to, const char *from, const char *route)
+{
+  int i;
+
+  *message = NULL;
+  if (method != NULL && *method == '\0')
+    return -1;
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (from != NULL && *from == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = generating_request_out_of_dialog (message, method, to, "UDP", from, route);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_message_send_request (osip_message_t * message)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, message);
+  if (i != 0)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (message);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_message_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  osip_transaction_t *tr = NULL;
+  int i = -1;
+
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+  if (status > 100 && status < 200)
+    {
+#if 0
+      /* TODO: not implemented */
+      i = _eXosip_build_response_default (response, NULL, code, tr->orig_request);
+#endif
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: status code 1xx for message not implemented (use 200<status<699)\n"));
+      return -1;
+  } else if (status > 199 && status < 300)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else if (status > 300 && status < 699)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: wrong status code (200<status<699)\n"));
+      return -1;
+    }
+  if (i != 0)
+    return -1;
+  return 0;
+}
+
+int
+eXosip_message_send_answer (int tid, int status, osip_message_t * answer)
+{
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+  int i = -1;
+
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No MESSAGE transaction found\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (status > 100 && status < 200)
+        {
+#if 0
+          /* TODO: not implemented */
+          i =
+            _eXosip_build_response_default (response, NULL, code,
+                                            tr->orig_request);
+#endif
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: status code 1xx for message not implemented (use 200<status<699)\n"));
+          return -1;
+      } else if (status > 199 && status < 300)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else if (status > 300 && status < 699)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (200<status<699)\n"));
+          return -1;
+        }
+      if (i != 0)
+        return -1;
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXoptions_api.c b/libs/eXosip2/eXoptions_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..e8c1ec6406985e6aa6745085bc7cb0ba728c05f6
--- /dev/null
+++ b/libs/eXosip2/eXoptions_api.c
@@ -0,0 +1,200 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_options_build_request (osip_message_t ** options, const char *to,
+                              const char *from, const char *route)
+{
+  int i;
+
+  *options = NULL;
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (from != NULL && *from == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = generating_request_out_of_dialog (options, "OPTIONS", to, "UDP", from,
+                                        route);
+  if (i != 0)
+    return -1;
+
+  /* after this delay, we should send a CANCEL */
+  osip_message_set_expires (*options, "120");
+
+  /* osip_message_set_organization(*invite, "Jack's Org"); */
+  return 0;
+}
+
+int
+eXosip_options_send_request (osip_message_t * options)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, options);
+  if (i != 0)
+    {
+      osip_message_free (options);
+      return -1;
+    }
+
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (options);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_options_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  osip_transaction_t *tr = NULL;
+  int i = -1;
+
+  *answer = NULL;
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+  if (status > 100 && status < 200)
+    {
+#if 0
+      /* TODO: not implemented */
+      i = _eXosip_build_response_default (response, NULL, code, tr->orig_request);
+#endif
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: status code 1xx for options not implemented (use 200<status<699)\n"));
+      return -1;
+  } else if (status > 199 && status < 300)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else if (status > 300 && status < 699)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: wrong status code (200<status<699)\n"));
+      return -1;
+    }
+  if (i != 0)
+    return -1;
+  return 0;
+}
+
+int
+eXosip_options_send_answer (int tid, int status, osip_message_t * answer)
+{
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+  int i = -1;
+
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No OPTIONS transaction found\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (status > 100 && status < 200)
+        {
+#if 0
+          /* TODO: not implemented */
+          i =
+            _eXosip_build_response_default (response, NULL, code,
+                                            tr->orig_request);
+#endif
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: status code 1xx for options not implemented (use 200<status<699)\n"));
+          return -1;
+      } else if (status > 199 && status < 300)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else if (status > 300 && status < 699)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (200<status<699)\n"));
+          return -1;
+        }
+      if (i != 0)
+        return -1;
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip.c b/libs/eXosip2/eXosip.c
new file mode 100644
index 0000000000000000000000000000000000000000..c93f3cf3a59976f24f184d8387875b522bd15b87
--- /dev/null
+++ b/libs/eXosip2/eXosip.c
@@ -0,0 +1,760 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+
+
+#ifndef  WIN32
+#include <memory.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <unistd.h>
+#endif
+
+/* Private functions */
+static jauthinfo_t *eXosip_find_authentication_info (const char *username,
+                                                     const char *realm);
+
+eXosip_t eXosip;
+
+void
+__eXosip_wakeup (void)
+{
+  jpipe_write (eXosip.j_socketctl, "w", 1);
+}
+
+void
+__eXosip_wakeup_event (void)
+{
+  jpipe_write (eXosip.j_socketctl_event, "w", 1);
+}
+
+
+int
+eXosip_lock (void)
+{
+  return osip_mutex_lock ((struct osip_mutex *) eXosip.j_mutexlock);
+}
+
+int
+eXosip_unlock (void)
+{
+  return osip_mutex_unlock ((struct osip_mutex *) eXosip.j_mutexlock);
+}
+
+int
+eXosip_transaction_find (int tid, osip_transaction_t ** transaction)
+{
+  int pos = 0;
+
+  *transaction = NULL;
+  while (!osip_list_eol (eXosip.j_transactions, pos))
+    {
+      osip_transaction_t *tr;
+
+      tr = (osip_transaction_t *) osip_list_get (eXosip.j_transactions, pos);
+      if (tr->transactionid == tid)
+        {
+          *transaction = tr;
+          return 0;
+        }
+      pos++;
+    }
+  return -1;
+}
+
+void
+eXosip_automatic_action (void)
+{
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_dialog_t *jd;
+  eXosip_notify_t *jn;
+
+  eXosip_reg_t *jr;
+  int now;
+
+  now = time (NULL);
+
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      if (jc->c_id < 1)
+        {
+      } else if (jc->c_dialogs == NULL || jc->c_dialogs->d_dialog == NULL)
+        {
+          /* an EARLY dialog may have failed with 401,407 or 3Xx */
+
+          osip_transaction_t *out_tr = NULL;
+
+          out_tr = jc->c_out_tr;
+
+          if (out_tr != NULL
+              && (out_tr->state == ICT_TERMINATED
+                  || out_tr->state == NICT_TERMINATED
+                  || out_tr->state == ICT_COMPLETED
+                  || out_tr->state == NICT_COMPLETED) &&
+              now - out_tr->birth_time < 120 &&
+              out_tr->orig_request != NULL &&
+              out_tr->last_response != NULL &&
+              (out_tr->last_response->status_code == 401
+               || out_tr->last_response->status_code == 407))
+            {
+              /* retry with credential */
+              if (jc->c_retry < 3)
+                {
+                  int i;
+
+                  i = _eXosip_call_send_request_with_credential (jc, NULL, out_tr);
+                  if (i != 0)
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                   "eXosip: could not clone msg for authentication\n"));
+                    }
+                  jc->c_retry++;
+                }
+          } else if (out_tr != NULL
+                     && (out_tr->state == ICT_TERMINATED
+                         || out_tr->state == NICT_TERMINATED
+                         || out_tr->state == ICT_COMPLETED
+                         || out_tr->state == NICT_COMPLETED) &&
+                     now - out_tr->birth_time < 120 &&
+                     out_tr->orig_request != NULL &&
+                     out_tr->last_response != NULL &&
+                     (out_tr->last_response->status_code >= 300
+                      && out_tr->last_response->status_code <= 399))
+            {
+              /* retry with credential */
+              int i;
+
+              i = _eXosip_call_redirect_request (jc, NULL, out_tr);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: could not clone msg for redirection\n"));
+                }
+            }
+        }
+
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog == NULL)     /* finished call */
+            {
+          } else
+            {
+              osip_transaction_t *out_tr = NULL;
+
+              out_tr = osip_list_get (jd->d_out_trs, 0);
+              if (out_tr == NULL)
+                out_tr = jc->c_out_tr;
+
+              if (out_tr != NULL
+                  && (out_tr->state == ICT_TERMINATED
+                      || out_tr->state == NICT_TERMINATED
+                      || out_tr->state == ICT_COMPLETED
+                      || out_tr->state == NICT_COMPLETED) &&
+                  now - out_tr->birth_time < 120 &&
+                  out_tr->orig_request != NULL &&
+                  out_tr->last_response != NULL &&
+                  (out_tr->last_response->status_code == 401
+                   || out_tr->last_response->status_code == 407))
+                {
+                  /* retry with credential */
+                  if (jd->d_retry < 3)
+                    {
+                      int i;
+
+                      i =
+                        _eXosip_call_send_request_with_credential (jc, jd, out_tr);
+                      if (i != 0)
+                        {
+                          OSIP_TRACE (osip_trace
+                                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                       "eXosip: could not clone msg for authentication\n"));
+                        }
+                      jd->d_retry++;
+                    }
+              } else if (out_tr != NULL
+                         && (out_tr->state == ICT_TERMINATED
+                             || out_tr->state == NICT_TERMINATED
+                             || out_tr->state == ICT_COMPLETED
+                             || out_tr->state == NICT_COMPLETED) &&
+                         now - out_tr->birth_time < 120 &&
+                         out_tr->orig_request != NULL &&
+                         out_tr->last_response != NULL &&
+                         (out_tr->last_response->status_code >= 300
+                          && out_tr->last_response->status_code <= 399))
+                {
+                  /* retry with credential */
+                  int i;
+
+                  i = _eXosip_call_redirect_request (jc, jd, out_tr);
+                  if (i != 0)
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                   "eXosip: could not clone msg for redirection\n"));
+                    }
+                }
+            }
+        }
+    }
+
+  for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+    {
+      if (js->s_id < 1)
+        {
+      } else if (js->s_dialogs == NULL)
+        {
+          osip_transaction_t *out_tr = NULL;
+
+          out_tr = js->s_out_tr;
+
+          if (out_tr != NULL
+              && (out_tr->state == NICT_TERMINATED
+                  || out_tr->state == NICT_COMPLETED) &&
+              now - out_tr->birth_time < 120 &&
+              out_tr->orig_request != NULL &&
+              out_tr->last_response != NULL &&
+              (out_tr->last_response->status_code == 401
+               || out_tr->last_response->status_code == 407))
+            {
+              /* retry with credential */
+              if (js->s_retry < 3)
+                {
+                  int i;
+
+                  i =
+                    _eXosip_subscribe_send_request_with_credential (js, NULL,
+                                                                    out_tr);
+                  if (i != 0)
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                   "eXosip: could not clone msg for authentication\n"));
+                    }
+                  js->s_retry++;
+                }
+            }
+        }
+
+      for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id >= 1)
+                {
+                  osip_transaction_t *out_tr = NULL;
+
+                  out_tr = osip_list_get (jd->d_out_trs, 0);
+                  if (out_tr == NULL)
+                    out_tr = js->s_out_tr;
+
+                  if (out_tr != NULL
+                      && (out_tr->state == NICT_TERMINATED
+                          || out_tr->state == NICT_COMPLETED) &&
+                      now - out_tr->birth_time < 120 &&
+                      out_tr->orig_request != NULL &&
+                      out_tr->last_response != NULL &&
+                      (out_tr->last_response->status_code == 401
+                       || out_tr->last_response->status_code == 407))
+                    {
+                      /* retry with credential */
+                      if (jd->d_retry < 3)
+                        {
+                          int i;
+
+                          i =
+                            _eXosip_subscribe_send_request_with_credential
+                            (js, jd, out_tr);
+                          if (i != 0)
+                            {
+                              OSIP_TRACE (osip_trace
+                                          (__FILE__, __LINE__, OSIP_ERROR,
+                                           NULL,
+                                           "eXosip: could not clone suscbribe for authentication\n"));
+                            }
+                          jd->d_retry++;
+                        }
+                  } else if (js->s_reg_period == 0 || out_tr == NULL)
+                    {
+                  } else if (now - out_tr->birth_time > js->s_reg_period - 60)
+                    {           /* will expires in 60 sec: send refresh! */
+                      int i;
+
+                      i =
+                        _eXosip_subscribe_send_request_with_credential (js,
+                                                                        jd,
+                                                                        out_tr);
+                      if (i != 0)
+                        {
+                          OSIP_TRACE (osip_trace
+                                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                       "eXosip: could not clone subscribe for refresh\n"));
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+  for (jn = eXosip.j_notifies; jn != NULL; jn = jn->next)
+    {
+      for (jd = jn->n_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id >= 1)
+                {
+                  osip_transaction_t *out_tr = NULL;
+
+                  out_tr = osip_list_get (jd->d_out_trs, 0);
+
+                  if (out_tr != NULL
+                      && (out_tr->state == NICT_TERMINATED
+                          || out_tr->state == NICT_COMPLETED) &&
+                      now - out_tr->birth_time < 120 &&
+                      out_tr->orig_request != NULL &&
+                      out_tr->last_response != NULL &&
+                      (out_tr->last_response->status_code == 401
+                       || out_tr->last_response->status_code == 407))
+                    {
+                      /* retry with credential */
+                      if (jd->d_retry < 3)
+                        {
+                          int i;
+
+                          i =
+                            _eXosip_insubscription_send_request_with_credential
+                            (jn, jd, out_tr);
+                          if (i != 0)
+                            {
+                              OSIP_TRACE (osip_trace
+                                          (__FILE__, __LINE__, OSIP_ERROR,
+                                           NULL,
+                                           "eXosip: could not clone notify for authentication\n"));
+                            }
+                          jd->d_retry++;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+  for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+      if (jr->r_id >= 1 && jr->r_last_tr != NULL)
+        {
+          if (jr->r_reg_period == 0)
+            {
+              /* skip refresh! */
+          } else if (now - jr->r_last_tr->birth_time > 900)
+            {
+              /* automatic refresh */
+              eXosip_register_send_register (jr->r_id, NULL);
+          } else if (now - jr->r_last_tr->birth_time > jr->r_reg_period - 60)
+            {
+              /* automatic refresh */
+              eXosip_register_send_register (jr->r_id, NULL);
+          } else if (now - jr->r_last_tr->birth_time > 120 &&
+                     (jr->r_last_tr->last_response == NULL
+                      || (!MSG_IS_STATUS_2XX (jr->r_last_tr->last_response))))
+            {
+              /* automatic refresh */
+              eXosip_register_send_register (jr->r_id, NULL);
+          } else if (now - jr->r_last_tr->birth_time < 120 &&
+                     jr->r_last_tr->orig_request != NULL &&
+                     (jr->r_last_tr->last_response != NULL
+                      && (jr->r_last_tr->last_response->status_code == 401
+                          || jr->r_last_tr->last_response->status_code == 407)))
+            {
+              if (jr->r_retry < 3)
+                {
+                  /* TODO: improve support for several retries when
+                     several credentials are needed */
+                  eXosip_register_send_register (jr->r_id, NULL);
+                  jr->r_retry++;
+                }
+            }
+        }
+    }
+}
+
+void
+eXosip_update ()
+{
+  static int static_id = 1;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  eXosip_dialog_t *jd;
+  int now;
+
+  if (static_id > 100000)
+    static_id = 1;              /* loop */
+
+  now = time (NULL);
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      if (jc->c_id < 1)
+        {
+          jc->c_id = static_id;
+          static_id++;
+        }
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id < 1)
+                {
+                  jd->d_id = static_id;
+                  static_id++;
+                }
+          } else
+            jd->d_id = -1;
+        }
+    }
+
+  for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+    {
+      if (js->s_id < 1)
+        {
+          js->s_id = static_id;
+          static_id++;
+        }
+      for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id < 1)
+                {
+                  jd->d_id = static_id;
+                  static_id++;
+                }
+          } else
+            jd->d_id = -1;
+        }
+    }
+
+  for (jn = eXosip.j_notifies; jn != NULL; jn = jn->next)
+    {
+      if (jn->n_id < 1)
+        {
+          jn->n_id = static_id;
+          static_id++;
+        }
+      for (jd = jn->n_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id < 1)
+                {
+                  jd->d_id = static_id;
+                  static_id++;
+                }
+          } else
+            jd->d_id = -1;
+        }
+    }
+}
+
+static jauthinfo_t *
+eXosip_find_authentication_info (const char *username, const char *realm)
+{
+  jauthinfo_t *fallback = NULL;
+  jauthinfo_t *authinfo;
+
+  for (authinfo = eXosip.authinfos; authinfo != NULL; authinfo = authinfo->next)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "INFO: authinfo: %s %s\n", realm, authinfo->realm));
+      if (0 == strcmp (authinfo->username, username))
+        {
+          if (authinfo->realm == NULL || authinfo->realm[0] == '\0')
+            {
+              fallback = authinfo;
+          } else if (strcmp (realm, authinfo->realm) == 0
+                     || 0 == strncmp (realm + 1, authinfo->realm,
+                                      strlen (realm) - 2))
+            {
+              return authinfo;
+            }
+        }
+    }
+
+  /* no matching username has been found for this realm,
+     try with another username... */
+  for (authinfo = eXosip.authinfos; authinfo != NULL; authinfo = authinfo->next)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "INFO: authinfo: %s %s\n", realm, authinfo->realm));
+      if (authinfo->realm == NULL || authinfo->realm[0] == '\0')
+        {
+          fallback = authinfo;
+      } else if (strcmp (realm, authinfo->realm) == 0
+                 || 0 == strncmp (realm + 1, authinfo->realm, strlen (realm) - 2))
+        {
+          return authinfo;
+        }
+    }
+
+  return fallback;
+}
+
+
+int
+eXosip_clear_authentication_info ()
+{
+  jauthinfo_t *jauthinfo;
+
+  for (jauthinfo = eXosip.authinfos; jauthinfo != NULL;
+       jauthinfo = eXosip.authinfos)
+    {
+      REMOVE_ELEMENT (eXosip.authinfos, jauthinfo);
+      osip_free (jauthinfo);
+    }
+  return 0;
+}
+
+int
+eXosip_add_authentication_info (const char *username, const char *userid,
+                                const char *passwd, const char *ha1,
+                                const char *realm)
+{
+  jauthinfo_t *authinfos;
+
+  if (username == NULL || username[0] == '\0')
+    return -1;
+  if (userid == NULL || userid[0] == '\0')
+    return -1;
+
+  if (passwd != NULL && passwd[0] != '\0')
+    {
+  } else if (ha1 != NULL && ha1[0] != '\0')
+    {
+  } else
+    return -1;
+
+  authinfos = (jauthinfo_t *) osip_malloc (sizeof (jauthinfo_t));
+  if (authinfos == NULL)
+    return -1;
+  memset (authinfos, 0, sizeof (jauthinfo_t));
+
+  snprintf (authinfos->username, 50, "%s", username);
+  snprintf (authinfos->userid, 50, "%s", userid);
+  if (passwd != NULL && passwd[0] != '\0')
+    snprintf (authinfos->passwd, 50, "%s", passwd);
+  else if (ha1 != NULL && ha1[0] != '\0')
+    snprintf (authinfos->ha1, 50, "%s", ha1);
+  if (realm != NULL && realm[0] != '\0')
+    snprintf (authinfos->realm, 50, "%s", realm);
+
+  ADD_ELEMENT (eXosip.authinfos, authinfos);
+  return 0;
+}
+
+int
+eXosip_add_authentication_information (osip_message_t * req,
+                                       osip_message_t * last_response)
+{
+  osip_authorization_t *aut = NULL;
+  osip_www_authenticate_t *wwwauth = NULL;
+  osip_proxy_authorization_t *proxy_aut = NULL;
+  osip_proxy_authenticate_t *proxyauth = NULL;
+  jauthinfo_t *authinfo = NULL;
+  int pos;
+  int i;
+
+  if (req == NULL
+      || req->from == NULL
+      || req->from->url == NULL || req->from->url->username == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "authinfo: Invalid message\n"));
+      return -1;
+    }
+
+  pos = 0;
+  osip_message_get_www_authenticate (last_response, pos, &wwwauth);
+  osip_message_get_proxy_authenticate (last_response, pos, &proxyauth);
+  if (wwwauth == NULL && proxyauth == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "authinfo: No WWW-Authenticate or Proxy-Authenticate\n"));
+      return -1;
+    }
+
+  while (wwwauth != NULL)
+    {
+      char *uri;
+
+      authinfo = eXosip_find_authentication_info (req->from->url->username,
+                                                  wwwauth->realm);
+      if (authinfo == NULL)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "authinfo: No authentication found for %s %s\n",
+		       req->from->url->username, wwwauth->realm));
+	  return -1;
+	}
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "authinfo: %s\n", authinfo->username));
+      i = osip_uri_to_str (req->req_uri, &uri);
+      if (i != 0)
+        return -1;
+
+      i = __eXosip_create_authorization_header (last_response, uri,
+                                                authinfo->userid,
+                                                authinfo->passwd,
+                                                authinfo->ha1, &aut,
+						req->sip_method);
+      osip_free (uri);
+      if (i != 0)
+        return -1;
+
+      if (aut != NULL)
+        {
+          osip_list_add (req->authorizations, aut, -1);
+          osip_message_force_update (req);
+        }
+
+      pos++;
+      osip_message_get_www_authenticate (last_response, pos, &wwwauth);
+    }
+
+  pos = 0;
+  while (proxyauth != NULL)
+    {
+      char *uri;
+
+      authinfo = eXosip_find_authentication_info (req->from->url->username,
+                                                  proxyauth->realm);
+      if (authinfo == NULL)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "authinfo: No authentication found for %s %s\n",
+		       req->from->url->username, proxyauth->realm));
+	  return -1;
+	}
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "authinfo: %s\n", authinfo->username));
+      i = osip_uri_to_str (req->req_uri, &uri);
+      if (i != 0)
+        return -1;
+
+      i = __eXosip_create_proxy_authorization_header (last_response, uri,
+                                                      authinfo->userid,
+                                                      authinfo->passwd,
+                                                      authinfo->ha1,
+                                                      &proxy_aut,
+						      req->sip_method);
+      osip_free (uri);
+      if (i != 0)
+        return -1;
+
+      if (proxy_aut != NULL)
+        {
+          osip_list_add (req->proxy_authorizations, proxy_aut, -1);
+          osip_message_force_update (req);
+        }
+
+      pos++;
+      osip_message_get_proxy_authenticate (last_response, pos, &proxyauth);
+    }
+
+  return 0;
+}
+
+int
+eXosip_update_top_via (osip_message_t * sip)
+{
+  char locip[50];
+  char *tmp = (char *) osip_malloc (256 * sizeof (char));
+  osip_via_t *via = (osip_via_t *) osip_list_get (sip->vias, 0);
+  int i;
+
+  i = _eXosip_find_protocol(sip);
+
+  osip_list_remove (sip->vias, 0);
+  osip_via_free (via);
+#ifdef SM
+  eXosip_get_localip_for (sip->req_uri->host, locip, 49);
+#else 
+  if (i==IPPROTO_UDP)
+    eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+  else if (i==IPPROTO_TCP)
+     eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip, 49);
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (using default UDP)\n"));
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+    }
+#endif
+  if (i==IPPROTO_UDP)
+    {
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (sip->vias, via, 0);
+  osip_free (tmp);
+
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2.h b/libs/eXosip2/eXosip2.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ef78c5842065259560c6a7112e27a35c74af0e1
--- /dev/null
+++ b/libs/eXosip2/eXosip2.h
@@ -0,0 +1,533 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EXOSIP2_H__
+#define __EXOSIP2_H__
+
+#ifdef WIN32
+#include <stdio.h>
+#include <stdlib.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define snprintf _snprintf
+#define close(s) closesocket(s)
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#endif
+
+#include <stdio.h>
+
+#include <osip2/osip.h>
+#include <osip2/osip_dialog.h>
+
+#include <eXosip2/eXosip.h>
+
+#include "jpipe.h"
+
+#ifndef JD_EMPTY
+
+#define JD_EMPTY          0
+#define JD_INITIALIZED    1
+#define JD_TRYING         2
+#define JD_QUEUED         3
+#define JD_RINGING        4
+#define JD_ESTABLISHED    5
+#define JD_REDIRECTED     6
+#define JD_AUTH_REQUIRED  7
+#define JD_CLIENTERROR    8
+#define JD_SERVERERROR    9
+#define JD_GLOBALFAILURE  10
+#define JD_TERMINATED     11
+
+#define JD_MAX            11
+
+#endif
+
+#define EXOSIP_VERSION	"0.1"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+  void eXosip_update (void);
+  void __eXosip_wakeup (void);
+
+  struct __eXosip_sockaddr
+  {
+    u_char ss_len;
+    u_char ss_family;
+    u_char padding[128 - 2];
+  };
+
+  typedef struct eXosip_dialog_t eXosip_dialog_t;
+
+  struct eXosip_dialog_t
+  {
+
+    int d_id;
+    int d_STATE;
+    osip_dialog_t *d_dialog;    /* active dialog */
+
+    int d_timer;
+    osip_message_t *d_200Ok;
+    osip_message_t *d_ack;
+
+    osip_list_t *d_inc_trs;
+    osip_list_t *d_out_trs;
+    int d_retry;                /* avoid too many unsuccessfull retry */
+
+    eXosip_dialog_t *next;
+    eXosip_dialog_t *parent;
+  };
+
+  typedef struct eXosip_subscribe_t eXosip_subscribe_t;
+
+  struct eXosip_subscribe_t
+  {
+
+    int s_id;
+    int s_ss_status;
+    int s_ss_reason;
+    int s_reg_period;
+    eXosip_dialog_t *s_dialogs;
+
+    int s_retry;                /* avoid too many unsuccessfull retry */
+    osip_transaction_t *s_inc_tr;
+    osip_transaction_t *s_out_tr;
+
+    eXosip_subscribe_t *next;
+    eXosip_subscribe_t *parent;
+  };
+
+  typedef struct eXosip_notify_t eXosip_notify_t;
+
+  struct eXosip_notify_t
+  {
+
+    int n_id;
+    char n_uri[255];
+    int n_online_status;
+
+    int n_ss_status;
+    int n_ss_reason;
+    int n_ss_expires;
+    eXosip_dialog_t *n_dialogs;
+
+    osip_transaction_t *n_inc_tr;
+    osip_transaction_t *n_out_tr;
+
+    eXosip_notify_t *next;
+    eXosip_notify_t *parent;
+  };
+
+  typedef struct eXosip_call_t eXosip_call_t;
+
+  struct eXosip_call_t
+  {
+
+    int c_id;
+    eXosip_dialog_t *c_dialogs;
+    osip_transaction_t *c_inc_tr;
+    osip_transaction_t *c_out_tr;
+    int c_retry;                /* avoid too many unsuccessfull retry */
+    osip_transaction_t *c_inc_options_tr;
+    osip_transaction_t *c_out_options_tr;
+    void *external_reference;
+
+    /* cache old credentials for reuse in next request */
+    osip_message_t *response_auth;
+
+    eXosip_call_t *next;
+    eXosip_call_t *parent;
+  };
+
+
+  typedef struct eXosip_reg_t eXosip_reg_t;
+
+  struct eXosip_reg_t
+  {
+
+    int r_id;
+
+    int r_reg_period;           /* delay between registration */
+    char *r_aor;                /* sip identity */
+    char *r_registrar;          /* registrar */
+    char *r_contact;            /* list of contacts string */
+
+    osip_transaction_t *r_last_tr;
+    int r_retry;                /* avoid too many unsuccessfull retry */
+
+    char transport[10];         /* transport used for registration */
+
+    struct __eXosip_sockaddr addr;
+    int len;
+
+    eXosip_reg_t *next;
+    eXosip_reg_t *parent;
+  };
+
+
+  typedef struct eXosip_pub_t eXosip_pub_t;
+
+  struct eXosip_pub_t
+  {
+    int p_id;
+
+    time_t p_expires;           /* expiration date (started+period) */
+    int p_period;               /* delay between registration */
+    char p_aor[256];            /* sip identity */
+    char p_sip_etag[64];        /* sip_etag from 200ok */
+
+    osip_transaction_t *p_last_tr;
+    eXosip_pub_t *next;
+    eXosip_pub_t *parent;
+  };
+
+  int _eXosip_pub_update (eXosip_pub_t ** pub, osip_transaction_t * tr,
+                          osip_message_t * answer);
+  int _eXosip_pub_find_by_aor (eXosip_pub_t ** pub, const char *aor);
+  int _eXosip_pub_init (eXosip_pub_t ** pub, const char *aor, const char *exp);
+  void _eXosip_pub_free (eXosip_pub_t * pub);
+
+  typedef struct jauthinfo_t jauthinfo_t;
+
+  struct jauthinfo_t
+  {
+    char username[50];
+    char userid[50];
+    char passwd[50];
+    char ha1[50];
+    char realm[50];
+    jauthinfo_t *parent;
+    jauthinfo_t *next;
+  };
+
+  int
+    __eXosip_create_authorization_header (osip_message_t * previous_answer,
+                                          const char *rquri,
+                                          const char *username,
+                                          const char *passwd,
+                                          const char *ha1,
+                                          osip_authorization_t ** auth,
+					  const char *method);
+  int __eXosip_create_proxy_authorization_header (osip_message_t *
+                                                  previous_answer,
+                                                  const char *rquri,
+                                                  const char *username,
+                                                  const char *passwd,
+                                                  const char *ha1,
+                                                  osip_proxy_authorization_t
+                                                  ** auth,
+						  const char *method);
+
+  eXosip_event_t *eXosip_event_init_for_call (int type, eXosip_call_t * jc,
+                                              eXosip_dialog_t * jd,
+                                              osip_transaction_t * tr);
+
+  eXosip_event_t *eXosip_event_init_for_subscribe (int type,
+                                                   eXosip_subscribe_t * js,
+                                                   eXosip_dialog_t * jd,
+                                                   osip_transaction_t * tr);
+  eXosip_event_t *eXosip_event_init_for_notify (int type,
+                                                eXosip_notify_t * jn,
+                                                eXosip_dialog_t * jd,
+                                                osip_transaction_t * tr);
+  eXosip_event_t *eXosip_event_init_for_reg (int type, eXosip_reg_t * jr,
+                                             osip_transaction_t * tr);
+  eXosip_event_t *eXosip_event_init_for_message (int type,
+                                                 osip_transaction_t * tr);
+
+  int eXosip_event_init (eXosip_event_t ** je, int type);
+  void report_call_event (int evt, eXosip_call_t * jc, eXosip_dialog_t * jd,
+                          osip_transaction_t * tr);
+  void report_options_event (int evt, osip_transaction_t * tr);
+  void report_event (eXosip_event_t * je, osip_message_t * sip);
+  int eXosip_event_add (eXosip_event_t * je);
+  eXosip_event_t *eXosip_event_wait (int tv_s, int tv_ms);
+  eXosip_event_t *eXosip_event_get (void);
+
+  typedef void (*eXosip_callback_t) (int type, eXosip_event_t *);
+
+  char *strdup_printf (const char *fmt, ...);
+
+#define eXosip_trace(loglevel,args)  do        \
+{                       \
+	char *__strmsg;  \
+	__strmsg=strdup_printf args ;    \
+	OSIP_TRACE(osip_trace(__FILE__,__LINE__,(loglevel),NULL,"%s\n",__strmsg)); \
+	osip_free (__strmsg);        \
+}while (0);
+
+#ifndef EXOSIP_MAX_SOCKETS
+#define EXOSIP_MAX_SOCKETS 200
+#endif
+
+  /* structure used for keepalive management with connected protocols (TCP or TLS) */
+  struct eXosip_socket {
+    int  socket;
+    char remote_ip[50];
+    int  remote_port;
+  };
+
+  struct eXosip_net {
+    char net_firewall_ip[50];     /* ip address to use for masquerading contacts */
+    int  net_ip_family;           /* AF_INET6 or AF_INET */
+    struct sockaddr_storage ai_addr;
+    char net_port[20];            /* port for receiving message/connection */
+    int  net_socket;              /* initial socket for receiving message/connection */
+    int  net_protocol;            /* initial socket for receiving message/connection */
+    struct eXosip_socket net_socket_tab[EXOSIP_MAX_SOCKETS];
+  };
+
+  char *_eXosip_transport_protocol(osip_message_t *msg);
+  int _eXosip_find_protocol(osip_message_t *msg);
+  int _eXosip_tcp_find_socket(char *host, int port);
+  int _eXosip_tcp_connect_socket(char *host, int port);
+  int setsockopt_ipv6only (int sock);
+
+  int _eXosip_recvfrom(int s, char *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen);
+  int _eXosip_sendto(int s,  const void* buf,  size_t len,  int flags,
+    const struct sockaddr* to,  socklen_t tolen);
+
+  typedef struct eXosip_t eXosip_t;
+
+  struct eXosip_t
+  {
+    int forced_localip;         /* set to 1 for masquerading contact headers */
+    struct eXosip_net net_interfaces[3];
+    char *user_agent;
+
+    eXosip_call_t *j_calls;             /* my calls        */
+    eXosip_subscribe_t *j_subscribes;   /* my friends      */
+    eXosip_notify_t *j_notifies;        /* my susbscribers */
+    osip_list_t *j_transactions;
+
+    eXosip_reg_t *j_reg;        /* my registrations */
+    eXosip_pub_t *j_pub;        /* my publications  */
+
+    void *j_cond;
+    void *j_mutexlock;
+
+    osip_t *j_osip;
+    int j_stop_ua;
+    void *j_thread;
+    jpipe_t *j_socketctl;
+    jpipe_t *j_socketctl_event;
+
+    osip_fifo_t *j_events;
+
+    jauthinfo_t *authinfos;
+
+    int   keep_alive;
+    int   learn_port;
+    int   http_port;
+    char  http_proxy[256];
+    char  http_outbound_proxy[256];
+  };
+
+  typedef struct jinfo_t jinfo_t;
+
+  struct jinfo_t
+  {
+    eXosip_dialog_t *jd;
+    eXosip_call_t *jc;
+    eXosip_subscribe_t *js;
+    eXosip_notify_t *jn;
+  };
+
+  int eXosip_guess_ip_for_via (int family, char *address, int size);
+
+/**
+ * Prepare addrinfo for socket binding and resolv hostname
+ * 
+ * @param addrinfo  informations about the connections
+ * @param hostname  hostname to resolv.
+ * @param service   port number or "sip" SRV record if service=0
+ */
+  int eXosip_get_addrinfo (struct addrinfo **addrinfo, const char *hostname,
+                           int service, int protocol);
+
+  int eXosip_set_callbacks (osip_t * osip);
+  int cb_snd_message (osip_transaction_t * tr, osip_message_t * sip,
+			   char *host, int port, int out_socket);
+  int cb_udp_snd_message (osip_transaction_t * tr, osip_message_t * sip,
+                          char *host, int port, int out_socket);
+  int cb_tcp_snd_message (osip_transaction_t * tr, osip_message_t * sip,
+                          char *host, int port, int out_socket);
+  char *osip_call_id_new_random (void);
+  char *osip_to_tag_new_random (void);
+  char *osip_from_tag_new_random (void);
+  unsigned int via_branch_new_random (void);
+  void __eXosip_delete_jinfo (osip_transaction_t * transaction);
+  jinfo_t *__eXosip_new_jinfo (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                               eXosip_subscribe_t * js, eXosip_notify_t * jn);
+
+  int eXosip_dialog_init_as_uac (eXosip_dialog_t ** jd, osip_message_t * _200Ok);
+  int eXosip_dialog_init_as_uas (eXosip_dialog_t ** jd,
+                                 osip_message_t * _invite,
+                                 osip_message_t * _200Ok);
+  void eXosip_dialog_free (eXosip_dialog_t * jd);
+  void eXosip_dialog_set_state (eXosip_dialog_t * jd, int state);
+  void eXosip_delete_early_dialog (eXosip_dialog_t * jd);
+
+
+  int isrfc1918 (char *ipaddr);
+  void eXosip_get_localip_from_via (osip_message_t *, char *localip, int size);
+  int generating_request_out_of_dialog (osip_message_t ** dest,
+                                        const char *method, const char *to,
+                                        const char *transport,
+                                        const char *from, const char *proxy);
+  int generating_publish (osip_message_t ** message, const char *to,
+                          const char *from, const char *route);
+  int generating_cancel (osip_message_t ** dest,
+                         osip_message_t * request_cancelled);
+  int generating_bye (osip_message_t ** bye, osip_dialog_t * dialog, char *transport);
+  int generating_ack_for_2xx (osip_message_t ** ack, osip_dialog_t * dialog);
+
+  int eXosip_update_top_via (osip_message_t * sip);
+  int eXosip_add_authentication_information (osip_message_t * req,
+                                             osip_message_t * last_response);
+  int _eXosip_reg_find (eXosip_reg_t ** reg, osip_transaction_t * tr);
+  int eXosip_reg_init (eXosip_reg_t ** jr, const char *from,
+                       const char *proxy, const char *contact);
+  void eXosip_reg_free (eXosip_reg_t * jreg);
+  int generating_register (osip_message_t ** reg, char *transport, char *from,
+                           char *proxy, char *contact, int expires);
+
+  int _eXosip_call_redirect_request (eXosip_call_t * jc,
+                                     eXosip_dialog_t * jd,
+                                     osip_transaction_t * out_tr);
+  int _eXosip_call_send_request_with_credential (eXosip_call_t * jc,
+                                                 eXosip_dialog_t * jd,
+                                                 osip_transaction_t * out_tr);
+  int eXosip_transaction_find (int tid, osip_transaction_t ** transaction);
+  int eXosip_call_dialog_find (int jid, eXosip_call_t ** jc,
+                               eXosip_dialog_t ** jd);
+  int eXosip_notify_dialog_find (int nid, eXosip_notify_t ** jn,
+                                 eXosip_dialog_t ** jd);
+  int eXosip_subscribe_dialog_find (int nid, eXosip_subscribe_t ** js,
+                                    eXosip_dialog_t ** jd);
+  int eXosip_call_find (int cid, eXosip_call_t ** jc);
+  int eXosip_dialog_set_200ok (eXosip_dialog_t * _jd, osip_message_t * _200Ok);
+
+  int _eXosip_answer_invite_3456xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                    int code, osip_message_t ** answer);
+  int _eXosip_answer_invite_2xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 int code, osip_message_t ** answer);
+  int _eXosip_answer_invite_1xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 int code, osip_message_t ** answer);
+  int _eXosip_default_answer_invite_1xx (eXosip_call_t * jc,
+                                         eXosip_dialog_t * jd, int code);
+  int _eXosip_default_answer_invite_3456xx (eXosip_call_t * jc,
+                                            eXosip_dialog_t * jd, int code);
+  int _eXosip_insubscription_answer_1xx (eXosip_notify_t * jc,
+                                         eXosip_dialog_t * jd, int code);
+  int _eXosip_insubscription_answer_2xx (eXosip_notify_t * jn,
+                                         eXosip_dialog_t * jd, int code);
+  int _eXosip_insubscription_answer_3456xx (eXosip_notify_t * jn,
+                                            eXosip_dialog_t * jd, int code);
+
+  int eXosip_build_response_default (int jid, int status);
+  int _eXosip_build_response_default (osip_message_t ** dest,
+                                      osip_dialog_t * dialog, int status,
+                                      osip_message_t * request);
+  int complete_answer_that_establish_a_dialog (osip_message_t * response,
+                                               osip_message_t * request);
+  int _eXosip_build_request_within_dialog (osip_message_t ** dest,
+                                           const char *method,
+                                           osip_dialog_t * dialog,
+                                           const char *transport);
+  void eXosip_kill_transaction (osip_list_t * transactions);
+  int eXosip_remove_transaction_from_call (osip_transaction_t * tr,
+                                           eXosip_call_t * jc);
+  osip_transaction_t *eXosip_find_last_inc_notify (eXosip_subscribe_t * jn,
+                                                   eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_out_notify (eXosip_notify_t * jn,
+                                                   eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_inc_subscribe (eXosip_notify_t * jn,
+                                                      eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_out_subscribe (eXosip_subscribe_t * js,
+                                                      eXosip_dialog_t * jd);
+
+  osip_transaction_t *eXosip_find_last_transaction (eXosip_call_t * jc,
+                                                    eXosip_dialog_t * jd,
+                                                    const char *method);
+  osip_transaction_t *eXosip_find_last_inc_transaction (eXosip_call_t * jc,
+                                                        eXosip_dialog_t * jd,
+                                                        const char *method);
+  osip_transaction_t *eXosip_find_last_out_transaction (eXosip_call_t * jc,
+                                                        eXosip_dialog_t * jd,
+                                                        const char *method);
+  osip_transaction_t *eXosip_find_last_invite (eXosip_call_t * jc,
+                                               eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_inc_invite (eXosip_call_t * jc,
+                                                   eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_out_invite (eXosip_call_t * jc,
+                                                   eXosip_dialog_t * jd);
+
+
+  int eXosip_call_init (eXosip_call_t ** jc);
+  void eXosip_call_free (eXosip_call_t * jc);
+  void __eXosip_call_remove_dialog_reference_in_call (eXosip_call_t * jc,
+                                                      eXosip_dialog_t * jd);
+  int eXosip_read_message (int max_message_nb, int sec_max, int usec_max);
+  void eXosip_release_terminated_calls (void);
+  void eXosip_release_terminated_registrations (void);
+
+
+  int eXosip_subscribe_init (eXosip_subscribe_t ** js);
+  void eXosip_subscribe_free (eXosip_subscribe_t * js);
+  int _eXosip_subscribe_set_refresh_interval (eXosip_subscribe_t * js,
+                                              osip_message_t * inc_subscribe);
+  int eXosip_subscribe_need_refresh (eXosip_subscribe_t * js,
+                                     eXosip_dialog_t * jd, int now);
+  int _eXosip_subscribe_send_request_with_credential (eXosip_subscribe_t * js,
+                                                      eXosip_dialog_t * jd,
+                                                      osip_transaction_t * out_tr);
+  int eXosip_notify_init (eXosip_notify_t ** jn, osip_message_t * inc_subscribe);
+  void eXosip_notify_free (eXosip_notify_t * jn);
+  int _eXosip_notify_set_contact_info (eXosip_notify_t * jn, char *uri);
+  int _eXosip_notify_set_refresh_interval (eXosip_notify_t * jn,
+                                           osip_message_t * inc_subscribe);
+  void _eXosip_notify_add_expires_in_2XX_for_subscribe (eXosip_notify_t * jn,
+                                                        osip_message_t * answer);
+  int _eXosip_insubscription_send_request_with_credential (eXosip_notify_t *
+                                                           jn,
+                                                           eXosip_dialog_t *
+                                                           jd,
+                                                           osip_transaction_t
+                                                           * out_tr);
+
+  int eXosip_is_public_address (const char *addr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/eXosip2/eXosip2/Makefile.am b/libs/eXosip2/eXosip2/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..fa00a8cf622d88586bad1b1fca8aab1b8839d781
--- /dev/null
+++ b/libs/eXosip2/eXosip2/Makefile.am
@@ -0,0 +1,33 @@
+
+
+noinst_LTLIBRARIES = libeXosip2.la
+
+#
+# Other flags to add someday:
+#	-Wcast-qual
+#	-Wwrite-strings
+#	-Wstrict-prototypes
+#	-Werror
+#
+AM_CFLAGS = $(EXOSIP_CFLAGS) @CFLAGS@  
+noinst_HEADERS = eXosip2.h  inet_ntop.h  jpipe.h
+
+libeXosip2_la_SOURCES =      \
+eXosip.c         eXconf.c    \
+eXregister_api.c eXsubscription_api.c    \
+eXcall_api.c     eXoptions_api.c         \
+eXrefer_api.c    eXmessage_api.c         \
+eXinsubscription_api.c  eXpublish_api.c     \
+eXtransport.c    \
+inet_ntop.c      inet_ntop.h   \
+jrequest.c       jresponse.c   \
+jcallback.c      jdialog.c               udp.c        \
+jcall.c          jreg.c                  eXutils.c    \
+jnotify.c        jsubscribe.c            jevents.c    \
+misc.c           eXosip2.h     \
+jpipe.c          jpipe.h                 jauth.c      \
+sdp_offans.c     jpublish.c
+
+libeXosip2_la_LIBADD = -losip2  @EXOSIP_LIBS@
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(includedir)
diff --git a/libs/eXosip2/eXosip2/eXcall_api.c b/libs/eXosip2/eXosip2/eXcall_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..76dc9a8fc73c438763817dba3f47a47d2725f6ba
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXcall_api.c
@@ -0,0 +1,1563 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+static int eXosip_create_transaction (eXosip_call_t * jc,
+                                      eXosip_dialog_t * jd,
+                                      osip_message_t * request);
+static int eXosip_create_cancel_transaction (eXosip_call_t * jc,
+                                             eXosip_dialog_t * jd,
+                                             osip_message_t * request);
+static int _eXosip_call_transaction_find (int tid, eXosip_call_t ** jc,
+                                          eXosip_dialog_t ** jd,
+                                          osip_transaction_t ** tr);
+
+static int
+eXosip_create_transaction (eXosip_call_t * jc,
+                           eXosip_dialog_t * jd, osip_message_t * request)
+{
+  osip_event_t *sipevent;
+  osip_transaction_t *tr;
+  int i;
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, request);
+  if (i != 0)
+    {
+      /* TODO: release the j_call.. */
+
+      osip_message_free (request);
+      return -1;
+    }
+
+  if (jd != NULL)
+    osip_list_add (jd->d_out_trs, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = tr->transactionid;
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+static int
+eXosip_create_cancel_transaction (eXosip_call_t * jc,
+                                  eXosip_dialog_t * jd, osip_message_t * request)
+{
+  osip_event_t *sipevent;
+  osip_transaction_t *tr;
+  int i;
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, request);
+  if (i != 0)
+    {
+      /* TODO: release the j_call.. */
+
+      osip_message_free (request);
+      return -2;
+    }
+
+  osip_list_add (eXosip.j_transactions, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+static int
+_eXosip_call_transaction_find (int tid, eXosip_call_t ** jc,
+                               eXosip_dialog_t ** jd, osip_transaction_t ** tr)
+{
+  for (*jc = eXosip.j_calls; *jc != NULL; *jc = (*jc)->next)
+    {
+      if ((*jc)->c_inc_tr != NULL && (*jc)->c_inc_tr->transactionid == tid)
+        {
+          *tr = (*jc)->c_inc_tr;
+          *jd = (*jc)->c_dialogs;
+          return 0;
+        }
+      if ((*jc)->c_out_tr != NULL && (*jc)->c_out_tr->transactionid == tid)
+        {
+          *tr = (*jc)->c_out_tr;
+          *jd = (*jc)->c_dialogs;
+          return 0;
+        }
+      for (*jd = (*jc)->c_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          osip_transaction_t *transaction;
+          int pos = 0;
+
+          while (!osip_list_eol ((*jd)->d_inc_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_inc_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+
+          pos = 0;
+          while (!osip_list_eol ((*jd)->d_out_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_out_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+        }
+    }
+  *jd = NULL;
+  *jc = NULL;
+  return -1;
+}
+
+int
+eXosip_call_set_reference (int id, void *reference)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  if (id > 0)
+    {
+      eXosip_call_dialog_find (id, &jc, &jd);
+      if (jc == NULL)
+        {
+          eXosip_call_find (id, &jc);
+        }
+    }
+  if (jc == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+  jc->external_reference = reference;
+  return 0;
+}
+
+/* this method can't be called unless the previous
+   INVITE transaction is over. */
+int
+eXosip_call_build_initial_invite (osip_message_t ** invite,
+                                  const char *to,
+                                  const char *from,
+                                  const char *route, const char *subject)
+{
+  int i;
+  osip_uri_param_t *uri_param = NULL;
+  osip_to_t *_to=NULL;
+
+  *invite = NULL;
+
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+  if (subject != NULL && *subject == '\0')
+    subject = NULL;
+
+  i = osip_to_init(&_to);
+  if (i!=0)
+    return -1;
+  
+  i = osip_to_parse(_to, to);
+  if (i!=0)
+    {
+      osip_to_free(_to);
+      return -1;
+    }
+
+  osip_uri_uparam_get_byname(_to->url, "transport", &uri_param);
+  if (uri_param != NULL && uri_param->gvalue != NULL)
+    {
+      i = generating_request_out_of_dialog (invite, "INVITE", to, uri_param->gvalue, from, route);      
+    }
+  else
+    {
+      if (eXosip.net_interfaces[0].net_socket>0)
+	i = generating_request_out_of_dialog (invite, "INVITE", to, "UDP", from, route);
+      else if (eXosip.net_interfaces[1].net_socket>0)
+	i = generating_request_out_of_dialog (invite, "INVITE", to, "TCP", from, route);
+      else
+	i = generating_request_out_of_dialog (invite, "INVITE", to, "UDP", from, route);
+    }
+  osip_to_free(_to);
+  if (i != 0)
+    return -1;
+
+  if (subject != NULL)
+    osip_message_set_subject (*invite, subject);
+
+  /* after this delay, we should send a CANCEL */
+  osip_message_set_expires (*invite, "120");
+  return 0;
+}
+
+int
+eXosip_call_send_initial_invite (osip_message_t * invite)
+{
+  eXosip_call_t *jc;
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  eXosip_call_init (&jc);
+
+  i = osip_transaction_init (&transaction, ICT, eXosip.j_osip, invite);
+  if (i != 0)
+    {
+      eXosip_call_free (jc);
+      osip_message_free (invite);
+      return -1;
+    }
+
+  jc->c_out_tr = transaction;
+
+  sipevent = osip_new_outgoing_sipmessage (invite);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  jc->external_reference = NULL;
+  ADD_ELEMENT (eXosip.j_calls, jc);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return jc->c_id;
+}
+
+int
+eXosip_call_build_ack (int did, osip_message_t ** _ack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  osip_message_t *ack;
+  char *transport;
+  int i;
+
+  *_ack = NULL;
+
+  if (did > 0)
+    {
+      eXosip_call_dialog_find (did, &jc, &jd);
+    }
+  if (jc == NULL || jd == NULL || jd->d_dialog == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+
+  tr = eXosip_find_last_invite (jc, jd);
+
+  if (tr == NULL || tr->orig_request == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No transaction for call?\n"));
+      return -1;
+    }
+
+  if (0 != osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: ACK are only sent for invite transactions\n"));
+      return -1;
+    }
+
+  transport = NULL;
+  transport = _eXosip_transport_protocol(tr->orig_request);
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (&ack, "ACK", jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (&ack, "ACK", jd->d_dialog, transport);
+
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  /* Fix CSeq Number when request has been exchanged during INVITE transactions */
+  if (tr->orig_request->cseq!=NULL && tr->orig_request->cseq->number!=NULL)
+    {
+      if (ack!=NULL && ack->cseq!=NULL && ack->cseq->number!=NULL)
+	{
+	  osip_free(ack->cseq->number);
+	  ack->cseq->number = osip_strdup(tr->orig_request->cseq->number);
+	}
+    }
+
+  /* copy all credentials from INVITE! */
+  {
+    int pos = 0;
+    int i;
+    osip_proxy_authorization_t *pa = NULL;
+
+    i = osip_message_get_proxy_authorization (tr->orig_request, pos, &pa);
+    while (i == 0 && pa != NULL)
+      {
+        osip_proxy_authorization_t *pa2;
+
+        i = osip_proxy_authorization_clone (pa, &pa2);
+        if (i != 0)
+          {
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                    "Error in credential from INVITE\n"));
+            break;
+          }
+        osip_list_add (ack->proxy_authorizations, pa2, -1);
+        pa = NULL;
+        pos++;
+        i = osip_message_get_proxy_authorization (tr->orig_request, pos, &pa);
+      }
+  }
+
+  *_ack = ack;
+  return 0;
+}
+
+int
+eXosip_call_send_ack (int did, osip_message_t * ack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  osip_route_t *route;
+  char *host;
+  int port;
+
+  if (did > 0)
+    {
+      eXosip_call_dialog_find (did, &jc, &jd);
+    }
+
+  if (jc == NULL || jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      if (ack != NULL)
+	osip_message_free (ack);
+      return -1;
+    }
+
+  if (ack == NULL)
+    {
+      int i;
+
+      i = eXosip_call_build_ack (did, &ack);
+      if (i != 0)
+        {
+          return -1;
+        }
+    }
+
+  osip_message_get_route (ack, 0, &route);
+  if (route != NULL)
+    {
+      osip_uri_param_t *lr_param=NULL;
+      osip_uri_uparam_get_byname (route->url, "lr", &lr_param);
+      if (lr_param==NULL)
+	route=NULL;
+    }
+
+  if (route != NULL)
+    {
+      port = 5060;
+      if (route->url->port != NULL)
+        port = osip_atoi (route->url->port);
+      host = route->url->host;
+  } else
+    {
+      port = 5060;
+      if (ack->req_uri->port != NULL)
+        port = osip_atoi (ack->req_uri->port);
+      host = ack->req_uri->host;
+    }
+
+  cb_snd_message (NULL, ack, host, port, -1);
+
+  if (jd->d_ack != NULL)
+    osip_message_free (jd->d_ack);
+  jd->d_ack = ack;
+  return 0;
+}
+
+int
+eXosip_call_build_request (int jid, const char *method, osip_message_t ** request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  osip_transaction_t *transaction;
+  char *transport;
+  int i;
+  
+  *request = NULL;
+  if (method == NULL || method[0] == '\0')
+    return -1;
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jd == NULL || jd->d_dialog == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+
+  transaction = NULL;
+  if (0 == osip_strcasecmp (method, "INVITE"))
+    {
+      transaction = eXosip_find_last_invite (jc, jd);
+  } else                        /* OPTIONS, UPDATE, INFO, REFER, ?... */
+    {
+      transaction = eXosip_find_last_transaction (jc, jd, method);
+    }
+
+  if (transaction != NULL)
+    {
+      if (0 != osip_strcasecmp (method, "INVITE"))
+        {
+          if (transaction->state != NICT_TERMINATED &&
+              transaction->state != NIST_TERMINATED &&
+              transaction->state != NICT_COMPLETED &&
+              transaction->state != NIST_COMPLETED)
+            return -1;
+      } else
+        {
+          if (transaction->state != ICT_TERMINATED &&
+              transaction->state != IST_TERMINATED &&
+              transaction->state != IST_CONFIRMED &&
+              transaction->state != ICT_COMPLETED)
+            return -1;
+        }
+    }
+
+  transport = NULL;
+  transaction = eXosip_find_last_invite (jc, jd);
+  if (transaction!=NULL && transaction->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(transaction->orig_request);
+
+  transaction = NULL;
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, transport);
+  if (i != 0)
+    return -2;
+
+  if (jc->response_auth!=NULL)
+    eXosip_add_authentication_information (*request, jc->response_auth);
+
+  return 0;
+}
+
+int
+eXosip_call_send_request (int jid, osip_message_t * request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+
+  int i;
+
+  if (request == NULL)
+    return -1;
+
+  if (request->sip_method == NULL)
+    {
+      osip_message_free (request);
+      return -1;
+    }
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      osip_message_free (request);
+      return -1;
+    }
+
+  transaction = NULL;
+  if (0 == osip_strcasecmp (request->sip_method, "INVITE"))
+    {
+      transaction = eXosip_find_last_invite (jc, jd);
+  } else                        /* OPTIONS, UPDATE, INFO, REFER, ?... */
+    {
+      transaction = eXosip_find_last_transaction (jc, jd, request->sip_method);
+    }
+
+  if (transaction != NULL)
+    {
+      if (0 != osip_strcasecmp (request->sip_method, "INVITE"))
+        {
+          if (transaction->state != NICT_TERMINATED &&
+              transaction->state != NIST_TERMINATED &&
+              transaction->state != NICT_COMPLETED &&
+              transaction->state != NIST_COMPLETED)
+	    {
+	      osip_message_free (request);
+	      return -1;
+	    }
+      } else
+        {
+          if (transaction->state != ICT_TERMINATED &&
+              transaction->state != IST_TERMINATED &&
+              transaction->state != IST_CONFIRMED &&
+              transaction->state != ICT_COMPLETED)
+	    {
+	      osip_message_free (request);
+	      return -1;
+	    }
+        }
+    }
+
+  transaction = NULL;
+  if (0 != osip_strcasecmp (request->sip_method, "INVITE"))
+    {
+      i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, request);
+  } else
+    {
+      i = osip_transaction_init (&transaction, ICT, eXosip.j_osip, request);
+    }
+
+  if (i != 0)
+    {
+      osip_message_free (request);
+      return -2;
+    }
+
+  osip_list_add (jd->d_out_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_call_build_refer (int did, const char *refer_to, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "REFER", request);
+  if (i != 0)
+    return -1;
+
+  if (refer_to == NULL || refer_to[0] == '\0')
+    return 0;
+
+  osip_message_set_header (*request, "Refer-to", refer_to);
+  return 0;
+}
+
+int
+eXosip_call_build_options (int did, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "OPTIONS", request);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_call_build_info (int did, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "INFO", request);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_call_build_update (int did, osip_message_t ** request)
+{
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "UPDATE", request);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_call_build_notify (int did, int subscription_status,
+                          osip_message_t ** request)
+{
+  char subscription_state[50];
+  char *tmp;
+  int i;
+
+  *request = NULL;
+  i = eXosip_call_build_request (did, "NOTIFY", request);
+  if (i != 0)
+    return -1;
+
+  if (subscription_status == EXOSIP_SUBCRSTATE_PENDING)
+    osip_strncpy (subscription_state, "pending;expires=", 16);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_ACTIVE)
+    osip_strncpy (subscription_state, "active;expires=", 15);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_TERMINATED)
+    {
+      int reason = NORESOURCE;
+
+      if (reason == DEACTIVATED)
+        osip_strncpy (subscription_state, "terminated;reason=deactivated", 29);
+      else if (reason == PROBATION)
+        osip_strncpy (subscription_state, "terminated;reason=probation", 27);
+      else if (reason == REJECTED)
+        osip_strncpy (subscription_state, "terminated;reason=rejected", 26);
+      else if (reason == TIMEOUT)
+        osip_strncpy (subscription_state, "terminated;reason=timeout", 25);
+      else if (reason == GIVEUP)
+        osip_strncpy (subscription_state, "terminated;reason=giveup", 24);
+      else if (reason == NORESOURCE)
+        osip_strncpy (subscription_state, "terminated;reason=noresource", 29);
+    }
+  tmp = subscription_state + strlen (subscription_state);
+  if (subscription_status != EXOSIP_SUBCRSTATE_TERMINATED)
+    sprintf (tmp, "%i", 180);
+  osip_message_set_header (*request, "Subscription-State", subscription_state);
+
+  return 0;
+}
+
+int
+eXosip_call_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  *answer = NULL;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (tr == NULL || jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+
+  if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      if (status > 100 && status < 200)
+        {
+          i = _eXosip_answer_invite_1xx (jc, jd, status, answer);
+      } else if (status > 199 && status < 300)
+        {
+          i = _eXosip_answer_invite_2xx (jc, jd, status, answer);
+      } else if (status > 300 && status < 699)
+        {
+          i = _eXosip_answer_invite_3456xx (jc, jd, status, answer);
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (101<status<699)\n"));
+          return -1;
+        }
+  } else
+    {
+      if (jd != NULL)
+        {
+          i =
+            _eXosip_build_response_default (answer, jd->d_dialog, status,
+                                            tr->orig_request);
+      } else
+        {
+          i =
+            _eXosip_build_response_default (answer, NULL, status,
+                                            tr->orig_request);
+        }
+      if (status>100 && status < 300 )
+	i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+    }
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for %s\n",
+                              tr->orig_request->sip_method));
+      return -1;
+    }
+  return 0;
+}
+
+int
+eXosip_call_send_answer (int tid, int status, osip_message_t * answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (jd == NULL || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here or no transaction for call\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+        {
+          if (status >= 100 && status <= 199)
+            {
+          } else if (status >= 300 && status <= 699)
+            {
+          } else
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: Wrong parameter?\n"));
+	      osip_message_free (answer);
+              return -1;
+            }
+        }
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED
+      || tr->state == IST_TERMINATED
+      || tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+        {
+          if (status < 200)
+            i = _eXosip_default_answer_invite_1xx (jc, jd, status);
+          else
+            i = _eXosip_default_answer_invite_3456xx (jc, jd, status);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot send response!\n"));
+              return -1;
+            }
+      } else
+        {
+          /* TODO */
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: a response must be given!\n"));
+          return -1;
+        }
+      return 0;
+  } else
+    {
+      i = 0;
+    }
+
+  if (0 == osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      if (MSG_IS_STATUS_1XX (answer))
+        {
+          if (jd == NULL)
+            {
+              i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, answer);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: cannot create dialog!\n"));
+                  i = 0;
+              } else
+                {
+                  ADD_ELEMENT (jc->c_dialogs, jd);
+                }
+            }
+      } else if (MSG_IS_STATUS_2XX (answer))
+        {
+          if (jd == NULL)
+            {
+              i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, answer);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: cannot create dialog!\n"));
+		  osip_message_free (answer);
+                  return -1;
+                }
+              ADD_ELEMENT (jc->c_dialogs, jd);
+          } else
+            i = 0;
+
+          eXosip_dialog_set_200ok (jd, answer);
+          osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+      } else if (answer->status_code >= 300 && answer->status_code <= 699)
+        {
+          i = 0;
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (101<status<699)\n"));
+	  osip_message_free (answer);
+          return -1;
+        }
+      if (i != 0)
+	{
+	  osip_message_free (answer);
+	  return -1;
+	}
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  eXosip_update ();
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_call_terminate (int cid, int did)
+{
+  int i;
+  osip_transaction_t *tr;
+  osip_message_t *request = NULL;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  char *transport=NULL;
+
+  if (did > 0)
+    {
+      eXosip_call_dialog_find (did, &jc, &jd);
+      if (jd == NULL)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: No call here?\n"));
+          return -1;
+        }
+  } else
+    {
+      eXosip_call_find (cid, &jc);
+    }
+
+  if (jc == NULL)
+    {
+      return -1;
+    }
+
+  tr = eXosip_find_last_out_invite (jc, jd);
+  if (tr != NULL && tr->last_response != NULL
+      && MSG_IS_STATUS_1XX (tr->last_response))
+    {
+      i = generating_cancel (&request, tr->orig_request);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot terminate this call!\n"));
+          return -2;
+        }
+      i = eXosip_create_cancel_transaction (jc, jd, request);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot initiate SIP transaction!\n"));
+          return i;
+        }
+      if (jd != NULL)
+        {
+          osip_dialog_free (jd->d_dialog);
+          jd->d_dialog = NULL;
+          eXosip_update(); //AMD 30/09/05
+        }
+      return 0;
+    }
+
+  if (jd == NULL || jd->d_dialog == NULL)
+    {
+      /* Check if some dialog exists */
+      if (jd != NULL && jd->d_dialog != NULL)
+        {
+	  transport = NULL;
+	  if (tr!=NULL && tr->orig_request!=NULL)
+	    transport = _eXosip_transport_protocol(tr->orig_request);
+	  if (transport==NULL)
+	    i = generating_bye (&request, jd->d_dialog, "UDP");
+	  else
+	    i = generating_bye (&request, jd->d_dialog, transport);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot terminate this call!\n"));
+              return -2;
+            }
+
+	  if (jc->response_auth!=NULL)
+	    eXosip_add_authentication_information (request, jc->response_auth);
+
+          i = eXosip_create_transaction (jc, jd, request);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot initiate SIP transaction!\n"));
+              return -2;
+            }
+
+          osip_dialog_free (jd->d_dialog);
+          jd->d_dialog = NULL;
+          eXosip_update(); //AMD 30/09/05
+          return 0;
+        }
+
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No established dialog!\n"));
+      return -1;
+    }
+
+  if (tr == NULL)
+    {
+      /*this may not be enough if it's a re-INVITE! */
+      tr = eXosip_find_last_inc_invite (jc, jd);
+      if (tr != NULL && tr->last_response != NULL &&
+          MSG_IS_STATUS_1XX (tr->last_response))
+        {                       /* answer with 603 */
+          i = eXosip_call_send_answer (tr->transactionid, 603, NULL);
+          return i;
+        }
+    }
+
+  transport = NULL;
+  if (tr!=NULL && tr->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(tr->orig_request);
+  if (transport==NULL)
+    i = generating_bye (&request, jd->d_dialog, "UDP");
+  else
+    i = generating_bye (&request, jd->d_dialog, transport);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot terminate this call!\n"));
+      return -2;
+    }
+  if (jc->response_auth!=NULL)
+    eXosip_add_authentication_information (request, jc->response_auth);
+
+  i = eXosip_create_transaction (jc, jd, request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot initiate SIP transaction!\n"));
+      return -2;
+    }
+
+  osip_dialog_free (jd->d_dialog);
+  jd->d_dialog = NULL;
+  eXosip_update(); //AMD 30/09/05
+  return 0;
+}
+
+int
+eXosip_call_build_prack (int tid, osip_message_t ** prack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  osip_header_t *rseq;
+  char *transport;
+  int i;
+
+  *prack = NULL;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (jc == NULL || jd == NULL || jd->d_dialog == NULL
+      || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here or no transaction for call\n"));
+      return -1;
+    }
+
+  if (0 != osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    return -1;
+
+  /* PRACK are only send in the PROCEEDING state */
+  if (tr->state != ICT_PROCEEDING)
+    return -1;
+
+  if (tr->orig_request->cseq == NULL
+      || tr->orig_request->cseq->number == NULL
+      || tr->orig_request->cseq->method == NULL)
+    return -1;
+
+  transport = NULL;
+  if (tr!=NULL && tr->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(tr->orig_request);
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (prack, "PRACK", jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (prack, "PRACK", jd->d_dialog, transport);
+
+  if (i != 0)
+    return -2;
+
+  osip_message_header_get_byname (tr->last_response, "RSeq", 0, &rseq);
+  if (rseq != NULL && rseq->hvalue != NULL)
+    {
+      char tmp[128];
+
+      memset (tmp, '\0', sizeof (tmp));
+      snprintf (tmp, 127, "%s %s %s", rseq->hvalue,
+                tr->orig_request->cseq->number, tr->orig_request->cseq->method);
+      osip_message_set_header (*prack, "RAck", tmp);
+    }
+
+  return 0;
+}
+
+int
+eXosip_call_send_prack (int tid, osip_message_t * prack)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *tr = NULL;
+
+  osip_event_t *sipevent;
+  int i;
+
+  if (prack == NULL)
+    return -1;
+
+  if (tid > 0)
+    {
+      _eXosip_call_transaction_find (tid, &jc, &jd, &tr);
+    }
+  if (jc == NULL || jd == NULL || jd->d_dialog == NULL
+      || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here or no transaction for call\n"));
+      osip_message_free (prack);
+      return -1;
+    }
+
+  if (0 != osip_strcasecmp (tr->orig_request->sip_method, "INVITE"))
+    {
+      osip_message_free (prack);
+      return -1;
+    }
+
+  /* PRACK are only send in the PROCEEDING state */
+  if (tr->state != ICT_PROCEEDING)
+    {
+      osip_message_free (prack);
+      return -1;
+    }
+
+  tr = NULL;
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, prack);
+
+  if (i != 0)
+    {
+      osip_message_free (prack);
+      return -2;
+    }
+
+  osip_list_add (jd->d_out_trs, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (prack);
+  sipevent->transactionid = tr->transactionid;
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+
+int
+_eXosip_call_redirect_request (eXosip_call_t * jc,
+                               eXosip_dialog_t * jd, osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  osip_contact_t *co;
+  int pos;
+  int i;
+  int protocol = IPPROTO_UDP;
+
+  if (jc == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  co = NULL;
+  pos = 0;
+  while (!osip_list_eol (out_tr->last_response->contacts, pos))
+    {
+      co = (osip_contact_t *) osip_list_get (out_tr->last_response->contacts, pos);
+      if (co != NULL && co->url != NULL && co->url->url_params != NULL)
+        {
+          /* check tranport? Only allow UDP, right now */
+          osip_uri_param_t *u_param;
+          int pos2;
+
+          u_param = NULL;
+          pos2 = 0;
+          while (!osip_list_eol (co->url->url_params, pos2))
+            {
+              u_param =
+                (osip_uri_param_t *) osip_list_get (co->url->url_params, pos2);
+              if (u_param == NULL || u_param->gname == NULL
+                  || u_param->gvalue == NULL)
+                {
+                  u_param = NULL;
+                  /* skip */
+              } else if (0 == osip_strcasecmp (u_param->gvalue, "transport"))
+                {
+                  if (0 == osip_strcasecmp (u_param->gvalue, "udp"))
+                    {
+#if 0
+                      /* remove the UDP parameter */
+                      osip_list_remove (co->url->url_params, pos2);
+                      osip_uri_param_free (u_param);
+#endif
+                      u_param = NULL;
+		      protocol=IPPROTO_UDP;
+                      break;    /* ok */
+                    }
+		  else if (0 == osip_strcasecmp (u_param->gvalue, "tcp"))
+		    {
+#if 0
+                      osip_list_remove (co->url->url_params, pos2);
+                      osip_uri_param_free (u_param);
+#endif
+		      protocol=IPPROTO_TCP;
+                      u_param = NULL;
+		    }
+                  break;
+                }
+              pos2++;
+            }
+
+          if (u_param == NULL || u_param->gname == NULL || u_param->gvalue == NULL)
+            {
+              break;            /* default is udp! */
+            }
+        }
+      pos++;
+      co = NULL;
+    }
+
+  if (co == NULL || co->url == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: contact header\n"));
+      return -1;
+    }
+
+  /* TODO:
+     remove extra parameter from new request-uri
+     check usual parameter like "transport"
+   */
+
+  /* replace request-uri with NEW contact address */
+  osip_uri_free (msg->req_uri);
+  msg->req_uri = NULL;
+  osip_uri_clone (co->url, &msg->req_uri);
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+
+  if (protocol==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+    }
+  else if (protocol==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  if (0 != osip_strcasecmp (msg->sip_method, "INVITE"))
+    {
+      i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+  } else
+    {
+      i = osip_transaction_init (&tr, ICT, eXosip.j_osip, msg);
+    }
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  if (out_tr == jc->c_out_tr)
+    {
+      /* replace with the new tr */
+      osip_list_add (eXosip.j_transactions, jc->c_out_tr, 0);
+      jc->c_out_tr = tr;
+
+      /* fix dialog issue */
+      if (jd!=NULL)
+      {
+        REMOVE_ELEMENT(jc->c_dialogs, jd);
+        eXosip_dialog_free(jd);
+        jd=NULL;
+      }
+    } else
+    {
+      /* add the new tr for the current dialog */
+      osip_list_add (jd->d_out_trs, tr, 0);
+    }
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_call_send_request_with_credential (eXosip_call_t * jc,
+                                           eXosip_dialog_t * jd,
+                                           osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  int i;
+  int pos;
+
+  if (jc == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  /* remove all previous authentication headers */
+  pos=0;
+  while (!osip_list_eol(msg->authorizations, pos))
+    {
+      osip_authorization_t *auth;
+      auth = (osip_authorization_t*)osip_list_get(msg->authorizations, pos);
+      osip_list_remove(msg->authorizations, pos);
+      osip_authorization_free(auth);
+      pos++;
+    }
+
+  pos=0;
+  while (!osip_list_eol(msg->proxy_authorizations, pos))
+    {
+      osip_proxy_authorization_t *auth;
+      auth = (osip_proxy_authorization_t*)osip_list_get(msg->proxy_authorizations, pos);
+      osip_list_remove(msg->proxy_authorizations, pos);
+      osip_authorization_free(auth);
+      pos++;
+    }
+
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+  i = _eXosip_find_protocol(out_tr->orig_request);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  if (0 != osip_strcasecmp (msg->sip_method, "INVITE"))
+    {
+      i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+  } else
+    {
+      i = osip_transaction_init (&tr, ICT, eXosip.j_osip, msg);
+    }
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  if (out_tr == jc->c_out_tr)
+    {
+      /* replace with the new tr */
+      osip_list_add (eXosip.j_transactions, jc->c_out_tr, 0);
+      jc->c_out_tr = tr;
+
+      /* fix dialog issue */
+      if (jd!=NULL)
+      {
+        REMOVE_ELEMENT(jc->c_dialogs, jd);
+        eXosip_dialog_free(jd);
+        jd=NULL;
+      }
+  } else
+    {
+      /* add the new tr for the current dialog */
+      osip_list_add (jd->d_out_trs, tr, 0);
+    }
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXconf.c b/libs/eXosip2/eXosip2/eXconf.c
new file mode 100644
index 0000000000000000000000000000000000000000..2e89e3ae209df08985e8db69167b099e3d29b9d4
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXconf.c
@@ -0,0 +1,803 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+#include <osip2/osip_mt.h>
+#include <osip2/osip_condv.h>
+
+extern eXosip_t eXosip;
+
+int ipv6_enable = 0;
+
+static void *_eXosip_thread (void *arg);
+static int _eXosip_execute (void);
+static void _eXosip_keep_alive(void);
+
+void
+eXosip_enable_ipv6 (int _ipv6_enable)
+{
+  ipv6_enable = _ipv6_enable;
+}
+
+void
+eXosip_masquerade_contact (const char *public_address, int port)
+{
+  if (public_address == NULL || public_address[0] == '\0')
+    {
+      memset (eXosip.net_interfaces[0].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[0].net_firewall_ip));
+      memset (eXosip.net_interfaces[1].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[1].net_firewall_ip));
+      memset (eXosip.net_interfaces[2].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[2].net_firewall_ip));
+      return;
+    }
+
+  snprintf (eXosip.net_interfaces[0].net_firewall_ip,
+	    sizeof (eXosip.net_interfaces[0].net_firewall_ip), "%s",
+            public_address);
+  snprintf (eXosip.net_interfaces[1].net_firewall_ip,
+	    sizeof (eXosip.net_interfaces[1].net_firewall_ip), "%s",
+            public_address);
+  snprintf (eXosip.net_interfaces[2].net_firewall_ip,
+	    sizeof (eXosip.net_interfaces[2].net_firewall_ip), "%s",
+            public_address);
+
+  if (port>0)
+    {
+      snprintf (eXosip.net_interfaces[0].net_port,
+		sizeof (eXosip.net_interfaces[0].net_port), "%i", port);
+      snprintf (eXosip.net_interfaces[1].net_port,
+		sizeof (eXosip.net_interfaces[1].net_port), "%i", port);
+      snprintf (eXosip.net_interfaces[2].net_port,
+		sizeof (eXosip.net_interfaces[2].net_port), "%i", port);
+    }
+  return;
+}
+
+int
+eXosip_force_masquerade_contact (const char *public_address)
+{
+  if (public_address == NULL || public_address[0] == '\0')
+    {
+      memset (eXosip.net_interfaces[0].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[0].net_firewall_ip));
+      memset (eXosip.net_interfaces[1].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[1].net_firewall_ip));
+      memset (eXosip.net_interfaces[2].net_firewall_ip, '\0',
+	      sizeof (eXosip.net_interfaces[2].net_firewall_ip));
+      eXosip.forced_localip = 0;
+      return 0;
+    }
+  eXosip.forced_localip = 1;
+  snprintf (eXosip.net_interfaces[0].net_firewall_ip, 50, "%s", public_address);
+  snprintf (eXosip.net_interfaces[1].net_firewall_ip, 50, "%s", public_address);
+  snprintf (eXosip.net_interfaces[2].net_firewall_ip, 50, "%s", public_address);
+  return 0;
+}
+
+int
+eXosip_guess_localip (int family, char *address, int size)
+{
+  return eXosip_guess_ip_for_via (family, address, size);
+}
+
+int
+eXosip_is_public_address (const char *c_address)
+{
+  return (0 != strncmp (c_address, "192.168", 7)
+          && 0 != strncmp (c_address, "10.", 3)
+          && 0 != strncmp (c_address, "172.16.", 7)
+          && 0 != strncmp (c_address, "172.17.", 7)
+          && 0 != strncmp (c_address, "172.18.", 7)
+          && 0 != strncmp (c_address, "172.19.", 7)
+          && 0 != strncmp (c_address, "172.20.", 7)
+          && 0 != strncmp (c_address, "172.21.", 7)
+          && 0 != strncmp (c_address, "172.22.", 7)
+          && 0 != strncmp (c_address, "172.23.", 7)
+          && 0 != strncmp (c_address, "172.24.", 7)
+          && 0 != strncmp (c_address, "172.25.", 7)
+          && 0 != strncmp (c_address, "172.26.", 7)
+          && 0 != strncmp (c_address, "172.27.", 7)
+          && 0 != strncmp (c_address, "172.28.", 7)
+          && 0 != strncmp (c_address, "172.29.", 7)
+          && 0 != strncmp (c_address, "172.30.", 7)
+          && 0 != strncmp (c_address, "172.31.", 7)
+          && 0 != strncmp (c_address, "169.254", 7));
+}
+
+void
+eXosip_set_user_agent (const char *user_agent)
+{
+  osip_free (eXosip.user_agent);
+  eXosip.user_agent = osip_strdup (user_agent);
+}
+
+void
+eXosip_kill_transaction (osip_list_t * transactions)
+{
+  osip_transaction_t *transaction;
+
+  if (!osip_list_eol (transactions, 0))
+    {
+      /* some transaction are still used by osip,
+         transaction should be released by modules! */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "module sfp: _osip_kill_transaction transaction should be released by modules!\n"));
+    }
+
+  while (!osip_list_eol (transactions, 0))
+    {
+      transaction = osip_list_get (transactions, 0);
+
+      __eXosip_delete_jinfo (transaction);
+      osip_transaction_free (transaction);
+    }
+}
+
+void
+eXosip_quit (void)
+{
+  jauthinfo_t *jauthinfo;
+  eXosip_call_t *jc;
+  eXosip_notify_t *jn;
+  eXosip_subscribe_t *js;
+  eXosip_reg_t *jreg;
+  eXosip_pub_t *jpub;
+  int i;
+  int pos;
+
+  eXosip.j_stop_ua = 1;         /* ask to quit the application */
+  __eXosip_wakeup ();
+  __eXosip_wakeup_event ();
+
+  i = osip_thread_join ((struct osip_thread *) eXosip.j_thread);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: can't terminate thread!\n"));
+    }
+  osip_free ((struct osip_thread *) eXosip.j_thread);
+
+  jpipe_close (eXosip.j_socketctl);
+  jpipe_close (eXosip.j_socketctl_event);
+
+  osip_free (eXosip.user_agent);
+
+  for (jc = eXosip.j_calls; jc != NULL; jc = eXosip.j_calls)
+    {
+      REMOVE_ELEMENT (eXosip.j_calls, jc);
+      eXosip_call_free (jc);
+    }
+
+  for (js = eXosip.j_subscribes; js != NULL; js = eXosip.j_subscribes)
+    {
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+    }
+
+  for (jn = eXosip.j_notifies; jn != NULL; jn = eXosip.j_notifies)
+    {
+      REMOVE_ELEMENT (eXosip.j_notifies, jn);
+      eXosip_notify_free (jn);
+    }
+
+  osip_mutex_destroy ((struct osip_mutex *) eXosip.j_mutexlock);
+  osip_cond_destroy ((struct osip_cond *) eXosip.j_cond);
+
+  if (eXosip.net_interfaces[0].net_socket)
+    {
+      close (eXosip.net_interfaces[0].net_socket);
+      eXosip.net_interfaces[0].net_socket = -1;
+    }
+  if (eXosip.net_interfaces[1].net_socket)
+    {
+      close (eXosip.net_interfaces[1].net_socket);
+      eXosip.net_interfaces[1].net_socket = -1;
+    }
+  if (eXosip.net_interfaces[2].net_socket)
+    {
+      close (eXosip.net_interfaces[2].net_socket);
+      eXosip.net_interfaces[2].net_socket = -1;
+    }
+
+  for (pos=0; pos<EXOSIP_MAX_SOCKETS; pos++)
+    {
+      if (eXosip.net_interfaces[0].net_socket_tab[pos].socket!=0)
+	close (eXosip.net_interfaces[0].net_socket_tab[pos].socket);
+      if (eXosip.net_interfaces[1].net_socket_tab[pos].socket!=0)
+	close (eXosip.net_interfaces[1].net_socket_tab[pos].socket);
+      if (eXosip.net_interfaces[2].net_socket_tab[pos].socket!=0)
+	close (eXosip.net_interfaces[2].net_socket_tab[pos].socket);
+    }
+
+  for (jreg = eXosip.j_reg; jreg != NULL; jreg = eXosip.j_reg)
+    {
+      REMOVE_ELEMENT (eXosip.j_reg, jreg);
+      eXosip_reg_free (jreg);
+    }
+
+  for (jpub = eXosip.j_pub; jpub != NULL; jpub = eXosip.j_pub)
+    {
+      REMOVE_ELEMENT (eXosip.j_pub, jpub);
+      _eXosip_pub_free (jpub);
+    }
+
+  while (!osip_list_eol (eXosip.j_transactions, 0))
+    {
+      osip_transaction_t *tr =
+        (osip_transaction_t *) osip_list_get (eXosip.j_transactions, 0);
+      if (tr->state == IST_TERMINATED || tr->state == ICT_TERMINATED
+          || tr->state == NICT_TERMINATED || tr->state == NIST_TERMINATED)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a terminated transaction\n"));
+          osip_list_remove (eXosip.j_transactions, 0);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+      } else
+        {
+          osip_list_remove (eXosip.j_transactions, 0);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+        }
+    }
+
+  osip_free (eXosip.j_transactions);
+
+  eXosip_kill_transaction (eXosip.j_osip->osip_ict_transactions);
+  eXosip_kill_transaction (eXosip.j_osip->osip_nict_transactions);
+  eXosip_kill_transaction (eXosip.j_osip->osip_ist_transactions);
+  eXosip_kill_transaction (eXosip.j_osip->osip_nist_transactions);
+  osip_release (eXosip.j_osip);
+
+  {
+    eXosip_event_t *ev;
+
+    for (ev = osip_fifo_tryget (eXosip.j_events); ev != NULL;
+         ev = osip_fifo_tryget (eXosip.j_events))
+      eXosip_event_free (ev);
+  }
+
+  osip_fifo_free (eXosip.j_events);
+
+  for (jauthinfo = eXosip.authinfos; jauthinfo != NULL;
+       jauthinfo = eXosip.authinfos)
+    {
+      REMOVE_ELEMENT (eXosip.authinfos, jauthinfo);
+      osip_free (jauthinfo);
+    }
+
+  return;
+}
+
+int eXosip_set_socket(int transport, int socket, int port)
+{
+  if (eXosip.net_interfaces[0].net_socket>0)
+    close(eXosip.net_interfaces[0].net_socket);
+
+  eXosip.net_interfaces[0].net_socket = socket;
+  snprintf (eXosip.net_interfaces[0].net_port,
+	    sizeof (eXosip.net_interfaces[0].net_port), "%i", port);
+
+  eXosip.j_thread = (void *) osip_thread_create (20000, _eXosip_thread, NULL);
+  if (eXosip.j_thread == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: Cannot start thread!\n"));
+      return -1;
+    }
+  return 0;
+}
+
+#ifdef IPV6_V6ONLY
+int setsockopt_ipv6only (int sock)
+{
+  int on = 1;
+
+  return setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+		    (char *)&on, sizeof(on));
+}
+#endif	/* IPV6_V6ONLY */
+
+int
+eXosip_listen_addr (int transport, const char *addr, int port, int family,
+		    int secure)
+{
+  int res;
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo *curinfo;
+  const char *node = addr;
+  int sock = -1;
+  struct eXosip_net *net_int;
+  char localip[256];
+
+  if (transport==IPPROTO_UDP)
+    net_int = &eXosip.net_interfaces[0];
+  else if (transport==IPPROTO_TCP)
+    net_int = &eXosip.net_interfaces[1];
+  else if (transport==IPPROTO_TCP && secure != 0)
+    net_int = &eXosip.net_interfaces[2];
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unknown protocol (use IPPROTO_UDP or IPPROTO_TCP!\n"));
+      return -1;
+    }
+
+  if (eXosip.http_port)
+  {
+      /* USE TUNNEL CAPABILITY */
+      transport=IPPROTO_TCP;
+  }
+
+  if (port < 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: port must be higher than 0!\n"));
+      return -1;
+    }
+
+  net_int->net_ip_family = family;
+  if (family == AF_INET6)
+    {
+      ipv6_enable = 1;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "IPv6 is enabled. Pls report bugs\n"));
+    }
+
+  eXosip_guess_localip (net_int->net_ip_family, localip,
+			sizeof (localip));
+  if (localip[0] == '\0')
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No ethernet interface found!\n"));
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: using 127.0.0.1 (debug mode)!\n"));
+      /* we should always fallback on something. The linphone user will surely
+         start linphone BEFORE setting its dial up connection. */
+    }
+
+  if (!node) {
+    node = ipv6_enable ? "::" : "0.0.0.0";
+  }
+
+
+  res = eXosip_get_addrinfo(&addrinfo, node, port, transport);
+  if (res)
+    return -1;
+    
+  for (curinfo = addrinfo; curinfo; curinfo = curinfo->ai_next)
+    {
+      socklen_t len;
+
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		   "eXosip: address for protocol %d (search %d)\n",
+		   curinfo->ai_protocol, transport));
+      if (curinfo->ai_protocol && curinfo->ai_protocol != transport)	
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Skipping protocol %d\n",
+		       curinfo->ai_protocol));
+	  continue;
+	}
+
+      sock = (int)socket(curinfo->ai_family, curinfo->ai_socktype,
+			 curinfo->ai_protocol);
+      if (sock < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot create socket!\n",
+		       strerror(errno)));
+	  continue;
+	}
+
+    if (eXosip.http_port)
+    {
+        break;
+    }
+
+      if (curinfo->ai_family == AF_INET6)
+	{
+#ifdef IPV6_V6ONLY
+	  if (setsockopt_ipv6only(sock))
+	    {
+	      close(sock);
+	      sock = -1;
+	      OSIP_TRACE (osip_trace
+			  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+			   "eXosip: Cannot set socket option!\n",
+			   strerror(errno)));
+	      continue;
+	    }
+#endif	/* IPV6_V6ONLY */
+	}
+      
+      res = bind (sock, curinfo->ai_addr, curinfo->ai_addrlen);
+      if (res < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot bind socket node:%s family:%d %s\n",
+		       node, curinfo->ai_family, strerror(errno)));
+	  close(sock);
+	  sock = -1;
+	  continue;
+	}
+      len = sizeof(net_int->ai_addr);
+      res = getsockname(sock, (struct sockaddr*)&net_int->ai_addr,
+			&len );
+      if (res!=0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot get socket name (%s)\n",
+		       strerror(errno)));
+	  memcpy(&net_int->ai_addr, curinfo->ai_addr, curinfo->ai_addrlen);
+	}
+
+      if (transport!=IPPROTO_UDP)
+	{
+	  res = listen(sock, SOMAXCONN);
+	  if (res < 0)
+	    {
+	      OSIP_TRACE (osip_trace
+			  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: Cannot bind socket node:%s family:%d %s\n",
+			   node, curinfo->ai_family, strerror(errno)));
+	      close(sock);
+	      sock = -1;
+	      continue;
+	    }
+        }
+      
+      break;
+    }
+
+  freeaddrinfo(addrinfo);
+
+  if (sock < 0)
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "eXosip: Cannot bind on port: %i\n",
+		   port));
+      return -1;
+    }
+
+  if (eXosip.http_port)
+      net_int->net_protocol = IPPROTO_UDP;
+  else
+      net_int->net_protocol = transport;
+  net_int->net_socket = sock;
+
+  if (port==0)
+    {
+      /* get port number from socket */
+      if (ipv6_enable == 0)
+	port = ntohs (((struct sockaddr_in*)&net_int->ai_addr)->sin_port);
+      else
+	port = ntohs (((struct sockaddr_in6*)&net_int->ai_addr)->sin6_port);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "eXosip: Binding on port %i!\n", port));
+    }
+
+  snprintf (net_int->net_port,
+	    sizeof (net_int->net_port) - 1, "%i", port);
+
+
+
+  if (eXosip.http_port)
+  {
+        /* only ipv4 */
+        struct sockaddr_in	_addr;
+	    char http_req[2048];
+	    char http_reply[2048];
+        int len;
+        _addr.sin_port = (unsigned short) htons(eXosip.http_port);
+        _addr.sin_addr.s_addr = inet_addr(eXosip.http_proxy);
+		_addr.sin_family = PF_INET;
+
+		if (connect(net_int->net_socket, (struct sockaddr *) &_addr, sizeof(_addr)) == -1)
+		{
+            OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                  "eXosip: Failed to connect to http server on %s:%i!\n", eXosip.http_proxy, port));
+			return -1;
+		}
+
+        sprintf(http_req, "GET / HTTP/1.1\r\nUdpHost: %s:%d\r\n\r\n", eXosip.http_outbound_proxy, 5060);
+
+		len = send(net_int->net_socket, http_req, (int) strlen(http_req), 0);
+
+		if (len < 0)
+			return -1;
+
+		osip_usleep(50000);
+
+		if ((len = recv(net_int->net_socket, http_reply, sizeof(http_reply), 0)) > 0)
+			http_reply[len] = '\0';
+		else
+			return -1;
+
+		if (strncmp(http_reply, "HTTP/1.0 200 OK\r\n", 17) == 0 || strncmp(http_reply, "HTTP/1.1 200 OK\r\n", 17) == 0)
+        {
+        }
+		else
+			return -1;
+  }
+
+  eXosip.j_thread = (void *) osip_thread_create (20000, _eXosip_thread, NULL);
+  if (eXosip.j_thread == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: Cannot start thread!\n"));
+      return -1;
+    }
+  return 0;
+}
+
+int
+eXosip_init (void)
+{
+  osip_t *osip;
+
+  memset (&eXosip, 0, sizeof (eXosip));
+
+#ifdef WIN32
+  /* Initializing windows socket library */
+  {
+    WORD wVersionRequested;
+    WSADATA wsaData;
+    int i;
+
+    wVersionRequested = MAKEWORD (1, 1);
+    i = WSAStartup (wVersionRequested, &wsaData);
+    if (i != 0)
+      {
+        OSIP_TRACE (osip_trace
+                    (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                     "eXosip: Unable to initialize WINSOCK, reason: %d\n", i));
+        /* return -1; It might be already initilized?? */
+      }
+  }
+#endif
+
+  eXosip.user_agent = osip_strdup ("eXosip/" EXOSIP_VERSION);
+
+  eXosip.j_calls = NULL;
+  eXosip.j_stop_ua = 0;
+  eXosip.j_thread = NULL;
+  eXosip.j_transactions = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (eXosip.j_transactions);
+  eXosip.j_reg = NULL;
+
+  eXosip.j_cond = (struct osip_cond *) osip_cond_init ();
+
+  eXosip.j_mutexlock = (struct osip_mutex *) osip_mutex_init ();
+
+  if (-1 == osip_init (&osip))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: Cannot initialize osip!\n"));
+      return -1;
+    }
+
+  osip_set_application_context (osip, &eXosip);
+
+  eXosip_set_callbacks (osip);
+
+  eXosip.j_osip = osip;
+
+  /* open a TCP socket to wake up the application when needed. */
+  eXosip.j_socketctl = jpipe ();
+  if (eXosip.j_socketctl == NULL)
+    return -1;
+
+  eXosip.j_socketctl_event = jpipe ();
+  if (eXosip.j_socketctl_event == NULL)
+    return -1;
+
+  /* To be changed in osip! */
+  eXosip.j_events = (osip_fifo_t *) osip_malloc (sizeof (osip_fifo_t));
+  osip_fifo_init (eXosip.j_events);
+
+  return 0;
+}
+
+
+static int
+_eXosip_execute (void)
+{
+  struct timeval lower_tv;
+  int i;
+
+  osip_timers_gettimeout (eXosip.j_osip, &lower_tv);
+  if (lower_tv.tv_sec > 15)
+    {
+      lower_tv.tv_sec = 15;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "eXosip: Reseting timer to 15s before waking up!\n"));
+  } else
+    {
+        /*  add a small amount of time on windows to avoid
+            waking up too early. (probably a bad time precision) */
+        if (lower_tv.tv_usec<900000)
+            lower_tv.tv_usec = 100000; /* add 10ms */
+        else 
+        {
+            lower_tv.tv_usec = 10000; /* add 10ms */
+            lower_tv.tv_sec++;
+        }
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "eXosip: timer sec:%i usec:%i!\n",
+                   lower_tv.tv_sec, lower_tv.tv_usec));
+    }
+  i = eXosip_read_message (1, lower_tv.tv_sec, lower_tv.tv_usec);
+
+  if (i == -2)
+    {
+      return -2;
+    }
+
+  eXosip_lock ();
+  osip_timers_ict_execute (eXosip.j_osip);
+  osip_timers_nict_execute (eXosip.j_osip);
+  osip_timers_ist_execute (eXosip.j_osip);
+  osip_timers_nist_execute (eXosip.j_osip);
+
+  osip_ict_execute (eXosip.j_osip);
+  osip_nict_execute (eXosip.j_osip);
+  osip_ist_execute (eXosip.j_osip);
+  osip_nist_execute (eXosip.j_osip);
+
+  /* free all Calls that are in the TERMINATED STATE? */
+  eXosip_release_terminated_calls ();
+  eXosip_release_terminated_registrations ();
+
+  eXosip_unlock ();
+
+
+  if (eXosip.keep_alive>0)
+  {
+      _eXosip_keep_alive();
+  }
+
+  return 0;
+}
+
+int eXosip_set_option(eXosip_option opt, void *value)
+{
+    int val;
+    char *tmp;
+	switch (opt) {
+		case EXOSIP_OPT_UDP_KEEP_ALIVE:
+            val = *((int*)value);
+            eXosip.keep_alive = val; /* value in ms */
+            break;
+		case EXOSIP_OPT_UDP_LEARN_PORT:
+            val = *((int*)value);
+            eXosip.learn_port = val; /* value in ms */
+            break;
+		case EXOSIP_OPT_SET_HTTP_TUNNEL_PORT:
+            val = *((int*)value);
+            eXosip.http_port = val; /* value in ms */
+            break;
+		case EXOSIP_OPT_SET_HTTP_TUNNEL_PROXY:
+            tmp = (char*)value;
+            memset(eXosip.http_proxy, '\0', sizeof(eXosip.http_proxy));
+            if (tmp!=NULL && tmp[0]!='\0')
+                strncpy(eXosip.http_proxy, tmp, sizeof(eXosip.http_proxy)); /* value in proxy:port */
+            break;
+		case EXOSIP_OPT_SET_HTTP_OUTBOUND_PROXY:
+            tmp = (char*)value;
+            memset(eXosip.http_outbound_proxy, '\0', sizeof(eXosip.http_outbound_proxy));
+            if (tmp!=NULL && tmp[0]!='\0')
+                strncpy(eXosip.http_outbound_proxy, tmp, sizeof(eXosip.http_outbound_proxy)); /* value in proxy:port */
+            break;
+            
+    }
+    return 0;
+}
+
+static void
+_eXosip_keep_alive(void)
+{
+    static struct timeval mtimer = { 0, 0 };
+
+    eXosip_reg_t *jr;
+    struct eXosip_net *net;
+    char buf[4] = "jaK";
+    struct timeval now;
+    osip_gettimeofday (&now, NULL);
+
+    if (mtimer.tv_sec==0 && mtimer.tv_usec==0)
+    {
+        /* first init */
+        osip_gettimeofday (&mtimer, NULL);
+	    add_gettimeofday (&mtimer, eXosip.keep_alive);
+    }
+
+    if (osip_timercmp (&now, &mtimer, <))
+    {
+        return; /* not yet time */
+    }
+
+    /* reset timer */
+    osip_gettimeofday (&mtimer, NULL);
+	add_gettimeofday (&mtimer, eXosip.keep_alive);
+
+    net = &eXosip.net_interfaces[0];
+    if (net == NULL)
+    {
+        return ;
+    }
+
+    for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+        if (jr->len>0)
+        {
+            if (sendto (net->net_socket, (const void *) buf, 4, 0,	 
+                (struct sockaddr *) &(jr->addr), jr->len )>0)
+            {
+                OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                            "eXosip: Keep Alive sent on UDP!\n"));
+            }
+        }
+    }
+}
+
+void *
+_eXosip_thread (void *arg)
+{
+  int i;
+
+  while (eXosip.j_stop_ua == 0)
+    {
+      i = _eXosip_execute ();
+      if (i == -2)
+        osip_thread_exit ();
+    }
+  osip_thread_exit ();
+  return NULL;
+}
+
diff --git a/libs/eXosip2/eXosip2/eXinsubscription_api.c b/libs/eXosip2/eXosip2/eXinsubscription_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..973cfef6c10b5ea71f8a69224ebdf99377ea26db
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXinsubscription_api.c
@@ -0,0 +1,567 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+static int _eXosip_insubscription_transaction_find (int tid,
+                                                    eXosip_notify_t ** jn,
+                                                    eXosip_dialog_t ** jd,
+                                                    osip_transaction_t ** tr);
+
+static int
+_eXosip_insubscription_transaction_find (int tid, eXosip_notify_t ** jn,
+                                         eXosip_dialog_t ** jd,
+                                         osip_transaction_t ** tr)
+{
+  for (*jn = eXosip.j_notifies; *jn != NULL; *jn = (*jn)->next)
+    {
+      if ((*jn)->n_inc_tr != NULL && (*jn)->n_inc_tr->transactionid == tid)
+        {
+          *tr = (*jn)->n_inc_tr;
+          *jd = (*jn)->n_dialogs;
+          return 0;
+        }
+      if ((*jn)->n_out_tr != NULL && (*jn)->n_out_tr->transactionid == tid)
+        {
+          *tr = (*jn)->n_out_tr;
+          *jd = (*jn)->n_dialogs;
+          return 0;
+        }
+      for (*jd = (*jn)->n_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          osip_transaction_t *transaction;
+          int pos = 0;
+
+          while (!osip_list_eol ((*jd)->d_inc_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_inc_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+
+          pos = 0;
+          while (!osip_list_eol ((*jd)->d_out_trs, pos))
+            {
+              transaction =
+                (osip_transaction_t *) osip_list_get ((*jd)->d_out_trs, pos);
+              if (transaction != NULL && transaction->transactionid == tid)
+                {
+                  *tr = transaction;
+                  return 0;
+                }
+              pos++;
+            }
+        }
+    }
+  *jd = NULL;
+  *jn = NULL;
+  return -1;
+}
+
+int
+eXosip_insubscription_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+  osip_transaction_t *tr = NULL;
+
+  *answer = NULL;
+
+  if (tid > 0)
+    {
+      _eXosip_insubscription_transaction_find (tid, &jn, &jd, &tr);
+    }
+  if (tr == NULL || jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      return -1;
+    }
+
+  if (status < 101 || status > 699)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: wrong status code (101<status<699)\n"));
+      return -1;
+    }
+
+  if (jd != NULL)
+    i =
+      _eXosip_build_response_default (answer, jd->d_dialog, status,
+                                      tr->orig_request);
+  else
+    i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for %s\n",
+                              tr->orig_request->sip_method));
+      return -1;
+    }
+
+  if (status >= 200 && status <= 299)
+    _eXosip_notify_add_expires_in_2XX_for_subscribe (jn, *answer);
+
+  if (status < 300)
+    i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+
+  return 0;
+}
+
+int
+eXosip_insubscription_send_answer (int tid, int status, osip_message_t * answer)
+{
+  int i = -1;
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+
+  if (tid > 0)
+    {
+      _eXosip_insubscription_transaction_find (tid, &jn, &jd, &tr);
+    }
+  if (jd == NULL || tr == NULL || tr->orig_request == NULL
+      || tr->orig_request->sip_method == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "SUBSCRIBE"))
+        {
+          if (status >= 101 && status <= 199)
+            {
+          } else if (status >= 300 && status <= 699)
+            {
+          } else
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: Wrong parameter?\n"));
+              return -1;
+            }
+        }
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (0 == osip_strcasecmp (tr->orig_request->sip_method, "SUBSCRIBE"))
+        {
+          if (status < 200)
+            i = _eXosip_insubscription_answer_1xx (jn, jd, status);
+          else
+            i = _eXosip_insubscription_answer_3456xx (jn, jd, status);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot send response!\n"));
+              return -1;
+            }
+      } else
+        {
+          /* TODO */
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: a response must be given!\n"));
+          return -1;
+        }
+      return 0;
+  } else
+    {
+      i = 0;
+    }
+
+  if (0 == osip_strcasecmp (tr->orig_request->sip_method, "SUBSCRIBE"))
+    {
+      if (MSG_IS_STATUS_1XX (answer))
+        {
+      } else if (MSG_IS_STATUS_2XX (answer))
+        {
+          eXosip_dialog_set_200ok (jd, answer);
+          osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+      } else if (answer->status_code >= 300 && answer->status_code <= 699)
+        {
+          i = 0;
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (101<status<699)\n"));
+	  osip_message_free (answer);
+          return -1;
+        }
+      if (i != 0)
+        {
+	  osip_message_free (answer);
+	  return -1;
+	}
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  eXosip_update ();
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_insubscription_build_notify (int did, int subscription_status,
+                                    int subscription_reason,
+                                    osip_message_t ** request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+
+  char subscription_state[50];
+  char *tmp;
+  int now = time (NULL);
+
+  int i;
+
+  *request = NULL;
+  if (did > 0)
+    {
+      eXosip_notify_dialog_find (did, &jn, &jd);
+    }
+  if (jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      return -1;
+    }
+
+  i = eXosip_insubscription_build_request (did, "NOTIFY", request);
+  if (i != 0)
+    {
+      return i;
+    }
+#ifndef SUPPORT_MSN
+  if (subscription_status == EXOSIP_SUBCRSTATE_PENDING)
+    osip_strncpy (subscription_state, "pending;expires=", 16);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_ACTIVE)
+    osip_strncpy (subscription_state, "active;expires=", 15);
+  else if (subscription_status == EXOSIP_SUBCRSTATE_TERMINATED)
+    {
+      if (subscription_reason == DEACTIVATED)
+        osip_strncpy (subscription_state, "terminated;reason=deactivated", 29);
+      else if (subscription_reason == PROBATION)
+        osip_strncpy (subscription_state, "terminated;reason=probation", 27);
+      else if (subscription_reason == REJECTED)
+        osip_strncpy (subscription_state, "terminated;reason=rejected", 26);
+      else if (subscription_reason == TIMEOUT)
+        osip_strncpy (subscription_state, "terminated;reason=timeout", 25);
+      else if (subscription_reason == GIVEUP)
+        osip_strncpy (subscription_state, "terminated;reason=giveup", 24);
+      else if (subscription_reason == NORESOURCE)
+        osip_strncpy (subscription_state, "terminated;reason=noresource", 28);
+      else
+        osip_strncpy (subscription_state, "terminated;reason=noresource", 28);
+  } else
+    osip_strncpy (subscription_state, "pending;expires=", 16);
+
+  tmp = subscription_state + strlen (subscription_state);
+  if (subscription_status != EXOSIP_SUBCRSTATE_TERMINATED)
+    sprintf (tmp, "%i", jn->n_ss_expires - now);
+  osip_message_set_header (*request, "Subscription-State", subscription_state);
+#endif
+
+  return 0;
+}
+
+int
+eXosip_insubscription_build_request (int did, const char *method,
+                                     osip_message_t ** request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+
+  osip_transaction_t *transaction;
+  char *transport;
+  int i;
+
+  *request = NULL;
+  if (method == NULL || method[0] == '\0')
+    return -1;
+
+  if (did > 0)
+    {
+      eXosip_notify_dialog_find (did, &jn, &jd);
+    }
+  if (jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_notify (jn, jd);
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+        return -1;
+    }
+
+  transport = NULL;
+  if (transaction==NULL)
+    transaction = jn->n_inc_tr;
+
+  if (transaction!=NULL && transaction->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(transaction->orig_request);
+
+  transaction = NULL;
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (request, method, jd->d_dialog, transport);
+  if (i != 0)
+    return -2;
+
+  return 0;
+}
+
+int
+eXosip_insubscription_send_request (int did, osip_message_t * request)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_notify_t *jn = NULL;
+
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  if (request == NULL)
+    return -1;
+
+  if (did > 0)
+    {
+      eXosip_notify_dialog_find (did, &jn, &jd);
+    }
+  if (jd == NULL || jn == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No incoming subscription here?\n"));
+      osip_message_free (request);
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_notify (jn, jd);
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+        {
+          osip_message_free (request);
+          return -1;
+        }
+      transaction = NULL;
+    }
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, request);
+  if (i != 0)
+    {
+      osip_message_free (request);
+      return -1;
+    }
+
+  osip_list_add (jd->d_out_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (request);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, NULL, jn));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_insubscription_send_request_with_credential (eXosip_notify_t * jn,
+                                                     eXosip_dialog_t * jd,
+                                                     osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  int i;
+
+  if (jn == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+
+  if (out_tr == NULL)
+    {
+      out_tr = eXosip_find_last_out_notify (jn, jd);
+    }
+
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+
+  i = _eXosip_find_protocol(out_tr->orig_request);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  /* add the new tr for the current dialog */
+  osip_list_add (jd->d_out_trs, tr, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (NULL, jd, NULL, jn));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXmessage_api.c b/libs/eXosip2/eXosip2/eXmessage_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..c21b649fffc954576478036e5c2fcabc3b35fdae
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXmessage_api.c
@@ -0,0 +1,196 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_message_build_request (osip_message_t ** message, const char *method,
+                              const char *to, const char *from, const char *route)
+{
+  int i;
+
+  *message = NULL;
+  if (method != NULL && *method == '\0')
+    return -1;
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (from != NULL && *from == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = generating_request_out_of_dialog (message, method, to, "UDP", from, route);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+int
+eXosip_message_send_request (osip_message_t * message)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, message);
+  if (i != 0)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (message);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_message_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  osip_transaction_t *tr = NULL;
+  int i = -1;
+
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+  if (status > 100 && status < 200)
+    {
+#if 0
+      /* TODO: not implemented */
+      i = _eXosip_build_response_default (response, NULL, code, tr->orig_request);
+#endif
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: status code 1xx for message not implemented (use 200<status<699)\n"));
+      return -1;
+  } else if (status > 199 && status < 300)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else if (status > 300 && status < 699)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: wrong status code (200<status<699)\n"));
+      return -1;
+    }
+  if (i != 0)
+    return -1;
+  return 0;
+}
+
+int
+eXosip_message_send_answer (int tid, int status, osip_message_t * answer)
+{
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+  int i = -1;
+
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No MESSAGE transaction found\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (status > 100 && status < 200)
+        {
+#if 0
+          /* TODO: not implemented */
+          i =
+            _eXosip_build_response_default (response, NULL, code,
+                                            tr->orig_request);
+#endif
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: status code 1xx for message not implemented (use 200<status<699)\n"));
+          return -1;
+      } else if (status > 199 && status < 300)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else if (status > 300 && status < 699)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (200<status<699)\n"));
+          return -1;
+        }
+      if (i != 0)
+        return -1;
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXoptions_api.c b/libs/eXosip2/eXosip2/eXoptions_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..e8c1ec6406985e6aa6745085bc7cb0ba728c05f6
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXoptions_api.c
@@ -0,0 +1,200 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_options_build_request (osip_message_t ** options, const char *to,
+                              const char *from, const char *route)
+{
+  int i;
+
+  *options = NULL;
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (from != NULL && *from == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = generating_request_out_of_dialog (options, "OPTIONS", to, "UDP", from,
+                                        route);
+  if (i != 0)
+    return -1;
+
+  /* after this delay, we should send a CANCEL */
+  osip_message_set_expires (*options, "120");
+
+  /* osip_message_set_organization(*invite, "Jack's Org"); */
+  return 0;
+}
+
+int
+eXosip_options_send_request (osip_message_t * options)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, options);
+  if (i != 0)
+    {
+      osip_message_free (options);
+      return -1;
+    }
+
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (options);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_options_build_answer (int tid, int status, osip_message_t ** answer)
+{
+  osip_transaction_t *tr = NULL;
+  int i = -1;
+
+  *answer = NULL;
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return -1;
+    }
+  if (status > 100 && status < 200)
+    {
+#if 0
+      /* TODO: not implemented */
+      i = _eXosip_build_response_default (response, NULL, code, tr->orig_request);
+#endif
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: status code 1xx for options not implemented (use 200<status<699)\n"));
+      return -1;
+  } else if (status > 199 && status < 300)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else if (status > 300 && status < 699)
+    {
+      i = _eXosip_build_response_default (answer, NULL, status, tr->orig_request);
+  } else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: wrong status code (200<status<699)\n"));
+      return -1;
+    }
+  if (i != 0)
+    return -1;
+  return 0;
+}
+
+int
+eXosip_options_send_answer (int tid, int status, osip_message_t * answer)
+{
+  osip_transaction_t *tr = NULL;
+  osip_event_t *evt_answer;
+  int i = -1;
+
+  if (tid > 0)
+    {
+      eXosip_transaction_find (tid, &tr);
+    }
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No OPTIONS transaction found\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == NIST_COMPLETED || tr->state == NIST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      osip_message_free (answer);
+      return -1;
+    }
+
+  if (answer == NULL)
+    {
+      if (status > 100 && status < 200)
+        {
+#if 0
+          /* TODO: not implemented */
+          i =
+            _eXosip_build_response_default (response, NULL, code,
+                                            tr->orig_request);
+#endif
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: status code 1xx for options not implemented (use 200<status<699)\n"));
+          return -1;
+      } else if (status > 199 && status < 300)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else if (status > 300 && status < 699)
+        {
+          i =
+            _eXosip_build_response_default (&answer, NULL, status,
+                                            tr->orig_request);
+      } else
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: wrong status code (200<status<699)\n"));
+          return -1;
+        }
+      if (i != 0)
+        return -1;
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXosip.c b/libs/eXosip2/eXosip2/eXosip.c
new file mode 100644
index 0000000000000000000000000000000000000000..c93f3cf3a59976f24f184d8387875b522bd15b87
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXosip.c
@@ -0,0 +1,760 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+
+
+#ifndef  WIN32
+#include <memory.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <unistd.h>
+#endif
+
+/* Private functions */
+static jauthinfo_t *eXosip_find_authentication_info (const char *username,
+                                                     const char *realm);
+
+eXosip_t eXosip;
+
+void
+__eXosip_wakeup (void)
+{
+  jpipe_write (eXosip.j_socketctl, "w", 1);
+}
+
+void
+__eXosip_wakeup_event (void)
+{
+  jpipe_write (eXosip.j_socketctl_event, "w", 1);
+}
+
+
+int
+eXosip_lock (void)
+{
+  return osip_mutex_lock ((struct osip_mutex *) eXosip.j_mutexlock);
+}
+
+int
+eXosip_unlock (void)
+{
+  return osip_mutex_unlock ((struct osip_mutex *) eXosip.j_mutexlock);
+}
+
+int
+eXosip_transaction_find (int tid, osip_transaction_t ** transaction)
+{
+  int pos = 0;
+
+  *transaction = NULL;
+  while (!osip_list_eol (eXosip.j_transactions, pos))
+    {
+      osip_transaction_t *tr;
+
+      tr = (osip_transaction_t *) osip_list_get (eXosip.j_transactions, pos);
+      if (tr->transactionid == tid)
+        {
+          *transaction = tr;
+          return 0;
+        }
+      pos++;
+    }
+  return -1;
+}
+
+void
+eXosip_automatic_action (void)
+{
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_dialog_t *jd;
+  eXosip_notify_t *jn;
+
+  eXosip_reg_t *jr;
+  int now;
+
+  now = time (NULL);
+
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      if (jc->c_id < 1)
+        {
+      } else if (jc->c_dialogs == NULL || jc->c_dialogs->d_dialog == NULL)
+        {
+          /* an EARLY dialog may have failed with 401,407 or 3Xx */
+
+          osip_transaction_t *out_tr = NULL;
+
+          out_tr = jc->c_out_tr;
+
+          if (out_tr != NULL
+              && (out_tr->state == ICT_TERMINATED
+                  || out_tr->state == NICT_TERMINATED
+                  || out_tr->state == ICT_COMPLETED
+                  || out_tr->state == NICT_COMPLETED) &&
+              now - out_tr->birth_time < 120 &&
+              out_tr->orig_request != NULL &&
+              out_tr->last_response != NULL &&
+              (out_tr->last_response->status_code == 401
+               || out_tr->last_response->status_code == 407))
+            {
+              /* retry with credential */
+              if (jc->c_retry < 3)
+                {
+                  int i;
+
+                  i = _eXosip_call_send_request_with_credential (jc, NULL, out_tr);
+                  if (i != 0)
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                   "eXosip: could not clone msg for authentication\n"));
+                    }
+                  jc->c_retry++;
+                }
+          } else if (out_tr != NULL
+                     && (out_tr->state == ICT_TERMINATED
+                         || out_tr->state == NICT_TERMINATED
+                         || out_tr->state == ICT_COMPLETED
+                         || out_tr->state == NICT_COMPLETED) &&
+                     now - out_tr->birth_time < 120 &&
+                     out_tr->orig_request != NULL &&
+                     out_tr->last_response != NULL &&
+                     (out_tr->last_response->status_code >= 300
+                      && out_tr->last_response->status_code <= 399))
+            {
+              /* retry with credential */
+              int i;
+
+              i = _eXosip_call_redirect_request (jc, NULL, out_tr);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: could not clone msg for redirection\n"));
+                }
+            }
+        }
+
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog == NULL)     /* finished call */
+            {
+          } else
+            {
+              osip_transaction_t *out_tr = NULL;
+
+              out_tr = osip_list_get (jd->d_out_trs, 0);
+              if (out_tr == NULL)
+                out_tr = jc->c_out_tr;
+
+              if (out_tr != NULL
+                  && (out_tr->state == ICT_TERMINATED
+                      || out_tr->state == NICT_TERMINATED
+                      || out_tr->state == ICT_COMPLETED
+                      || out_tr->state == NICT_COMPLETED) &&
+                  now - out_tr->birth_time < 120 &&
+                  out_tr->orig_request != NULL &&
+                  out_tr->last_response != NULL &&
+                  (out_tr->last_response->status_code == 401
+                   || out_tr->last_response->status_code == 407))
+                {
+                  /* retry with credential */
+                  if (jd->d_retry < 3)
+                    {
+                      int i;
+
+                      i =
+                        _eXosip_call_send_request_with_credential (jc, jd, out_tr);
+                      if (i != 0)
+                        {
+                          OSIP_TRACE (osip_trace
+                                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                       "eXosip: could not clone msg for authentication\n"));
+                        }
+                      jd->d_retry++;
+                    }
+              } else if (out_tr != NULL
+                         && (out_tr->state == ICT_TERMINATED
+                             || out_tr->state == NICT_TERMINATED
+                             || out_tr->state == ICT_COMPLETED
+                             || out_tr->state == NICT_COMPLETED) &&
+                         now - out_tr->birth_time < 120 &&
+                         out_tr->orig_request != NULL &&
+                         out_tr->last_response != NULL &&
+                         (out_tr->last_response->status_code >= 300
+                          && out_tr->last_response->status_code <= 399))
+                {
+                  /* retry with credential */
+                  int i;
+
+                  i = _eXosip_call_redirect_request (jc, jd, out_tr);
+                  if (i != 0)
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                   "eXosip: could not clone msg for redirection\n"));
+                    }
+                }
+            }
+        }
+    }
+
+  for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+    {
+      if (js->s_id < 1)
+        {
+      } else if (js->s_dialogs == NULL)
+        {
+          osip_transaction_t *out_tr = NULL;
+
+          out_tr = js->s_out_tr;
+
+          if (out_tr != NULL
+              && (out_tr->state == NICT_TERMINATED
+                  || out_tr->state == NICT_COMPLETED) &&
+              now - out_tr->birth_time < 120 &&
+              out_tr->orig_request != NULL &&
+              out_tr->last_response != NULL &&
+              (out_tr->last_response->status_code == 401
+               || out_tr->last_response->status_code == 407))
+            {
+              /* retry with credential */
+              if (js->s_retry < 3)
+                {
+                  int i;
+
+                  i =
+                    _eXosip_subscribe_send_request_with_credential (js, NULL,
+                                                                    out_tr);
+                  if (i != 0)
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                   "eXosip: could not clone msg for authentication\n"));
+                    }
+                  js->s_retry++;
+                }
+            }
+        }
+
+      for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id >= 1)
+                {
+                  osip_transaction_t *out_tr = NULL;
+
+                  out_tr = osip_list_get (jd->d_out_trs, 0);
+                  if (out_tr == NULL)
+                    out_tr = js->s_out_tr;
+
+                  if (out_tr != NULL
+                      && (out_tr->state == NICT_TERMINATED
+                          || out_tr->state == NICT_COMPLETED) &&
+                      now - out_tr->birth_time < 120 &&
+                      out_tr->orig_request != NULL &&
+                      out_tr->last_response != NULL &&
+                      (out_tr->last_response->status_code == 401
+                       || out_tr->last_response->status_code == 407))
+                    {
+                      /* retry with credential */
+                      if (jd->d_retry < 3)
+                        {
+                          int i;
+
+                          i =
+                            _eXosip_subscribe_send_request_with_credential
+                            (js, jd, out_tr);
+                          if (i != 0)
+                            {
+                              OSIP_TRACE (osip_trace
+                                          (__FILE__, __LINE__, OSIP_ERROR,
+                                           NULL,
+                                           "eXosip: could not clone suscbribe for authentication\n"));
+                            }
+                          jd->d_retry++;
+                        }
+                  } else if (js->s_reg_period == 0 || out_tr == NULL)
+                    {
+                  } else if (now - out_tr->birth_time > js->s_reg_period - 60)
+                    {           /* will expires in 60 sec: send refresh! */
+                      int i;
+
+                      i =
+                        _eXosip_subscribe_send_request_with_credential (js,
+                                                                        jd,
+                                                                        out_tr);
+                      if (i != 0)
+                        {
+                          OSIP_TRACE (osip_trace
+                                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                       "eXosip: could not clone subscribe for refresh\n"));
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+  for (jn = eXosip.j_notifies; jn != NULL; jn = jn->next)
+    {
+      for (jd = jn->n_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id >= 1)
+                {
+                  osip_transaction_t *out_tr = NULL;
+
+                  out_tr = osip_list_get (jd->d_out_trs, 0);
+
+                  if (out_tr != NULL
+                      && (out_tr->state == NICT_TERMINATED
+                          || out_tr->state == NICT_COMPLETED) &&
+                      now - out_tr->birth_time < 120 &&
+                      out_tr->orig_request != NULL &&
+                      out_tr->last_response != NULL &&
+                      (out_tr->last_response->status_code == 401
+                       || out_tr->last_response->status_code == 407))
+                    {
+                      /* retry with credential */
+                      if (jd->d_retry < 3)
+                        {
+                          int i;
+
+                          i =
+                            _eXosip_insubscription_send_request_with_credential
+                            (jn, jd, out_tr);
+                          if (i != 0)
+                            {
+                              OSIP_TRACE (osip_trace
+                                          (__FILE__, __LINE__, OSIP_ERROR,
+                                           NULL,
+                                           "eXosip: could not clone notify for authentication\n"));
+                            }
+                          jd->d_retry++;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+  for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+      if (jr->r_id >= 1 && jr->r_last_tr != NULL)
+        {
+          if (jr->r_reg_period == 0)
+            {
+              /* skip refresh! */
+          } else if (now - jr->r_last_tr->birth_time > 900)
+            {
+              /* automatic refresh */
+              eXosip_register_send_register (jr->r_id, NULL);
+          } else if (now - jr->r_last_tr->birth_time > jr->r_reg_period - 60)
+            {
+              /* automatic refresh */
+              eXosip_register_send_register (jr->r_id, NULL);
+          } else if (now - jr->r_last_tr->birth_time > 120 &&
+                     (jr->r_last_tr->last_response == NULL
+                      || (!MSG_IS_STATUS_2XX (jr->r_last_tr->last_response))))
+            {
+              /* automatic refresh */
+              eXosip_register_send_register (jr->r_id, NULL);
+          } else if (now - jr->r_last_tr->birth_time < 120 &&
+                     jr->r_last_tr->orig_request != NULL &&
+                     (jr->r_last_tr->last_response != NULL
+                      && (jr->r_last_tr->last_response->status_code == 401
+                          || jr->r_last_tr->last_response->status_code == 407)))
+            {
+              if (jr->r_retry < 3)
+                {
+                  /* TODO: improve support for several retries when
+                     several credentials are needed */
+                  eXosip_register_send_register (jr->r_id, NULL);
+                  jr->r_retry++;
+                }
+            }
+        }
+    }
+}
+
+void
+eXosip_update ()
+{
+  static int static_id = 1;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  eXosip_dialog_t *jd;
+  int now;
+
+  if (static_id > 100000)
+    static_id = 1;              /* loop */
+
+  now = time (NULL);
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      if (jc->c_id < 1)
+        {
+          jc->c_id = static_id;
+          static_id++;
+        }
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id < 1)
+                {
+                  jd->d_id = static_id;
+                  static_id++;
+                }
+          } else
+            jd->d_id = -1;
+        }
+    }
+
+  for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+    {
+      if (js->s_id < 1)
+        {
+          js->s_id = static_id;
+          static_id++;
+        }
+      for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id < 1)
+                {
+                  jd->d_id = static_id;
+                  static_id++;
+                }
+          } else
+            jd->d_id = -1;
+        }
+    }
+
+  for (jn = eXosip.j_notifies; jn != NULL; jn = jn->next)
+    {
+      if (jn->n_id < 1)
+        {
+          jn->n_id = static_id;
+          static_id++;
+        }
+      for (jd = jn->n_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)     /* finished call */
+            {
+              if (jd->d_id < 1)
+                {
+                  jd->d_id = static_id;
+                  static_id++;
+                }
+          } else
+            jd->d_id = -1;
+        }
+    }
+}
+
+static jauthinfo_t *
+eXosip_find_authentication_info (const char *username, const char *realm)
+{
+  jauthinfo_t *fallback = NULL;
+  jauthinfo_t *authinfo;
+
+  for (authinfo = eXosip.authinfos; authinfo != NULL; authinfo = authinfo->next)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "INFO: authinfo: %s %s\n", realm, authinfo->realm));
+      if (0 == strcmp (authinfo->username, username))
+        {
+          if (authinfo->realm == NULL || authinfo->realm[0] == '\0')
+            {
+              fallback = authinfo;
+          } else if (strcmp (realm, authinfo->realm) == 0
+                     || 0 == strncmp (realm + 1, authinfo->realm,
+                                      strlen (realm) - 2))
+            {
+              return authinfo;
+            }
+        }
+    }
+
+  /* no matching username has been found for this realm,
+     try with another username... */
+  for (authinfo = eXosip.authinfos; authinfo != NULL; authinfo = authinfo->next)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "INFO: authinfo: %s %s\n", realm, authinfo->realm));
+      if (authinfo->realm == NULL || authinfo->realm[0] == '\0')
+        {
+          fallback = authinfo;
+      } else if (strcmp (realm, authinfo->realm) == 0
+                 || 0 == strncmp (realm + 1, authinfo->realm, strlen (realm) - 2))
+        {
+          return authinfo;
+        }
+    }
+
+  return fallback;
+}
+
+
+int
+eXosip_clear_authentication_info ()
+{
+  jauthinfo_t *jauthinfo;
+
+  for (jauthinfo = eXosip.authinfos; jauthinfo != NULL;
+       jauthinfo = eXosip.authinfos)
+    {
+      REMOVE_ELEMENT (eXosip.authinfos, jauthinfo);
+      osip_free (jauthinfo);
+    }
+  return 0;
+}
+
+int
+eXosip_add_authentication_info (const char *username, const char *userid,
+                                const char *passwd, const char *ha1,
+                                const char *realm)
+{
+  jauthinfo_t *authinfos;
+
+  if (username == NULL || username[0] == '\0')
+    return -1;
+  if (userid == NULL || userid[0] == '\0')
+    return -1;
+
+  if (passwd != NULL && passwd[0] != '\0')
+    {
+  } else if (ha1 != NULL && ha1[0] != '\0')
+    {
+  } else
+    return -1;
+
+  authinfos = (jauthinfo_t *) osip_malloc (sizeof (jauthinfo_t));
+  if (authinfos == NULL)
+    return -1;
+  memset (authinfos, 0, sizeof (jauthinfo_t));
+
+  snprintf (authinfos->username, 50, "%s", username);
+  snprintf (authinfos->userid, 50, "%s", userid);
+  if (passwd != NULL && passwd[0] != '\0')
+    snprintf (authinfos->passwd, 50, "%s", passwd);
+  else if (ha1 != NULL && ha1[0] != '\0')
+    snprintf (authinfos->ha1, 50, "%s", ha1);
+  if (realm != NULL && realm[0] != '\0')
+    snprintf (authinfos->realm, 50, "%s", realm);
+
+  ADD_ELEMENT (eXosip.authinfos, authinfos);
+  return 0;
+}
+
+int
+eXosip_add_authentication_information (osip_message_t * req,
+                                       osip_message_t * last_response)
+{
+  osip_authorization_t *aut = NULL;
+  osip_www_authenticate_t *wwwauth = NULL;
+  osip_proxy_authorization_t *proxy_aut = NULL;
+  osip_proxy_authenticate_t *proxyauth = NULL;
+  jauthinfo_t *authinfo = NULL;
+  int pos;
+  int i;
+
+  if (req == NULL
+      || req->from == NULL
+      || req->from->url == NULL || req->from->url->username == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "authinfo: Invalid message\n"));
+      return -1;
+    }
+
+  pos = 0;
+  osip_message_get_www_authenticate (last_response, pos, &wwwauth);
+  osip_message_get_proxy_authenticate (last_response, pos, &proxyauth);
+  if (wwwauth == NULL && proxyauth == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "authinfo: No WWW-Authenticate or Proxy-Authenticate\n"));
+      return -1;
+    }
+
+  while (wwwauth != NULL)
+    {
+      char *uri;
+
+      authinfo = eXosip_find_authentication_info (req->from->url->username,
+                                                  wwwauth->realm);
+      if (authinfo == NULL)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "authinfo: No authentication found for %s %s\n",
+		       req->from->url->username, wwwauth->realm));
+	  return -1;
+	}
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "authinfo: %s\n", authinfo->username));
+      i = osip_uri_to_str (req->req_uri, &uri);
+      if (i != 0)
+        return -1;
+
+      i = __eXosip_create_authorization_header (last_response, uri,
+                                                authinfo->userid,
+                                                authinfo->passwd,
+                                                authinfo->ha1, &aut,
+						req->sip_method);
+      osip_free (uri);
+      if (i != 0)
+        return -1;
+
+      if (aut != NULL)
+        {
+          osip_list_add (req->authorizations, aut, -1);
+          osip_message_force_update (req);
+        }
+
+      pos++;
+      osip_message_get_www_authenticate (last_response, pos, &wwwauth);
+    }
+
+  pos = 0;
+  while (proxyauth != NULL)
+    {
+      char *uri;
+
+      authinfo = eXosip_find_authentication_info (req->from->url->username,
+                                                  proxyauth->realm);
+      if (authinfo == NULL)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "authinfo: No authentication found for %s %s\n",
+		       req->from->url->username, proxyauth->realm));
+	  return -1;
+	}
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "authinfo: %s\n", authinfo->username));
+      i = osip_uri_to_str (req->req_uri, &uri);
+      if (i != 0)
+        return -1;
+
+      i = __eXosip_create_proxy_authorization_header (last_response, uri,
+                                                      authinfo->userid,
+                                                      authinfo->passwd,
+                                                      authinfo->ha1,
+                                                      &proxy_aut,
+						      req->sip_method);
+      osip_free (uri);
+      if (i != 0)
+        return -1;
+
+      if (proxy_aut != NULL)
+        {
+          osip_list_add (req->proxy_authorizations, proxy_aut, -1);
+          osip_message_force_update (req);
+        }
+
+      pos++;
+      osip_message_get_proxy_authenticate (last_response, pos, &proxyauth);
+    }
+
+  return 0;
+}
+
+int
+eXosip_update_top_via (osip_message_t * sip)
+{
+  char locip[50];
+  char *tmp = (char *) osip_malloc (256 * sizeof (char));
+  osip_via_t *via = (osip_via_t *) osip_list_get (sip->vias, 0);
+  int i;
+
+  i = _eXosip_find_protocol(sip);
+
+  osip_list_remove (sip->vias, 0);
+  osip_via_free (via);
+#ifdef SM
+  eXosip_get_localip_for (sip->req_uri->host, locip, 49);
+#else 
+  if (i==IPPROTO_UDP)
+    eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+  else if (i==IPPROTO_TCP)
+     eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip, 49);
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (using default UDP)\n"));
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+    }
+#endif
+  if (i==IPPROTO_UDP)
+    {
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port,
+		  via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port,
+		  via_branch_new_random ());
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (sip->vias, via, 0);
+  osip_free (tmp);
+
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXosip2.h b/libs/eXosip2/eXosip2/eXosip2.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ef78c5842065259560c6a7112e27a35c74af0e1
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXosip2.h
@@ -0,0 +1,533 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#ifndef __EXOSIP2_H__
+#define __EXOSIP2_H__
+
+#ifdef WIN32
+#include <stdio.h>
+#include <stdlib.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define snprintf _snprintf
+#define close(s) closesocket(s)
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#endif
+
+#include <stdio.h>
+
+#include <osip2/osip.h>
+#include <osip2/osip_dialog.h>
+
+#include <eXosip2/eXosip.h>
+
+#include "jpipe.h"
+
+#ifndef JD_EMPTY
+
+#define JD_EMPTY          0
+#define JD_INITIALIZED    1
+#define JD_TRYING         2
+#define JD_QUEUED         3
+#define JD_RINGING        4
+#define JD_ESTABLISHED    5
+#define JD_REDIRECTED     6
+#define JD_AUTH_REQUIRED  7
+#define JD_CLIENTERROR    8
+#define JD_SERVERERROR    9
+#define JD_GLOBALFAILURE  10
+#define JD_TERMINATED     11
+
+#define JD_MAX            11
+
+#endif
+
+#define EXOSIP_VERSION	"0.1"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+  void eXosip_update (void);
+  void __eXosip_wakeup (void);
+
+  struct __eXosip_sockaddr
+  {
+    u_char ss_len;
+    u_char ss_family;
+    u_char padding[128 - 2];
+  };
+
+  typedef struct eXosip_dialog_t eXosip_dialog_t;
+
+  struct eXosip_dialog_t
+  {
+
+    int d_id;
+    int d_STATE;
+    osip_dialog_t *d_dialog;    /* active dialog */
+
+    int d_timer;
+    osip_message_t *d_200Ok;
+    osip_message_t *d_ack;
+
+    osip_list_t *d_inc_trs;
+    osip_list_t *d_out_trs;
+    int d_retry;                /* avoid too many unsuccessfull retry */
+
+    eXosip_dialog_t *next;
+    eXosip_dialog_t *parent;
+  };
+
+  typedef struct eXosip_subscribe_t eXosip_subscribe_t;
+
+  struct eXosip_subscribe_t
+  {
+
+    int s_id;
+    int s_ss_status;
+    int s_ss_reason;
+    int s_reg_period;
+    eXosip_dialog_t *s_dialogs;
+
+    int s_retry;                /* avoid too many unsuccessfull retry */
+    osip_transaction_t *s_inc_tr;
+    osip_transaction_t *s_out_tr;
+
+    eXosip_subscribe_t *next;
+    eXosip_subscribe_t *parent;
+  };
+
+  typedef struct eXosip_notify_t eXosip_notify_t;
+
+  struct eXosip_notify_t
+  {
+
+    int n_id;
+    char n_uri[255];
+    int n_online_status;
+
+    int n_ss_status;
+    int n_ss_reason;
+    int n_ss_expires;
+    eXosip_dialog_t *n_dialogs;
+
+    osip_transaction_t *n_inc_tr;
+    osip_transaction_t *n_out_tr;
+
+    eXosip_notify_t *next;
+    eXosip_notify_t *parent;
+  };
+
+  typedef struct eXosip_call_t eXosip_call_t;
+
+  struct eXosip_call_t
+  {
+
+    int c_id;
+    eXosip_dialog_t *c_dialogs;
+    osip_transaction_t *c_inc_tr;
+    osip_transaction_t *c_out_tr;
+    int c_retry;                /* avoid too many unsuccessfull retry */
+    osip_transaction_t *c_inc_options_tr;
+    osip_transaction_t *c_out_options_tr;
+    void *external_reference;
+
+    /* cache old credentials for reuse in next request */
+    osip_message_t *response_auth;
+
+    eXosip_call_t *next;
+    eXosip_call_t *parent;
+  };
+
+
+  typedef struct eXosip_reg_t eXosip_reg_t;
+
+  struct eXosip_reg_t
+  {
+
+    int r_id;
+
+    int r_reg_period;           /* delay between registration */
+    char *r_aor;                /* sip identity */
+    char *r_registrar;          /* registrar */
+    char *r_contact;            /* list of contacts string */
+
+    osip_transaction_t *r_last_tr;
+    int r_retry;                /* avoid too many unsuccessfull retry */
+
+    char transport[10];         /* transport used for registration */
+
+    struct __eXosip_sockaddr addr;
+    int len;
+
+    eXosip_reg_t *next;
+    eXosip_reg_t *parent;
+  };
+
+
+  typedef struct eXosip_pub_t eXosip_pub_t;
+
+  struct eXosip_pub_t
+  {
+    int p_id;
+
+    time_t p_expires;           /* expiration date (started+period) */
+    int p_period;               /* delay between registration */
+    char p_aor[256];            /* sip identity */
+    char p_sip_etag[64];        /* sip_etag from 200ok */
+
+    osip_transaction_t *p_last_tr;
+    eXosip_pub_t *next;
+    eXosip_pub_t *parent;
+  };
+
+  int _eXosip_pub_update (eXosip_pub_t ** pub, osip_transaction_t * tr,
+                          osip_message_t * answer);
+  int _eXosip_pub_find_by_aor (eXosip_pub_t ** pub, const char *aor);
+  int _eXosip_pub_init (eXosip_pub_t ** pub, const char *aor, const char *exp);
+  void _eXosip_pub_free (eXosip_pub_t * pub);
+
+  typedef struct jauthinfo_t jauthinfo_t;
+
+  struct jauthinfo_t
+  {
+    char username[50];
+    char userid[50];
+    char passwd[50];
+    char ha1[50];
+    char realm[50];
+    jauthinfo_t *parent;
+    jauthinfo_t *next;
+  };
+
+  int
+    __eXosip_create_authorization_header (osip_message_t * previous_answer,
+                                          const char *rquri,
+                                          const char *username,
+                                          const char *passwd,
+                                          const char *ha1,
+                                          osip_authorization_t ** auth,
+					  const char *method);
+  int __eXosip_create_proxy_authorization_header (osip_message_t *
+                                                  previous_answer,
+                                                  const char *rquri,
+                                                  const char *username,
+                                                  const char *passwd,
+                                                  const char *ha1,
+                                                  osip_proxy_authorization_t
+                                                  ** auth,
+						  const char *method);
+
+  eXosip_event_t *eXosip_event_init_for_call (int type, eXosip_call_t * jc,
+                                              eXosip_dialog_t * jd,
+                                              osip_transaction_t * tr);
+
+  eXosip_event_t *eXosip_event_init_for_subscribe (int type,
+                                                   eXosip_subscribe_t * js,
+                                                   eXosip_dialog_t * jd,
+                                                   osip_transaction_t * tr);
+  eXosip_event_t *eXosip_event_init_for_notify (int type,
+                                                eXosip_notify_t * jn,
+                                                eXosip_dialog_t * jd,
+                                                osip_transaction_t * tr);
+  eXosip_event_t *eXosip_event_init_for_reg (int type, eXosip_reg_t * jr,
+                                             osip_transaction_t * tr);
+  eXosip_event_t *eXosip_event_init_for_message (int type,
+                                                 osip_transaction_t * tr);
+
+  int eXosip_event_init (eXosip_event_t ** je, int type);
+  void report_call_event (int evt, eXosip_call_t * jc, eXosip_dialog_t * jd,
+                          osip_transaction_t * tr);
+  void report_options_event (int evt, osip_transaction_t * tr);
+  void report_event (eXosip_event_t * je, osip_message_t * sip);
+  int eXosip_event_add (eXosip_event_t * je);
+  eXosip_event_t *eXosip_event_wait (int tv_s, int tv_ms);
+  eXosip_event_t *eXosip_event_get (void);
+
+  typedef void (*eXosip_callback_t) (int type, eXosip_event_t *);
+
+  char *strdup_printf (const char *fmt, ...);
+
+#define eXosip_trace(loglevel,args)  do        \
+{                       \
+	char *__strmsg;  \
+	__strmsg=strdup_printf args ;    \
+	OSIP_TRACE(osip_trace(__FILE__,__LINE__,(loglevel),NULL,"%s\n",__strmsg)); \
+	osip_free (__strmsg);        \
+}while (0);
+
+#ifndef EXOSIP_MAX_SOCKETS
+#define EXOSIP_MAX_SOCKETS 200
+#endif
+
+  /* structure used for keepalive management with connected protocols (TCP or TLS) */
+  struct eXosip_socket {
+    int  socket;
+    char remote_ip[50];
+    int  remote_port;
+  };
+
+  struct eXosip_net {
+    char net_firewall_ip[50];     /* ip address to use for masquerading contacts */
+    int  net_ip_family;           /* AF_INET6 or AF_INET */
+    struct sockaddr_storage ai_addr;
+    char net_port[20];            /* port for receiving message/connection */
+    int  net_socket;              /* initial socket for receiving message/connection */
+    int  net_protocol;            /* initial socket for receiving message/connection */
+    struct eXosip_socket net_socket_tab[EXOSIP_MAX_SOCKETS];
+  };
+
+  char *_eXosip_transport_protocol(osip_message_t *msg);
+  int _eXosip_find_protocol(osip_message_t *msg);
+  int _eXosip_tcp_find_socket(char *host, int port);
+  int _eXosip_tcp_connect_socket(char *host, int port);
+  int setsockopt_ipv6only (int sock);
+
+  int _eXosip_recvfrom(int s, char *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen);
+  int _eXosip_sendto(int s,  const void* buf,  size_t len,  int flags,
+    const struct sockaddr* to,  socklen_t tolen);
+
+  typedef struct eXosip_t eXosip_t;
+
+  struct eXosip_t
+  {
+    int forced_localip;         /* set to 1 for masquerading contact headers */
+    struct eXosip_net net_interfaces[3];
+    char *user_agent;
+
+    eXosip_call_t *j_calls;             /* my calls        */
+    eXosip_subscribe_t *j_subscribes;   /* my friends      */
+    eXosip_notify_t *j_notifies;        /* my susbscribers */
+    osip_list_t *j_transactions;
+
+    eXosip_reg_t *j_reg;        /* my registrations */
+    eXosip_pub_t *j_pub;        /* my publications  */
+
+    void *j_cond;
+    void *j_mutexlock;
+
+    osip_t *j_osip;
+    int j_stop_ua;
+    void *j_thread;
+    jpipe_t *j_socketctl;
+    jpipe_t *j_socketctl_event;
+
+    osip_fifo_t *j_events;
+
+    jauthinfo_t *authinfos;
+
+    int   keep_alive;
+    int   learn_port;
+    int   http_port;
+    char  http_proxy[256];
+    char  http_outbound_proxy[256];
+  };
+
+  typedef struct jinfo_t jinfo_t;
+
+  struct jinfo_t
+  {
+    eXosip_dialog_t *jd;
+    eXosip_call_t *jc;
+    eXosip_subscribe_t *js;
+    eXosip_notify_t *jn;
+  };
+
+  int eXosip_guess_ip_for_via (int family, char *address, int size);
+
+/**
+ * Prepare addrinfo for socket binding and resolv hostname
+ * 
+ * @param addrinfo  informations about the connections
+ * @param hostname  hostname to resolv.
+ * @param service   port number or "sip" SRV record if service=0
+ */
+  int eXosip_get_addrinfo (struct addrinfo **addrinfo, const char *hostname,
+                           int service, int protocol);
+
+  int eXosip_set_callbacks (osip_t * osip);
+  int cb_snd_message (osip_transaction_t * tr, osip_message_t * sip,
+			   char *host, int port, int out_socket);
+  int cb_udp_snd_message (osip_transaction_t * tr, osip_message_t * sip,
+                          char *host, int port, int out_socket);
+  int cb_tcp_snd_message (osip_transaction_t * tr, osip_message_t * sip,
+                          char *host, int port, int out_socket);
+  char *osip_call_id_new_random (void);
+  char *osip_to_tag_new_random (void);
+  char *osip_from_tag_new_random (void);
+  unsigned int via_branch_new_random (void);
+  void __eXosip_delete_jinfo (osip_transaction_t * transaction);
+  jinfo_t *__eXosip_new_jinfo (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                               eXosip_subscribe_t * js, eXosip_notify_t * jn);
+
+  int eXosip_dialog_init_as_uac (eXosip_dialog_t ** jd, osip_message_t * _200Ok);
+  int eXosip_dialog_init_as_uas (eXosip_dialog_t ** jd,
+                                 osip_message_t * _invite,
+                                 osip_message_t * _200Ok);
+  void eXosip_dialog_free (eXosip_dialog_t * jd);
+  void eXosip_dialog_set_state (eXosip_dialog_t * jd, int state);
+  void eXosip_delete_early_dialog (eXosip_dialog_t * jd);
+
+
+  int isrfc1918 (char *ipaddr);
+  void eXosip_get_localip_from_via (osip_message_t *, char *localip, int size);
+  int generating_request_out_of_dialog (osip_message_t ** dest,
+                                        const char *method, const char *to,
+                                        const char *transport,
+                                        const char *from, const char *proxy);
+  int generating_publish (osip_message_t ** message, const char *to,
+                          const char *from, const char *route);
+  int generating_cancel (osip_message_t ** dest,
+                         osip_message_t * request_cancelled);
+  int generating_bye (osip_message_t ** bye, osip_dialog_t * dialog, char *transport);
+  int generating_ack_for_2xx (osip_message_t ** ack, osip_dialog_t * dialog);
+
+  int eXosip_update_top_via (osip_message_t * sip);
+  int eXosip_add_authentication_information (osip_message_t * req,
+                                             osip_message_t * last_response);
+  int _eXosip_reg_find (eXosip_reg_t ** reg, osip_transaction_t * tr);
+  int eXosip_reg_init (eXosip_reg_t ** jr, const char *from,
+                       const char *proxy, const char *contact);
+  void eXosip_reg_free (eXosip_reg_t * jreg);
+  int generating_register (osip_message_t ** reg, char *transport, char *from,
+                           char *proxy, char *contact, int expires);
+
+  int _eXosip_call_redirect_request (eXosip_call_t * jc,
+                                     eXosip_dialog_t * jd,
+                                     osip_transaction_t * out_tr);
+  int _eXosip_call_send_request_with_credential (eXosip_call_t * jc,
+                                                 eXosip_dialog_t * jd,
+                                                 osip_transaction_t * out_tr);
+  int eXosip_transaction_find (int tid, osip_transaction_t ** transaction);
+  int eXosip_call_dialog_find (int jid, eXosip_call_t ** jc,
+                               eXosip_dialog_t ** jd);
+  int eXosip_notify_dialog_find (int nid, eXosip_notify_t ** jn,
+                                 eXosip_dialog_t ** jd);
+  int eXosip_subscribe_dialog_find (int nid, eXosip_subscribe_t ** js,
+                                    eXosip_dialog_t ** jd);
+  int eXosip_call_find (int cid, eXosip_call_t ** jc);
+  int eXosip_dialog_set_200ok (eXosip_dialog_t * _jd, osip_message_t * _200Ok);
+
+  int _eXosip_answer_invite_3456xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                    int code, osip_message_t ** answer);
+  int _eXosip_answer_invite_2xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 int code, osip_message_t ** answer);
+  int _eXosip_answer_invite_1xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 int code, osip_message_t ** answer);
+  int _eXosip_default_answer_invite_1xx (eXosip_call_t * jc,
+                                         eXosip_dialog_t * jd, int code);
+  int _eXosip_default_answer_invite_3456xx (eXosip_call_t * jc,
+                                            eXosip_dialog_t * jd, int code);
+  int _eXosip_insubscription_answer_1xx (eXosip_notify_t * jc,
+                                         eXosip_dialog_t * jd, int code);
+  int _eXosip_insubscription_answer_2xx (eXosip_notify_t * jn,
+                                         eXosip_dialog_t * jd, int code);
+  int _eXosip_insubscription_answer_3456xx (eXosip_notify_t * jn,
+                                            eXosip_dialog_t * jd, int code);
+
+  int eXosip_build_response_default (int jid, int status);
+  int _eXosip_build_response_default (osip_message_t ** dest,
+                                      osip_dialog_t * dialog, int status,
+                                      osip_message_t * request);
+  int complete_answer_that_establish_a_dialog (osip_message_t * response,
+                                               osip_message_t * request);
+  int _eXosip_build_request_within_dialog (osip_message_t ** dest,
+                                           const char *method,
+                                           osip_dialog_t * dialog,
+                                           const char *transport);
+  void eXosip_kill_transaction (osip_list_t * transactions);
+  int eXosip_remove_transaction_from_call (osip_transaction_t * tr,
+                                           eXosip_call_t * jc);
+  osip_transaction_t *eXosip_find_last_inc_notify (eXosip_subscribe_t * jn,
+                                                   eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_out_notify (eXosip_notify_t * jn,
+                                                   eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_inc_subscribe (eXosip_notify_t * jn,
+                                                      eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_out_subscribe (eXosip_subscribe_t * js,
+                                                      eXosip_dialog_t * jd);
+
+  osip_transaction_t *eXosip_find_last_transaction (eXosip_call_t * jc,
+                                                    eXosip_dialog_t * jd,
+                                                    const char *method);
+  osip_transaction_t *eXosip_find_last_inc_transaction (eXosip_call_t * jc,
+                                                        eXosip_dialog_t * jd,
+                                                        const char *method);
+  osip_transaction_t *eXosip_find_last_out_transaction (eXosip_call_t * jc,
+                                                        eXosip_dialog_t * jd,
+                                                        const char *method);
+  osip_transaction_t *eXosip_find_last_invite (eXosip_call_t * jc,
+                                               eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_inc_invite (eXosip_call_t * jc,
+                                                   eXosip_dialog_t * jd);
+  osip_transaction_t *eXosip_find_last_out_invite (eXosip_call_t * jc,
+                                                   eXosip_dialog_t * jd);
+
+
+  int eXosip_call_init (eXosip_call_t ** jc);
+  void eXosip_call_free (eXosip_call_t * jc);
+  void __eXosip_call_remove_dialog_reference_in_call (eXosip_call_t * jc,
+                                                      eXosip_dialog_t * jd);
+  int eXosip_read_message (int max_message_nb, int sec_max, int usec_max);
+  void eXosip_release_terminated_calls (void);
+  void eXosip_release_terminated_registrations (void);
+
+
+  int eXosip_subscribe_init (eXosip_subscribe_t ** js);
+  void eXosip_subscribe_free (eXosip_subscribe_t * js);
+  int _eXosip_subscribe_set_refresh_interval (eXosip_subscribe_t * js,
+                                              osip_message_t * inc_subscribe);
+  int eXosip_subscribe_need_refresh (eXosip_subscribe_t * js,
+                                     eXosip_dialog_t * jd, int now);
+  int _eXosip_subscribe_send_request_with_credential (eXosip_subscribe_t * js,
+                                                      eXosip_dialog_t * jd,
+                                                      osip_transaction_t * out_tr);
+  int eXosip_notify_init (eXosip_notify_t ** jn, osip_message_t * inc_subscribe);
+  void eXosip_notify_free (eXosip_notify_t * jn);
+  int _eXosip_notify_set_contact_info (eXosip_notify_t * jn, char *uri);
+  int _eXosip_notify_set_refresh_interval (eXosip_notify_t * jn,
+                                           osip_message_t * inc_subscribe);
+  void _eXosip_notify_add_expires_in_2XX_for_subscribe (eXosip_notify_t * jn,
+                                                        osip_message_t * answer);
+  int _eXosip_insubscription_send_request_with_credential (eXosip_notify_t *
+                                                           jn,
+                                                           eXosip_dialog_t *
+                                                           jd,
+                                                           osip_transaction_t
+                                                           * out_tr);
+
+  int eXosip_is_public_address (const char *addr);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/eXosip2/eXosip2/eXpublish_api.c b/libs/eXosip2/eXosip2/eXpublish_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..36a937664b4692db5e08a8a8505bf8430ba3f8ce
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXpublish_api.c
@@ -0,0 +1,168 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+extern eXosip_t eXosip;
+
+int
+eXosip_build_publish (osip_message_t ** message,
+                      const char *to,
+                      const char *from,
+                      const char *route,
+                      const char *event,
+                      const char *expires, const char *ctype, const char *body)
+{
+  int i;
+
+  *message = NULL;
+
+  if (to == NULL || to[0] == '\0')
+    return -1;
+  if (from == NULL || from[0] == '\0')
+    return -1;
+  if (event == NULL || event[0] == '\0')
+    return -1;
+  if (ctype == NULL || ctype[0] == '\0')
+    {
+      if (body != NULL && body[0] != '\0')
+        return -1;
+  } else
+    {
+      if (body == NULL || body[0] == '\0')
+        return -1;
+    }
+
+  i = generating_publish (message, to, from, route);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot send message (cannot build PUBLISH)! "));
+      return -1;
+    }
+
+  if (body != NULL && body[0] != '\0' && ctype != NULL && ctype[0] != '\0')
+    {
+      osip_message_set_content_type (*message, ctype);
+      osip_message_set_body (*message, body, strlen (body));
+      osip_message_set_header (*message, "Content-Disposition",
+                               "render;handling=required");
+    }
+  if (expires != NULL && expires[0] != '\0')
+    osip_message_set_expires (*message, expires);
+  else
+    osip_message_set_expires (*message, "3600");
+
+  osip_message_set_header (*message, "Event", event);
+  return 0;
+}
+
+int
+eXosip_publish (osip_message_t * message, const char *to)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+  eXosip_pub_t *pub = NULL;
+
+  if (message == NULL)
+    return -1;
+  if (message->cseq == NULL || message->cseq->number == NULL)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+  if (to == NULL)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+
+  i = _eXosip_pub_find_by_aor (&pub, to);
+  if (i != 0 || pub == NULL)
+    {
+      osip_header_t *expires;
+
+      osip_message_get_expires (message, 0, &expires);
+      if (expires == NULL || expires->hvalue == NULL)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: missing expires header in PUBLISH!"));
+          osip_message_free (message);
+          return -1;
+      } else
+        {
+          /* start a new publication context */
+          _eXosip_pub_init (&pub, to, expires->hvalue);
+          if (pub == NULL)
+	    {
+	      osip_message_free (message);
+	      return -1;
+	    }
+          ADD_ELEMENT (eXosip.j_pub, pub);
+        }
+  } else
+    {
+      if (pub->p_sip_etag != NULL && pub->p_sip_etag[0] != '\0')
+        {
+          /* increase cseq */
+          osip_message_set_header (message, "SIP-If-Match", pub->p_sip_etag);
+        }
+
+      if (pub->p_last_tr != NULL && pub->p_last_tr->cseq != NULL
+          && pub->p_last_tr->cseq->number != NULL)
+        {
+          int osip_cseq_num = osip_atoi (pub->p_last_tr->cseq->number);
+          int length = strlen (pub->p_last_tr->cseq->number);
+
+          osip_cseq_num++;
+          osip_free (message->cseq->number);
+          message->cseq->number = (char *) osip_malloc (length + 2);    /* +2 like for 9 to 10 */
+          sprintf (message->cseq->number, "%i", osip_cseq_num);
+        }
+    }
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, message);
+  if (i != 0)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+
+  if (pub->p_last_tr != NULL)
+    osip_list_add (eXosip.j_transactions, pub->p_last_tr, 0);
+  pub->p_last_tr = transaction;
+
+  sipevent = osip_new_outgoing_sipmessage (message);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXrefer_api.c b/libs/eXosip2/eXosip2/eXrefer_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..9b6a2ec5a6c9fa1965c8d1bc7672db96c8c1d4e3
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXrefer_api.c
@@ -0,0 +1,74 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+extern eXosip_t eXosip;
+
+int
+eXosip_refer_build_request (osip_message_t ** refer, const char *refer_to,
+                            const char *from, const char *to, const char *proxy)
+{
+  int i;
+
+  *refer = NULL;
+  i = generating_request_out_of_dialog (refer, "REFER", to, "UDP", from, proxy);
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  osip_message_set_header (*refer, "Refer-to", refer_to);
+  return 0;
+}
+
+int
+eXosip_refer_send_request (osip_message_t * refer)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  if (refer == NULL)
+    return -1;
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, refer);
+  if (i != 0)
+    {
+      osip_message_free (refer);
+      return -1;
+    }
+
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (refer);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXregister_api.c b/libs/eXosip2/eXosip2/eXregister_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..23f61f240e635e20398088b2789c59a690ade776
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXregister_api.c
@@ -0,0 +1,376 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+static int _eXosip_register_build_register (eXosip_reg_t * jr,
+                                            osip_message_t ** _reg);
+
+static eXosip_reg_t *
+eXosip_reg_find (int rid)
+{
+  eXosip_reg_t *jr;
+
+  for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+      if (jr->r_id == rid)
+        {
+          return jr;
+        }
+    }
+  return NULL;
+}
+
+
+static int
+_eXosip_register_build_register (eXosip_reg_t * jr, osip_message_t ** _reg)
+{
+  osip_message_t *reg=NULL;
+  struct eXosip_net *net;
+  int i;
+
+  reg = NULL;
+  *_reg = NULL;
+
+  if (jr->r_last_tr != NULL)
+    {
+      if (jr->r_last_tr->state != NICT_TERMINATED
+          && jr->r_last_tr->state != NICT_COMPLETED)
+        return -1;
+      else
+        {
+          osip_message_t *last_response=NULL;
+	  osip_transaction_t *tr;
+	  osip_message_clone(jr->r_last_tr->orig_request, &reg);
+	  if (reg==NULL)
+	    return -1;
+          /* reg = jr->r_last_tr->orig_request; */
+	  if (jr->r_last_tr->last_response!=NULL)
+	    {
+	      osip_message_clone(jr->r_last_tr->last_response, &last_response);
+	      if (last_response==NULL)
+		{
+		  osip_message_free(reg);
+		  return -1;
+		}
+	    }
+
+	  __eXosip_delete_jinfo (jr->r_last_tr);
+	  tr = jr->r_last_tr;
+	  jr->r_last_tr = NULL;
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+
+          /* modify the REGISTER request */
+          {
+            int osip_cseq_num = osip_atoi (reg->cseq->number);
+            int length = strlen (reg->cseq->number);
+
+
+            osip_authorization_t *aut;
+            osip_proxy_authorization_t *proxy_aut;
+
+            aut = (osip_authorization_t *) osip_list_get (reg->authorizations, 0);
+            while (aut != NULL)
+              {
+                osip_list_remove (reg->authorizations, 0);
+                osip_authorization_free (aut);
+                aut =
+                  (osip_authorization_t *) osip_list_get (reg->authorizations, 0);
+              }
+
+            proxy_aut =
+              (osip_proxy_authorization_t *) osip_list_get (reg->
+                                                            proxy_authorizations,
+                                                            0);
+            while (proxy_aut != NULL)
+              {
+                osip_list_remove (reg->proxy_authorizations, 0);
+                osip_proxy_authorization_free (proxy_aut);
+                proxy_aut =
+                  (osip_proxy_authorization_t *) osip_list_get (reg->
+                                                                proxy_authorizations,
+                                                                0);
+              }
+
+            if (0==osip_strcasecmp(jr->transport, "udp"))
+              net = &eXosip.net_interfaces[0];
+            else if (0==osip_strcasecmp(jr->transport, "tcp"))
+              net = &eXosip.net_interfaces[1];
+            else
+              {
+                OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                             "eXosip: unsupported protocol '%s' (default to UDP)\n",
+                             jr->transport));
+                net = &eXosip.net_interfaces[0];
+              }
+
+	    /*
+	      modify the port number when masquerading is ON.
+	    */
+	    if (net->net_firewall_ip[0]!='\0')
+	      {
+		int pos=0;
+		while (!osip_list_eol(reg->contacts,pos))
+		  {
+		    osip_contact_t *co;
+		    co = (osip_contact_t *)osip_list_get(reg->contacts,pos);
+		    pos++;
+		    if (co!=NULL && co->url!=NULL && co->url->host!=NULL
+			&& 0==osip_strcasecmp(co->url->host,
+					      net->net_firewall_ip))
+		      {
+			if (co->url->port==NULL &&
+			    0!=osip_strcasecmp(net->net_port, "5060"))
+			  {
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+			else if (co->url->port!=NULL &&
+				 0!=osip_strcasecmp(net->net_port, co->url->port))
+			  {
+			    osip_free(co->url->port);
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+		      }
+		  }
+	      }
+
+	    if (-1 == eXosip_update_top_via (reg))
+	      {
+		osip_message_free (reg);
+		if (last_response != NULL)
+		  osip_message_free (last_response);
+                return -1;
+              }
+
+            osip_cseq_num++;
+            osip_free (reg->cseq->number);
+            reg->cseq->number = (char *) osip_malloc (length + 2);      /* +2 like for 9 to 10 */
+            sprintf (reg->cseq->number, "%i", osip_cseq_num);
+
+            {
+              osip_header_t *exp;
+
+              osip_message_header_get_byname (reg, "expires", 0, &exp);
+              osip_free (exp->hvalue);
+              exp->hvalue = (char *) osip_malloc (10);
+              snprintf (exp->hvalue, 9, "%i", jr->r_reg_period);
+            }
+
+            osip_message_force_update (reg);
+          }
+
+          if (last_response != NULL)
+            {
+              if (MSG_IS_STATUS_4XX (last_response))
+                {
+                  eXosip_add_authentication_information (reg, last_response);
+                }
+              osip_message_free (last_response);
+            }
+        }
+    }
+  if (reg == NULL)
+    {
+      i = generating_register (&reg, jr->transport,
+			       jr->r_aor, jr->r_registrar, jr->r_contact,
+			       jr->r_reg_period);
+      if (i != 0)
+        {
+          return -2;
+        }
+    }
+
+  *_reg = reg;
+  return 0;
+}
+
+int
+eXosip_register_build_initial_register (const char *from, const char *proxy,
+                                        const char *contact, int expires,
+                                        osip_message_t ** reg)
+{
+  eXosip_reg_t *jr = NULL;
+  int i;
+
+  *reg = NULL;
+
+  if (eXosip.net_interfaces[0].net_socket<=0
+      && eXosip.net_interfaces[1].net_socket<=0
+      && eXosip.net_interfaces[2].net_socket<=0)
+    return -1;
+
+  /* Avoid adding the same registration info twice to prevent mem leaks */
+  for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+      if (strcmp (jr->r_aor, from) == 0 && strcmp (jr->r_registrar, proxy) == 0)
+        {
+          break;
+        }
+    }
+  if (jr == NULL)
+    {
+      /* Add new registration info */
+      i = eXosip_reg_init (&jr, from, proxy, contact);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot register! "));
+          return i;
+        }
+      ADD_ELEMENT (eXosip.j_reg, jr);
+    }
+
+  /* Guess transport from existing connections */
+  if (eXosip.net_interfaces[0].net_socket>0)
+    osip_strncpy(jr->transport, "UDP", sizeof(jr->transport)-1);
+  else if (eXosip.net_interfaces[1].net_socket>0)
+    osip_strncpy(jr->transport, "TCP", sizeof(jr->transport)-1);
+  else if (eXosip.net_interfaces[2].net_socket>0)
+    osip_strncpy(jr->transport, "TLS", sizeof(jr->transport)-1);
+
+  /* build register */
+  jr->r_reg_period = expires;
+
+  i = _eXosip_register_build_register (jr, reg);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot build REGISTER!"));
+      *reg = NULL;
+      return i;
+    }
+  return jr->r_id;
+}
+
+int
+eXosip_register_build_register (int rid, int expires, osip_message_t ** reg)
+{
+  eXosip_reg_t *jr;
+  int i;
+
+  *reg = NULL;
+  jr = eXosip_reg_find (rid);
+  if (jr == NULL)
+    {
+      /* fprintf(stderr, "eXosip: no registration info saved!\n"); */
+      return -1;
+    }
+  jr->r_reg_period = expires;
+  if (jr->r_reg_period == 0)
+    {
+    } /* unregistration */
+  else if (jr->r_reg_period > 3600)
+    jr->r_reg_period = 3600;
+  else if (jr->r_reg_period < 200)      /* too low */
+    jr->r_reg_period = 200;
+
+  if (jr->r_last_tr != NULL)
+    {
+      if (jr->r_last_tr->state != NICT_TERMINATED
+          && jr->r_last_tr->state != NICT_COMPLETED)
+        {
+          /* fprintf(stderr, "eXosip: a registration is already pending!\n"); */
+          return -1;
+        }
+    }
+
+  i = _eXosip_register_build_register (jr, reg);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot build REGISTER!"));
+      *reg = NULL;
+      return i;
+    }
+  return 0;
+}
+
+int
+eXosip_register_send_register (int rid, osip_message_t * reg)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  eXosip_reg_t *jr;
+  char *transport;
+  int i;
+
+  jr = eXosip_reg_find (rid);
+  if (jr == NULL)
+    {
+      osip_message_free (reg);
+      return -1;
+    }
+
+  if (jr->r_last_tr != NULL)
+    {
+      if (jr->r_last_tr->state != NICT_TERMINATED
+          && jr->r_last_tr->state != NICT_COMPLETED)
+        {
+          osip_message_free (reg);
+          return -1;
+        }
+    }
+
+  if (reg == NULL)
+    {
+      i = _eXosip_register_build_register (jr, &reg);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot build REGISTER!"));
+          return i;
+        }
+    }
+
+  transport = _eXosip_transport_protocol(reg);
+  osip_strncpy(jr->transport, transport, sizeof(jr->transport)-1);
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, reg);
+  if (i != 0)
+    {
+      /* TODO: release the j_call.. */
+
+      osip_message_free (reg);
+      return -2;
+    }
+
+  jr->r_last_tr = transaction;
+
+  /* send REGISTER */
+  sipevent = osip_new_outgoing_sipmessage (reg);
+  sipevent->transactionid = transaction->transactionid;
+  osip_message_force_update (reg);
+
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXsubscription_api.c b/libs/eXosip2/eXosip2/eXsubscription_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..84c25f288007258335ddbe57ec4c2df5cf623761
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXsubscription_api.c
@@ -0,0 +1,372 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_subscribe_build_initial_request (osip_message_t ** sub, const char *to,
+                                        const char *from, const char *route,
+                                        const char *event, int expires)
+{
+  char tmp[10];
+  int i;
+  osip_uri_param_t *uri_param = NULL;
+  osip_to_t *_to=NULL;
+
+  *sub = NULL;
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (from != NULL && *from == '\0')
+    return -1;
+  if (event != NULL && *event == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = osip_to_init(&_to);
+  if (i!=0)
+    return -1;
+  
+  i = osip_to_parse(_to, to);
+  if (i!=0)
+    {
+      osip_to_free(_to);
+      return -1;
+    }
+
+  osip_uri_uparam_get_byname(_to->url, "transport", &uri_param);
+  if (uri_param != NULL && uri_param->gvalue != NULL)
+    {
+      i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "UDP", from, route);
+    }
+  else
+    {
+      if (eXosip.net_interfaces[0].net_socket>0)
+	i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "UDP", from, route);
+      else if (eXosip.net_interfaces[1].net_socket>0)
+	i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "TCP", from, route);
+      else
+	i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "UDP", from, route);
+    }
+
+  osip_to_free(_to);
+  if (i != 0)
+    return -1;
+
+  snprintf (tmp, 10, "%i", expires);
+  osip_message_set_expires (*sub, tmp);
+
+  osip_message_set_header (*sub, "Event", event);
+
+  return 0;
+}
+
+int
+eXosip_subscribe_send_initial_request (osip_message_t * subscribe)
+{
+  eXosip_subscribe_t *js = NULL;
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  i = eXosip_subscribe_init (&js);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot subscribe."));
+      osip_message_free (subscribe);
+      return -1;
+    }
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, subscribe);
+  if (i != 0)
+    {
+      eXosip_subscribe_free (js);
+      osip_message_free (subscribe);
+      return -1;
+    }
+
+  _eXosip_subscribe_set_refresh_interval (js, subscribe);
+  js->s_out_tr = transaction;
+
+  sipevent = osip_new_outgoing_sipmessage (subscribe);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, js, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  ADD_ELEMENT (eXosip.j_subscribes, js);
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_subscribe_build_refresh_request (int did, osip_message_t ** sub)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_subscribe_t *js = NULL;
+
+  osip_transaction_t *transaction;
+  char *transport;
+  int i;
+
+  *sub = NULL;
+  if (did > 0)
+    {
+      eXosip_subscribe_dialog_find (did, &js, &jd);
+    }
+  if (jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No subscribe here?\n"));
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_subscribe (js, jd);
+
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+        return -1;
+    }
+
+  transport = NULL;
+  if (transaction!=NULL && transaction->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(transaction->orig_request);
+
+  transaction = NULL;
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (sub, "SUBSCRIBE", jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (sub, "SUBSCRIBE", jd->d_dialog, transport);
+
+  if (i != 0)
+    return -2;
+
+  return 0;
+}
+
+int
+eXosip_subscribe_send_refresh_request (int did, osip_message_t * sub)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_subscribe_t *js = NULL;
+
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  if (did > 0)
+    {
+      eXosip_subscribe_dialog_find (did, &js, &jd);
+    }
+  if (jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No subscribe here?\n"));
+      osip_message_free (sub);
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_subscribe (js, jd);
+
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+	{
+	  osip_message_free (sub);
+	  return -1;
+	}
+      transaction = NULL;
+    }
+
+  transaction = NULL;
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, sub);
+
+  if (i != 0)
+    {
+      osip_message_free (sub);
+      return -2;
+    }
+
+  _eXosip_subscribe_set_refresh_interval (js, sub);
+  osip_list_add (jd->d_out_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (sub);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, js, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_subscribe_send_request_with_credential (eXosip_subscribe_t * js,
+                                                eXosip_dialog_t * jd,
+                                                osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  int i;
+
+  if (js == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+
+  if (out_tr == NULL)
+    {
+      out_tr = eXosip_find_last_out_subscribe (js, jd);
+    }
+
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+  i = _eXosip_find_protocol(out_tr->orig_request);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  if (out_tr == js->s_out_tr)
+    {
+      /* replace with the new tr */
+      osip_list_add (eXosip.j_transactions, js->s_out_tr, 0);
+      js->s_out_tr = tr;
+  } else
+    {
+      /* add the new tr for the current dialog */
+      osip_list_add (jd->d_out_trs, tr, 0);
+    }
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (NULL, jd, js, NULL));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/eXtransport.c b/libs/eXosip2/eXosip2/eXtransport.c
new file mode 100644
index 0000000000000000000000000000000000000000..2624ab8a928396b2dd87f9d7e9453ec539cf84fc
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXtransport.c
@@ -0,0 +1,279 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+char *_eXosip_transport_protocol(osip_message_t *msg)
+{
+  osip_via_t *via;
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || via->protocol == NULL)
+    return NULL;
+  return via->protocol;
+}
+
+int _eXosip_find_protocol(osip_message_t *msg)
+{
+  osip_via_t *via;
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || via->protocol == NULL)
+    return -1;
+  else if (0==osip_strcasecmp(via->protocol, "UDP"))
+	return IPPROTO_UDP;
+  else if (0==osip_strcasecmp(via->protocol, "TCP"))
+    return IPPROTO_TCP;
+  return -1;;
+}
+
+int _eXosip_tcp_find_socket(char *host, int port)
+{
+  int pos;
+  struct eXosip_net *net;
+
+  net = &eXosip.net_interfaces[1];
+
+  for (pos=0;pos<EXOSIP_MAX_SOCKETS;pos++)
+    {
+      if (net->net_socket_tab[pos].socket!=0)
+	{
+	  if (0==osip_strcasecmp(net->net_socket_tab[pos].remote_ip, host)
+	      && port == net->net_socket_tab[pos].remote_port)
+	    return net->net_socket_tab[pos].socket;
+	}
+    }
+  return -1;
+}
+
+int _eXosip_tcp_connect_socket(char *host, int port)
+{
+  int pos;
+  struct eXosip_net *net;
+
+  int res;
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo *curinfo;
+  int sock = -1;
+
+  net = &eXosip.net_interfaces[1];
+
+  for (pos=0;pos<EXOSIP_MAX_SOCKETS;pos++)
+    {
+      if (net->net_socket_tab[pos].socket==0)
+	{
+	  break;
+	}
+    }
+
+  if (pos==EXOSIP_MAX_SOCKETS)
+    return -1;
+
+  res = eXosip_get_addrinfo(&addrinfo, host, port, IPPROTO_TCP);
+  if (res)
+    return -1;
+
+
+  for (curinfo = addrinfo; curinfo; curinfo = curinfo->ai_next)
+    {
+      if (curinfo->ai_protocol && curinfo->ai_protocol != IPPROTO_TCP)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Skipping protocol %d\n",
+		       curinfo->ai_protocol));
+	  continue;
+	}
+
+      sock = (int)socket(curinfo->ai_family, curinfo->ai_socktype,
+			 curinfo->ai_protocol);
+      if (sock < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Cannot create socket!\n",
+		       strerror(errno)));
+	  continue;
+	}
+      
+      if (curinfo->ai_family == AF_INET6)
+	{
+#ifdef IPV6_V6ONLY
+	  if (setsockopt_ipv6only(sock))
+	    {
+	      close(sock);
+	      sock = -1;
+	      OSIP_TRACE (osip_trace
+			  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+			   "eXosip: Cannot set socket option!\n",
+			   strerror(errno)));
+	      continue;
+	    }
+#endif	/* IPV6_V6ONLY */
+	}
+      
+#if 0
+      res = bind (sock, (struct sockaddr*)&net->ai_addr, curinfo->ai_addrlen);
+      if (res < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Cannot bind socket %s\n",
+		       strerror(errno)));
+	  close(sock);
+	  sock = -1;
+	  continue;
+	}
+#endif
+
+      res = connect (sock, curinfo->ai_addr, curinfo->ai_addrlen);
+      if (res < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Cannot bind socket node:%s family:%d %s\n",
+		       host, curinfo->ai_family, strerror(errno)));
+	  close(sock);
+	  sock = -1;
+	  continue;
+	}
+
+      break;
+    }
+
+  freeaddrinfo(addrinfo);
+
+  if (sock>0)
+    {
+      net->net_socket_tab[pos].socket = sock;
+      osip_strncpy(net->net_socket_tab[pos].remote_ip, host,
+		   sizeof(net->net_socket_tab[pos].remote_ip)-1);
+      net->net_socket_tab[pos].remote_port = port;
+      return sock;
+    }
+
+  return -1;
+}
+
+
+int eXosip_transport_set(osip_message_t *msg, const char *transport)
+{
+  osip_via_t *via;
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || via->protocol == NULL)
+    return -1;
+  
+  if (0==osip_strcasecmp(via->protocol, transport))
+    return 0;
+
+  osip_free(via->protocol);
+  via->protocol = osip_strdup(transport);
+  return 0;
+}
+
+int _eXosip_recvfrom(int s, char *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen)
+{
+    int message_size=0;
+    int length_done=0;
+    int real_size=0;
+    int i;
+    int extra_data_discarded;
+
+    if (!eXosip.http_port)
+    {
+        return recvfrom(s, buf, len, flags, from, fromlen);
+    }
+
+
+    /* we get the size of the HTTP data */
+    i = recv (eXosip.net_interfaces[0].net_socket, (char *) &(message_size), 4, 0);
+
+    real_size = message_size;
+    if (message_size<0)
+    {
+        return -1; /* Connection error? */
+    }
+    if (message_size==0)
+    {
+        buf[0]='\0';
+        return 0;
+    }
+    if (message_size>len-1)
+        message_size = len-1;
+
+    length_done=0;
+
+    i = recv (eXosip.net_interfaces[0].net_socket, buf, message_size, 0);
+    length_done = i;
+
+    if (length_done==real_size)
+    {
+        return length_done;
+    }
+
+    if (length_done<message_size)
+    {
+        /* continue reading up to message_size */
+        while (length_done<message_size)
+        {
+            i = recv (eXosip.net_interfaces[0].net_socket, buf+length_done, message_size-length_done, 0);
+            length_done = length_done+i;
+        }
+    }
+
+    extra_data_discarded = length_done;
+    while (extra_data_discarded<real_size)
+    {
+        char buf2[2048];
+        /* We have to discard the end of data... up to the next message */
+        i = recv (eXosip.net_interfaces[0].net_socket, buf2, 2048, 0);
+        extra_data_discarded = extra_data_discarded+i;
+    }
+    return length_done;
+}
+
+int _eXosip_sendto(int s,  const void* buf,  size_t len,  int flags,
+  const struct sockaddr* to,  socklen_t tolen)
+{
+    int i;
+    char buf2[10000];
+
+    if (!eXosip.http_port)
+    {
+       i = sendto(s, buf, len, flags, to, tolen);
+       return i;
+    }
+
+    memset(buf2, '\0', sizeof(buf2));
+    memcpy(buf2, &len, sizeof(int));
+    memcpy(buf2+sizeof(int), buf, len);
+
+    i = send(s, (char *) buf2, len+sizeof(int), 0); /* use TCP connection to proxy */
+    if (i>0)
+        i=i-sizeof(int);
+
+    return i;
+}
\ No newline at end of file
diff --git a/libs/eXosip2/eXosip2/eXutils.c b/libs/eXosip2/eXosip2/eXutils.c
new file mode 100644
index 0000000000000000000000000000000000000000..764209695b783d1957fdba62ae8fba608829ffef
--- /dev/null
+++ b/libs/eXosip2/eXosip2/eXutils.c
@@ -0,0 +1,694 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include <osipparser2/osip_port.h>
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+#ifdef WIN32
+
+/* You need the Platform SDK to compile this. */
+#include <Windows.h>
+#include <Iphlpapi.h>
+
+int
+ppl_dns_get_local_fqdn (char **servername, char **serverip,
+                        char **netmask, unsigned int WIN32_interface)
+{
+  unsigned int pos;
+
+  *servername = NULL;           /* no name on win32? */
+  *serverip = NULL;
+  *netmask = NULL;
+
+  /* First, try to get the interface where we should listen */
+  {
+    DWORD size_of_iptable = 0;
+    PMIB_IPADDRTABLE ipt;
+    PMIB_IFROW ifrow;
+
+    if (GetIpAddrTable (NULL, &size_of_iptable, TRUE) == ERROR_INSUFFICIENT_BUFFER)
+      {
+        ifrow = (PMIB_IFROW) _alloca (sizeof (MIB_IFROW));
+        ipt = (PMIB_IPADDRTABLE) _alloca (size_of_iptable);
+        if (ifrow == NULL || ipt == NULL)
+          {
+            /* not very usefull to continue */
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                    "ERROR alloca failed\r\n"));
+            return -1;
+          }
+
+        if (!GetIpAddrTable (ipt, &size_of_iptable, TRUE))
+          {
+            /* look for the best public interface */
+
+            for (pos = 0; pos < ipt->dwNumEntries && *netmask == NULL; ++pos)
+              {
+                /* index is */
+                struct in_addr addr;
+                struct in_addr mask;
+
+                ifrow->dwIndex = ipt->table[pos].dwIndex;
+                if (GetIfEntry (ifrow) == NO_ERROR)
+                  {
+                    switch (ifrow->dwType)
+                      {
+                        case MIB_IF_TYPE_LOOPBACK:
+                          /*    break; */
+                        case MIB_IF_TYPE_ETHERNET:
+                        default:
+                          addr.s_addr = ipt->table[pos].dwAddr;
+                          mask.s_addr = ipt->table[pos].dwMask;
+                          if (ipt->table[pos].dwIndex == WIN32_interface)
+                            {
+                              *servername = NULL;       /* no name on win32? */
+                              *serverip = osip_strdup (inet_ntoa (addr));
+                              *netmask = osip_strdup (inet_ntoa (mask));
+                              OSIP_TRACE (osip_trace
+                                          (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                           "Interface ethernet: %s/%s\r\n",
+                                           *serverip, *netmask));
+                              break;
+                            }
+                      }
+                  }
+              }
+          }
+      }
+  }
+
+  if (*serverip == NULL || *netmask == NULL)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                              "ERROR No network interface found\r\n"));
+      return -1;
+    }
+
+  return 0;
+}
+
+int
+eXosip_guess_ip_for_via (int family, char *address, int size)
+{
+  /* w2000 and W95/98 */
+  unsigned long best_interface_index;
+  DWORD hr;
+
+  /* NT4 (sp4 only?) */
+  PMIB_IPFORWARDTABLE ipfwdt;
+  DWORD siz_ipfwd_table = 0;
+  unsigned int ipf_cnt;
+
+  address[0] = '\0';
+  best_interface_index = -1;
+  /* w2000 and W95/98 only */
+
+  hr = GetBestInterface (inet_addr ("217.12.3.11"), &best_interface_index);
+  if (hr)
+    {
+      LPVOID lpMsgBuf;
+
+      FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                     FORMAT_MESSAGE_FROM_SYSTEM |
+                     FORMAT_MESSAGE_IGNORE_INSERTS,
+                     NULL,
+                     hr,
+                     MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
+                     (LPSTR) & lpMsgBuf, 0, NULL);
+
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                              "GetBestInterface: %s\r\n", lpMsgBuf));
+      best_interface_index = -1;
+    }
+
+  if (best_interface_index != -1)
+    {                           /* probably W2000 or W95/W98 */
+      char *servername;
+      char *serverip;
+      char *netmask;
+
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                              "Default Interface found %i\r\n",
+                              best_interface_index));
+
+      if (0 == ppl_dns_get_local_fqdn (&servername, &serverip, &netmask,
+                                       best_interface_index))
+        {
+          osip_strncpy (address, serverip, size - 1);
+          osip_free (servername);
+          osip_free (serverip);
+          osip_free (netmask);
+          return 0;
+        }
+      return -1;
+    }
+
+
+  if (!GetIpForwardTable (NULL, &siz_ipfwd_table, FALSE) ==
+      ERROR_INSUFFICIENT_BUFFER
+      || !(ipfwdt = (PMIB_IPFORWARDTABLE) alloca (siz_ipfwd_table)))
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                              "Allocation error\r\n"));
+      return -1;
+    }
+
+
+  /* NT4 (sp4 support only?) */
+  if (!GetIpForwardTable (ipfwdt, &siz_ipfwd_table, FALSE))
+    {
+      for (ipf_cnt = 0; ipf_cnt < ipfwdt->dwNumEntries; ++ipf_cnt)
+        {
+          if (ipfwdt->table[ipf_cnt].dwForwardDest == 0)
+            {                   /* default gateway found */
+              char *servername;
+              char *serverip;
+              char *netmask;
+
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                      "Default Interface found %i\r\n",
+                                      ipfwdt->table[ipf_cnt].dwForwardIfIndex));
+
+              if (0 == ppl_dns_get_local_fqdn (&servername,
+                                               &serverip,
+                                               &netmask,
+                                               ipfwdt->table[ipf_cnt].
+                                               dwForwardIfIndex))
+                {
+                  osip_strncpy (address, serverip, size);
+                  osip_free (servername);
+                  osip_free (serverip);
+                  osip_free (netmask);
+                  return 0;
+                }
+              return -1;
+            }
+        }
+
+    }
+
+    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                            "Please define a default network interface.\r\n"));
+#ifdef WANT_INTERFACE_ANYWAY
+
+
+  /* NT4 (sp4 support only?) */
+  if (!GetIpForwardTable (ipfwdt, &siz_ipfwd_table, FALSE))
+    {
+      for (ipf_cnt = 0; ipf_cnt < ipfwdt->dwNumEntries; ++ipf_cnt)
+        {
+            char *servername;
+            char *serverip;
+            char *netmask;
+
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                    "Default Interface found %i\r\n",
+                                    ipfwdt->table[ipf_cnt].dwForwardIfIndex));
+
+            if (0 == ppl_dns_get_local_fqdn (&servername,
+                                            &serverip,
+                                            &netmask,
+                                            ipfwdt->table[ipf_cnt].
+                                            dwForwardIfIndex))
+            {
+                /* search for public */
+                if (eXosip_is_public_address(serverip) == 0)
+                {
+                    osip_strncpy (address, serverip, size);
+                    osip_free (servername);
+                    osip_free (serverip);
+                    osip_free (netmask);
+                    return 0;
+                }
+                osip_free (servername);
+                osip_free (serverip);
+                osip_free (netmask);
+            }
+        }
+    }
+
+    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                            "No public interface found. searching private\r\n"));
+
+  /* NT4 (sp4 support only?) */
+  if (!GetIpForwardTable (ipfwdt, &siz_ipfwd_table, FALSE))
+    {
+      for (ipf_cnt = 0; ipf_cnt < ipfwdt->dwNumEntries; ++ipf_cnt)
+        {
+            char *servername;
+            char *serverip;
+            char *netmask;
+
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                    "Default Interface found %i\r\n",
+                                    ipfwdt->table[ipf_cnt].dwForwardIfIndex));
+
+            if (0 == ppl_dns_get_local_fqdn (&servername,
+                                            &serverip,
+                                            &netmask,
+                                            ipfwdt->table[ipf_cnt].
+                                            dwForwardIfIndex))
+            {
+                osip_strncpy (address, serverip, size);
+                osip_free (servername);
+                osip_free (serverip);
+                osip_free (netmask);
+                return 0;
+            }
+        }
+    }
+
+  {
+      char *lo = osip_strdup("127.0.0.1");
+      osip_strncpy (address, lo, size);
+      osip_free(lo);
+      return 0;
+  }
+
+    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                            "No interface found. returning 127.0.0.1\r\n"));
+  /* no default gateway interface found */
+  return 0;
+#else
+  return -1;
+#endif /* WANT_INTERFACE_ANYWAY */
+}
+
+
+#else /* sun, *BSD, linux, and other? */
+
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <unistd.h>
+#include <sys/param.h>
+
+#include <stdio.h>
+
+static int ppl_dns_default_gateway_ipv4 (char *address, int size);
+static int ppl_dns_default_gateway_ipv6 (char *address, int size);
+
+
+int
+eXosip_guess_ip_for_via (int familiy, char *address, int size)
+{
+  if (familiy == AF_INET6)
+    {
+      return ppl_dns_default_gateway_ipv6 (address, size);
+  } else
+    {
+      return ppl_dns_default_gateway_ipv4 (address, size);
+    }
+}
+
+/* This is a portable way to find the default gateway.
+ * The ip of the default interface is returned.
+ */
+static int
+ppl_dns_default_gateway_ipv4 (char *address, int size)
+{
+#ifdef __APPLE_CC__
+  int len;
+#else
+  unsigned int len;
+#endif
+  int sock_rt, on = 1;
+  struct sockaddr_in iface_out;
+  struct sockaddr_in remote;
+
+  memset (&remote, 0, sizeof (struct sockaddr_in));
+
+  remote.sin_family = AF_INET;
+  remote.sin_addr.s_addr = inet_addr ("217.12.3.11");
+  remote.sin_port = htons (11111);
+
+  memset (&iface_out, 0, sizeof (iface_out));
+  sock_rt = socket (AF_INET, SOCK_DGRAM, 0);
+
+  if (setsockopt (sock_rt, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST");
+      close (sock_rt);
+      return -1;
+    }
+
+  if (connect
+      (sock_rt, (struct sockaddr *) &remote, sizeof (struct sockaddr_in)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] connect");
+      close (sock_rt);
+      return -1;
+    }
+
+  len = sizeof (iface_out);
+  if (getsockname (sock_rt, (struct sockaddr *) &iface_out, &len) == -1)
+    {
+      perror ("DEBUG: [get_output_if] getsockname");
+      close (sock_rt);
+      return -1;
+    }
+
+  close (sock_rt);
+  if (iface_out.sin_addr.s_addr == 0)
+    {                           /* what is this case?? */
+      return -1;
+    }
+  osip_strncpy (address, inet_ntoa (iface_out.sin_addr), size - 1);
+  return 0;
+}
+
+
+/* This is a portable way to find the default gateway.
+ * The ip of the default interface is returned.
+ */
+static int
+ppl_dns_default_gateway_ipv6 (char *address, int size)
+{
+#ifdef __APPLE_CC__
+  int len;
+#else
+  unsigned int len;
+#endif
+  int sock_rt, on = 1;
+  struct sockaddr_in6 iface_out;
+  struct sockaddr_in6 remote;
+
+  memset (&remote, 0, sizeof (struct sockaddr_in6));
+
+  remote.sin6_family = AF_INET6;
+  inet_pton (AF_INET6, "2001:638:500:101:2e0:81ff:fe24:37c6", &remote.sin6_addr);
+  remote.sin6_port = htons (11111);
+
+  memset (&iface_out, 0, sizeof (iface_out));
+  sock_rt = socket (AF_INET6, SOCK_DGRAM, 0);
+
+  if (setsockopt (sock_rt, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST");
+      close (sock_rt);
+      return -1;
+    }
+
+  if (connect
+      (sock_rt, (struct sockaddr *) &remote, sizeof (struct sockaddr_in6)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] connect");
+      close (sock_rt);
+      return -1;
+    }
+
+  len = sizeof (iface_out);
+  if (getsockname (sock_rt, (struct sockaddr *) &iface_out, &len) == -1)
+    {
+      perror ("DEBUG: [get_output_if] getsockname");
+      close (sock_rt);
+      return -1;
+    }
+  close (sock_rt);
+
+  if (iface_out.sin6_addr.s6_addr == 0)
+    {                           /* what is this case?? */
+      return -1;
+    }
+  inet_ntop (AF_INET6, (const void *) &iface_out.sin6_addr, address, size - 1);
+  return 0;
+}
+
+#endif
+
+int
+eXosip_get_localip_for (const char *address_to_reach, char *loc, int size)
+{
+  int err, tmp;
+  struct addrinfo hints;
+  struct addrinfo *res = NULL;
+  struct sockaddr_storage addr;
+  int sock;
+
+#ifdef __APPLE_CC__
+  int s;
+#else
+  socklen_t s;
+#endif
+#ifdef MAXHOSTNAMELEN
+  if (size > MAXHOSTNAMELEN)
+    size = MAXHOSTNAMELEN;
+#else
+  if (size > 256)
+      size = 256;
+#endif
+  if (eXosip.forced_localip)
+    {
+      if (size > sizeof (eXosip.net_interfaces[0].net_firewall_ip))
+        size = sizeof (eXosip.net_interfaces[0].net_firewall_ip);
+      strncpy (loc, eXosip.net_interfaces[0].net_firewall_ip, size);
+      return 0;
+    }
+
+  strcpy (loc, "127.0.0.1");    /* always fallback to local loopback */
+
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = PF_UNSPEC;
+  hints.ai_socktype = SOCK_DGRAM;
+  /*hints.ai_flags=AI_NUMERICHOST|AI_CANONNAME; */
+  err = getaddrinfo (address_to_reach, "5060", &hints, &res);
+  if (err != 0)
+    {
+      eXosip_trace (OSIP_ERROR,
+                    ("Error in getaddrinfo for %s: %s\n", address_to_reach,
+                     gai_strerror (err)));
+      return -1;
+    }
+  if (res == NULL)
+    {
+      eXosip_trace (OSIP_ERROR, ("getaddrinfo reported nothing !"));
+      return -1;
+    }
+  sock = socket (res->ai_family, SOCK_DGRAM, 0);
+  tmp = 1;
+  err = setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&tmp, sizeof (int));
+  if (err < 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("Error in setsockopt: %s\n", strerror (errno)));
+      return -1;
+    }
+  err = connect (sock, res->ai_addr, res->ai_addrlen);
+  if (err < 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("Error in connect: %s\n", strerror (errno)));
+      freeaddrinfo (res);
+      close (sock);
+      return -1;
+    }
+  freeaddrinfo (res);
+  res = NULL;
+  s = sizeof (addr);
+  err = getsockname (sock, (struct sockaddr *) &addr, &s);
+  if (err != 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("Error in getsockname: %s\n", strerror (errno)));
+      close (sock);
+      return -1;
+    }
+
+  err =
+    getnameinfo ((struct sockaddr *) &addr, s, loc, size, NULL, 0, NI_NUMERICHOST);
+  if (err != 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("getnameinfo error:%s", strerror (errno)));
+      return -1;
+    }
+  close (sock);
+  eXosip_trace (OSIP_INFO1,
+                ("Outgoing interface to reach %s is %s.\n", address_to_reach,
+                 loc));
+  return 0;
+}
+
+
+#ifdef SM
+
+void
+eXosip_get_localip_from_via (osip_message_t * mesg, char *locip, int size)
+{
+  osip_via_t *via = NULL;
+  char *host;
+
+  via = (osip_via_t *) osip_list_get (mesg->vias, 0);
+  if (via == NULL)
+    {
+      host = "15.128.128.93";
+      eXosip_trace (OSIP_ERROR, ("Could not get via:%s"));
+  } else
+    host = via->host;
+  eXosip_get_localip_for (host, locip, size);
+
+}
+#endif
+
+char *
+strdup_printf (const char *fmt, ...)
+{
+  /* Guess we need no more than 100 bytes. */
+  int n, size = 100;
+  char *p;
+  va_list ap;
+
+  if ((p = osip_malloc (size)) == NULL)
+    return NULL;
+  while (1)
+    {
+      /* Try to print in the allocated space. */
+      va_start (ap, fmt);
+#ifdef WIN32
+      n = _vsnprintf (p, size, fmt, ap);
+#else
+      n = vsnprintf (p, size, fmt, ap);
+#endif
+      va_end (ap);
+      /* If that worked, return the string. */
+      if (n > -1 && n < size)
+        return p;
+      /* Else try again with more space. */
+      if (n > -1)               /* glibc 2.1 */
+        size = n + 1;           /* precisely what is needed */
+      else                      /* glibc 2.0 */
+        size *= 2;              /* twice the old size */
+      if ((p = realloc (p, size)) == NULL)
+        return NULL;
+    }
+}
+
+int
+eXosip_get_addrinfo (struct addrinfo **addrinfo, const char *hostname,
+		     int service, int protocol)
+{
+#ifndef WIN32
+  struct in_addr addr;
+  struct in6_addr addrv6;
+#else
+  unsigned long int one_inet_addr;
+#endif
+  struct addrinfo hints;
+  int error;
+  char portbuf[10];
+
+  if (hostname==NULL)
+    return -1;
+
+  if (service != -1) /* -1 for SRV record */
+    snprintf (portbuf, sizeof (portbuf), "%i", service);
+
+  memset (&hints, 0, sizeof (hints));
+#ifndef WIN32
+  if (inet_pton (AF_INET, hostname, &addr) > 0)
+    {
+      /* ipv4 address detected */
+      hints.ai_flags = AI_NUMERICHOST;
+      hints.ai_family = PF_INET;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "IPv4 address detected: %s\n", hostname));
+  } else if (inet_pton (AF_INET6, hostname, &addrv6) > 0)
+    {
+      /* ipv6 address detected */
+      /* Do the resolution anyway */
+      hints.ai_flags = AI_CANONNAME;
+      hints.ai_family = PF_INET6;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "IPv6 address detected: %s\n", hostname));
+  } else
+    {
+      /* hostname must be resolved */
+      hints.ai_flags = AI_CANONNAME;
+      if (protocol==IPPROTO_UDP)
+	hints.ai_family = (eXosip.net_interfaces[0].net_ip_family == AF_INET) ? PF_INET : PF_INET6;
+      else if (protocol==IPPROTO_TCP)
+	hints.ai_family = (eXosip.net_interfaces[1].net_ip_family == AF_INET) ? PF_INET : PF_INET6;
+      else
+	{
+	  hints.ai_family = (eXosip.net_interfaces[0].net_ip_family == AF_INET) ? PF_INET : PF_INET6;
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: unsupported protocol (default to UDP)\n"));
+	}
+
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "Not an IPv4 or IPv6 address: %s\n", hostname));
+    }
+#else
+  if ((int) (one_inet_addr = inet_addr (hostname)) == -1)
+    hints.ai_flags = AI_CANONNAME;
+  else
+    hints.ai_flags = AI_NUMERICHOST;
+
+#ifdef IPV6_SUPPORT
+  hints.ai_family = PF_UNSPEC;  /* ipv6 support */
+#else
+  hints.ai_family = PF_INET;    /* ipv4 only support */
+#endif
+
+#endif
+
+  if (protocol==IPPROTO_UDP)
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+    hints.ai_socktype = SOCK_STREAM;
+
+  hints.ai_protocol = protocol; /* IPPROTO_UDP or IPPROTO_TCP */
+  if (service == -1) /* -1 for SRV record */
+    {
+      error = getaddrinfo (hostname, "sip", &hints, addrinfo);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "SRV resolution with udp-sip-%s\n", hostname));
+  } else
+    {
+      error = getaddrinfo (hostname, portbuf, &hints, addrinfo);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "DNS resolution with %s:%i\n", hostname, service));
+    }
+  if (error || *addrinfo == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "getaddrinfo failure. %s:%s (%s)\n", hostname, portbuf,
+                   gai_strerror (error)));
+      return -1;
+    }
+
+  return 0;
+}
+
diff --git a/libs/eXosip2/eXosip2/inet_ntop.c b/libs/eXosip2/eXosip2/inet_ntop.c
new file mode 100644
index 0000000000000000000000000000000000000000..d3d765c263801a8f322ce55b017d03d313c9ff3b
--- /dev/null
+++ b/libs/eXosip2/eXosip2/inet_ntop.c
@@ -0,0 +1,217 @@
+/* This is from the BIND 4.9.4 release, modified to compile by itself */
+
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#if defined(WIN32)
+
+#include <osipparser2/osip_port.h>
+#include "eXosip2.h"
+
+#include <windowsx.h>
+#include <winsock2.h>
+#include <Ws2tcpip.h>
+#include <Iphlpapi.h>
+
+#include "inet_ntop.h"
+
+/* added by adm */
+/*
+ * the definitions below are valid for 32-bit architectures and will have to
+ * be adjusted for 16- or 64-bit architectures
+ */
+typedef unsigned __int8		uint8_t;
+typedef unsigned __int16	uint16_t;
+typedef unsigned __int32	uint32_t;
+typedef unsigned __int64    uint64_t;
+typedef __int8		int8_t;
+typedef __int16		int16_t;
+typedef __int32		int32_t;
+typedef __int64		int64_t;
+typedef unsigned long	in_addr_t;
+
+/* !added by amd */
+
+#define	IN6ADDRSZ	16
+#define	INT16SZ		 2
+
+#ifndef	AF_INET6
+#define	AF_INET6	AF_MAX+1	/* just to let this compile */
+#endif
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static const char *_inet_ntop4(const u_char *src, char *dst, size_t size);
+static const char *_inet_ntop6(const u_char *src, char *dst, size_t size);
+
+/* char *
+ * inet_ntop(af, src, dst, size)
+ *	convert a network format address to presentation format.
+ * return:
+ *	pointer to presentation format address (`dst'), or NULL (see errno).
+ * author:
+ *	Paul Vixie, 1996.
+ */
+const char *
+_inet_ntop(af, src, dst, size)
+	int af;
+	const void *src;
+	char *dst;
+	size_t size;
+{
+	switch (af) {
+	case AF_INET:
+		return (_inet_ntop4(src, dst, size));
+	case AF_INET6:
+		return (_inet_ntop6(src, dst, size));
+	default:
+		errno = EAFNOSUPPORT;
+		return (NULL);
+	}
+	/* NOTREACHED */
+}
+
+/* const char *
+ * inet_ntop4(src, dst, size)
+ *	format an IPv4 address, more or less like inet_ntoa()
+ * return:
+ *	`dst' (as a const)
+ * notes:
+ *	(1) uses no statics
+ *	(2) takes a u_char* not an in_addr as input
+ * author:
+ *	Paul Vixie, 1996.
+ */
+static const char *
+_inet_ntop4(src, dst, size)
+	const u_char *src;
+	char *dst;
+	size_t size;
+{
+	static const char fmt[] = "%u.%u.%u.%u";
+	char tmp[sizeof "255.255.255.255"];
+
+	sprintf(tmp, fmt, src[0], src[1], src[2], src[3]);
+	if ((size_t)strlen(tmp) > size) {
+		errno = ENOSPC;
+		return (NULL);
+	}
+	strcpy(dst, tmp);
+	return (dst);
+}
+
+/* const char *
+ * inet_ntop6(src, dst, size)
+ *	convert IPv6 binary address into presentation (printable) format
+ * author:
+ *	Paul Vixie, 1996.
+ */
+static const char *
+_inet_ntop6(src, dst, size)
+	const u_char *src;
+	char *dst;
+	size_t size;
+{
+	/*
+	 * Note that int32_t and int16_t need only be "at least" large enough
+	 * to contain a value of the specified size.  On some systems, like
+	 * Crays, there is no such thing as an integer variable with 16 bits.
+	 * Keep this in mind if you think this function should have been coded
+	 * to use pointer overlays.  All the world's not a VAX.
+	 */
+	char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
+	struct { int base, len; } best, cur;
+	uint32_t words[IN6ADDRSZ / INT16SZ];
+	int i;
+
+	/*
+	 * Preprocess:
+	 *	Copy the input (bytewise) array into a wordwise array.
+	 *	Find the longest run of 0x00's in src[] for :: shorthanding.
+	 */
+	memset(words, 0, sizeof words);
+	for (i = 0; i < IN6ADDRSZ; i++)
+		words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
+	best.base = -1;
+	cur.base = -1;
+	for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+		if (words[i] == 0) {
+			if (cur.base == -1)
+				cur.base = i, cur.len = 1;
+			else
+				cur.len++;
+		} else {
+			if (cur.base != -1) {
+				if (best.base == -1 || cur.len > best.len)
+					best = cur;
+				cur.base = -1;
+			}
+		}
+	}
+	if (cur.base != -1) {
+		if (best.base == -1 || cur.len > best.len)
+			best = cur;
+	}
+	if (best.base != -1 && best.len < 2)
+		best.base = -1;
+
+	/*
+	 * Format the result.
+	 */
+	tp = tmp;
+	for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+		/* Are we inside the best run of 0x00's? */
+		if (best.base != -1 && i >= best.base &&
+		    i < (best.base + best.len)) {
+			if (i == best.base)
+				*tp++ = ':';
+			continue;
+		}
+		/* Are we following an initial run of 0x00s or any real hex? */
+		if (i != 0)
+			*tp++ = ':';
+		/* Is this address an encapsulated IPv4? */
+		if (i == 6 && best.base == 0 &&
+		    (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+			if (!_inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
+				return (NULL);
+			tp += strlen(tp);
+			break;
+		}
+		sprintf(tp, "%x", words[i]);
+		tp += strlen(tp);
+	}
+	/* Was it a trailing run of 0x00's? */
+	if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
+		*tp++ = ':';
+	*tp++ = '\0';
+
+	/*
+	 * Check for overflow, copy, and we're done.
+	 */
+	if ((size_t) (tp - tmp) > size) {
+		errno = ENOSPC;
+		return (NULL);
+	}
+	strcpy(dst, tmp);
+	return (dst);
+}
+
+#endif
+
diff --git a/libs/eXosip2/eXosip2/inet_ntop.h b/libs/eXosip2/eXosip2/inet_ntop.h
new file mode 100644
index 0000000000000000000000000000000000000000..d965806f77c7f9e1fbbc6286d7a98906840d9c52
--- /dev/null
+++ b/libs/eXosip2/eXosip2/inet_ntop.h
@@ -0,0 +1,21 @@
+
+#if defined(WIN32)
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#ifndef EAFNOSUPPORT
+#define EAFNOSUPPORT	WSAEAFNOSUPPORT
+#endif
+
+
+const char *_inet_ntop(int af, const void *src, char *dst, size_t size);
+
+#define inet_ntop _inet_ntop
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* WIN32 */
diff --git a/libs/eXosip2/eXosip2/jauth.c b/libs/eXosip2/eXosip2/jauth.c
new file mode 100644
index 0000000000000000000000000000000000000000..63c9539d9d1695c0ab13eec1e2c4de49d188cea6
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jauth.c
@@ -0,0 +1,489 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+#include <osip2/osip_mt.h>
+#include <osip2/osip_condv.h>
+
+/* #include <osip2/global.h> */
+#include <osipparser2/osip_md5.h>
+
+/* TAKEN from rcf2617.txt */
+
+#define HASHLEN 16
+typedef char HASH[HASHLEN];
+
+#define HASHHEXLEN 32
+typedef char HASHHEX[HASHHEXLEN + 1];
+
+#define IN
+#define OUT
+
+extern eXosip_t eXosip;
+
+/* Private functions */
+static void CvtHex (IN HASH Bin, OUT HASHHEX Hex);
+static void DigestCalcHA1 (IN const char *pszAlg, IN const char *pszUserName,
+                           IN const char *pszRealm,
+                           IN const char *pszPassword,
+                           IN const char *pszNonce, IN const char *pszCNonce,
+                           OUT HASHHEX SessionKey);
+static void DigestCalcResponse (IN HASHHEX HA1, IN const char *pszNonce,
+                                IN const char *pszNonceCount,
+                                IN const char *pszCNonce,
+                                IN const char *pszQop,
+                                IN const char *pszMethod,
+                                IN const char *pszDigestUri,
+                                IN HASHHEX HEntity, OUT HASHHEX Response);
+
+static void
+CvtHex (IN HASH Bin, OUT HASHHEX Hex)
+{
+  unsigned short i;
+  unsigned char j;
+
+  for (i = 0; i < HASHLEN; i++)
+    {
+      j = (Bin[i] >> 4) & 0xf;
+      if (j <= 9)
+        Hex[i * 2] = (j + '0');
+      else
+        Hex[i * 2] = (j + 'a' - 10);
+      j = Bin[i] & 0xf;
+      if (j <= 9)
+        Hex[i * 2 + 1] = (j + '0');
+      else
+        Hex[i * 2 + 1] = (j + 'a' - 10);
+    };
+  Hex[HASHHEXLEN] = '\0';
+}
+
+/* calculate H(A1) as per spec */
+static void
+DigestCalcHA1 (IN const char *pszAlg,
+               IN const char *pszUserName,
+               IN const char *pszRealm,
+               IN const char *pszPassword,
+               IN const char *pszNonce,
+               IN const char *pszCNonce, OUT HASHHEX SessionKey)
+{
+  MD5_CTX Md5Ctx;
+  HASH HA1;
+
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) pszUserName, strlen (pszUserName));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszRealm, strlen (pszRealm));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszPassword, strlen (pszPassword));
+  MD5Final ((unsigned char *) HA1, &Md5Ctx);
+  if ((pszAlg != NULL) && osip_strcasecmp (pszAlg, "md5-sess") == 0)
+    {
+      MD5Init (&Md5Ctx);
+      MD5Update (&Md5Ctx, (unsigned char *) HA1, HASHLEN);
+      MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+      MD5Update (&Md5Ctx, (unsigned char *) pszNonce, strlen (pszNonce));
+      MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+      MD5Update (&Md5Ctx, (unsigned char *) pszCNonce, strlen (pszCNonce));
+      MD5Final ((unsigned char *) HA1, &Md5Ctx);
+    }
+  CvtHex (HA1, SessionKey);
+}
+
+/* calculate request-digest/response-digest as per HTTP Digest spec */
+static void
+DigestCalcResponse (IN HASHHEX HA1,     /* H(A1) */
+                    IN const char *pszNonce,    /* nonce from server */
+                    IN const char *pszNonceCount,       /* 8 hex digits */
+                    IN const char *pszCNonce,   /* client nonce */
+                    IN const char *pszQop,      /* qop-value: "", "auth", "auth-int" */
+                    IN const char *pszMethod,   /* method from the request */
+                    IN const char *pszDigestUri,        /* requested URL */
+                    IN HASHHEX HEntity, /* H(entity body) if qop="auth-int" */
+                    OUT HASHHEX Response
+                    /* request-digest or response-digest */ )
+{
+  MD5_CTX Md5Ctx;
+  HASH HA2;
+  HASH RespHash;
+  HASHHEX HA2Hex;
+
+  /* calculate H(A2) */
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) pszMethod, strlen (pszMethod));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszDigestUri, strlen (pszDigestUri));
+
+  if (pszQop != NULL)
+    {
+
+      /*#define AUTH_INT_SUPPORT *//* experimental  */
+#ifdef AUTH_INT_SUPPORT         /* experimental  */
+      char *index = strchr (pszQop, 'i');
+
+      while (index != NULL && index - pszQop >= 5 && strlen (index) >= 3)
+        {
+          if (osip_strncasecmp (index - 5, "auth-int", 8) == 0)
+            {
+              goto auth_withqop;
+            }
+          index = strchr (index + 1, 'i');
+        }
+
+      strchr (pszQop, 'a');
+      while (index != NULL && strlen (index) >= 4)
+        {
+          if (osip_strncasecmp (index - 5, "auth", 4) == 0)
+            {
+              /* and in the case of a unknown token
+                 like auth1. It is not auth, but this
+                 implementation will think it is!??
+                 This is may not happen but it's a bug!
+               */
+              goto auth_withqop;
+            }
+          index = strchr (index + 1, 'a');
+        }
+#endif
+      goto auth_withoutqop;
+
+    };
+
+auth_withoutqop:
+  MD5Final ((unsigned char *) HA2, &Md5Ctx);
+  CvtHex (HA2, HA2Hex);
+
+  /* calculate response */
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) HA1, HASHHEXLEN);
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszNonce, strlen (pszNonce));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+
+  goto end;
+
+#ifdef AUTH_INT_SUPPORT         /* experimental  */
+auth_withqop:
+#endif
+
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) HEntity, HASHHEXLEN);
+  MD5Final ((unsigned char *) HA2, &Md5Ctx);
+  CvtHex (HA2, HA2Hex);
+
+  /* calculate response */
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) HA1, HASHHEXLEN);
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszNonce, strlen (pszNonce));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszNonceCount, strlen (pszNonceCount));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszCNonce, strlen (pszCNonce));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszQop, strlen (pszQop));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+
+end:
+  MD5Update (&Md5Ctx, (unsigned char *) HA2Hex, HASHHEXLEN);
+  MD5Final ((unsigned char *) RespHash, &Md5Ctx);
+  CvtHex (RespHash, Response);
+}
+
+
+int
+__eXosip_create_authorization_header (osip_message_t * previous_answer,
+                                      const char *rquri, const char *username,
+                                      const char *passwd, const char *ha1,
+                                      osip_authorization_t ** auth,
+				      const char *method)
+{
+  osip_authorization_t *aut;
+  osip_www_authenticate_t *wa = NULL;
+
+  osip_message_get_www_authenticate (previous_answer, 0, &wa);
+
+  /* make some test */
+  if (passwd == NULL)
+    return -1;
+  if (wa == NULL || wa->auth_type == NULL
+      || (wa->realm == NULL) || (wa->nonce == NULL))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "www_authenticate header is not acceptable.\n"));
+      return -1;
+    }
+  if (0 != osip_strcasecmp ("Digest", wa->auth_type))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (Digest only).\n"));
+      return -1;
+    }
+  /* "MD5" is invalid, but some servers use it. */
+  if (wa->algorithm != NULL && 0 != osip_strcasecmp ("MD5", wa->algorithm)
+      && 0 != osip_strcasecmp ("\"MD5\"", wa->algorithm))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (Digest only).\n"));
+      return -1;
+    }
+  if (0 != osip_authorization_init (&aut))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "allocation with authorization_init failed.\n"));
+      return -1;
+    }
+
+  /* just copy some feilds from response to new request */
+  osip_authorization_set_auth_type (aut, osip_strdup ("Digest"));
+  osip_authorization_set_realm (aut,
+                                osip_strdup (osip_www_authenticate_get_realm
+                                             (wa)));
+  osip_authorization_set_nonce (aut,
+                                osip_strdup (osip_www_authenticate_get_nonce
+                                             (wa)));
+  if (osip_www_authenticate_get_opaque (wa) != NULL)
+    osip_authorization_set_opaque (aut,
+                                   osip_strdup
+                                   (osip_www_authenticate_get_opaque (wa)));
+  /* copy the username field in new request */
+  aut->username = osip_malloc (strlen (username) + 3);
+  sprintf (aut->username, "\"%s\"", username);
+
+  {
+    char *tmp = osip_malloc (strlen (rquri) + 3);
+
+    sprintf (tmp, "\"%s\"", rquri);
+    osip_authorization_set_uri (aut, tmp);
+  }
+
+  osip_authorization_set_algorithm (aut, osip_strdup ("MD5"));
+
+  {
+    char *pszNonce =
+      osip_strdup_without_quote (osip_www_authenticate_get_nonce (wa));
+    char *pszCNonce = NULL;
+    const char *pszUser = username;
+    char *pszRealm =
+      osip_strdup_without_quote (osip_authorization_get_realm (aut));
+    const char *pszPass = NULL;
+    char *pszAlg = osip_strdup ("MD5");
+    char *szNonceCount = NULL;
+    const char *pszMethod = method; /* previous_answer->cseq->method; */
+    char *pszQop = NULL;
+    const char *pszURI = rquri;
+
+    HASHHEX HA1;
+    HASHHEX HA2 = "";
+    HASHHEX Response;
+    const char *pha1 = NULL;
+
+    pszPass = passwd;
+    if (osip_authorization_get_nonce_count (aut) != NULL)
+      szNonceCount = osip_strdup (osip_authorization_get_nonce_count (aut));
+    if (osip_authorization_get_message_qop (aut) != NULL)
+      pszQop = osip_strdup (osip_authorization_get_message_qop (aut));
+
+    if (ha1 && ha1[0])
+      {
+	/* Depending on algorithm=md5 */
+	pha1 = ha1;
+      }
+    else
+      {
+	DigestCalcHA1 (pszAlg, pszUser, pszRealm, pszPass, pszNonce, pszCNonce, HA1);
+	pha1 = HA1;
+      }
+
+    DigestCalcResponse ((char *)pha1, pszNonce, szNonceCount, pszCNonce, pszQop,
+                        pszMethod, pszURI, HA2, Response);
+    OSIP_TRACE (osip_trace
+                (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                 "Response in authorization |%s|\n", Response));
+    {
+      char *resp = osip_malloc (35);
+
+      sprintf (resp, "\"%s\"", Response);
+      osip_authorization_set_response (aut, resp);
+    }
+    osip_free (pszAlg);         /* xkd, 2004-5-13 */
+    osip_free (pszNonce);
+    osip_free (pszCNonce);
+    osip_free (pszRealm);
+    osip_free (pszQop);
+    osip_free (szNonceCount);
+  }
+
+  *auth = aut;
+  return 0;
+}
+
+int
+__eXosip_create_proxy_authorization_header (osip_message_t * previous_answer,
+                                            const char *rquri,
+                                            const char *username,
+                                            const char *passwd,
+                                            const char *ha1,
+                                            osip_proxy_authorization_t ** auth,
+					    const char *method)
+{
+  osip_proxy_authorization_t *aut;
+  osip_proxy_authenticate_t *wa;
+
+  osip_message_get_proxy_authenticate (previous_answer, 0, &wa);
+
+  /* make some test */
+  if (passwd == NULL)
+    return -1;
+  if (wa == NULL || wa->auth_type == NULL
+      || (wa->realm == NULL) || (wa->nonce == NULL))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "www_authenticate header is not acceptable.\n"));
+      return -1;
+    }
+  if (0 != osip_strcasecmp ("Digest", wa->auth_type))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (Digest only).\n"));
+      return -1;
+    }
+  /* "MD5" is invalid, but some servers use it. */
+  if (wa->algorithm != NULL && 0 != osip_strcasecmp ("MD5", wa->algorithm)
+      && 0 != osip_strcasecmp ("\"MD5\"", wa->algorithm))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (MD5 Digest only).\n"));
+      return -1;
+    }
+  if (0 != osip_proxy_authorization_init (&aut))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "allocation with authorization_init failed.\n"));
+      return -1;
+    }
+
+  /* just copy some feilds from response to new request */
+  osip_proxy_authorization_set_auth_type (aut, osip_strdup ("Digest"));
+  osip_proxy_authorization_set_realm (aut,
+                                      osip_strdup
+                                      (osip_proxy_authenticate_get_realm (wa)));
+  osip_proxy_authorization_set_nonce (aut,
+                                      osip_strdup
+                                      (osip_proxy_authenticate_get_nonce (wa)));
+  if (osip_proxy_authenticate_get_opaque (wa) != NULL)
+    osip_proxy_authorization_set_opaque (aut,
+                                         osip_strdup
+                                         (osip_proxy_authenticate_get_opaque
+                                          (wa)));
+  /* copy the username field in new request */
+  aut->username = osip_malloc (strlen (username) + 3);
+  sprintf (aut->username, "\"%s\"", username);
+
+  {
+    char *tmp = osip_malloc (strlen (rquri) + 3);
+
+    sprintf (tmp, "\"%s\"", rquri);
+    osip_proxy_authorization_set_uri (aut, tmp);
+  }
+  osip_proxy_authorization_set_algorithm (aut, osip_strdup ("MD5"));
+
+  {
+    char *pszNonce = NULL;
+    char *pszCNonce = NULL;
+    const char *pszUser = username;
+    char *pszRealm =
+      osip_strdup_without_quote (osip_proxy_authorization_get_realm (aut));
+    const char *pszPass = NULL;
+    char *pszAlg = osip_strdup ("MD5");
+    char *szNonceCount = NULL;
+    char *pszMethod = (char *)method; /* previous_answer->cseq->method; */
+    char *pszQop = NULL;
+    const char *pszURI = rquri;
+
+    HASHHEX HA1;
+    HASHHEX HA2 = "";
+    HASHHEX Response;
+    const char *pha1 = NULL;
+
+    pszPass = passwd;
+
+    if (osip_www_authenticate_get_nonce (wa) == NULL)
+      return -1;
+    pszNonce = osip_strdup_without_quote (osip_www_authenticate_get_nonce (wa));
+
+    /* should upgrade szNonceCount */
+    /* should add szNonceCount in aut */
+    /* should upgrade pszCNonce */
+    /* should add pszCNonce in aut */
+
+    if (osip_proxy_authenticate_get_qop_options (wa) != NULL)
+      {
+        szNonceCount = osip_strdup ("00000001");
+        /* MUST be incremented on each */
+        pszQop = osip_strdup (osip_proxy_authenticate_get_qop_options (wa));
+        pszCNonce = osip_strdup ("234abcc436e2667097e7fe6eia53e8dd");
+      }
+    if (ha1 && ha1[0])
+      {
+	/* Depending on algorithm=md5 */
+	pha1 = ha1;
+      }
+    else
+      {
+	DigestCalcHA1 (pszAlg, pszUser, pszRealm, pszPass, pszNonce, pszCNonce, HA1);
+	pha1 = HA1;
+      }
+    DigestCalcResponse ((char *)pha1, pszNonce, szNonceCount, pszCNonce, pszQop,
+                        pszMethod, pszURI, HA2, Response);
+    OSIP_TRACE (osip_trace
+                (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                 "Response in proxy_authorization |%s|\n", Response));
+    {
+      char *resp = osip_malloc (35);
+
+      sprintf (resp, "\"%s\"", Response);
+      osip_proxy_authorization_set_response (aut, resp);
+    }
+    osip_free (pszAlg);         /* xkd, 2004-5-13 */
+    osip_free (pszNonce);
+    osip_free (pszCNonce);
+    osip_free (pszRealm);
+    osip_free (pszQop);
+    osip_free (szNonceCount);
+  }
+
+  *auth = aut;
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/jcall.c b/libs/eXosip2/eXosip2/jcall.c
new file mode 100644
index 0000000000000000000000000000000000000000..cd13c0432ea7d50002f961933cd1851529d6a68b
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jcall.c
@@ -0,0 +1,119 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_call_find (int cid, eXosip_call_t ** jc)
+{
+  for (*jc = eXosip.j_calls; *jc != NULL; *jc = (*jc)->next)
+    {
+      if ((*jc)->c_id == cid)
+        {
+          return 0;
+        }
+    }
+  *jc = NULL;
+  return -1;
+}
+
+int
+eXosip_call_init (eXosip_call_t ** jc)
+{
+  *jc = (eXosip_call_t *) osip_malloc (sizeof (eXosip_call_t));
+  if (*jc == NULL)
+    return -1;
+  memset (*jc, 0, sizeof (eXosip_call_t));
+
+  (*jc)->c_id = -1;             /* make sure the eXosip_update will assign a valid id to the call */
+  return 0;
+}
+
+void
+__eXosip_call_remove_dialog_reference_in_call (eXosip_call_t * jc,
+                                               eXosip_dialog_t * jd)
+{
+  eXosip_dialog_t *_jd;
+  jinfo_t *ji;
+
+  if (jc == NULL)
+    return;
+  if (jd == NULL)
+    return;
+
+
+  for (_jd = jc->c_dialogs; _jd != NULL; _jd = _jd->next)
+    {
+      if (jd == _jd)
+        break;
+    }
+  if (_jd == NULL)
+    {
+      /* dialog not found??? */
+    }
+
+  ji = osip_transaction_get_your_instance (jc->c_inc_tr);
+  if (ji != NULL && ji->jd == jd)
+    ji->jd = NULL;
+  ji = osip_transaction_get_your_instance (jc->c_out_tr);
+  if (ji != NULL && ji->jd == jd)
+    ji->jd = NULL;
+}
+
+void
+eXosip_call_free (eXosip_call_t * jc)
+{
+  /* ... */
+
+  eXosip_dialog_t *jd;
+
+  if (jc->response_auth!=NULL)
+    osip_message_free(jc->response_auth);
+
+  for (jd = jc->c_dialogs; jd != NULL; jd = jc->c_dialogs)
+    {
+      REMOVE_ELEMENT (jc->c_dialogs, jd);
+      eXosip_dialog_free (jd);
+    }
+
+  __eXosip_delete_jinfo (jc->c_inc_tr);
+  __eXosip_delete_jinfo (jc->c_out_tr);
+  if (jc->c_inc_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_inc_tr, 0);
+  if (jc->c_out_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_out_tr, 0);
+
+  __eXosip_delete_jinfo (jc->c_inc_options_tr);
+  __eXosip_delete_jinfo (jc->c_out_options_tr);
+  if (jc->c_inc_options_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_inc_options_tr, 0);
+  if (jc->c_out_options_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_out_options_tr, 0);
+
+  osip_free (jc);
+
+}
diff --git a/libs/eXosip2/eXosip2/jcallback.c b/libs/eXosip2/eXosip2/jcallback.c
new file mode 100644
index 0000000000000000000000000000000000000000..84e9b646b722ca1eb701162182c4118dac52c92c
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jcallback.c
@@ -0,0 +1,2053 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include <stdlib.h>
+
+#ifdef WIN32
+#include <windowsx.h>
+#include <winsock2.h>
+#include <Ws2tcpip.h>
+#include "inet_ntop.h"
+
+#else
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#endif
+
+#include <eXosip2/eXosip.h>
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+
+/* Private functions */
+static void rcvregister_failure (int type, osip_transaction_t * tr,
+                                 osip_message_t * sip);
+static void cb_ict_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_ist_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_nict_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_nist_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_rcvinvite (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvack (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvack2 (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvregister (int type, osip_transaction_t * tr,
+                            osip_message_t * sip);
+static void cb_rcvcancel (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvrequest (int type, osip_transaction_t * tr,
+                              osip_message_t * sip);
+static void cb_sndinvite (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndack (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndregister (int type, osip_transaction_t * tr,
+                            osip_message_t * sip);
+static void cb_sndbye (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndcancel (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndinfo (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndoptions (int type, osip_transaction_t * tr,
+                           osip_message_t * sip);
+static void cb_sndnotify (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndsubscribe (int type, osip_transaction_t * tr,
+                             osip_message_t * sip);
+static void cb_sndunkrequest (int type, osip_transaction_t * tr,
+                              osip_message_t * sip);
+static void cb_rcv1xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv2xx_4invite (osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv2xx_4subscribe (osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv2xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv3xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv4xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv5xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv6xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd1xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd2xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd3xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd4xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd5xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd6xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvresp_retransmission (int type, osip_transaction_t * tr,
+                                       osip_message_t * sip);
+static void cb_sndreq_retransmission (int type, osip_transaction_t * tr,
+                                      osip_message_t * sip);
+static void cb_sndresp_retransmission (int type, osip_transaction_t * tr,
+                                       osip_message_t * sip);
+static void cb_rcvreq_retransmission (int type, osip_transaction_t * tr,
+                                      osip_message_t * sip);
+static void cb_transport_error (int type, osip_transaction_t * tr, int error);
+
+
+int
+cb_snd_message (osip_transaction_t * tr, osip_message_t * sip, char *host,
+		int port, int out_socket)
+{
+  int i;
+  osip_via_t *via;
+  if (eXosip.net_interfaces[0].net_socket == 0
+      && eXosip.net_interfaces[1].net_socket == 0)
+    return -1;
+
+  if (host == NULL)
+    {
+      host = sip->req_uri->host;
+      if (sip->req_uri->port != NULL)
+        port = osip_atoi (sip->req_uri->port);
+      else
+        port = 5060;
+    }
+
+  via = (osip_via_t *) osip_list_get(sip->vias, 0);
+  if (via==NULL || via->protocol==NULL)
+    return -1;
+
+  i = -1;
+  if (osip_strcasecmp(via->protocol, "udp")==0)
+    {
+      i = cb_udp_snd_message (tr, sip, host, port, out_socket);
+    }
+  else
+    {
+      i = cb_tcp_snd_message (tr, sip, host, port, out_socket);
+    }
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+
+}
+
+int
+cb_udp_snd_message (osip_transaction_t * tr, osip_message_t * sip, char *host,
+                    int port, int out_socket)
+{
+  int len = 0;
+  size_t length = 0;
+  struct addrinfo *addrinfo;
+  struct __eXosip_sockaddr addr;
+  char *message;
+#ifdef INET6_ADDRSTRLEN
+  char ipbuf[INET6_ADDRSTRLEN];
+#else
+  char ipbuf[46];
+#endif
+  int i;
+  struct eXosip_net *net;
+
+  if (eXosip.net_interfaces[0].net_socket == 0)
+    return -1;
+
+  net = &eXosip.net_interfaces[0];
+
+  if (eXosip.http_port)
+  {
+    i = osip_message_to_str (sip, &message, &length);
+
+    if (i != 0 || length <= 0)
+        {
+        return -1;
+        }
+    if (0 >
+        _eXosip_sendto (net->net_socket, (const void *) message, length, 0,
+	        (struct sockaddr *) &addr, len ))
+    {
+        /* should reopen connection! */
+        osip_free (message);
+        return -1;
+    }
+    return 0;
+  }
+
+  if (host == NULL)
+    {
+      host = sip->req_uri->host;
+      if (sip->req_uri->port != NULL)
+        port = osip_atoi (sip->req_uri->port);
+      else
+        port = 5060;
+    }
+
+  i = eXosip_get_addrinfo (&addrinfo, host, port, IPPROTO_UDP);
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+  len = addrinfo->ai_addrlen;
+
+  freeaddrinfo (addrinfo);
+
+  i = osip_message_to_str (sip, &message, &length);
+
+  if (i != 0 || length <= 0)
+    {
+      return -1;
+    }
+
+  switch (addr.ss_family)
+    {
+    case AF_INET:
+      inet_ntop(addr.ss_family, &(((struct sockaddr_in*)&addr)->sin_addr), ipbuf, sizeof(ipbuf));
+      break;
+    case AF_INET6:
+      inet_ntop(addr.ss_family, &(((struct sockaddr_in6*)&addr)->sin6_addr), ipbuf, sizeof(ipbuf));
+      break;
+    default:
+      strncpy(ipbuf, "(unknown)", sizeof(ipbuf));
+      break;
+    }
+  
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			  "Message sent: \n%s (to dest=%s:%i)\n",
+			  message, ipbuf, port));
+  if (0 >
+      _eXosip_sendto (net->net_socket, (const void *) message, length, 0,
+	      (struct sockaddr *) &addr, len ))
+    {
+#ifdef WIN32
+      if (WSAECONNREFUSED == WSAGetLastError ())
+#else
+      if (ECONNREFUSED == errno)
+#endif
+        {
+          /* This can be considered as an error, but for the moment,
+             I prefer that the application continue to try sending
+             message again and again... so we are not in a error case.
+             Nevertheless, this error should be announced!
+             ALSO, UAS may not have any other options than retry always
+             on the same port.
+           */
+          osip_free (message);
+          return 1;
+      } else
+        {
+          /* SIP_NETWORK_ERROR; */
+          osip_free (message);
+          return -1;
+        }
+    }
+
+
+    if (eXosip.keep_alive>0)
+    {
+        if (MSG_IS_REGISTER(sip))
+        {
+            eXosip_reg_t *reg = NULL;
+            if (_eXosip_reg_find(&reg, tr)==0)
+            {
+                memcpy (&(reg->addr), &addr, len);
+                reg->len = len;
+            }
+        }
+    }
+
+  osip_free (message);
+  return 0;
+
+}
+
+int
+cb_tcp_snd_message (osip_transaction_t * tr, osip_message_t * sip, char *host,
+                    int port, int out_socket)
+{
+  size_t length = 0;
+  char *message;
+  int i;
+  struct eXosip_net *net;
+  if (eXosip.net_interfaces[1].net_socket == 0)
+    return -1;
+
+  if (host == NULL)
+    {
+      host = sip->req_uri->host;
+      if (sip->req_uri->port != NULL)
+        port = osip_atoi (sip->req_uri->port);
+      else
+        port = 5060;
+    }
+
+  net = &eXosip.net_interfaces[1];
+
+  i = osip_message_to_str (sip, &message, &length);
+  
+  if (i != 0 || length <= 0)
+    {
+      return -1;
+    }
+
+  /* Step 1: find existing socket to send message */
+  if (out_socket<=0)
+    {
+      out_socket = _eXosip_tcp_find_socket(host, port);
+      
+      /* Step 2: create new socket with host:port */
+      if (out_socket<=0)
+	{
+	  out_socket = _eXosip_tcp_connect_socket(host, port);
+	}
+      
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			      "Message sent: \n%s (to dest=%s:%i)\n",
+			      message, host, port));
+    }
+  else
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			      "Message sent: \n%s (reusing REQUEST connection)\n",
+			      message, host, port));
+    }
+
+  if (out_socket<=0)
+    {
+      return -1;
+    }
+
+
+  if (0 > send (out_socket, (const void *) message, length, 0))
+    {
+#ifdef WIN32
+      if (WSAECONNREFUSED == WSAGetLastError ())
+#else
+      if (ECONNREFUSED == errno)
+#endif
+        {
+          /* This can be considered as an error, but for the moment,
+             I prefer that the application continue to try sending
+             message again and again... so we are not in a error case.
+             Nevertheless, this error should be announced!
+             ALSO, UAS may not have any other options than retry always
+             on the same port.
+           */
+          osip_free (message);
+          return 1;
+      } else
+        {
+          /* SIP_NETWORK_ERROR; */
+	  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				  "TCP error: \n%s\n",
+				  strerror(errno)));
+          osip_free (message);
+          return -1;
+        }
+    }
+
+  osip_free (message);
+  return 0;
+
+}
+
+static void
+cb_ict_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_ict_kill_transaction (id=%i)\r\n", tr->transactionid));
+
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_ict_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+}
+
+static void
+cb_ist_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_ist_kill_transaction (id=%i)\r\n", tr->transactionid));
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_ist_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+}
+
+static void
+cb_nict_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_nict_kill_transaction (id=%i)\r\n", tr->transactionid));
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_nict_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+
+  if (MSG_IS_REGISTER (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION && tr->last_response == NULL)
+    {
+      eXosip_event_t *je;
+      eXosip_reg_t *jreg = NULL;
+
+      /* find matching j_reg */
+      _eXosip_reg_find (&jreg, tr);
+      if (jreg != NULL)
+        {
+          je = eXosip_event_init_for_reg (EXOSIP_REGISTRATION_FAILURE, jreg, tr);
+          report_event (je, NULL);
+        }
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (jn == NULL && js == NULL)
+    return;
+
+  /* no answer to a NOTIFY request! */
+  if (MSG_IS_NOTIFY (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION && tr->last_response == NULL)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_notifies, jn);
+      eXosip_notify_free (jn);
+      return;
+    }
+
+  if (MSG_IS_NOTIFY (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION
+      && tr->last_response != NULL && tr->last_response->status_code > 299)
+    {
+      /* delete the dialog! */
+      if (tr->last_response->status_code != 407
+          && tr->last_response->status_code != 401)
+        {
+          REMOVE_ELEMENT (eXosip.j_notifies, jn);
+          eXosip_notify_free (jn);
+          return;
+        }
+    }
+
+  if (MSG_IS_NOTIFY (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION
+      && tr->last_response != NULL
+      && tr->last_response->status_code > 199
+      && tr->last_response->status_code < 300)
+    {
+      if (jn->n_ss_status == EXOSIP_SUBCRSTATE_TERMINATED)
+        {
+          /* delete the dialog! */
+          REMOVE_ELEMENT (eXosip.j_notifies, jn);
+          eXosip_notify_free (jn);
+          return;
+        }
+    }
+
+  /* no answer to a SUBSCRIBE request! */
+  if (MSG_IS_SUBSCRIBE (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION && tr->last_response == NULL)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+      return;
+    }
+
+  /* detect SUBSCRIBE request that close the dialogs! */
+  /* expires=0 with MSN */
+  if (MSG_IS_SUBSCRIBE (tr->orig_request) && type == OSIP_NICT_KILL_TRANSACTION)
+    {
+      osip_header_t *expires;
+
+      osip_message_get_expires (tr->orig_request, 0, &expires);
+      if (expires == NULL || expires->hvalue == NULL)
+        {
+      } else if (0 == strcmp (expires->hvalue, "0"))
+        {
+          /* delete the dialog! */
+          REMOVE_ELEMENT (eXosip.j_subscribes, js);
+          eXosip_subscribe_free (js);
+          return;
+        }
+    }
+}
+
+static void
+cb_nist_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_nist_kill_transaction (id=%i)\r\n", tr->transactionid));
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_nist_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+
+}
+
+static void
+cb_rcvinvite (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcvinvite (id=%i)\n",
+               tr->transactionid));
+}
+
+static void
+cb_rcvack (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcvack (id=%i)\n",
+               tr->transactionid));
+}
+
+static void
+cb_rcvack2 (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcvack2 (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_rcvregister (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_event_t *je;
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvregister (id=%i)\r\n", tr->transactionid));
+  
+  je = eXosip_event_init_for_message (EXOSIP_MESSAGE_NEW, tr);
+  eXosip_event_add (je);
+  return;
+}
+
+static void
+cb_rcvcancel (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvcancel (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_rcvrequest (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_notify_t *jn;
+  eXosip_subscribe_t *js;
+
+  eXosip_event_t *je;
+
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvunkrequest (id=%i)\r\n", tr->transactionid));
+
+  if (jinfo == NULL)
+    {
+      eXosip_event_t *je;
+      
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_NEW, tr);
+      eXosip_event_add (je);
+      return;
+    }
+
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+  if (jc == NULL && jn == NULL && js == NULL)
+    {
+      eXosip_event_t *je;
+      
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_NEW, tr);
+      eXosip_event_add (je);
+      return;
+    }
+  else if (jc!=NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "cb_rcv? (id=%i)\r\n", tr->transactionid));
+
+      report_call_event (EXOSIP_CALL_MESSAGE_NEW, jc, jd, tr);
+      return;
+    }
+  else if (jn!=NULL)
+    {
+      if (MSG_IS_SUBSCRIBE (sip))
+	{
+	  je = eXosip_event_init_for_notify (EXOSIP_IN_SUBSCRIPTION_NEW, jn, jd, tr);
+	  report_event (je, NULL);
+	  return;
+	}
+      return;
+    }
+  else if (js!=NULL)
+    {
+      if (MSG_IS_NOTIFY (sip))
+	{
+	  je = eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_NOTIFY, js, jd, tr);
+	  report_event (je, NULL);      
+	  return;
+	}
+      return;
+    }
+}
+
+static void
+cb_sndinvite (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndinvite (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndack (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_sndack (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_sndregister (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndregister (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndbye (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_sndbye (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_sndcancel (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndcancel (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndinfo (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_sndinfo (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_sndoptions (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndoptions (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndnotify (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndnotify (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndsubscribe (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndsubscibe (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndunkrequest (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndunkrequest (id=%i)\r\n", tr->transactionid));
+}
+
+void
+__eXosip_delete_jinfo (osip_transaction_t * transaction)
+{
+  jinfo_t *ji;
+
+  if (transaction == NULL)
+    return;
+  ji = osip_transaction_get_your_instance (transaction);
+  osip_free (ji);
+  osip_transaction_set_your_instance (transaction, NULL);
+}
+
+jinfo_t *
+__eXosip_new_jinfo (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                    eXosip_subscribe_t * js, eXosip_notify_t * jn)
+{
+  jinfo_t *ji = (jinfo_t *) osip_malloc (sizeof (jinfo_t));
+
+  if (ji == NULL)
+    return NULL;
+  ji->jd = jd;
+  ji->jc = jc;
+  ji->js = js;
+  ji->jn = jn;
+  return ji;
+}
+
+static void
+cb_rcv1xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv1xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (eXosip.learn_port>0)
+  {
+      struct eXosip_net *net;
+      net = &eXosip.net_interfaces[0];
+      /* EXOSIP_OPT_UDP_LEARN_PORT option set */
+#if 1
+      /* learn through rport */
+      if (net->net_firewall_ip[0]!='\0')
+      {
+        osip_via_t *via=NULL;
+        osip_generic_param_t *br;
+        int i = osip_message_get_via (sip, 0, &via);
+        if (via!=NULL && via->protocol!=NULL
+            && osip_strcasecmp(via->protocol, "udp")==0)
+        {
+            osip_via_param_get_byname (via, "rport", &br);
+            if (br!=NULL && br->gvalue!=NULL)
+            {
+                snprintf(net->net_port, 20, "%s", br->gvalue);
+                OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                            "cb_rcv1xx (id=%i) SIP port modified from rport in REGISTER answer\r\n",
+                            tr->transactionid));
+            }
+        }
+      }
+#else
+      /* learn through REGISTER? */
+      if (net->net_firewall_ip[0]!='\0')
+	      {
+		int pos=0;
+		while (!osip_list_eol(reg->contacts,pos))
+		  {
+		    osip_contact_t *co;
+		    co = (osip_contact_t *)osip_list_get(reg->contacts,pos);
+		    pos++;
+		    if (co!=NULL && co->url!=NULL && co->url->host!=NULL
+			&& 0==osip_strcasecmp(co->url->host,
+					      net->net_firewall_ip))
+		      {
+			if (co->url->port==NULL &&
+			    0!=osip_strcasecmp(net->net_port, "5060"))
+			  {
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+			else if (co->url->port!=NULL &&
+				 0!=osip_strcasecmp(net->net_port, co->url->port))
+			  {
+			    osip_free(co->url->port);
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+		      }
+		  }
+	      }
+#endif
+  }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "OPTIONS"))
+    {
+      if (jc == NULL)
+        {
+	  eXosip_event_t *je;
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                       "cb_rcv1xx (id=%i) OPTIONS outside of any call\r\n",
+                       tr->transactionid));
+      
+	  je = eXosip_event_init_for_message (EXOSIP_MESSAGE_PROCEEDING, tr);
+	  eXosip_event_add (je);
+          return;
+      }
+      report_call_event (EXOSIP_CALL_MESSAGE_PROCEEDING, jc, jd, tr);
+      return;
+    }
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE") && MSG_TEST_CODE (sip, 100))
+    {
+      report_call_event (EXOSIP_CALL_PROCEEDING, jc, jd, tr);
+    }
+
+  if ((MSG_IS_RESPONSE_FOR (sip, "INVITE")
+       || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE")) && !MSG_TEST_CODE (sip, 100))
+    {
+      int i;
+
+      /* for SUBSCRIBE, test if the dialog has been already created
+         with a previous NOTIFY */
+      if (jd == NULL && js != NULL && js->s_dialogs != NULL
+          && MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+        {
+          /* find if existing dialog match the to tag */
+          osip_generic_param_t *tag;
+          int i;
+
+          i = osip_to_get_tag (sip->to, &tag);
+          if (i == 0 && tag != NULL && tag->gvalue != NULL)
+            {
+              for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+                {
+                  if (0 == strcmp (jd->d_dialog->remote_tag, tag->gvalue))
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                   "eXosip: found established early dialog for this subscribe\n"));
+                      jinfo->jd = jd;
+                      break;
+                    }
+                }
+            }
+        }
+
+      if (jd == NULL)           /* This transaction initiate a dialog in the case of
+                                   INVITE (else it would be attached to a "jd" element. */
+        {
+          /* allocate a jd */
+
+          i = eXosip_dialog_init_as_uac (&jd, sip);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot establish a dialog\n"));
+              return;
+            }
+          if (jc != NULL)
+            {
+              ADD_ELEMENT (jc->c_dialogs, jd);
+              jinfo->jd = jd;
+              eXosip_update ();
+          } else if (js != NULL)
+            {
+              ADD_ELEMENT (js->s_dialogs, jd);
+              jinfo->jd = jd;
+              eXosip_update ();
+          } else if (jn != NULL)
+            {
+              ADD_ELEMENT (jn->n_dialogs, jd);
+              jinfo->jd = jd;
+              eXosip_update ();
+          } else
+            {
+#ifndef WIN32
+              assert (0 == 0);
+#else
+              exit (0);
+#endif
+            }
+          osip_transaction_set_your_instance (tr, jinfo);
+      } else
+        {
+          osip_dialog_update_route_set_as_uac (jd->d_dialog, sip);
+        }
+
+      if (jd != NULL)
+        jd->d_STATE = JD_TRYING;
+      if (jd != NULL && MSG_IS_RESPONSE_FOR (sip, "INVITE")
+          && sip->status_code < 180)
+        {
+          report_call_event (EXOSIP_CALL_PROCEEDING, jc, jd, tr);
+      } else if (jd != NULL && MSG_IS_RESPONSE_FOR (sip, "INVITE")
+                 && sip->status_code >= 180)
+        {
+          report_call_event (EXOSIP_CALL_RINGING, jc, jd, tr);
+      } else if (jd != NULL && MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+        {
+          eXosip_event_t *je;
+
+          je =
+            eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_PROCEEDING,
+                                             js, jd, tr);
+          report_event (je, sip);
+        }
+      if (MSG_TEST_CODE (sip, 180) && jd != NULL)
+        {
+          jd->d_STATE = JD_RINGING;
+      } else if (MSG_TEST_CODE (sip, 183) && jd != NULL)
+        {
+          jd->d_STATE = JD_QUEUED;
+        }
+
+    }
+}
+
+static void
+cb_rcv2xx_4invite (osip_transaction_t * tr, osip_message_t * sip)
+{
+  int i;
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)               /* This transaction initiate a dialog in the case of
+                                   INVITE (else it would be attached to a "jd" element. */
+    {
+      /* allocate a jd */
+      i = eXosip_dialog_init_as_uac (&jd, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot establish a dialog\n"));
+          return;
+        }
+      ADD_ELEMENT (jc->c_dialogs, jd);
+      jinfo->jd = jd;
+      eXosip_update ();
+      osip_transaction_set_your_instance (tr, jinfo);
+  } else
+    {
+      /* Here is a special case:
+         We have initiated a dialog and we have received informationnal
+         answers from 2 or more remote SIP UA. Those answer can be
+         differentiated with the "To" header's tag.
+
+         We have used the first informationnal answer to create a
+         dialog, but we now want to be sure the 200ok received is
+         for the dialog this dialog.
+
+         We have to check the To tag and if it does not match, we
+         just have to modify the existing dialog and replace it. */
+      osip_generic_param_t *tag;
+      int i;
+
+      i = osip_to_get_tag (sip->to, &tag);
+      i = 1;                    /* default is the same dialog */
+
+      if (jd->d_dialog == NULL || jd->d_dialog->remote_tag == NULL)
+        {
+          /* There are real use-case where a BYE is received/processed before
+             the 200ok of the previous INVITE. In this case, jd->d_dialog is
+             empty and the transaction should be silently discarded. */
+          /* a ACK should still be sent... -but there is no dialog built- */
+          return;
+        }
+
+      if (jd->d_dialog->remote_tag == NULL && tag == NULL)
+        {
+        } /* non compliant remote UA -> assume it is the same dialog */
+      else if (jd->d_dialog->remote_tag != NULL && tag == NULL)
+        {
+          i = 0;
+        } /* different dialog! */
+      else if (jd->d_dialog->remote_tag == NULL && tag != NULL)
+        {
+          i = 0;
+        } /* different dialog! */
+      else if (jd->d_dialog->remote_tag != NULL && tag != NULL
+               && tag->gvalue != NULL
+               && 0 != strcmp (jd->d_dialog->remote_tag, tag->gvalue))
+        {
+          i = 0;
+        }
+      /* different dialog! */
+      if (i == 1)               /* just update the dialog */
+        {
+          osip_dialog_update_route_set_as_uac (jd->d_dialog, sip);
+          osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+      } else
+        {
+          /* the best thing is to update the repace the current dialog
+             information... Much easier than creating a useless dialog! */
+          osip_dialog_free (jd->d_dialog);
+          i = osip_dialog_init_as_uac (&(jd->d_dialog), sip);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "Cannot replace the dialog.\r\n"));
+          } else
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                           "The dialog has been replaced with the new one fro 200ok.\r\n"));
+            }
+        }
+    }
+
+  jd->d_STATE = JD_ESTABLISHED;
+
+  eXosip_dialog_set_200ok (jd, sip);
+
+  report_call_event (EXOSIP_CALL_ANSWERED, jc, jd, tr);
+
+  /* look for the SDP information and decide if this answer was for
+     an initial INVITE, an HoldCall, or a RetreiveCall */
+
+  /* don't handle hold/unhold by now... */
+  /* eXosip_update_audio_session(tr); */
+
+}
+
+static void
+cb_rcv2xx_4subscribe (osip_transaction_t * tr, osip_message_t * sip)
+{
+  int i;
+  eXosip_dialog_t *jd;
+  eXosip_subscribe_t *js;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  js = jinfo->js;
+  _eXosip_subscribe_set_refresh_interval (js, sip);
+
+
+  /* for SUBSCRIBE, test if the dialog has been already created
+     with a previous NOTIFY */
+  if (jd == NULL && js != NULL && js->s_dialogs != NULL
+      && MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      /* find if existing dialog match the to tag */
+      osip_generic_param_t *tag;
+      int i;
+
+      i = osip_to_get_tag (sip->to, &tag);
+      if (i == 0 && tag != NULL && tag->gvalue != NULL)
+        {
+          for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+            {
+              if (0 == strcmp (jd->d_dialog->remote_tag, tag->gvalue))
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                               "eXosip: found established early dialog for this subscribe\n"));
+                  jinfo->jd = jd;
+                  break;
+                }
+            }
+        }
+    }
+
+  if (jd == NULL)               /* This transaction initiate a dialog in the case of
+                                   SUBSCRIBE (else it would be attached to a "jd" element. */
+    {
+      /* allocate a jd */
+      i = eXosip_dialog_init_as_uac (&jd, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot establish a dialog\n"));
+          return;
+        }
+      ADD_ELEMENT (js->s_dialogs, jd);
+      jinfo->jd = jd;
+      eXosip_update ();
+      osip_transaction_set_your_instance (tr, jinfo);
+  } else
+    {
+      osip_dialog_update_route_set_as_uac (jd->d_dialog, sip);
+      osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+    }
+
+  jd->d_STATE = JD_ESTABLISHED;
+  /* look for the body information */
+
+  {
+    eXosip_event_t *je;
+
+    je =
+      eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_ANSWERED, js, jd, tr);
+    report_event (je, sip);
+  }
+
+}
+
+static void
+cb_rcv2xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv2xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv2xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_ANSWERED, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      eXosip_event_t *je;
+      eXosip_reg_t *jreg = NULL;
+
+      /* find matching j_reg */
+      _eXosip_reg_find (&jreg, tr);
+      if (jreg != NULL)
+        {
+          je = eXosip_event_init_for_reg (EXOSIP_REGISTRATION_SUCCESS, jreg, tr);
+          report_event (je, sip);
+          jreg->r_retry = 0;    /* reset value */
+        }
+
+
+        if (eXosip.learn_port>0)
+        {
+            struct eXosip_net *net;
+            net = &eXosip.net_interfaces[0];
+            /* EXOSIP_OPT_UDP_LEARN_PORT option set */
+#if 1
+            /* learn through rport */
+           if (net->net_firewall_ip[0]!='\0')
+           { 
+                osip_via_t *via=NULL;
+                osip_generic_param_t *br;
+                int i = osip_message_get_via (sip, 0, &via);
+                if (via!=NULL && via->protocol!=NULL
+                    && osip_strcasecmp(via->protocol, "udp")==0)
+                {
+                    osip_via_param_get_byname (via, "rport", &br);
+                    if (br!=NULL && br->gvalue!=NULL)
+                    {
+                        snprintf(net->net_port, 20, "%s", br->gvalue);
+                        OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                            "cb_rcv1xx (id=%i) SIP port modified from rport in REGISTER answer\r\n",
+                            tr->transactionid));
+                    }
+                }
+            }
+#else
+            /* learn through REGISTER? */
+            if (net->net_firewall_ip[0]!='\0')
+            {
+                int pos=0;
+                while (!osip_list_eol(reg->contacts,pos))
+                {
+                    osip_contact_t *co;
+                    co = (osip_contact_t *)osip_list_get(reg->contacts,pos);
+                    pos++;
+                    if (co!=NULL && co->url!=NULL && co->url->host!=NULL
+                        && 0==osip_strcasecmp(co->url->host,
+                        net->net_firewall_ip))
+                    {
+                        if (co->url->port==NULL &&
+                            0!=osip_strcasecmp(net->net_port, "5060"))
+                        {
+                            co->url->port=osip_strdup(net->net_port);
+                        }
+                        else if (co->url->port!=NULL &&
+                            0!=osip_strcasecmp(net->net_port, co->url->port))
+                        {
+                            osip_free(co->url->port);
+                            co->url->port=osip_strdup(net->net_port);
+                        }
+                    }
+                }
+            }
+#endif
+        }
+
+        return;
+  }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (jd != NULL)
+    jd->d_retry = 0;            /* reset marker for authentication */
+  if (jc != NULL)
+    jc->c_retry = 0;            /* reset marker for authentication */
+  if (js != NULL)
+    js->s_retry = 0;            /* reset marker for authentication */
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      cb_rcv2xx_4invite (tr, sip);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      cb_rcv2xx_4subscribe (tr, sip);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "BYE"))
+    {
+      if (jd != NULL)
+        jd->d_STATE = JD_TERMINATED;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "NOTIFY"))
+    {
+#ifdef SUPPORT_MSN
+      osip_header_t *expires;
+
+      osip_message_header_get_byname (tr->orig_request, "expires", 0, &expires);
+      if (expires == NULL || expires->hvalue == NULL)
+        {
+          /* UNCOMPLIANT UA without a subscription-state header */
+      } else if (0 == osip_strcasecmp (expires->hvalue, "0"))
+        {
+          /* delete the dialog! */
+          if (jn != NULL)
+            {
+              REMOVE_ELEMENT (eXosip.j_notifies, jn);
+              eXosip_notify_free (jn);
+            }
+        }
+#else
+      osip_header_t *sub_state;
+
+      osip_message_header_get_byname (tr->orig_request, "subscription-state",
+                                      0, &sub_state);
+      if (sub_state == NULL || sub_state->hvalue == NULL)
+        {
+          /* UNCOMPLIANT UA without a subscription-state header */
+      } else if (0 == osip_strncasecmp (sub_state->hvalue, "terminated", 10))
+        {
+          /* delete the dialog! */
+          if (jn != NULL)
+            {
+              REMOVE_ELEMENT (eXosip.j_notifies, jn);
+              eXosip_notify_free (jn);
+            }
+        }
+#endif
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_ANSWERED, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_ANSWERED, tr);
+      report_event (je, sip);
+      return;
+    }
+}
+
+void
+eXosip_delete_early_dialog (eXosip_dialog_t * jd)
+{
+  if (jd == NULL)               /* bug? */
+    return;
+
+  /* an early dialog was created, but the call is not established */
+  if (jd->d_dialog != NULL && jd->d_dialog->state == DIALOG_EARLY)
+    {
+      osip_dialog_free (jd->d_dialog);
+      jd->d_dialog = NULL;
+      eXosip_update(); //AMD 30/09/05
+      eXosip_dialog_set_state (jd, JD_TERMINATED);
+    }
+}
+
+static void
+rcvregister_failure (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_event_t *je;
+  eXosip_reg_t *jreg = NULL;
+
+  /* find matching j_reg */
+  _eXosip_reg_find (&jreg, tr);
+  if (jreg != NULL)
+    {
+      je = eXosip_event_init_for_reg (EXOSIP_REGISTRATION_FAILURE, jreg, tr);
+      report_event (je, sip);
+    }
+}
+
+static void
+cb_rcv3xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv3xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_event_t *je;
+      eXosip_pub_t *pub;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv3xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REDIRECTED, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_REDIRECTED, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_REDIRECTED, js,
+                                         jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_REDIRECTED, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REDIRECTED, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      if (jd->d_dialog == NULL)
+        jd->d_STATE = JD_REDIRECTED;
+    }
+
+}
+
+static void
+cb_rcv4xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv4xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je; 
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv4xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REQUESTFAILURE, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_REQUESTFAILURE, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_REQUESTFAILURE,
+                                         js, jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_REQUESTFAILURE, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REQUESTFAILURE, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jc!=NULL)
+    {
+      if (MSG_TEST_CODE (sip, 401) || MSG_TEST_CODE (sip, 407))
+	{
+	  if (jc->response_auth!=NULL)
+	    osip_message_free(jc->response_auth);
+	  
+	  osip_message_clone(sip, &jc->response_auth);
+	}
+    }
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      if (MSG_TEST_CODE (sip, 401) || MSG_TEST_CODE (sip, 407))
+        jd->d_STATE = JD_AUTH_REQUIRED;
+      else
+        jd->d_STATE = JD_CLIENTERROR;
+    }
+
+}
+
+static void
+cb_rcv5xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv5xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv3xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_SERVERFAILURE, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_SERVERFAILURE, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_SERVERFAILURE,
+                                         js, jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_SERVERFAILURE, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_SERVERFAILURE, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      jd->d_STATE = JD_SERVERERROR;
+    }
+
+}
+
+static void
+cb_rcv6xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv6xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv6xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_GLOBALFAILURE, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_GLOBALFAILURE, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_GLOBALFAILURE,
+                                         js, jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_GLOBALFAILURE, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_GLOBALFAILURE, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      jd->d_STATE = JD_GLOBALFAILURE;
+    }
+
+}
+
+static void
+cb_snd1xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd1xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  jd->d_STATE = JD_TRYING;
+}
+
+static void
+cb_snd2xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd2xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      jd->d_STATE = JD_ESTABLISHED;
+      return;
+    }
+  jd->d_STATE = JD_ESTABLISHED;
+}
+
+static void
+cb_snd3xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd3xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_REDIRECTED;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+}
+
+static void
+cb_snd4xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd4xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_CLIENTERROR;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+
+}
+
+static void
+cb_snd5xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd5xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_SERVERERROR;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+
+}
+
+static void
+cb_snd6xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd6xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_GLOBALFAILURE;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+
+}
+
+static void
+cb_rcvresp_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvresp_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndreq_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndreq_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndresp_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndresp_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_rcvreq_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvreq_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_transport_error (int type, osip_transaction_t * tr, int error)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_transport_error (id=%i)\r\n", tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (jn == NULL && js == NULL)
+    return;
+
+  if (MSG_IS_NOTIFY (tr->orig_request) && type == OSIP_NICT_TRANSPORT_ERROR)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_notifies, jn);
+      eXosip_notify_free (jn);
+    }
+
+  if (MSG_IS_SUBSCRIBE (tr->orig_request) && type == OSIP_NICT_TRANSPORT_ERROR)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+    }
+
+  if (MSG_IS_OPTIONS (tr->orig_request) && jc->c_dialogs == NULL
+      && type == OSIP_NICT_TRANSPORT_ERROR)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_calls, jc);
+      eXosip_call_free (jc);
+    }
+}
+
+
+
+int
+eXosip_set_callbacks (osip_t * osip)
+{
+  /* register all callbacks */
+
+  osip_set_cb_send_message (osip, &cb_snd_message);
+
+  osip_set_kill_transaction_callback (osip, OSIP_ICT_KILL_TRANSACTION,
+                                      &cb_ict_kill_transaction);
+  osip_set_kill_transaction_callback (osip, OSIP_IST_KILL_TRANSACTION,
+                                      &cb_ist_kill_transaction);
+  osip_set_kill_transaction_callback (osip, OSIP_NICT_KILL_TRANSACTION,
+                                      &cb_nict_kill_transaction);
+  osip_set_kill_transaction_callback (osip, OSIP_NIST_KILL_TRANSACTION,
+                                      &cb_nist_kill_transaction);
+
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_2XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_3456XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_ICT_INVITE_SENT_AGAIN,
+                             &cb_sndreq_retransmission);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_2XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_3456XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_IST_INVITE_RECEIVED_AGAIN,
+                             &cb_rcvreq_retransmission);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_2XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_3456XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NICT_REQUEST_SENT_AGAIN,
+                             &cb_sndreq_retransmission);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_2XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_3456XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NIST_REQUEST_RECEIVED_AGAIN,
+                             &cb_rcvreq_retransmission);
+
+  osip_set_transport_error_callback (osip, OSIP_ICT_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+  osip_set_transport_error_callback (osip, OSIP_IST_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+  osip_set_transport_error_callback (osip, OSIP_NICT_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+  osip_set_transport_error_callback (osip, OSIP_NIST_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+
+  osip_set_message_callback (osip, OSIP_ICT_INVITE_SENT, &cb_sndinvite);
+  osip_set_message_callback (osip, OSIP_ICT_ACK_SENT, &cb_sndack);
+  osip_set_message_callback (osip, OSIP_NICT_REGISTER_SENT, &cb_sndregister);
+  osip_set_message_callback (osip, OSIP_NICT_BYE_SENT, &cb_sndbye);
+  osip_set_message_callback (osip, OSIP_NICT_CANCEL_SENT, &cb_sndcancel);
+  osip_set_message_callback (osip, OSIP_NICT_INFO_SENT, &cb_sndinfo);
+  osip_set_message_callback (osip, OSIP_NICT_OPTIONS_SENT, &cb_sndoptions);
+  osip_set_message_callback (osip, OSIP_NICT_SUBSCRIBE_SENT, &cb_sndsubscribe);
+  osip_set_message_callback (osip, OSIP_NICT_NOTIFY_SENT, &cb_sndnotify);
+  /*  osip_set_cb_nict_sndprack   (osip,&cb_sndprack); */
+  osip_set_message_callback (osip, OSIP_NICT_UNKNOWN_REQUEST_SENT,
+                             &cb_sndunkrequest);
+
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_1XX_RECEIVED, &cb_rcv1xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_2XX_RECEIVED, &cb_rcv2xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_3XX_RECEIVED, &cb_rcv3xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_4XX_RECEIVED, &cb_rcv4xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_5XX_RECEIVED, &cb_rcv5xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_6XX_RECEIVED, &cb_rcv6xx);
+
+  osip_set_message_callback (osip, OSIP_IST_STATUS_1XX_SENT, &cb_snd1xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_2XX_SENT, &cb_snd2xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_3XX_SENT, &cb_snd3xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_4XX_SENT, &cb_snd4xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_5XX_SENT, &cb_snd5xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_6XX_SENT, &cb_snd6xx);
+
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_1XX_RECEIVED, &cb_rcv1xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_2XX_RECEIVED, &cb_rcv2xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_3XX_RECEIVED, &cb_rcv3xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_4XX_RECEIVED, &cb_rcv4xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_5XX_RECEIVED, &cb_rcv5xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_6XX_RECEIVED, &cb_rcv6xx);
+
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_1XX_SENT, &cb_snd1xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_2XX_SENT, &cb_snd2xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_3XX_SENT, &cb_snd3xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_4XX_SENT, &cb_snd4xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_5XX_SENT, &cb_snd5xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_6XX_SENT, &cb_snd6xx);
+
+  osip_set_message_callback (osip, OSIP_IST_INVITE_RECEIVED, &cb_rcvinvite);
+  osip_set_message_callback (osip, OSIP_IST_ACK_RECEIVED, &cb_rcvack);
+  osip_set_message_callback (osip, OSIP_IST_ACK_RECEIVED_AGAIN, &cb_rcvack2);
+  osip_set_message_callback (osip, OSIP_NIST_REGISTER_RECEIVED, &cb_rcvregister);
+  osip_set_message_callback (osip, OSIP_NIST_CANCEL_RECEIVED, &cb_rcvcancel);
+  osip_set_message_callback (osip, OSIP_NIST_BYE_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_INFO_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_OPTIONS_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_SUBSCRIBE_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_NOTIFY_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_UNKNOWN_REQUEST_RECEIVED,
+                             &cb_rcvrequest);
+
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/jdialog.c b/libs/eXosip2/eXosip2/jdialog.c
new file mode 100644
index 0000000000000000000000000000000000000000..d8010252cb17b7816092d41ff4fc477f0157c6c0
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jdialog.c
@@ -0,0 +1,217 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+void
+eXosip_dialog_set_state (eXosip_dialog_t * jd, int state)
+{
+  jd->d_STATE = state;
+}
+
+
+int
+eXosip_call_dialog_find (int jid, eXosip_call_t ** jc, eXosip_dialog_t ** jd)
+{
+  for (*jc = eXosip.j_calls; *jc != NULL; *jc = (*jc)->next)
+    {
+      for (*jd = (*jc)->c_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          if ((*jd)->d_id == jid)
+            return 0;
+        }
+    }
+  *jd = NULL;
+  *jc = NULL;
+  return -1;
+}
+
+int
+eXosip_notify_dialog_find (int nid, eXosip_notify_t ** jn, eXosip_dialog_t ** jd)
+{
+  for (*jn = eXosip.j_notifies; *jn != NULL; *jn = (*jn)->next)
+    {
+      for (*jd = (*jn)->n_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          if ((*jd)->d_id == nid)
+            return 0;
+        }
+    }
+  *jd = NULL;
+  *jn = NULL;
+  return -1;
+}
+
+int
+eXosip_subscribe_dialog_find (int sid, eXosip_subscribe_t ** js,
+                              eXosip_dialog_t ** jd)
+{
+  for (*js = eXosip.j_subscribes; *js != NULL; *js = (*js)->next)
+    {
+      *jd = NULL;
+      if ((*js)->s_id == sid)
+        return 0;
+      for (*jd = (*js)->s_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          if ((*jd)->d_id == sid)
+            return 0;
+        }
+    }
+  *jd = NULL;
+  *js = NULL;
+  return -1;
+}
+
+int
+eXosip_dialog_set_200ok (eXosip_dialog_t * jd, osip_message_t * _200Ok)
+{
+  int i;
+
+  if (jd == NULL)
+    return -1;
+  i = osip_message_clone (_200Ok, &(jd->d_200Ok));
+  if (i != 0)
+    {
+      return -1;
+    }
+  return 0;
+}
+
+int
+eXosip_dialog_init_as_uac (eXosip_dialog_t ** _jd, osip_message_t * _200Ok)
+{
+  int i;
+  eXosip_dialog_t *jd;
+
+  *_jd = NULL;
+  jd = (eXosip_dialog_t *) osip_malloc (sizeof (eXosip_dialog_t));
+  memset (jd, 0, sizeof (eXosip_dialog_t));
+
+  jd->d_id = -1;                /* not yet available to user */
+  jd->d_STATE = JD_EMPTY;
+
+  if (MSG_IS_REQUEST (_200Ok))
+    {
+      i =
+        osip_dialog_init_as_uac_with_remote_request (&(jd->d_dialog), _200Ok, -1);
+  } else
+    {                           /* normal usage with response */
+      i = osip_dialog_init_as_uac (&(jd->d_dialog), _200Ok);
+    }
+  if (i != 0)
+    {
+      osip_free (jd);
+      return -1;
+    }
+
+  jd->d_timer = time (NULL);
+  jd->d_200Ok = NULL;
+  jd->d_ack = NULL;
+  jd->next = NULL;
+  jd->parent = NULL;
+  jd->d_out_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_out_trs);
+  jd->d_inc_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_inc_trs);
+
+  /* jd->d_bh = sdp_handler_new(); */
+  *_jd = jd;
+  return 0;
+}
+
+int
+eXosip_dialog_init_as_uas (eXosip_dialog_t ** _jd, osip_message_t * _invite,
+                           osip_message_t * _200Ok)
+{
+  int i;
+  eXosip_dialog_t *jd;
+
+  *_jd = NULL;
+  jd = (eXosip_dialog_t *) osip_malloc (sizeof (eXosip_dialog_t));
+  memset (jd, 0, sizeof (eXosip_dialog_t));
+  jd->d_id = -1;                /* not yet available to user */
+  jd->d_STATE = JD_EMPTY;
+  i = osip_dialog_init_as_uas (&(jd->d_dialog), _invite, _200Ok);
+  if (i != 0)
+    {
+      osip_free (jd);
+      return -1;
+    }
+
+  jd->d_timer = time (NULL);
+  jd->d_200Ok = NULL;
+  jd->d_ack = NULL;
+  jd->next = NULL;
+  jd->parent = NULL;
+  jd->d_out_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_out_trs);
+  jd->d_inc_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_inc_trs);
+
+#ifdef SUPPORT_MSN
+  /* bugguy MSN */
+  jd->d_dialog->local_cseq = 1;
+#endif
+
+  /* jd->d_bh = sdp_handler_new(); */
+  *_jd = jd;
+  return 0;
+}
+
+void
+eXosip_dialog_free (eXosip_dialog_t * jd)
+{
+  while (!osip_list_eol (jd->d_inc_trs, 0))
+    {
+      osip_transaction_t *tr;
+
+      tr = (osip_transaction_t *) osip_list_get (jd->d_inc_trs, 0);
+      osip_list_remove (jd->d_inc_trs, 0);
+      __eXosip_delete_jinfo (tr);
+      osip_list_add (eXosip.j_transactions, tr, 0);
+    }
+
+  while (!osip_list_eol (jd->d_out_trs, 0))
+    {
+      osip_transaction_t *tr;
+
+      tr = (osip_transaction_t *) osip_list_get (jd->d_out_trs, 0);
+      osip_list_remove (jd->d_out_trs, 0);
+      __eXosip_delete_jinfo (tr);
+      osip_list_add (eXosip.j_transactions, tr, 0);
+    }
+
+  osip_message_free (jd->d_200Ok);
+  osip_message_free (jd->d_ack);
+
+  osip_dialog_free (jd->d_dialog);
+
+  osip_free (jd->d_out_trs);
+  osip_free (jd->d_inc_trs);
+  osip_free (jd);
+
+  eXosip_update ();
+}
diff --git a/libs/eXosip2/eXosip2/jevents.c b/libs/eXosip2/eXosip2/jevents.c
new file mode 100644
index 0000000000000000000000000000000000000000..a59092ce99047c0683612cb9650e4fc9f090f0f3
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jevents.c
@@ -0,0 +1,511 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+#include <osip2/osip_condv.h>
+
+extern eXosip_t eXosip;
+
+static int _eXosip_event_fill_messages (eXosip_event_t * je,
+                                        osip_transaction_t * tr);
+
+static int
+_eXosip_event_fill_messages (eXosip_event_t * je, osip_transaction_t * tr)
+{
+  int i;
+
+  if (tr != NULL && tr->orig_request != NULL)
+    {
+      i = osip_message_clone (tr->orig_request, &je->request);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone request for event\n"));
+        }
+    }
+  if (tr != NULL && tr->last_response != NULL)
+    {
+      i = osip_message_clone (tr->last_response, &je->response);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone response for event\n"));
+        }
+    }
+  if (tr != NULL && tr->ack != NULL)
+    {
+      i = osip_message_clone (tr->ack, &je->ack);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone ACK for event\n"));
+        }
+    }
+  return 0;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_call (int type, eXosip_call_t * jc,
+                            eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (jc == NULL)
+    return NULL;
+
+  je->cid = jc->c_id;
+  if (jd != NULL)
+    je->did = jd->d_id;
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  je->external_reference = jc->external_reference;
+
+  _eXosip_event_fill_messages (je, tr);
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_subscribe (int type, eXosip_subscribe_t * js,
+                                 eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (js == NULL)
+    return NULL;
+
+  je->sid = js->s_id;
+  if (jd != NULL)
+    je->did = jd->d_id;
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  je->ss_status = js->s_ss_status;
+  je->ss_reason = js->s_ss_reason;
+
+  /* je->external_reference = js->external_reference; */
+
+  _eXosip_event_fill_messages (je, tr);
+
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_notify (int type, eXosip_notify_t * jn,
+                              eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (jn == NULL)
+    return NULL;
+
+  je->nid = jn->n_id;
+  if (jd != NULL)
+    je->did = jd->d_id;
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  je->ss_status = jn->n_ss_status;
+  je->ss_reason = jn->n_ss_reason;
+
+  /*je->external_reference = jc->external_reference; */
+
+  _eXosip_event_fill_messages (je, tr);
+
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_reg (int type, eXosip_reg_t * jr, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (jr == NULL)
+    return NULL;
+  je->rid = jr->r_id;
+
+  _eXosip_event_fill_messages (je, tr);
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_message (int type, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  _eXosip_event_fill_messages (je, tr);
+
+  return je;
+}
+
+int
+eXosip_event_init (eXosip_event_t ** je, int type)
+{
+  *je = (eXosip_event_t *) osip_malloc (sizeof (eXosip_event_t));
+  if (*je == NULL)
+    return -1;
+
+  memset (*je, 0, sizeof (eXosip_event_t));
+  (*je)->type = type;
+
+  if (type == EXOSIP_CALL_NOANSWER)
+    {
+      sprintf ((*je)->textinfo, "No answer for this Call!");
+  } else if (type == EXOSIP_CALL_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "Call is being processed!");
+  } else if (type == EXOSIP_CALL_RINGING)
+    {
+      sprintf ((*je)->textinfo, "Remote phone is ringing!");
+  } else if (type == EXOSIP_CALL_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "Remote phone has answered!");
+  } else if (type == EXOSIP_CALL_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "Call is redirected!");
+  } else if (type == EXOSIP_CALL_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for Call!");
+  } else if (type == EXOSIP_CALL_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for Call!");
+  } else if (type == EXOSIP_CALL_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "6xx received for Call!");
+  } else if (type == EXOSIP_CALL_INVITE)
+    {
+      sprintf ((*je)->textinfo, "New call received!");
+  } else if (type == EXOSIP_CALL_ACK)
+    {
+      sprintf ((*je)->textinfo, "ACK received!");
+  } else if (type == EXOSIP_CALL_CANCELLED)
+    {
+      sprintf ((*je)->textinfo, "Call has been cancelled!");
+  } else if (type == EXOSIP_CALL_TIMEOUT)
+    {
+      sprintf ((*je)->textinfo, "Timeout. Gave up!");
+  } else if (type == EXOSIP_CALL_REINVITE)
+    {
+      sprintf ((*je)->textinfo, "INVITE within call received!");
+  } else if (type == EXOSIP_CALL_CLOSED)
+    {
+      sprintf ((*je)->textinfo, "Bye Received!");
+  } else if (type == EXOSIP_CALL_RELEASED)
+    {
+      sprintf ((*je)->textinfo, "Call Context is released!");
+  } else if (type == EXOSIP_REGISTRATION_SUCCESS)
+    {
+      sprintf ((*je)->textinfo, "User is successfully registred!");
+  } else if (type == EXOSIP_REGISTRATION_FAILURE)
+    {
+      sprintf ((*je)->textinfo, "Registration failed!");
+  } else if (type == EXOSIP_CALL_MESSAGE_NEW)
+    {
+      sprintf ((*je)->textinfo, "New request received!");
+  } else if (type == EXOSIP_CALL_MESSAGE_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "request is being processed!");
+  } else if (type == EXOSIP_CALL_MESSAGE_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "2xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "3xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request!");
+  } else if (type == EXOSIP_MESSAGE_NEW)
+    {
+      sprintf ((*je)->textinfo, "New request outside call received!");
+  } else if (type == EXOSIP_MESSAGE_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "request outside call is being processed!");
+  } else if (type == EXOSIP_MESSAGE_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "2xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "3xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request outside call!");
+  } else if (type == EXOSIP_SUBSCRIPTION_NOANSWER)
+    {
+      sprintf ((*je)->textinfo, "No answer for this SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "SUBSCRIBE is being processed!");
+  } else if (type == EXOSIP_SUBSCRIPTION_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "2xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "3xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_NOTIFY)
+    {
+      sprintf ((*je)->textinfo, "NOTIFY request for subscription!");
+  } else if (type == EXOSIP_SUBSCRIPTION_RELEASED)
+    {
+      sprintf ((*je)->textinfo, "Subscription has terminate!");
+  } else if (type == EXOSIP_IN_SUBSCRIPTION_NEW)
+    {
+      sprintf ((*je)->textinfo, "New incoming SUBSCRIBE!");
+  } else if (type == EXOSIP_IN_SUBSCRIPTION_RELEASED)
+    {
+      sprintf ((*je)->textinfo, "Incoming Subscription has terminate!");
+  } else
+    {
+      (*je)->textinfo[0] = '\0';
+    }
+  return 0;
+}
+
+void
+eXosip_event_free (eXosip_event_t * je)
+{
+  if (je == NULL)
+    return;
+  if (je->request != NULL)
+    osip_message_free (je->request);
+  if (je->response != NULL)
+    osip_message_free (je->response);
+  if (je->ack != NULL)
+    osip_message_free (je->ack);
+  osip_free (je);
+}
+
+void
+report_event (eXosip_event_t * je, osip_message_t * sip)
+{
+  if (je != NULL)
+    {
+      eXosip_event_add (je);
+    }
+}
+
+void
+report_call_event (int evt, eXosip_call_t * jc,
+                   eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  je = eXosip_event_init_for_call (evt, jc, jd, tr);
+  report_event (je, NULL);
+}
+
+void
+report_options_event (int evt, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, evt);
+  if (je == NULL)
+    return;
+
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  _eXosip_event_fill_messages (je, tr);
+  report_event (je, NULL);
+}
+
+int
+eXosip_event_add (eXosip_event_t * je)
+{
+  int i = osip_fifo_add (eXosip.j_events, (void *) je);
+
+  osip_cond_signal ((struct osip_cond *) eXosip.j_cond);
+  __eXosip_wakeup_event ();
+  return i;
+}
+
+#if 0
+#ifdef CLOCK_REALTIME
+/* if CLOCK_REALTIME exist, then clock_gettime should be defined */
+
+#define OSIP_CLOCK_REALTIME CLOCK_REALTIME
+
+void
+__eXosip_clock_gettime (clockid_t cid, struct timespec *time)
+{
+  clock_gettime (cid, time);
+}
+
+#elif defined (WIN32) || defined (_WIN32_WCE)
+
+#include <sys/types.h>
+#include <sys/timeb.h>
+
+#define OSIP_CLOCK_REALTIME 4002
+
+void
+__eXosip_clock_gettime (unsigned int clock_id, struct timespec *time)
+{
+  struct _timeb time_val;
+
+  if (clock_id != OSIP_CLOCK_REALTIME)
+    return;
+
+  _ftime (&time_val);
+  time->tv_sec = time_val.time;
+  time->tv_nsec = time_val.millitm * 1000000;
+  return;
+}
+#endif
+#endif
+
+eXosip_event_t *
+eXosip_event_wait (int tv_s, int tv_ms)
+{
+  eXosip_event_t *je = NULL;
+
+#if 0                           /* this does not seems to work. by now */
+#if defined (CLOCK_REALTIME) || defined (WIN32) || defined (_WIN32_WCE)
+  int i;
+
+  struct timespec deadline;
+  struct timespec interval;
+  long tot_ms = (tv_s * 1000) + tv_ms;
+
+  static struct osip_mutex *mlock = NULL;
+
+  if (mlock == NULL)
+    mlock = osip_mutex_init ();
+
+  je = (eXosip_event_t *) osip_fifo_tryget (eXosip.j_events);
+  if (je)
+    return je;
+
+  interval.tv_sec = tot_ms / 1000;
+  interval.tv_nsec = (tot_ms % 1000) * 1000000L;
+
+  __eXosip_clock_gettime (OSIP_CLOCK_REALTIME, &deadline);
+
+  if ((deadline.tv_nsec += interval.tv_nsec) >= 1000000000L)
+    {
+      deadline.tv_nsec -= 1000000000L;
+      deadline.tv_sec += 1;
+  } else
+    deadline.tv_nsec += interval.tv_nsec;
+
+  deadline.tv_sec += interval.tv_sec;
+
+  i = osip_cond_timedwait ((struct osip_cond *) eXosip.j_cond,
+                           (struct osip_mutex *) mlock, &deadline);
+
+#endif
+#else
+  /* basic replacement */
+  {
+    fd_set fdset;
+    struct timeval tv;
+    int max, i;
+
+    FD_ZERO (&fdset);
+#if defined (WIN32) || defined (_WIN32_WCE)
+    FD_SET ((unsigned int) jpipe_get_read_descr (eXosip.j_socketctl_event),
+            &fdset);
+#else
+    FD_SET (jpipe_get_read_descr (eXosip.j_socketctl_event), &fdset);
+#endif
+    max = jpipe_get_read_descr (eXosip.j_socketctl_event);
+    tv.tv_sec = tv_s;
+    tv.tv_usec = tv_ms * 1000;
+
+    je = (eXosip_event_t *) osip_fifo_tryget (eXosip.j_events);
+    if (je != NULL)
+      return je;
+
+    if (tv_s == 0 && tv_ms == 0)
+      return NULL;
+
+    i = select (max + 1, &fdset, NULL, NULL, &tv);
+    if (i <= 0)
+      return 0;
+
+    if (FD_ISSET (jpipe_get_read_descr (eXosip.j_socketctl_event), &fdset))
+      {
+        char buf[500];
+
+        jpipe_read (eXosip.j_socketctl_event, buf, 499);
+      }
+
+    je = (eXosip_event_t *) osip_fifo_tryget (eXosip.j_events);
+    if (je != NULL)
+      return je;
+  }
+#endif
+
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_get ()
+{
+  eXosip_event_t *je;
+
+  je = (eXosip_event_t *) osip_fifo_get (eXosip.j_events);
+  return je;
+}
diff --git a/libs/eXosip2/eXosip2/jnotify.c b/libs/eXosip2/eXosip2/jnotify.c
new file mode 100644
index 0000000000000000000000000000000000000000..ab9049a173bdbbff8e0041d7e30308caa8df8e5a
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jnotify.c
@@ -0,0 +1,202 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+osip_transaction_t *
+eXosip_find_last_inc_subscribe (eXosip_notify_t * jn, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *inc_tr;
+  int pos;
+
+  inc_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (0 == strcmp (inc_tr->cseq->method, "SUBSCRIBE"))
+            break;
+          else
+            inc_tr = NULL;
+          pos++;
+        }
+  } else
+    inc_tr = NULL;
+
+  if (inc_tr == NULL)
+    return jn->n_inc_tr;        /* can be NULL */
+
+  return inc_tr;
+}
+
+
+osip_transaction_t *
+eXosip_find_last_out_notify (eXosip_notify_t * jn, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "NOTIFY"))
+            return out_tr;
+          pos++;
+        }
+    }
+
+  return NULL;
+}
+
+int
+eXosip_notify_init (eXosip_notify_t ** jn, osip_message_t * inc_subscribe)
+{
+  osip_contact_t *co;
+  char *uri;
+  int i;
+  char locip[50];
+
+#ifdef SM
+  eXosip_get_localip_from_via (inc_subscribe, locip, 49);
+#else
+  i = _eXosip_find_protocol(inc_subscribe);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip, 49);
+    }
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (default to UDP)\n"));
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+      return -1;
+    }
+    
+#endif
+  if (inc_subscribe == NULL
+      || inc_subscribe->to == NULL || inc_subscribe->to->url == NULL)
+    return -1;
+  co = (osip_contact_t *) osip_list_get (inc_subscribe->contacts, 0);
+  if (co == NULL || co->url == NULL)
+    return -1;
+
+  *jn = (eXosip_notify_t *) osip_malloc (sizeof (eXosip_notify_t));
+  if (*jn == NULL)
+    return -1;
+  memset (*jn, 0, sizeof (eXosip_notify_t));
+
+  i = osip_uri_to_str (co->url, &uri);
+  if (i != 0)
+    {
+      osip_free (*jn);
+      *jn = NULL;
+      return -1;
+    }
+  osip_strncpy ((*jn)->n_uri, uri, 254);
+  osip_free (uri);
+
+  return 0;
+}
+
+void
+eXosip_notify_free (eXosip_notify_t * jn)
+{
+  /* ... */
+
+  eXosip_dialog_t *jd;
+
+  for (jd = jn->n_dialogs; jd != NULL; jd = jn->n_dialogs)
+    {
+      REMOVE_ELEMENT (jn->n_dialogs, jd);
+      eXosip_dialog_free (jd);
+    }
+
+  __eXosip_delete_jinfo (jn->n_inc_tr);
+  __eXosip_delete_jinfo (jn->n_out_tr);
+  if (jn->n_inc_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jn->n_inc_tr, 0);
+  if (jn->n_out_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jn->n_out_tr, 0);
+  osip_free (jn);
+}
+
+int
+_eXosip_notify_set_refresh_interval (eXosip_notify_t * jn,
+                                     osip_message_t * inc_subscribe)
+{
+  osip_header_t *exp;
+  int now;
+
+  now = time (NULL);
+  if (jn == NULL || inc_subscribe == NULL)
+    return -1;
+
+  osip_message_get_expires (inc_subscribe, 0, &exp);
+  if (exp == NULL || exp->hvalue == NULL)
+    jn->n_ss_expires = now + 600;
+  else
+    {
+      jn->n_ss_expires = osip_atoi (exp->hvalue);
+      if (jn->n_ss_expires != -1)
+        jn->n_ss_expires = now + jn->n_ss_expires;
+      else                      /* on error, set it to default */
+        jn->n_ss_expires = now + 600;
+    }
+
+  return 0;
+}
+
+void
+_eXosip_notify_add_expires_in_2XX_for_subscribe (eXosip_notify_t * jn,
+                                                 osip_message_t * answer)
+{
+  char tmp[20];
+  int now;
+
+  now = time (NULL);
+
+  if (jn->n_ss_expires - now < 0)
+    {
+      tmp[0] = '0';
+      tmp[1] = '\0';
+  } else
+    {
+      sprintf (tmp, "%i", jn->n_ss_expires - now);
+    }
+  osip_message_set_expires (answer, tmp);
+}
diff --git a/libs/eXosip2/eXosip2/jpipe.c b/libs/eXosip2/eXosip2/jpipe.c
new file mode 100644
index 0000000000000000000000000000000000000000..004306aa77f49cd8f64f29218c4a98cc3d332e9b
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jpipe.c
@@ -0,0 +1,230 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "jpipe.h"
+
+#ifndef WIN32
+
+jpipe_t *
+jpipe ()
+{
+  jpipe_t *my_pipe = (jpipe_t *) osip_malloc (sizeof (jpipe_t));
+
+  if (my_pipe == NULL)
+    return NULL;
+
+  if (0 != pipe (my_pipe->pipes))
+    {
+      osip_free (my_pipe);
+      return NULL;
+    }
+  return my_pipe;
+}
+
+int
+jpipe_close (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  close (apipe->pipes[0]);
+  close (apipe->pipes[1]);
+  osip_free (apipe);
+  return 0;
+}
+
+
+/**
+ * Write in a pipe.
+ */
+int
+jpipe_write (jpipe_t * apipe, const void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return write (apipe->pipes[1], buf, count);
+}
+
+/**
+ * Read in a pipe.
+ */
+int
+jpipe_read (jpipe_t * apipe, void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return read (apipe->pipes[0], buf, count);
+}
+
+/**
+ * Get descriptor of reading pipe.
+ */
+int
+jpipe_get_read_descr (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  return apipe->pipes[0];
+}
+
+#else
+
+jpipe_t *
+jpipe ()
+{
+  int s = 0;
+  int timeout = 0;
+  static int aport = 10500;
+  struct sockaddr_in raddr;
+  int j;
+
+  jpipe_t *my_pipe = (jpipe_t *) osip_malloc (sizeof (jpipe_t));
+
+  if (my_pipe == NULL)
+    return NULL;
+
+  s = (int) socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
+  if (0 > s)
+    {
+      osip_free (my_pipe);
+      return NULL;
+    }
+  my_pipe->pipes[1] = (int) socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
+  if (0 > my_pipe->pipes[1])
+    {
+      closesocket (s);
+      osip_free (my_pipe);
+      return NULL;
+    }
+
+  raddr.sin_addr.s_addr = inet_addr ("127.0.0.1");
+  raddr.sin_family = AF_INET;
+
+  j = 50;
+  while (aport++ && j-- > 0)
+    {
+      raddr.sin_port = htons ((short) aport);
+      if (bind (s, (struct sockaddr *) &raddr, sizeof (raddr)) < 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                                  "Failed to bind one local socket %i!\n", aport));
+      } else
+        break;
+    }
+
+  if (j == 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "Failed to bind a local socket, aborting!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  j = listen (s, 1);
+  if (j != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "Failed to listen on a local socket, aborting!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  j = setsockopt (my_pipe->pipes[1],
+                  SOL_SOCKET,
+                  SO_RCVTIMEO, (const char *) &timeout, sizeof (timeout));
+  if (j != NO_ERROR)
+    {
+      /* failed for some reason... */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "udp plugin; cannot set O_NONBLOCK to the file desciptor!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  connect (my_pipe->pipes[1], (struct sockaddr *) &raddr, sizeof (raddr));
+
+  my_pipe->pipes[0] = accept (s, NULL, NULL);
+
+  if (my_pipe->pipes[0] <= 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "udp plugin; Failed to call accept!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  return my_pipe;
+}
+
+int
+jpipe_close (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  closesocket (apipe->pipes[0]);
+  closesocket (apipe->pipes[1]);
+  osip_free (apipe);
+  return 0;
+}
+
+
+/**
+ * Write in a pipe.
+ */
+int
+jpipe_write (jpipe_t * apipe, const void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return send (apipe->pipes[1], buf, count, 0);
+}
+
+/**
+ * Read in a pipe.
+ */
+int
+jpipe_read (jpipe_t * apipe, void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return recv (apipe->pipes[0], buf, count, 0 /* MSG_DONTWAIT */ );     /* BUG?? */
+}
+
+/**
+ * Get descriptor of reading pipe.
+ */
+int
+jpipe_get_read_descr (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  return apipe->pipes[0];
+}
+
+#endif
diff --git a/libs/eXosip2/eXosip2/jpipe.h b/libs/eXosip2/eXosip2/jpipe.h
new file mode 100644
index 0000000000000000000000000000000000000000..1a8862c4f6d70efe7117c64a670a0be89e3f741b
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jpipe.h
@@ -0,0 +1,109 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public 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 _JPIPE_H_
+#define _JPIPE_H_
+
+#include <eXosip2/eXosip.h>
+
+#ifndef WIN32
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+/**
+ * @file jpipe.h
+ * @brief PPL Pipe Handling Routines
+ */
+
+/**
+ * @defgroup JPIPE Pipe Handling
+ * @ingroup PPL
+ * @{
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifndef WIN32
+
+/**
+ * Structure for storing a pipe descriptor
+ * @defvar jpipe_t
+ */
+  typedef struct jpipe_t jpipe_t;
+
+  struct jpipe_t
+  {
+    int pipes[2];
+  };
+
+#else
+
+/**
+ * Structure for storing a pipe descriptor
+ * @defvar ppl_pipe_t
+ */
+  typedef struct jpipe_t jpipe_t;
+
+  struct jpipe_t
+  {
+    int pipes[2];
+  };
+
+#endif
+
+/**
+ * Get New pipe pair.
+ */
+  jpipe_t *jpipe (void);
+
+/**
+ * Close pipe
+ */
+  int jpipe_close (jpipe_t * apipe);
+
+/**
+ * Write in a pipe.
+ */
+  int jpipe_write (jpipe_t * pipe, const void *buf, int count);
+
+/**
+ * Read in a pipe.
+ */
+  int jpipe_read (jpipe_t * pipe, void *buf, int count);
+
+/**
+ * Get descriptor of reading pipe.
+ */
+  int jpipe_get_read_descr (jpipe_t * pipe);
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif
diff --git a/libs/eXosip2/eXosip2/jpublish.c b/libs/eXosip2/eXosip2/jpublish.c
new file mode 100644
index 0000000000000000000000000000000000000000..ef75828af598e781a45691b3be78b257e084266b
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jpublish.c
@@ -0,0 +1,122 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+_eXosip_pub_update (eXosip_pub_t ** pub, osip_transaction_t * tr,
+                    osip_message_t * answer)
+{
+  eXosip_pub_t *jpub;
+
+  *pub = NULL;
+
+  for (jpub = eXosip.j_pub; jpub != NULL; jpub = jpub->next)
+    {
+      if (jpub->p_last_tr == NULL)
+        {                       /*bug? */
+      } else if (tr == jpub->p_last_tr)
+        {
+          /* update the sip_etag parameter */
+          if (answer == NULL)
+            {                   /* bug? */
+          } else if (MSG_IS_STATUS_2XX (answer))
+            {
+              osip_header_t *sip_etag = NULL;
+
+              osip_message_header_get_byname (answer, "SIP-ETag", 0, &sip_etag);
+              if (sip_etag != NULL && sip_etag->hvalue != NULL)
+                snprintf (jpub->p_sip_etag, 64, "%s", sip_etag->hvalue);
+            }
+          *pub = jpub;
+          return 0;
+        }
+    }
+  return -1;
+}
+
+int
+_eXosip_pub_find_by_aor (eXosip_pub_t ** pub, const char *aor)
+{
+  eXosip_pub_t *jpub;
+  eXosip_pub_t *ptr;
+  time_t now;
+
+  *pub = NULL;
+
+  /* delete expired publications */
+  now = time (NULL);
+  ptr = eXosip.j_pub;
+  for (jpub = ptr; jpub != NULL; jpub = ptr)
+    {
+      ptr = jpub->next;
+      if (now - jpub->p_expires > 60)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                       "eXosip: removing expired publication!"));
+          REMOVE_ELEMENT (eXosip.j_pub, jpub);
+          _eXosip_pub_free (jpub);
+        }
+    }
+
+  for (jpub = eXosip.j_pub; jpub != NULL; jpub = jpub->next)
+    {
+      if (osip_strcasecmp (aor, jpub->p_aor) == 0)
+        {
+          *pub = jpub;
+          return 0;
+        }
+    }
+  return -1;
+}
+
+int
+_eXosip_pub_init (eXosip_pub_t ** pub, const char *aor, const char *exp)
+{
+  eXosip_pub_t *jpub;
+
+  *pub = NULL;
+
+  jpub = (eXosip_pub_t *) osip_malloc (sizeof (eXosip_pub_t));
+  if (jpub == 0)
+    return -1;
+  memset (jpub, 0, sizeof (eXosip_pub_t));
+  snprintf (jpub->p_aor, 256, "%s", aor);
+
+  jpub->p_expires = atoi (exp) + time (NULL);
+  jpub->p_period = atoi (exp);
+
+  *pub = jpub;
+  return 0;
+}
+
+void
+_eXosip_pub_free (eXosip_pub_t * pub)
+{
+  if (pub->p_last_tr != NULL)
+    osip_list_add (eXosip.j_transactions, pub->p_last_tr, 0);
+  osip_free (pub);
+}
diff --git a/libs/eXosip2/eXosip2/jreg.c b/libs/eXosip2/eXosip2/jreg.c
new file mode 100644
index 0000000000000000000000000000000000000000..ecd32872b1ef47e44c3cb12ba779d0a5e06b1cd3
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jreg.c
@@ -0,0 +1,104 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_reg_init (eXosip_reg_t ** jr, const char *from, const char *proxy,
+                 const char *contact)
+{
+  static int r_id;
+
+  *jr = (eXosip_reg_t *) osip_malloc (sizeof (eXosip_reg_t));
+  if (*jr == NULL)
+    return -1;
+
+  if (r_id > 1000000)           /* keep it non-negative */
+    r_id = 0;
+
+  memset (*jr, '\0', sizeof (eXosip_reg_t));
+
+  (*jr)->r_id = ++r_id;
+  (*jr)->r_reg_period = 3600;   /* delay between registration */
+  (*jr)->r_aor = osip_strdup (from);    /* sip identity */
+  (*jr)->r_contact = osip_strdup (contact);     /* sip identity */
+  (*jr)->r_registrar = osip_strdup (proxy);     /* registrar */
+
+  return 0;
+}
+
+void
+eXosip_reg_free (eXosip_reg_t * jreg)
+{
+
+  osip_free (jreg->r_aor);
+  osip_free (jreg->r_contact);
+  osip_free (jreg->r_registrar);
+
+  if (jreg->r_last_tr != NULL)
+    {
+      if (jreg->r_last_tr->state == IST_TERMINATED ||
+          jreg->r_last_tr->state == ICT_TERMINATED ||
+          jreg->r_last_tr->state == NICT_TERMINATED ||
+          jreg->r_last_tr->state == NIST_TERMINATED)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a terminated transaction\n"));
+          __eXosip_delete_jinfo (jreg->r_last_tr);
+          if (jreg->r_last_tr != NULL)
+            osip_list_add (eXosip.j_transactions, jreg->r_last_tr, 0);
+      } else
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a non-terminated transaction\n"));
+          __eXosip_delete_jinfo (jreg->r_last_tr);
+          if (jreg->r_last_tr != NULL)
+            osip_list_add (eXosip.j_transactions, jreg->r_last_tr, 0);
+        }
+    }
+
+  osip_free (jreg);
+}
+
+int
+_eXosip_reg_find (eXosip_reg_t ** reg, osip_transaction_t * tr)
+{
+  eXosip_reg_t *jreg;
+
+  *reg = NULL;
+  if (tr == NULL)
+    return -1;
+
+  for (jreg = eXosip.j_reg; jreg != NULL; jreg = jreg->next)
+    {
+      if (jreg->r_last_tr == tr)
+        {
+          *reg = jreg;
+          return 0;
+        }
+    }
+  return -1;
+}
diff --git a/libs/eXosip2/eXosip2/jrequest.c b/libs/eXosip2/eXosip2/jrequest.c
new file mode 100644
index 0000000000000000000000000000000000000000..ae24979e2f11046876f104ad26fa793512c6a32e
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jrequest.c
@@ -0,0 +1,999 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+#ifndef WIN32
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#ifdef __APPLE_CC__
+#include <unistd.h>
+#endif
+#else
+#include <windows.h>
+#include <Iphlpapi.h>
+#endif
+
+extern eXosip_t eXosip;
+
+/* Private functions */
+static int dialog_fill_route_set (osip_dialog_t * dialog,
+                                  osip_message_t * request);
+
+/* should use cryptographically random identifier is RECOMMENDED.... */
+/* by now this should lead to identical call-id when application are
+   started at the same time...   */
+char *
+osip_call_id_new_random ()
+{
+  char *tmp = (char *) osip_malloc (33);
+  unsigned int number = osip_build_random_number ();
+
+  sprintf (tmp, "%u", number);
+  return tmp;
+}
+
+char *
+osip_from_tag_new_random (void)
+{
+  return osip_call_id_new_random ();
+}
+
+char *
+osip_to_tag_new_random (void)
+{
+  return osip_call_id_new_random ();
+}
+
+unsigned int
+via_branch_new_random (void)
+{
+  return osip_build_random_number ();
+}
+
+/* prepare a minimal request (outside of a dialog) with required headers */
+/* 
+   method is the type of request. ("INVITE", "REGISTER"...)
+   to is the remote target URI
+   transport is either "TCP" or "UDP" (by now, only UDP is implemented!)
+*/
+int
+generating_request_out_of_dialog (osip_message_t ** dest, const char *method,
+                                  const char *to, const char *transport,
+                                  const char *from, const char *proxy)
+{
+  /* Section 8.1:
+     A valid request contains at a minimum "To, From, Call-iD, Cseq,
+     Max-Forwards and Via
+   */
+  int i;
+  osip_message_t *request;
+  char locip[50];
+  int doing_register;
+  char *register_callid_number = NULL;
+  struct eXosip_net *net;
+
+  if (0==osip_strcasecmp(transport, "udp"))
+    net = &eXosip.net_interfaces[0];
+  else if (0==osip_strcasecmp(transport, "tcp"))
+    net = &eXosip.net_interfaces[1];
+  else
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "eXosip: unsupported protocol (default to UDP)\n"));
+    net = &eXosip.net_interfaces[0];
+    }
+
+  *dest = NULL;
+
+  i = osip_message_init (&request);
+  if (i != 0)
+    return -1;
+
+  /* prepare the request-line */
+  osip_message_set_method (request, osip_strdup (method));
+  osip_message_set_version (request, osip_strdup ("SIP/2.0"));
+  osip_message_set_status_code (request, 0);
+  osip_message_set_reason_phrase (request, NULL);
+
+  doing_register = 0 == strcmp ("REGISTER", method);
+
+  if (doing_register)
+    {
+      osip_uri_init (&(request->req_uri));
+      i = osip_uri_parse (request->req_uri, proxy);
+      if (i != 0)
+        {
+          goto brood_error_1;
+        }
+      osip_message_set_to (request, from);
+  } else
+    {
+      /* in any cases except REGISTER: */
+      i = osip_message_set_to (request, to);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "ERROR: callee address does not seems to be a sipurl: %s\n",
+                       to));
+          goto brood_error_1;
+        }
+      if (proxy != NULL && proxy[0] != 0)
+        {                       /* equal to a pre-existing route set */
+          /* if the pre-existing route set contains a "lr" (compliance
+             with bis-08) then the req_uri should contains the remote target
+             URI */
+          osip_uri_param_t *lr_param;
+          osip_route_t *o_proxy;
+
+#ifndef __VXWORKS_OS__
+          osip_route_init (&o_proxy);
+#else
+          osip_route_init2 (&o_proxy);
+#endif
+          i = osip_route_parse (o_proxy, proxy);
+          if (i != 0)
+            {
+              osip_route_free (o_proxy);
+              goto brood_error_1;
+            }
+
+          osip_uri_uparam_get_byname (o_proxy->url, "lr", &lr_param);
+          if (lr_param != NULL) /* to is the remote target URI in this case! */
+            {
+              osip_uri_clone (request->to->url, &(request->req_uri));
+              /* "[request] MUST includes a Route header field containing
+                 the route set values in order." */
+              osip_list_add (request->routes, o_proxy, 0);
+          } else
+            /* if the first URI of route set does not contain "lr", the req_uri
+               is set to the first uri of route set */
+            {
+              request->req_uri = o_proxy->url;
+              o_proxy->url = NULL;
+              osip_route_free (o_proxy);
+              /* add the route set */
+              /* "The UAC MUST add a route header field containing
+                 the remainder of the route set values in order.
+                 The UAC MUST then place the remote target URI into
+                 the route header field as the last value
+               */
+              osip_message_set_route (request, to);
+            }
+      } else                    /* No route set (outbound proxy) is used */
+        {
+          /* The UAC must put the remote target URI (to field) in the req_uri */
+          i = osip_uri_clone (request->to->url, &(request->req_uri));
+          if (i != 0)
+            goto brood_error_1;
+        }
+    }
+  /*guess the local ip since req uri is known */
+#ifdef SM
+  eXosip_get_localip_for (request->req_uri->host, locip, 49);
+#else
+  if (0==osip_strcasecmp(transport, "udp"))
+    eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+  else if (0==osip_strcasecmp(transport, "tcp"))
+    eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip, 49);
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (default to UDP)\n"));
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+    }
+#endif
+  /* set To and From */
+  osip_message_set_from (request, from);
+  /* add a tag */
+  osip_from_set_tag (request->from, osip_from_tag_new_random ());
+
+  /* set the cseq and call_id header */
+  {
+    osip_call_id_t *callid;
+    osip_cseq_t *cseq;
+    char *num;
+    char *cidrand;
+
+    /* call-id is always the same for REGISTRATIONS */
+    i = osip_call_id_init (&callid);
+    if (i != 0)
+      goto brood_error_1;
+    cidrand = osip_call_id_new_random ();
+    osip_call_id_set_number (callid, cidrand);
+    if (doing_register)
+      register_callid_number = cidrand;
+
+    osip_call_id_set_host (callid, osip_strdup (locip));
+    request->call_id = callid;
+
+    i = osip_cseq_init (&cseq);
+    if (i != 0)
+      goto brood_error_1;
+    num = osip_strdup (doing_register ? "1" : "20");
+    osip_cseq_set_number (cseq, num);
+    osip_cseq_set_method (cseq, osip_strdup (method));
+    request->cseq = cseq;
+  }
+
+  /* always add the Max-Forward header */
+  osip_message_set_max_forwards (request, "5"); /* a UA should start a request with 70 */
+
+#define MASQUERADE_VIA
+#ifdef MASQUERADE_VIA
+  /* should be useless with compliant UA */
+  if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+    {
+      char *c_address = request->req_uri->host;
+
+      struct addrinfo *addrinfo;
+      struct __eXosip_sockaddr addr;
+
+      i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_UDP);
+      if (i == 0)
+        {
+          memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+          freeaddrinfo (addrinfo);
+          c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                       "eXosip: here is the resolved destination host=%s\n",
+                       c_address));
+        }
+
+      if (eXosip_is_public_address (c_address))
+        {
+          char tmp[200];
+
+          snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                    transport, eXosip.net_interfaces[0].net_firewall_ip,
+		    net->net_port,
+                    via_branch_new_random ());
+          osip_message_set_via (request, tmp);
+      } else
+        {
+          char tmp[200];
+
+          if (net->net_ip_family == AF_INET6)
+            snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+          else
+            snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+          osip_message_set_via (request, tmp);
+        }
+  } else
+    {
+      char tmp[200];
+
+      if (net->net_ip_family == AF_INET6)
+        snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+                  locip, net->net_port,
+		  via_branch_new_random ());
+      else
+        snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                  transport, locip, net->net_port,
+		  via_branch_new_random ());
+      osip_message_set_via (request, tmp);
+    }
+
+#else
+  {
+    char tmp[200];
+
+    if (net->net_ip_family == AF_INET6)
+      spnrintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+                locip, net->net_port,
+		via_branch_new_random ());
+    else
+      spnrintf (tmp, 200, "SIP/2.0/%s %s:%s;branch=z9hG4bK%u", transport,
+                locip, net->net_port,
+		via_branch_new_random ());
+
+    osip_message_set_via (request, tmp);
+  }
+#endif
+
+  /* add specific headers for each kind of request... */
+
+  if (0 == strcmp ("INVITE", method) || 0 == strcmp ("SUBSCRIBE", method))
+    {
+      char *contact;
+      osip_from_t *a_from;
+      int i;
+
+      i = osip_from_init (&a_from);
+      if (i == 0)
+        i = osip_from_parse (a_from, from);
+
+      if (i == 0 && a_from != NULL
+          && a_from->url != NULL && a_from->url->username != NULL)
+        {
+          contact = (char *) osip_malloc (50 + strlen (a_from->url->username));
+
+          if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+            {
+              char *c_address = request->req_uri->host;
+
+              struct addrinfo *addrinfo;
+              struct __eXosip_sockaddr addr;
+
+	      i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_TCP);
+              if (i == 0)
+                {
+                  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+                  freeaddrinfo (addrinfo);
+                  c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: here is the resolved destination host=%s\n",
+                               c_address));
+                }
+
+              if (eXosip_is_public_address (c_address))
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           eXosip.net_interfaces[0].net_firewall_ip,
+			   net->net_port);
+              } else
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           locip, net->net_port);
+                }
+          } else
+            {
+              sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                       locip, net->net_port);
+            }
+          osip_message_set_contact (request, contact);
+          osip_free (contact);
+        }
+      osip_from_free (a_from);
+
+      /* This is probably useless for other messages */
+      osip_message_set_allow (request, "INVITE");
+      osip_message_set_allow (request, "ACK");
+      osip_message_set_allow (request, "UPDATE");
+      osip_message_set_allow (request, "INFO");
+      osip_message_set_allow (request, "CANCEL");
+      osip_message_set_allow (request, "BYE");
+      osip_message_set_allow (request, "OPTIONS");
+      osip_message_set_allow (request, "REFER");
+      osip_message_set_allow (request, "SUBSCRIBE");
+      osip_message_set_allow (request, "NOTIFY");
+      osip_message_set_allow (request, "MESSAGE");
+    }
+
+  if (0 == strcmp ("REGISTER", method))
+    {
+  } else if (0 == strcmp ("INFO", method))
+    {
+  } else if (0 == strcmp ("OPTIONS", method))
+    {
+      osip_message_set_accept (request, "application/sdp");
+    }
+
+  osip_message_set_user_agent (request, eXosip.user_agent);
+  /*  else if ... */
+  *dest = request;
+  return 0;
+
+brood_error_1:
+  osip_message_free (request);
+  *dest = NULL;
+  return -1;
+}
+
+int
+generating_register (osip_message_t ** reg, char *transport, char *from,
+                     char *proxy, char *contact, int expires)
+{
+  osip_from_t *a_from;
+  int i;
+  char locip[50];
+  struct eXosip_net *net;
+
+  i = generating_request_out_of_dialog (reg, "REGISTER", NULL, transport, from, proxy);
+  if (i != 0)
+    return -1;
+
+  i = _eXosip_find_protocol(*reg);
+  if (i==IPPROTO_UDP)
+      net = &eXosip.net_interfaces[0];
+  else if (i==IPPROTO_TCP)
+      net = &eXosip.net_interfaces[1];
+  else
+    {
+      net = &eXosip.net_interfaces[0];
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+#ifdef SM
+  eXosip_get_localip_for ((*reg)->req_uri->host, locip, 49);
+#else
+  eXosip_guess_ip_for_via (net->net_ip_family, locip, 49);
+#endif
+
+  if (contact == NULL)
+    {
+      i = osip_from_init (&a_from);
+      if (i == 0)
+        i = osip_from_parse (a_from, from);
+
+      if (i == 0 && a_from != NULL
+          && a_from->url != NULL && a_from->url->username != NULL)
+        {
+          contact = (char *) osip_malloc (50 + strlen (a_from->url->username));
+          if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+            {
+              char *c_address = (*reg)->req_uri->host;
+
+              struct addrinfo *addrinfo;
+              struct __eXosip_sockaddr addr;
+
+	      i = eXosip_get_addrinfo (&addrinfo, (*reg)->req_uri->host, 5060, IPPROTO_UDP);
+              if (i == 0)
+                {
+                  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+                  freeaddrinfo (addrinfo);
+                  c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: here is the resolved destination host=%s\n",
+                               c_address));
+                }
+
+              if (eXosip_is_public_address (c_address))
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           eXosip.net_interfaces[0].net_firewall_ip,
+			   net->net_port);
+              } else
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           locip, net->net_port);
+                }
+          } else
+            {
+              sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                       locip, net->net_port);
+            }
+
+          osip_message_set_contact (*reg, contact);
+          osip_free (contact);
+        }
+      osip_from_free (a_from);
+  } else
+    {
+      osip_message_set_contact (*reg, contact);
+    }
+
+  {
+    char exp[10];               /* MUST never be ouside 1 and 3600 */
+
+    snprintf (exp, 9, "%i", expires);
+    osip_message_set_expires (*reg, exp);
+  }
+
+  osip_message_set_content_length (*reg, "0");
+
+  return 0;
+}
+
+int
+generating_publish (osip_message_t ** message, const char *to,
+                    const char *from, const char *route)
+{
+  int i;
+
+  if (to != NULL && *to == '\0')
+    return -1;
+
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = generating_request_out_of_dialog (message, "PUBLISH", to, "UDP", from,
+					route);
+  if (i != 0)
+    return -1;
+
+  /* osip_message_set_organization(*message, "Jack's Org"); */
+
+  return 0;
+}
+
+static int
+dialog_fill_route_set (osip_dialog_t * dialog, osip_message_t * request)
+{
+  /* if the pre-existing route set contains a "lr" (compliance
+     with bis-08) then the req_uri should contains the remote target
+     URI */
+  int i;
+  int pos = 0;
+  osip_uri_param_t *lr_param;
+  osip_route_t *route;
+  char *last_route;
+
+  /* AMD bug: fixed 17/06/2002 */
+
+#ifdef OSIP_FUTURE_FIX_2_3
+    route = (osip_route_t *) osip_list_get (dialog->route_set, 0);
+#else
+  if (dialog->type == CALLER)
+    {
+      pos = osip_list_size (dialog->route_set) - 1;
+      route = (osip_route_t *) osip_list_get (dialog->route_set, pos);
+  } else
+    route = (osip_route_t *) osip_list_get (dialog->route_set, 0);
+#endif
+
+  osip_uri_uparam_get_byname (route->url, "lr", &lr_param);
+  if (lr_param != NULL)         /* the remote target URI is the req_uri! */
+    {
+      i = osip_uri_clone (dialog->remote_contact_uri->url, &(request->req_uri));
+      if (i != 0)
+        return -1;
+      /* "[request] MUST includes a Route header field containing
+         the route set values in order." */
+      /* AMD bug: fixed 17/06/2002 */
+      pos = 0;                  /* first element is at index 0 */
+      while (!osip_list_eol (dialog->route_set, pos))
+        {
+          osip_route_t *route2;
+
+          route = osip_list_get (dialog->route_set, pos);
+          i = osip_route_clone (route, &route2);
+          if (i != 0)
+            return -1;
+#ifdef OSIP_FUTURE_FIX_2_3
+            osip_list_add (request->routes, route2, -1);
+#else
+          if (dialog->type == CALLER)
+            osip_list_add (request->routes, route2, 0);
+          else
+            osip_list_add (request->routes, route2, -1);
+          pos++;
+#endif
+        }
+      return 0;
+    }
+
+  /* if the first URI of route set does not contain "lr", the req_uri
+     is set to the first uri of route set */
+
+
+  i = osip_uri_clone (route->url, &(request->req_uri));
+  if (i != 0)
+    return -1;
+  /* add the route set */
+  /* "The UAC MUST add a route header field containing
+     the remainder of the route set values in order. */
+  pos = 0;                      /* yes it is */
+
+  while (!osip_list_eol (dialog->route_set, pos))       /* not the first one in the list */
+    {
+      osip_route_t *route2;
+
+      route = osip_list_get (dialog->route_set, pos);
+      i = osip_route_clone (route, &route2);
+      if (i != 0)
+        return -1;
+#ifdef OSIP_FUTURE_FIX_2_3
+      if (!osip_list_eol (dialog->route_set, pos + 1))
+        osip_list_add (request->routes, route2, -1);
+      else
+        osip_route_free (route2);
+#else
+      if (dialog->type == CALLER)
+        {
+          if (pos != osip_list_size (dialog->route_set) - 1)
+            osip_list_add (request->routes, route2, 0);
+          else
+            osip_route_free (route2);
+      } else
+        {
+          if (!osip_list_eol (dialog->route_set, pos + 1))
+            osip_list_add (request->routes, route2, -1);
+          else
+            osip_route_free (route2);
+        }
+#endif
+      pos++;
+    }
+
+  /* The UAC MUST then place the remote target URI into
+     the route header field as the last value */
+  i = osip_uri_to_str (dialog->remote_contact_uri->url, &last_route);
+  if (i != 0)
+    return -1;
+  i = osip_message_set_route (request, last_route);
+  osip_free (last_route);
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  /* route header and req_uri set */
+  return 0;
+}
+
+int
+_eXosip_build_request_within_dialog (osip_message_t ** dest,
+                                     const char *method,
+                                     osip_dialog_t * dialog, const char *transport)
+{
+  int i;
+  osip_message_t *request;
+  char locip[50];
+  struct eXosip_net *net;
+
+  i = osip_message_init (&request);
+  if (i != 0) 
+   return -1;
+
+  if (dialog->remote_contact_uri == NULL)
+    {
+      /* this dialog is probably not established! or the remote UA
+         is not compliant with the latest RFC
+       */
+      osip_message_free (request);
+      return -1;
+    }
+
+  if (0==osip_strcasecmp(transport, "udp"))
+    net = &eXosip.net_interfaces[0];
+  else if (0==osip_strcasecmp(transport, "tcp"))
+    net = &eXosip.net_interfaces[1];
+  else
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "eXosip: unsupported protocol -%s- (default to UDP)\n"));
+    net = &eXosip.net_interfaces[0];
+    }
+
+#ifdef SM
+  eXosip_get_localip_for (dialog->remote_contact_uri->url->host, locip, 49);
+#else
+  eXosip_guess_ip_for_via (net->net_ip_family, locip, 49);
+#endif
+  /* prepare the request-line */
+  request->sip_method = osip_strdup (method);
+  request->sip_version = osip_strdup ("SIP/2.0");
+  request->status_code = 0;
+  request->reason_phrase = NULL;
+
+  /* and the request uri???? */
+  if (osip_list_eol (dialog->route_set, 0))
+    {
+      /* The UAC must put the remote target URI (to field) in the req_uri */
+      i = osip_uri_clone (dialog->remote_contact_uri->url, &(request->req_uri));
+      if (i != 0)
+        goto grwd_error_1;
+  } else
+    {
+      /* fill the request-uri, and the route headers. */
+      dialog_fill_route_set (dialog, request);
+    }
+
+  /* To and From already contains the proper tag! */
+  i = osip_to_clone (dialog->remote_uri, &(request->to));
+  if (i != 0)
+    goto grwd_error_1;
+  i = osip_from_clone (dialog->local_uri, &(request->from));
+  if (i != 0)
+    goto grwd_error_1;
+
+  /* set the cseq and call_id header */
+  osip_message_set_call_id (request, dialog->call_id);
+
+  if (0 == strcmp ("ACK", method))
+    {
+      osip_cseq_t *cseq;
+      char *tmp;
+
+      i = osip_cseq_init (&cseq);
+      if (i != 0)
+        goto grwd_error_1;
+      tmp = osip_malloc (20);
+      sprintf (tmp, "%i", dialog->local_cseq);
+      osip_cseq_set_number (cseq, tmp);
+      osip_cseq_set_method (cseq, osip_strdup (method));
+      request->cseq = cseq;
+  } else
+    {
+      osip_cseq_t *cseq;
+      char *tmp;
+
+      i = osip_cseq_init (&cseq);
+      if (i != 0)
+        goto grwd_error_1;
+      dialog->local_cseq++;     /* we should we do that?? */
+      tmp = osip_malloc (20);
+      sprintf (tmp, "%i", dialog->local_cseq);
+      osip_cseq_set_number (cseq, tmp);
+      osip_cseq_set_method (cseq, osip_strdup (method));
+      request->cseq = cseq;
+    }
+
+  /* always add the Max-Forward header */
+  osip_message_set_max_forwards (request, "5"); /* a UA should start a request with 70 */
+
+
+  /* even for ACK for 2xx (ACK within a dialog), the branch ID MUST
+     be a new ONE! */
+#ifdef MASQUERADE_VIA
+  /* should be useless with compliant UA */
+  if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+    {
+      char *c_address = request->req_uri->host;
+
+      struct addrinfo *addrinfo;
+      struct __eXosip_sockaddr addr;
+
+      i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_UDP);
+      if (i == 0)
+        {
+          memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+          freeaddrinfo (addrinfo);
+          c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                       "eXosip: here is the resolved destination host=%s\n",
+                       c_address));
+        }
+
+      if (eXosip_is_public_address (c_address))
+        {
+          char tmp[200];
+
+          sprintf (tmp, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u", transport,
+                   eXosip.net_interfaces[0].net_firewall_ip,
+                   net->net_port,
+		   via_branch_new_random ());
+          osip_message_set_via (request, tmp);
+      } else
+        {
+          char tmp[200];
+
+          if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+            snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+          else
+            snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+
+          osip_message_set_via (request, tmp);
+        }
+  } else
+    {
+      char tmp[200];
+
+      if (net->net_ip_family == AF_INET6)
+        snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+                  locip, net->net_port,
+		  via_branch_new_random ());
+      else
+        snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                  transport, locip, net->net_port,
+		  via_branch_new_random ());
+
+      osip_message_set_via (request, tmp);
+    }
+
+#else
+  {
+    char tmp[200];
+
+    if (net->net_ip_family == AF_INET6)
+      sprintf (tmp, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+               locip, net->net_port,
+	       via_branch_new_random ());
+    else
+      sprintf (tmp, "SIP/2.0/%s %s:%s;branch=z9hG4bK%u", transport,
+               locip, net->net_port,
+	       via_branch_new_random ());
+
+    osip_message_set_via (request, tmp);
+  }
+#endif
+
+  /* add specific headers for each kind of request... */
+
+  {
+    char contact[200];
+
+    if (net->net_firewall_ip[0] != '\0')
+      {
+        char *c_address = request->req_uri->host;
+
+        struct addrinfo *addrinfo;
+        struct __eXosip_sockaddr addr;
+
+        i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_UDP);
+        if (i == 0)
+          {
+            memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+            freeaddrinfo (addrinfo);
+            c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+            OSIP_TRACE (osip_trace
+                        (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                         "eXosip: here is the resolved destination host=%s\n",
+                         c_address));
+          }
+
+        if (eXosip_is_public_address (c_address))
+          {
+            sprintf (contact, "<sip:%s@%s:%s>",
+                     dialog->local_uri->url->username,
+		     eXosip.net_interfaces[0].net_firewall_ip,
+                     net->net_port);
+        } else
+          {
+            sprintf (contact, "<sip:%s@%s:%s>",
+                     dialog->local_uri->url->username, locip,
+		     net->net_port);
+          }
+    } else
+      {
+        sprintf (contact, "<sip:%s@%s:%s>", dialog->local_uri->url->username,
+                 locip, net->net_port);
+      }
+    osip_message_set_contact (request, contact);
+    /* Here we'll add the supported header if it's needed! */
+    /* the require header must be added by the upper layer if needed */
+  }
+
+  if (0 == strcmp ("NOTIFY", method))
+    {
+  } else if (0 == strcmp ("INFO", method))
+    {
+
+  } else if (0 == strcmp ("OPTIONS", method))
+    {
+      osip_message_set_accept (request, "application/sdp");
+  } else if (0 == strcmp ("ACK", method))
+    {
+      /* The ACK MUST contains the same credential than the INVITE!! */
+      /* TODO... */
+    }
+
+  osip_message_set_user_agent (request, eXosip.user_agent);
+  /*  else if ... */
+  *dest = request;
+  return 0;
+
+  /* grwd_error_2: */
+  dialog->local_cseq--;
+grwd_error_1:
+  osip_message_free (request);
+  *dest = NULL;
+  return -1;
+}
+
+/* this request is only build within a dialog!! */
+int
+generating_bye (osip_message_t ** bye, osip_dialog_t * dialog, char *transport)
+{
+  int i;
+
+  i = _eXosip_build_request_within_dialog (bye, "BYE", dialog, transport);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+/* It is RECOMMENDED to only cancel INVITE request */
+int
+generating_cancel (osip_message_t ** dest, osip_message_t * request_cancelled)
+{
+  int i;
+  osip_message_t *request;
+
+  i = osip_message_init (&request);
+  if (i != 0)
+    return -1;
+
+  /* prepare the request-line */
+  osip_message_set_method (request, osip_strdup ("CANCEL"));
+  osip_message_set_version (request, osip_strdup ("SIP/2.0"));
+  osip_message_set_status_code (request, 0);
+  osip_message_set_reason_phrase (request, NULL);
+
+  i = osip_uri_clone (request_cancelled->req_uri, &(request->req_uri));
+  if (i != 0)
+    goto gc_error_1;
+
+  i = osip_to_clone (request_cancelled->to, &(request->to));
+  if (i != 0)
+    goto gc_error_1;
+  i = osip_from_clone (request_cancelled->from, &(request->from));
+  if (i != 0)
+    goto gc_error_1;
+
+  /* set the cseq and call_id header */
+  i = osip_call_id_clone (request_cancelled->call_id, &(request->call_id));
+  if (i != 0)
+    goto gc_error_1;
+  i = osip_cseq_clone (request_cancelled->cseq, &(request->cseq));
+  if (i != 0)
+    goto gc_error_1;
+  osip_free (request->cseq->method);
+  request->cseq->method = osip_strdup ("CANCEL");
+
+  /* copy ONLY the top most Via Field (this method is also used by proxy) */
+  {
+    osip_via_t *via;
+    osip_via_t *via2;
+
+    i = osip_message_get_via (request_cancelled, 0, &via);
+    if (i != 0)
+      goto gc_error_1;
+    i = osip_via_clone (via, &via2);
+    if (i != 0)
+      goto gc_error_1;
+    osip_list_add (request->vias, via2, -1);
+  }
+
+  /* add the same route-set than in the previous request */
+  {
+    int pos = 0;
+    osip_route_t *route;
+    osip_route_t *route2;
+
+    while (!osip_list_eol (request_cancelled->routes, pos))
+      {
+        route = (osip_route_t *) osip_list_get (request_cancelled->routes, pos);
+        i = osip_route_clone (route, &route2);
+        if (i != 0)
+          goto gc_error_1;
+        osip_list_add (request->routes, route2, -1);
+        pos++;
+      }
+  }
+
+  osip_message_set_max_forwards (request, "70");        /* a UA should start a request with 70 */
+  osip_message_set_user_agent (request, eXosip.user_agent);
+
+  *dest = request;
+  return 0;
+
+gc_error_1:
+  osip_message_free (request);
+  *dest = NULL;
+  return -1;
+}
+
diff --git a/libs/eXosip2/eXosip2/jresponse.c b/libs/eXosip2/eXosip2/jresponse.c
new file mode 100644
index 0000000000000000000000000000000000000000..6135f56505c1594b2191af1bb6c242a3dc5b3ab9
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jresponse.c
@@ -0,0 +1,736 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+
+int
+_eXosip_build_response_default (osip_message_t ** dest,
+                                osip_dialog_t * dialog, int status,
+                                osip_message_t * request)
+{
+  osip_generic_param_t *tag;
+  osip_message_t *response;
+  int pos;
+  int i;
+
+  *dest = NULL;
+  if (request == NULL)
+    return -1;
+
+  i = osip_message_init (&response);
+  if (i != 0)
+    return -1;
+  /* initialise osip_message_t structure */
+  /* yet done... */
+
+  response->sip_version = (char *) osip_malloc (8 * sizeof (char));
+  sprintf (response->sip_version, "SIP/2.0");
+  osip_message_set_status_code (response, status);
+
+  /* handle some internal reason definitions. */
+  if (MSG_IS_NOTIFY (request) && status == 481)
+    {
+      response->reason_phrase = osip_strdup ("Subcription Does Not Exist");
+  } else if (MSG_IS_SUBSCRIBE (request) && status == 202)
+    {
+      response->reason_phrase = osip_strdup ("Accepted subscription");
+  } else
+    {
+      response->reason_phrase = osip_strdup (osip_message_get_reason (status));
+      if (response->reason_phrase == NULL)
+        {
+          if (response->status_code == 101)
+            response->reason_phrase = osip_strdup ("Dialog Establishement");
+          else
+            response->reason_phrase = osip_strdup ("Unknown code");
+        }
+      response->req_uri = NULL;
+      response->sip_method = NULL;
+    }
+
+  i = osip_to_clone (request->to, &(response->to));
+  if (i != 0)
+    goto grd_error_1;
+
+  i = osip_to_get_tag (response->to, &tag);
+  if (i != 0)
+    {                           /* we only add a tag if it does not already contains one! */
+      if ((dialog != NULL) && (dialog->local_tag != NULL))
+        /* it should contain the local TAG we created */
+        {
+          osip_to_set_tag (response->to, osip_strdup (dialog->local_tag));
+      } else
+        {
+          if (status != 100)
+            osip_to_set_tag (response->to, osip_to_tag_new_random ());
+        }
+    }
+
+  i = osip_from_clone (request->from, &(response->from));
+  if (i != 0)
+    goto grd_error_1;
+
+  pos = 0;
+  while (!osip_list_eol (request->vias, pos))
+    {
+      osip_via_t *via;
+      osip_via_t *via2;
+
+      via = (osip_via_t *) osip_list_get (request->vias, pos);
+      i = osip_via_clone (via, &via2);
+      if (i != -0)
+        goto grd_error_1;
+      osip_list_add (response->vias, via2, -1);
+      pos++;
+    }
+
+  i = osip_call_id_clone (request->call_id, &(response->call_id));
+  if (i != 0)
+    goto grd_error_1;
+  i = osip_cseq_clone (request->cseq, &(response->cseq));
+  if (i != 0)
+    goto grd_error_1;
+
+  if (MSG_IS_SUBSCRIBE (request))
+    {
+      osip_header_t *exp;
+      osip_header_t *evt_hdr;
+
+      osip_message_header_get_byname (request, "event", 0, &evt_hdr);
+      if (evt_hdr != NULL && evt_hdr->hvalue != NULL)
+	osip_message_set_header (response, "Event", evt_hdr->hvalue);
+      else
+	osip_message_set_header (response, "Event", "presence");
+      i = osip_message_get_expires (request, 0, &exp);
+      if (exp == NULL)
+        {
+          osip_header_t *cp;
+
+          i = osip_header_clone (exp, &cp);
+          if (cp != NULL)
+            osip_list_add (response->headers, cp, 0);
+        }
+    }
+
+  osip_message_set_allow (response, "INVITE");
+  osip_message_set_allow (response, "ACK");
+  osip_message_set_allow (response, "OPTIONS");
+  osip_message_set_allow (response, "CANCEL");
+  osip_message_set_allow (response, "BYE");
+  osip_message_set_allow (response, "SUBSCRIBE");
+  osip_message_set_allow (response, "NOTIFY");
+  osip_message_set_allow (response, "MESSAGE");
+  osip_message_set_allow (response, "INFO");
+  osip_message_set_allow (response, "REFER");
+  osip_message_set_allow (response, "UPDATE");
+
+  *dest = response;
+  return 0;
+
+grd_error_1:
+  osip_message_free (response);
+  return -1;
+}
+
+int
+complete_answer_that_establish_a_dialog (osip_message_t * response,
+                                         osip_message_t * request)
+{
+  int i;
+  int pos = 0;
+  char contact[1000];
+  char locip[50];
+  struct eXosip_net *net;
+  /* 12.1.1:
+     copy all record-route in response
+     add a contact with global scope
+   */
+  while (!osip_list_eol (request->record_routes, pos))
+    {
+      osip_record_route_t *rr;
+      osip_record_route_t *rr2;
+
+      rr = osip_list_get (request->record_routes, pos);
+      i = osip_record_route_clone (rr, &rr2);
+      if (i != 0)
+        return -1;
+      osip_list_add (response->record_routes, rr2, -1);
+      pos++;
+    }
+
+  i = _eXosip_find_protocol(response);
+  if (i==IPPROTO_UDP)
+    {
+      net = &eXosip.net_interfaces[0];
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      net = &eXosip.net_interfaces[1];
+    }
+  else
+    {
+      net = &eXosip.net_interfaces[0];
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (default to UDP)\n"));
+      return -1;
+    }
+
+#ifdef SM
+  eXosip_get_localip_from_via (response, locip, 49);
+#else
+  eXosip_guess_ip_for_via (net->net_ip_family, locip, 49);
+#endif
+
+  if (request->to->url->username == NULL)
+    snprintf (contact, 1000, "<sip:%s:%s>", locip, net->net_port);
+  else
+    snprintf (contact, 1000, "<sip:%s@%s:%s>", request->to->url->username,
+              locip, net->net_port);
+
+  if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+    {
+      osip_contact_t *con =
+        (osip_contact_t *) osip_list_get (request->contacts, 0);
+      if (con != NULL && con->url != NULL && con->url->host != NULL)
+        {
+          char *c_address = con->url->host;
+
+          struct addrinfo *addrinfo;
+          struct __eXosip_sockaddr addr;
+	  i = eXosip_get_addrinfo (&addrinfo, con->url->host, 5060, IPPROTO_UDP);
+          if (i == 0)
+            {
+              memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+              freeaddrinfo (addrinfo);
+              c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                           "eXosip: here is the resolved destination host=%s\n",
+                           c_address));
+            }
+
+          /* If c_address is a PUBLIC address, the request was
+             coming from the PUBLIC network. */
+          if (eXosip_is_public_address (c_address))
+            {
+              if (request->to->url->username == NULL)
+                snprintf (contact, 1000, "<sip:%s:%s>",
+			  eXosip.net_interfaces[0].net_firewall_ip,
+                          net->net_port);
+              else
+                snprintf (contact, 1000, "<sip:%s@%s:%s>",
+                          request->to->url->username,
+			  eXosip.net_interfaces[0].net_firewall_ip,
+                          net->net_port);
+            }
+        }
+    }
+
+  osip_message_set_contact (response, contact);
+
+  return 0;
+}
+
+int
+_eXosip_answer_invite_1xx (eXosip_call_t * jc, eXosip_dialog_t * jd, int code,
+                           osip_message_t ** answer)
+{
+  int i;
+  osip_transaction_t *tr;
+
+  *answer = NULL;
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (answer, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (answer, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -2;
+    }
+
+  osip_message_set_content_length (*answer, "0");
+  /*  send message to transaction layer */
+
+  if (code > 100)
+    {
+      i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+    }
+
+  return 0;
+}
+
+int
+_eXosip_answer_invite_2xx (eXosip_call_t * jc, eXosip_dialog_t * jd, int code,
+                           osip_message_t ** answer)
+{
+  int i;
+  osip_transaction_t *tr;
+
+  *answer = NULL;
+  tr = eXosip_find_last_inc_invite (jc, jd);
+
+  if (tr == NULL || tr->orig_request == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer\n"));
+      return -1;
+    }
+
+  if (jd != NULL && jd->d_dialog == NULL)
+    {                           /* element previously removed */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot answer this closed transaction\n"));
+      return -1;
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (answer, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (answer, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -1;
+    }
+
+  /* request that estabish a dialog: */
+  /* 12.1.1 UAS Behavior */
+  {
+    i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+    if (i != 0)
+      goto g2atii_error_1;;     /* ?? */
+  }
+
+  return 0;
+
+g2atii_error_1:
+  osip_message_free (*answer);
+  return -1;
+}
+
+int
+_eXosip_answer_invite_3456xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                              int code, osip_message_t ** answer)
+{
+  int i;
+  osip_transaction_t *tr;
+
+  *answer = NULL;
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  i =
+    _eXosip_build_response_default (answer, jd->d_dialog, code, tr->orig_request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -1;
+    }
+
+  if ((300 <= code) && (code <= 399))
+    {
+      /* Should add contact fields */
+      /* ... */
+    }
+
+  osip_message_set_content_length (*answer, "0");
+  /*  send message to transaction layer */
+
+  return 0;
+}
+
+int
+_eXosip_default_answer_invite_1xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                   int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -2;
+    }
+
+  osip_message_set_content_length (response, "0");
+  /*  send message to transaction layer */
+
+  if (code > 100)
+    {
+      /* request that estabish a dialog: */
+      /* 12.1.1 UAS Behavior */
+      i = complete_answer_that_establish_a_dialog (response, tr->orig_request);
+
+      if (jd == NULL)
+        {
+          i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, response);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot create dialog!\n"));
+          } else
+            {
+              ADD_ELEMENT (jc->c_dialogs, jd);
+            }
+        }
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+
+  return 0;
+}
+
+int
+_eXosip_default_answer_invite_3456xx (eXosip_call_t * jc,
+                                      eXosip_dialog_t * jd, int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  i =
+    _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                    tr->orig_request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -1;
+    }
+
+  osip_message_set_content_length (response, "0");
+  /*  send message to transaction layer */
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+
+int
+_eXosip_insubscription_answer_1xx (eXosip_notify_t * jn, eXosip_dialog_t * jd,
+                                   int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_subscribe (jn, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "ERROR: Could not create response for subscribe\n"));
+      return -1;
+    }
+
+  if (code > 100)
+    {
+      /* request that estabish a dialog: */
+      /* 12.1.1 UAS Behavior */
+      i = complete_answer_that_establish_a_dialog (response, tr->orig_request);
+
+      if (jd == NULL)
+        {
+          i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, response);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot create dialog!\n"));
+            }
+          ADD_ELEMENT (jn->n_dialogs, jd);
+        }
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_insubscription_answer_2xx (eXosip_notify_t * jn, eXosip_dialog_t * jd,
+                                   int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_subscribe (jn, jd);
+
+  if (tr == NULL || tr->orig_request == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer\n"));
+      return -1;
+    }
+
+  if (jd != NULL && jd->d_dialog == NULL)
+    {                           /* element previously removed, this is a no hop! */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot answer this closed transaction\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for subscribe\n"));
+      code = 500;               /* ? which code to use? */
+      return -1;
+    }
+
+  /* request that estabish a dialog: */
+  /* 12.1.1 UAS Behavior */
+  {
+    i = complete_answer_that_establish_a_dialog (response, tr->orig_request);
+    if (i != 0)
+      goto g2atii_error_1;;     /* ?? */
+  }
+
+  /* THIS RESPONSE MUST BE SENT RELIABILY until the final ACK is received !! */
+  /* this response must be stored at the upper layer!!! (it will be destroyed */
+  /* right after being sent! */
+
+  if (jd == NULL)
+    {
+      i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, response);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot create dialog!\n"));
+          return -1;
+        }
+      ADD_ELEMENT (jn->n_dialogs, jd);
+    }
+
+  eXosip_dialog_set_200ok (jd, response);
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+
+  osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+  return 0;
+
+g2atii_error_1:
+  osip_message_free (response);
+  return -1;
+}
+
+int
+_eXosip_insubscription_answer_3456xx (eXosip_notify_t * jn,
+                                      eXosip_dialog_t * jd, int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_subscribe (jn, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for subscribe\n"));
+      return -1;
+    }
+
+  if ((300 <= code) && (code <= 399))
+    {
+      /* Should add contact fields */
+      /* ... */
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXosip2/jsubscribe.c b/libs/eXosip2/eXosip2/jsubscribe.c
new file mode 100644
index 0000000000000000000000000000000000000000..7f58c793673d134522a715dd58bc7fa49642c4ce
--- /dev/null
+++ b/libs/eXosip2/eXosip2/jsubscribe.c
@@ -0,0 +1,150 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+osip_transaction_t *
+eXosip_find_last_out_subscribe (eXosip_subscribe_t * js, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "SUBSCRIBE"))
+            break;
+          else
+            out_tr = NULL;
+          pos++;
+        }
+  } else
+    out_tr = NULL;
+
+  if (out_tr == NULL)
+    return js->s_out_tr;        /* can be NULL */
+
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_inc_notify (eXosip_subscribe_t * js, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "NOTIFY"))
+            return out_tr;
+          pos++;
+        }
+    }
+
+  return NULL;
+}
+
+
+int
+eXosip_subscribe_init (eXosip_subscribe_t ** js)
+{
+  *js = (eXosip_subscribe_t *) osip_malloc (sizeof (eXosip_subscribe_t));
+  if (*js == NULL)
+    return -1;
+  memset (*js, 0, sizeof (eXosip_subscribe_t));
+  return 0;
+}
+
+void
+eXosip_subscribe_free (eXosip_subscribe_t * js)
+{
+  /* ... */
+
+  eXosip_dialog_t *jd;
+
+  for (jd = js->s_dialogs; jd != NULL; jd = js->s_dialogs)
+    {
+      REMOVE_ELEMENT (js->s_dialogs, jd);
+      eXosip_dialog_free (jd);
+    }
+
+  __eXosip_delete_jinfo (js->s_inc_tr);
+  __eXosip_delete_jinfo (js->s_out_tr);
+  if (js->s_inc_tr != NULL)
+    osip_list_add (eXosip.j_transactions, js->s_inc_tr, 0);
+  if (js->s_out_tr != NULL)
+    osip_list_add (eXosip.j_transactions, js->s_out_tr, 0);
+
+  osip_free (js);
+}
+
+int
+_eXosip_subscribe_set_refresh_interval (eXosip_subscribe_t * js,
+                                        osip_message_t * out_subscribe)
+{
+  osip_header_t *exp;
+
+  if (js == NULL || out_subscribe == NULL)
+    return -1;
+
+  osip_message_get_expires (out_subscribe, 0, &exp);
+  if (exp == NULL || exp->hvalue == NULL)
+    js->s_reg_period = 3600;
+  else
+    {
+      js->s_reg_period = osip_atoi (exp->hvalue);
+      if (js->s_reg_period < 0)
+        js->s_reg_period = 3600;
+    }
+
+  return 0;
+}
+
+int
+eXosip_subscribe_need_refresh (eXosip_subscribe_t * js, eXosip_dialog_t * jd,
+                               int now)
+{
+  osip_transaction_t *out_tr = NULL;
+
+  if (jd != NULL)
+    out_tr = osip_list_get (jd->d_out_trs, 0);
+  if (out_tr == NULL)
+    out_tr = js->s_out_tr;
+
+  if (now - out_tr->birth_time > js->s_reg_period - 60)
+    return 0;
+  return -1;
+}
diff --git a/libs/eXosip2/eXosip2/misc.c b/libs/eXosip2/eXosip2/misc.c
new file mode 100644
index 0000000000000000000000000000000000000000..b811c4764d9d8a28effff24848d65addf3877770
--- /dev/null
+++ b/libs/eXosip2/eXosip2/misc.c
@@ -0,0 +1,239 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+
+/* some methods to extract transaction information from a eXosip_call_t */
+
+int
+eXosip_remove_transaction_from_call (osip_transaction_t * tr, eXosip_call_t * jc)
+{
+  osip_transaction_t *inc_tr;
+  osip_transaction_t *out_tr;
+  eXosip_dialog_t *jd;
+  int pos = 0;
+
+  if (jc->c_inc_tr == tr)
+    {
+      jc->c_inc_tr = NULL;      /* can be NULL */
+      return 0;
+    }
+
+  for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+    {
+      pos = 0;
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (inc_tr == tr)
+            {
+              osip_list_remove (jd->d_inc_trs, pos);
+              return 0;
+            }
+          pos++;
+        }
+    }
+
+  if (jc->c_out_tr == tr)
+    {
+      jc->c_out_tr = NULL;      /* can be NULL */
+      return 0;
+    }
+
+  for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+    {
+      pos = 0;
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (out_tr == tr)
+            {
+              osip_list_remove (jd->d_out_trs, pos);
+              return 0;
+            }
+          pos++;
+        }
+    }
+
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                          "eXosip: No information.\n"));
+  return -1;
+}
+
+osip_transaction_t *
+eXosip_find_last_transaction (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                              const char *method)
+{
+  osip_transaction_t *inc_tr;
+  osip_transaction_t *out_tr;
+
+  inc_tr = eXosip_find_last_inc_transaction (jc, jd, method);
+  out_tr = eXosip_find_last_out_transaction (jc, jd, method);
+  if (inc_tr == NULL)
+    return out_tr;
+  if (out_tr == NULL)
+    return inc_tr;
+
+  if (inc_tr->birth_time > out_tr->birth_time)
+    return inc_tr;
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_inc_transaction (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  const char *method)
+{
+  osip_transaction_t *inc_tr;
+  int pos;
+
+  inc_tr = NULL;
+  pos = 0;
+  if (method == NULL || method[0] == '\0')
+    return NULL;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (0 == osip_strcasecmp (inc_tr->cseq->method, method))
+            break;
+          else
+            inc_tr = NULL;
+          pos++;
+        }
+  } else
+    inc_tr = NULL;
+
+  return inc_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_out_transaction (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  const char *method)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd == NULL && jc == NULL)
+    return NULL;
+  if (method == NULL || method[0] == '\0')
+    return NULL;
+
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == osip_strcasecmp (out_tr->cseq->method, method))
+            break;
+          else
+            out_tr = NULL;
+          pos++;
+        }
+    }
+
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_invite (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *inc_tr;
+  osip_transaction_t *out_tr;
+
+  inc_tr = eXosip_find_last_inc_invite (jc, jd);
+  out_tr = eXosip_find_last_out_invite (jc, jd);
+  if (inc_tr == NULL)
+    return out_tr;
+  if (out_tr == NULL)
+    return inc_tr;
+
+  if (inc_tr->birth_time > out_tr->birth_time)
+    return inc_tr;
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_inc_invite (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *inc_tr;
+  int pos;
+
+  inc_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (0 == strcmp (inc_tr->cseq->method, "INVITE"))
+            break;
+          else
+            inc_tr = NULL;
+          pos++;
+        }
+  } else
+    inc_tr = NULL;
+
+  if (inc_tr == NULL)
+    return jc->c_inc_tr;        /* can be NULL */
+
+  return inc_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_out_invite (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd == NULL && jc == NULL)
+    return NULL;
+
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "INVITE"))
+            break;
+          else
+            out_tr = NULL;
+          pos++;
+        }
+    }
+
+  if (out_tr == NULL)
+    return jc->c_out_tr;        /* can be NULL */
+
+  return out_tr;
+}
diff --git a/libs/eXosip2/eXosip2/sdp_offans.c b/libs/eXosip2/eXosip2/sdp_offans.c
new file mode 100644
index 0000000000000000000000000000000000000000..0d30fdcc1935931f3458e1b50a2d5c2f1902b5f0
--- /dev/null
+++ b/libs/eXosip2/eXosip2/sdp_offans.c
@@ -0,0 +1,204 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+sdp_message_t *_eXosip_get_remote_sdp (osip_transaction_t * invite_tr);
+sdp_message_t *_eXosip_get_local_sdp (osip_transaction_t * invite_tr);
+
+
+sdp_message_t *
+eXosip_get_remote_sdp (int jid)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *invite_tr = NULL;
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jc == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return NULL;
+    }
+  invite_tr = eXosip_find_last_invite (jc, jd);
+  if (invite_tr == NULL)
+    return NULL;
+
+  return _eXosip_get_remote_sdp (invite_tr);
+}
+
+sdp_message_t *
+eXosip_get_local_sdp (int jid)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *invite_tr = NULL;
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jc == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return NULL;
+    }
+  invite_tr = eXosip_find_last_invite (jc, jd);
+  if (invite_tr == NULL)
+    return NULL;
+
+  return _eXosip_get_local_sdp (invite_tr);
+}
+
+sdp_message_t *
+_eXosip_get_remote_sdp (osip_transaction_t * invite_tr)
+{
+  osip_message_t *message;
+
+  if (invite_tr == NULL)
+    return NULL;
+  if (invite_tr->ctx_type == IST)
+    message = invite_tr->orig_request;
+  else if (invite_tr->ctx_type == ICT)
+    message = invite_tr->last_response;
+  else
+    return NULL;
+  return eXosip_get_sdp_info (message);
+}
+
+sdp_message_t *
+_eXosip_get_local_sdp (osip_transaction_t * invite_tr)
+{
+  osip_message_t *message;
+
+  if (invite_tr == NULL)
+    return NULL;
+  if (invite_tr->ctx_type == IST)
+    message = invite_tr->last_response;
+  else if (invite_tr->ctx_type == ICT)
+    message = invite_tr->orig_request;
+  else
+    return NULL;
+  return eXosip_get_sdp_info (message);
+}
+
+sdp_message_t *
+eXosip_get_sdp_info (osip_message_t * message)
+{
+  osip_content_type_t *ctt;
+  osip_mime_version_t *mv;
+  sdp_message_t *sdp;
+  osip_body_t *oldbody;
+  int pos;
+
+  if (message == NULL)
+    return NULL;
+
+  /* get content-type info */
+  ctt = osip_message_get_content_type (message);
+  mv = osip_message_get_mime_version (message);
+  if (mv == NULL && ctt == NULL)
+    return NULL;                /* previous message was not correct or empty */
+  if (mv != NULL)
+    {
+      /* look for the SDP body */
+      /* ... */
+  } else if (ctt != NULL)
+    {
+      if (ctt->type == NULL || ctt->subtype == NULL)
+        /* it can be application/sdp or mime... */
+        return NULL;
+      if (osip_strcasecmp (ctt->type, "application") != 0 ||
+          osip_strcasecmp (ctt->subtype, "sdp") != 0)
+        {
+          return NULL;
+        }
+    }
+
+  pos = 0;
+  while (!osip_list_eol (message->bodies, pos))
+    {
+      int i;
+
+      oldbody = (osip_body_t *) osip_list_get (message->bodies, pos);
+      pos++;
+      sdp_message_init (&sdp);
+      i = sdp_message_parse (sdp, oldbody->body);
+      if (i == 0)
+        return sdp;
+      sdp_message_free (sdp);
+      sdp = NULL;
+    }
+  return NULL;
+}
+
+
+sdp_connection_t *
+eXosip_get_audio_connection (sdp_message_t * sdp)
+{
+  int pos = 0;
+  sdp_media_t *med = (sdp_media_t *) osip_list_get (sdp->m_medias, 0);
+
+  while (med != NULL)
+    {
+      if (med->m_media != NULL && osip_strcasecmp (med->m_media, "audio") == 0)
+        break;
+      pos++;
+      med = (sdp_media_t *) osip_list_get (sdp->m_medias, pos);
+    }
+  if (med == NULL)
+    return NULL;                /* no audio stream */
+  if (osip_list_eol (med->c_connections, 0))
+    return sdp->c_connection;
+
+  /* just return the first one... */
+  return (sdp_connection_t *) osip_list_get (med->c_connections, 0);
+}
+
+
+sdp_media_t *
+eXosip_get_audio_media (sdp_message_t * sdp)
+{
+  int pos = 0;
+  sdp_media_t *med = (sdp_media_t *) osip_list_get (sdp->m_medias, 0);
+
+  while (med != NULL)
+    {
+      if (med->m_media != NULL && osip_strcasecmp (med->m_media, "audio") == 0)
+        return med;
+      pos++;
+      med = (sdp_media_t *) osip_list_get (sdp->m_medias, pos);
+    }
+
+  return NULL;
+}
diff --git a/libs/eXosip2/eXosip2/udp.c b/libs/eXosip2/eXosip2/udp.c
new file mode 100644
index 0000000000000000000000000000000000000000..f70b12daa7198fd8ed5d54a2cd75f21d8df05db5
--- /dev/null
+++ b/libs/eXosip2/eXosip2/udp.c
@@ -0,0 +1,2307 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+#ifndef WIN32
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#ifdef __APPLE_CC__
+#include <unistd.h>
+#endif
+#else
+#include <windows.h>
+#endif
+
+extern eXosip_t eXosip;
+extern int ipv6_enable;
+
+/* Private functions */
+static void eXosip_send_default_answer (eXosip_dialog_t * jd,
+                                        osip_transaction_t * transaction,
+                                        osip_event_t * evt,
+                                        int status,
+                                        char *reason_phrase,
+                                        char *warning, int line);
+static void eXosip_process_info (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 osip_transaction_t * transaction,
+                                 osip_event_t * evt);
+static void eXosip_process_options (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                    osip_transaction_t * transaction,
+                                    osip_event_t * evt);
+static void eXosip_process_bye (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                osip_transaction_t * transaction,
+                                osip_event_t * evt);
+static void eXosip_process_refer (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  osip_transaction_t * transaction,
+                                  osip_event_t * evt);
+static void eXosip_process_ack (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                osip_event_t * evt);
+static void eXosip_process_prack (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  osip_transaction_t * transaction,
+                                  osip_event_t * evt);
+static int cancel_match_invite (osip_transaction_t * invite,
+                                osip_message_t * cancel);
+static void eXosip_process_cancel (osip_transaction_t * transaction,
+                                   osip_event_t * evt);
+static osip_event_t *eXosip_process_reinvite (eXosip_call_t * jc,
+                                              eXosip_dialog_t * jd,
+                                              osip_transaction_t *
+                                              transaction, osip_event_t * evt);
+static void eXosip_process_new_options (osip_transaction_t * transaction,
+                                        osip_event_t * evt);
+static void eXosip_process_new_invite (osip_transaction_t * transaction,
+                                       osip_event_t * evt);
+static int eXosip_event_package_is_supported (osip_transaction_t *
+                                              transaction, osip_event_t * evt);
+static void eXosip_process_new_subscribe (osip_transaction_t * transaction,
+                                          osip_event_t * evt);
+static void eXosip_process_subscribe_within_call (eXosip_notify_t * jn,
+                                                  eXosip_dialog_t * jd,
+                                                  osip_transaction_t *
+                                                  transaction, osip_event_t * evt);
+static void eXosip_process_notify_within_dialog (eXosip_subscribe_t * js,
+                                                 eXosip_dialog_t * jd,
+                                                 osip_transaction_t *
+                                                 transaction, osip_event_t * evt);
+static int eXosip_match_notify_for_subscribe (eXosip_subscribe_t * js,
+                                              osip_message_t * notify);
+static void eXosip_process_message_outside_of_dialog (osip_transaction_t * tr,
+						      osip_event_t * evt);
+static void eXosip_process_refer_outside_of_dialog (osip_transaction_t * tr,
+						    osip_event_t * evt);
+static void eXosip_process_message_within_dialog (eXosip_call_t * jc,
+						  eXosip_dialog_t * jd,
+						  osip_transaction_t * transaction,
+						  osip_event_t * evt);
+static void eXosip_process_newrequest (osip_event_t * evt, int socket);
+static void eXosip_process_response_out_of_transaction (osip_event_t * evt);
+static int eXosip_pendingosip_transaction_exist (eXosip_call_t * jc,
+                                                 eXosip_dialog_t * jd);
+static int eXosip_release_finished_calls (eXosip_call_t * jc,
+                                          eXosip_dialog_t * jd);
+static int eXosip_release_aborted_calls (eXosip_call_t * jc, eXosip_dialog_t * jd);
+
+
+static void
+eXosip_send_default_answer (eXosip_dialog_t * jd,
+                            osip_transaction_t * transaction,
+                            osip_event_t * evt,
+                            int status,
+                            char *reason_phrase, char *warning, int line)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  /* osip_list_add(eXosip.j_transactions, transaction, 0); */
+  osip_transaction_set_your_instance (transaction, NULL);
+
+  /* THIS METHOD DOES NOT ACCEPT STATUS CODE BETWEEN 101 and 299 */
+  if (status > 100 && status < 299 && MSG_IS_INVITE (evt->sip))
+    return;
+
+  if (jd != NULL)
+    i = _eXosip_build_response_default (&answer, jd->d_dialog, status, evt->sip);
+  else
+    i = _eXosip_build_response_default (&answer, NULL, status, evt->sip);
+
+  if (i != 0 || answer == NULL)
+    {
+      return;
+    }
+
+  if (reason_phrase != NULL)
+    {
+      char *_reason;
+
+      _reason = osip_message_get_reason_phrase (answer);
+      if (_reason != NULL)
+        osip_free (_reason);
+      _reason = osip_strdup (reason_phrase);
+      osip_message_set_reason_phrase (answer, _reason);
+    }
+
+  osip_message_set_content_length (answer, "0");
+
+  if (status == 500)
+    osip_message_set_retry_after (answer, "10");
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+
+}
+
+static void
+eXosip_process_options (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                        osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_info (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                     osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  __eXosip_wakeup ();
+}
+
+
+static void
+eXosip_process_bye (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                    osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, NULL /*jd */ ,
+                                                          NULL, NULL));
+
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      return;
+    }
+  osip_message_set_content_length (answer, "0");
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  /* Release the eXosip_dialog */
+  osip_dialog_free (jd->d_dialog);
+  jd->d_dialog = NULL;
+  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, transaction);
+  eXosip_update(); /* AMD 30/09/05 */
+
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_refer (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                      osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_header_t *referto_head = NULL;
+  osip_contact_t *referto;
+  int i;
+
+  /* check if the refer is valid */
+  osip_message_header_get_byname (evt->sip, "refer-to", 0, &referto_head);
+  if (referto_head == NULL || referto_head->hvalue == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400,
+                                  "Missing Refer-To header",
+                                  "Missing Refer-To header", __LINE__);
+      return;
+    }
+  /* check if refer-to is well-formed */
+  osip_contact_init (&referto);
+  i = osip_contact_parse (referto, referto_head->hvalue);
+  if (i != 0)
+    {
+      osip_contact_free (referto);
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400,
+                                  "Non valid Refer-To header",
+                                  "Non valid Refer-To header", __LINE__);
+      return;
+    }
+
+  osip_contact_free (referto);
+
+  /* check policy so we can decline immediatly the refer */
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_notify_for_refer (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 osip_transaction_t * transaction,
+                                 osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+  osip_transaction_t *ref;
+  osip_header_t *event_hdr;
+  osip_header_t *sub_state;
+  osip_content_type_t *ctype;
+  osip_body_t *body = NULL;
+
+  /* get the event type and return "489 Bad Event". */
+  osip_message_header_get_byname (evt->sip, "event", 0, &event_hdr);
+  if (event_hdr == NULL || event_hdr->hvalue == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400,
+                                  "Missing Event header in Notify",
+                                  "Missing Event header in Notify", __LINE__);
+      return;
+    }
+  if (NULL==strstr(event_hdr->hvalue, "refer"))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 501,
+                                  "Unsupported Event header",
+                                  "Unsupported Event header in Notify", __LINE__);
+      return;
+    }
+  osip_message_header_get_byname (evt->sip, "subscription-state", 0, &sub_state);
+  if (sub_state == NULL || sub_state->hvalue == NULL)
+    {
+#ifndef CISCO_BUG
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, "Missing Header",
+                                  "Missing subscription-state Header", __LINE__);
+      return;
+#else
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                   "eXosip: Missing subscription-state Header (cisco 7960 bug)\n"));
+#endif
+    }
+
+  ctype = osip_message_get_content_type (evt->sip);
+  if (ctype == NULL || ctype->type == NULL || ctype->subtype == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, "Missing Header",
+                                  "Missing Content-Type Header", __LINE__);
+      return;
+    }
+  if (0 != osip_strcasecmp (ctype->type, "message")
+      || 0 != osip_strcasecmp (ctype->subtype, "sipfrag"))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 501,
+                                  "Unsupported body type",
+                                  "Unsupported body type", __LINE__);
+      return;
+    }
+
+  osip_message_get_body (evt->sip, 0, &body);
+  if (body == NULL || body->body == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, "Missing Body",
+                                  "Missing Body", __LINE__);
+      return;
+    }
+
+#if 0
+  report_call_event (EXOSIP_CALL_REFER_STATUS, jc, jd, transaction);
+#endif
+
+  /* check if a refer was sent previously! */
+  ref = eXosip_find_last_out_transaction (jc, jd, "REFER");
+  if (ref == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 481, NULL,
+                                  "No associated refer", __LINE__);
+      return;
+    }
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  /* for now, send default response of 200ok.  eventually, application should
+     be deciding how to answer NOTIFY messages */
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      return;
+    }
+
+  i = complete_answer_that_establish_a_dialog (answer, evt->sip);
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_ack (eXosip_call_t * jc, eXosip_dialog_t * jd, osip_event_t * evt)
+{
+  /* TODO: We should find the matching transaction for this ACK
+     and also add the ACK in the event. */
+  eXosip_event_t *je;
+  int i;
+
+  je = eXosip_event_init_for_call (EXOSIP_CALL_ACK, jc, jd, NULL);
+  if (je!=NULL)
+    {
+      i = osip_message_clone (evt->sip, &je->ack);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone ACK for event\n"));
+        }
+      else
+	report_event (je, NULL);
+    }
+
+  osip_event_free (evt);
+}
+
+static void
+eXosip_process_prack (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                      osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      return;
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+}
+
+static int
+cancel_match_invite (osip_transaction_t * invite, osip_message_t * cancel)
+{
+  osip_generic_param_t *br;
+  osip_generic_param_t *br2;
+  osip_via_t *via;
+
+  osip_via_param_get_byname (invite->topvia, "branch", &br);
+  via = osip_list_get (cancel->vias, 0);
+  if (via == NULL)
+    return -1;                  /* request without via??? */
+  osip_via_param_get_byname (via, "branch", &br2);
+  if (br != NULL && br2 == NULL)
+    return -1;
+  if (br2 != NULL && br == NULL)
+    return -1;
+  if (br2 != NULL && br != NULL)        /* compliant UA  :) */
+    {
+      if (br->gvalue != NULL && br2->gvalue != NULL &&
+          0 == strcmp (br->gvalue, br2->gvalue))
+        return 0;
+      return -1;
+    }
+  /* old backward compatibility mechanism */
+  if (0 != osip_call_id_match (invite->callid, cancel->call_id))
+    return -1;
+  if (0 != osip_to_tag_match (invite->to, cancel->to))
+    return -1;
+  if (0 != osip_from_tag_match (invite->from, cancel->from))
+    return -1;
+  if (0 != osip_via_match (invite->topvia, via))
+    return -1;
+  return 0;
+}
+
+static void
+eXosip_process_cancel (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_transaction_t *tr;
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  eXosip_call_t *jc;
+  eXosip_dialog_t *jd;
+
+  tr = NULL;
+  jd = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      if (jc->c_inc_tr != NULL)
+        {
+          i = cancel_match_invite (jc->c_inc_tr, evt->sip);
+          if (i == 0)
+            {
+              tr = jc->c_inc_tr;
+	      /* fixed */
+	      if (jc->c_dialogs!=NULL)
+		jd = jc->c_dialogs;
+              break;
+            }
+        }
+      tr = NULL;
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          int pos = 0;
+
+          while (!osip_list_eol (jd->d_inc_trs, pos))
+            {
+              tr = osip_list_get (jd->d_inc_trs, pos);
+              i = cancel_match_invite (tr, evt->sip);
+              if (i == 0)
+                break;
+              tr = NULL;
+              pos++;
+            }
+        }
+      if (jd != NULL)
+        break;                  /* tr has just been found! */
+    }
+
+  if (tr == NULL)               /* we didn't found the transaction to cancel */
+    {
+      i = _eXosip_build_response_default (&answer, NULL, 481, evt->sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot cancel transaction.\n"));
+          osip_list_add (eXosip.j_transactions, tr, 0);
+          osip_transaction_set_your_instance (tr, NULL);
+          return;
+        }
+      osip_message_set_content_length (answer, "0");
+      evt_answer = osip_new_outgoing_sipmessage (answer);
+      evt_answer->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, evt_answer);
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      __eXosip_wakeup ();
+      return;
+    }
+
+  if (tr->state == IST_TERMINATED || tr->state == IST_CONFIRMED
+      || tr->state == IST_COMPLETED)
+    {
+      /* I can't find the status code in the rfc?
+         (I read I must answer 200? wich I found strange)
+         I probably misunderstood it... and prefer to send 481
+         as the transaction has been answered. */
+      if (jd == NULL)
+        i = _eXosip_build_response_default (&answer, NULL, 481, evt->sip);
+      else
+        i = _eXosip_build_response_default (&answer, jd->d_dialog, 481, evt->sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot cancel transaction.\n"));
+          osip_list_add (eXosip.j_transactions, tr, 0);
+          osip_transaction_set_your_instance (tr, NULL);
+          return;
+        }
+      osip_message_set_content_length (answer, "0");
+      evt_answer = osip_new_outgoing_sipmessage (answer);
+      evt_answer->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, evt_answer);
+
+      if (jd != NULL)
+        osip_list_add (jd->d_inc_trs, transaction, 0);
+      else
+        osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      __eXosip_wakeup ();
+
+      return;
+    }
+
+  {
+    if (jd == NULL)
+      i = _eXosip_build_response_default (&answer, NULL, 200, evt->sip);
+    else
+      i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+    if (i != 0)
+      {
+        OSIP_TRACE (osip_trace
+                    (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                     "eXosip: cannot cancel transaction.\n"));
+        osip_list_add (eXosip.j_transactions, tr, 0);
+        osip_transaction_set_your_instance (tr, NULL);
+        return;
+      }
+    osip_message_set_content_length (answer, "0");
+    evt_answer = osip_new_outgoing_sipmessage (answer);
+    evt_answer->transactionid = transaction->transactionid;
+    osip_transaction_add_event (transaction, evt_answer);
+    __eXosip_wakeup ();
+
+    if (jd != NULL)
+      osip_list_add (jd->d_inc_trs, transaction, 0);
+    else
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+    osip_transaction_set_your_instance (transaction, NULL);
+
+    /* answer transaction to cancel */
+    if (jd == NULL)
+      i = _eXosip_build_response_default (&answer, NULL, 487, tr->orig_request);
+    else
+      i = _eXosip_build_response_default (&answer, jd->d_dialog, 487,
+                                          tr->orig_request);
+    if (i != 0)
+      {
+        OSIP_TRACE (osip_trace
+                    (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                     "eXosip: cannot cancel transaction.\n"));
+        osip_list_add (eXosip.j_transactions, tr, 0);
+        osip_transaction_set_your_instance (tr, NULL);
+        return;
+      }
+    osip_message_set_content_length (answer, "0");
+    evt_answer = osip_new_outgoing_sipmessage (answer);
+    evt_answer->transactionid = tr->transactionid;
+    osip_transaction_add_event (tr, evt_answer);
+    __eXosip_wakeup ();
+  }
+}
+
+static osip_event_t *
+eXosip_process_reinvite (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                         osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_message_t *answer;
+  osip_event_t *sipevent;
+  int i;
+
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 100, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 500,
+                                  "Internal SIP Error",
+                                  "Failed to build Answer for INVITE within call",
+                                  __LINE__);
+      return NULL;
+    }
+
+  complete_answer_that_establish_a_dialog (answer, evt->sip);
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  sipevent = osip_new_outgoing_sipmessage (answer);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  osip_ist_execute (eXosip.j_osip);
+
+  report_call_event (EXOSIP_CALL_REINVITE, jc, jd, transaction);
+  return sipevent;
+}
+
+static void
+eXosip_process_new_options (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+  __eXosip_wakeup ();           /* needed? */
+}
+
+static void
+eXosip_process_new_invite (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  int i;
+  eXosip_call_t *jc;
+  eXosip_dialog_t *jd;
+  osip_message_t *answer;
+
+  eXosip_call_init (&jc);
+
+  ADD_ELEMENT (eXosip.j_calls, jc);
+
+  i = _eXosip_build_response_default (&answer, NULL, 101, evt->sip);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot create dialog."));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for invite\n"));
+      return;
+    }
+  osip_message_set_content_length (answer, "0");
+  i = complete_answer_that_establish_a_dialog (answer, evt->sip);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot complete answer!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      osip_message_free (answer);
+      return;
+    }
+
+  i = eXosip_dialog_init_as_uas (&jd, evt->sip, answer);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot create dialog!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      osip_message_free (answer);
+      return;
+    }
+  ADD_ELEMENT (jc->c_dialogs, jd);
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  eXosip_update ();
+  jc->c_inc_tr = transaction;
+  osip_transaction_add_event (transaction, evt_answer);
+
+  /* be sure the invite will be processed
+     before any API call on this dialog */
+  osip_ist_execute (eXosip.j_osip);
+
+  if (transaction->orig_request != NULL)
+    {
+      report_call_event (EXOSIP_CALL_INVITE, jc, jd, transaction);
+    }
+
+  __eXosip_wakeup ();
+
+}
+
+static int
+eXosip_event_package_is_supported (osip_transaction_t * transaction,
+                                   osip_event_t * evt)
+{
+  osip_header_t *event_hdr;
+  int code;
+
+  /* get the event type and return "489 Bad Event". */
+  osip_message_header_get_byname (evt->sip, "event", 0, &event_hdr);
+  if (event_hdr == NULL || event_hdr->hvalue == NULL)
+    {
+#ifdef SUPPORT_MSN
+      /* msn don't show any event header */
+      code = 200;               /* Bad Request... anyway... */
+#else
+      code = 400;               /* Bad Request */
+#endif
+  } else if (0 != osip_strcasecmp (event_hdr->hvalue, "presence"))
+    code = 489;
+  else
+    code = 200;
+  if (code != 200)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (NULL, transaction, evt, code, NULL, NULL,
+                                  __LINE__);
+      return 0;
+    }
+  return -1;
+}
+
+static void
+eXosip_process_new_subscribe (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  eXosip_notify_t *jn;
+  eXosip_dialog_t *jd;
+  osip_message_t *answer;
+  int i;
+
+  eXosip_notify_init (&jn, evt->sip);
+  _eXosip_notify_set_refresh_interval (jn, evt->sip);
+
+  i = _eXosip_build_response_default (&answer, NULL, 101, evt->sip);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for invite\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_notify_free (jn);
+      return;
+    }
+  i = complete_answer_that_establish_a_dialog (answer, evt->sip);
+  if (i != 0)
+    {
+      osip_message_free (answer);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot complete answer!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_notify_free (jn);
+      return;
+    }
+
+  i = eXosip_dialog_init_as_uas (&jd, evt->sip, answer);
+  if (i != 0)
+    {
+      osip_message_free (answer);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot create dialog!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_notify_free (jn);
+      return;
+    }
+  ADD_ELEMENT (jn->n_dialogs, jd);
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, NULL, jn));
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+  osip_transaction_add_event (transaction, evt_answer);
+
+  ADD_ELEMENT (eXosip.j_notifies, jn);
+  __eXosip_wakeup ();
+
+  jn->n_inc_tr = transaction;
+
+  eXosip_update ();
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_subscribe_within_call (eXosip_notify_t * jn,
+                                      eXosip_dialog_t * jd,
+                                      osip_transaction_t * transaction,
+                                      osip_event_t * evt)
+{
+  _eXosip_notify_set_refresh_interval (jn, evt->sip);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, NULL, jn));
+
+  /* if subscribe request contains expires="0", close the subscription */
+  {
+    int now = time (NULL);
+
+    if (jn->n_ss_expires - now <= 0)
+      {
+        jn->n_ss_status = EXOSIP_SUBCRSTATE_TERMINATED;
+        jn->n_ss_reason = TIMEOUT;
+      }
+  }
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  __eXosip_wakeup ();
+  return;
+}
+
+static void
+eXosip_process_notify_within_dialog (eXosip_subscribe_t * js,
+                                     eXosip_dialog_t * jd,
+                                     osip_transaction_t * transaction,
+                                     osip_event_t * evt)
+{
+  osip_message_t *answer;
+  osip_event_t *sipevent;
+  osip_header_t *sub_state;
+
+#ifdef SUPPORT_MSN
+  osip_header_t *expires;
+#endif
+  int i;
+
+  if (jd == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 500,
+                                  "Internal SIP Error",
+                                  "No dialog for this NOTIFY", __LINE__);
+      return;
+    }
+
+  /* if subscription-state has a reason state set to terminated,
+     we close the dialog */
+#ifndef SUPPORT_MSN
+  osip_message_header_get_byname (evt->sip, "subscription-state", 0, &sub_state);
+  if (sub_state == NULL || sub_state->hvalue == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, NULL, NULL, __LINE__);
+      return;
+    }
+#endif
+
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 500,
+                                  "Internal SIP Error",
+                                  "Failed to build Answer for NOTIFY", __LINE__);
+      return;
+    }
+#ifdef SUPPORT_MSN
+  osip_message_header_get_byname (evt->sip, "expires", 0, &expires);
+  if (expires != NULL && expires->hvalue != NULL
+      && 0 == osip_strcasecmp (expires->hvalue, "0"))
+    {
+      /* delete the dialog! */
+      js->s_ss_status = EXOSIP_SUBCRSTATE_TERMINATED;
+      {
+        eXosip_event_t *je;
+
+        je = eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_NOTIFY, js, jd);
+        eXosip_event_add (je);
+      }
+
+      sipevent = osip_new_outgoing_sipmessage (answer);
+      sipevent->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, sipevent);
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+      __eXosip_wakeup ();
+
+      return;
+  } else
+    {
+      osip_transaction_set_your_instance (transaction,
+                                          __eXosip_new_jinfo (NULL, jd, js, NULL));
+      js->s_ss_status = EXOSIP_SUBCRSTATE_ACTIVE;
+    }
+#else
+  /* modify the status of user */
+  if (0 == osip_strncasecmp (sub_state->hvalue, "active", 6))
+    {
+      js->s_ss_status = EXOSIP_SUBCRSTATE_ACTIVE;
+  } else if (0 == osip_strncasecmp (sub_state->hvalue, "pending", 7))
+    {
+      js->s_ss_status = EXOSIP_SUBCRSTATE_PENDING;
+    }
+
+  if (0 == osip_strncasecmp (sub_state->hvalue, "terminated", 10))
+    {
+      /* delete the dialog! */
+      js->s_ss_status = EXOSIP_SUBCRSTATE_TERMINATED;
+
+      {
+        eXosip_event_t *je;
+
+        je =
+          eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_NOTIFY, js, jd,
+                                           transaction);
+        eXosip_event_add (je);
+      }
+
+      sipevent = osip_new_outgoing_sipmessage (answer);
+      sipevent->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, sipevent);
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+      __eXosip_wakeup ();
+      return;
+  } else
+    {
+      osip_transaction_set_your_instance (transaction,
+                                          __eXosip_new_jinfo (NULL, jd, js, NULL));
+    }
+#endif
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (answer);
+  sipevent->transactionid = transaction->transactionid;
+  osip_transaction_add_event (transaction, sipevent);
+
+  __eXosip_wakeup ();
+  return;
+}
+
+static int
+eXosip_match_notify_for_subscribe (eXosip_subscribe_t * js,
+                                   osip_message_t * notify)
+{
+  osip_transaction_t *out_sub;
+
+  if (js == NULL)
+    return -1;
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                          "Trying to match notify with subscribe\n"));
+
+  out_sub = eXosip_find_last_out_subscribe (js, NULL);
+  if (out_sub == NULL || out_sub->orig_request == NULL)
+    return -1;
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                          "subscribe transaction found\n"));
+
+  /* some checks to avoid crashing on bad requests */
+  if (notify == NULL || notify->cseq == NULL
+      || notify->cseq->method == NULL || notify->to == NULL)
+    return -1;
+
+  if (0 != osip_call_id_match (out_sub->callid, notify->call_id))
+    return -1;
+
+  {
+    /* The From tag of outgoing request must match
+       the To tag of incoming notify:
+     */
+    osip_generic_param_t *tag_from;
+    osip_generic_param_t *tag_to;
+
+    osip_from_param_get_byname (out_sub->from, "tag", &tag_from);
+    osip_from_param_get_byname (notify->to, "tag", &tag_to);
+    if (tag_to == NULL || tag_to->gvalue == NULL)
+      {
+        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                "Uncompliant user agent: no tag in from of outgoing request\n"));
+        return -1;
+      }
+    if (tag_from == NULL || tag_to->gvalue == NULL)
+      {
+        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                "Uncompliant user agent: no tag in to of incoming request\n"));
+        return -1;
+      }
+
+    if (0 != strcmp (tag_from->gvalue, tag_to->gvalue))
+      return -1;
+  }
+
+  return 0;
+}
+
+static void
+eXosip_process_message_outside_of_dialog (osip_transaction_t * transaction,
+                                          osip_event_t * evt)
+{
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+  __eXosip_wakeup ();           /* needed? */
+  return;
+}
+
+static void
+eXosip_process_refer_outside_of_dialog (osip_transaction_t * transaction,
+					osip_event_t * evt)
+{
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+  __eXosip_wakeup ();           /* needed? */
+  return;
+}
+
+static void
+eXosip_process_message_within_dialog (eXosip_call_t * jc,
+				      eXosip_dialog_t * jd,
+				      osip_transaction_t * transaction,
+				      osip_event_t * evt)
+{
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  __eXosip_wakeup ();
+  return;
+}
+
+
+static void
+eXosip_process_newrequest (osip_event_t * evt, int socket)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+  int ctx_type;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  eXosip_dialog_t *jd;
+
+  if (MSG_IS_INVITE (evt->sip))
+    {
+      ctx_type = IST;
+  } else if (MSG_IS_ACK (evt->sip))
+    {                           /* this should be a ACK for 2xx (but could be a late ACK!) */
+      ctx_type = -1;
+  } else if (MSG_IS_REQUEST (evt->sip))
+    {
+      ctx_type = NIST;
+  } else
+    {                           /* We should handle late response and 200 OK before coming here. */
+      ctx_type = -1;
+      osip_event_free (evt);
+      return;
+    }
+
+  transaction = NULL;
+  if (ctx_type != -1)
+    {
+      i = osip_transaction_init (&transaction,
+                                 (osip_fsm_type_t) ctx_type,
+                                 eXosip.j_osip, evt->sip);
+      if (i != 0)
+        {
+          osip_event_free (evt);
+          return;
+        }
+
+      osip_transaction_set_in_socket(transaction, socket);
+      osip_transaction_set_out_socket(transaction, socket);
+
+      evt->transactionid = transaction->transactionid;
+      osip_transaction_set_your_instance (transaction, NULL);
+
+      osip_transaction_add_event (transaction, evt);
+      if (ctx_type == IST)
+        {
+          i = _eXosip_build_response_default (&answer, NULL, 100, evt->sip);
+          if (i != 0)
+            {
+              __eXosip_delete_jinfo (transaction);
+              osip_transaction_free (transaction);
+              return;
+            }
+
+          osip_message_set_content_length (answer, "0");
+          /*  send message to transaction layer */
+
+          evt_answer = osip_new_outgoing_sipmessage (answer);
+          evt_answer->transactionid = transaction->transactionid;
+
+          /* add the REQUEST & the 100 Trying */
+          osip_transaction_add_event (transaction, evt_answer);
+          __eXosip_wakeup ();
+        }
+    }
+
+  if (MSG_IS_CANCEL (evt->sip))
+    {
+      /* special handling for CANCEL */
+      /* in the new spec, if the CANCEL has a Via branch, then it
+         is the same as the one in the original INVITE */
+      eXosip_process_cancel (transaction, evt);
+      return;
+    }
+
+  jd = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)
+            {
+              if (osip_dialog_match_as_uas (jd->d_dialog, evt->sip) == 0)
+                break;
+            }
+        }
+      if (jd != NULL)
+        break;
+    }
+
+
+  if (jd != NULL)
+    {
+      osip_transaction_t *old_trn;
+
+      /* it can be:
+         1: a new INVITE offer.
+         2: a REFER request from one of the party.
+         2: a BYE request from one of the party.
+         3: a REQUEST with a wrong CSeq.
+         4: a NOT-SUPPORTED method with a wrong CSeq.
+       */
+
+      if (!MSG_IS_BYE (evt->sip))
+        {
+          /* reject all requests for a closed dialog */
+          old_trn = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+          if (old_trn == NULL)
+            old_trn = eXosip_find_last_out_transaction (jc, jd, "BYE");
+
+          if (old_trn != NULL)
+            {
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 481, NULL,
+                                          NULL, __LINE__);
+              return;
+            }
+        }
+
+      if (MSG_IS_INVITE (evt->sip))
+        {
+          /* the previous transaction MUST be freed */
+          old_trn = eXosip_find_last_inc_invite (jc, jd);
+
+          if (old_trn != NULL && old_trn->state != IST_TERMINATED)
+            {
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Retry Later",
+                                          "An INVITE is not terminated", __LINE__);
+              return;
+            }
+
+          old_trn = eXosip_find_last_out_invite (jc, jd);
+          if (old_trn != NULL && old_trn->state != ICT_TERMINATED)
+            {
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 491, NULL,
+                                          NULL, __LINE__);
+              return;
+            }
+
+          osip_dialog_update_osip_cseq_as_uas (jd->d_dialog, evt->sip);
+          osip_dialog_update_route_set_as_uas (jd->d_dialog, evt->sip);
+
+          eXosip_process_reinvite (jc, jd, transaction, evt);
+      } else if (MSG_IS_BYE (evt->sip))
+        {
+          old_trn = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+
+          if (old_trn != NULL)  /* && old_trn->state!=NIST_TERMINATED) */
+            {                   /* this situation should NEVER occur?? (we can't receive
+                                   two different BYE for one call! */
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Call Already Terminated",
+                                          "A pending BYE has already terminate this call",
+                                          __LINE__);
+              return;
+            }
+          /* osip_transaction_free(old_trn); */
+          eXosip_process_bye (jc, jd, transaction, evt);
+      } else if (MSG_IS_ACK (evt->sip))
+        {
+          eXosip_process_ack (jc, jd, evt);
+      } else if (MSG_IS_REFER (evt->sip))
+        {
+          eXosip_process_refer (jc, jd, transaction, evt);
+      } else if (MSG_IS_OPTIONS (evt->sip))
+        {
+          eXosip_process_options (jc, jd, transaction, evt);
+      } else if (MSG_IS_INFO (evt->sip))
+        {
+          eXosip_process_info (jc, jd, transaction, evt);
+      } else if (MSG_IS_NOTIFY (evt->sip))
+        {
+          eXosip_process_notify_for_refer (jc, jd, transaction, evt);
+      } else if (MSG_IS_PRACK (evt->sip))
+        {
+          eXosip_process_prack (jc, jd, transaction, evt);
+      } else if (MSG_IS_MESSAGE (evt->sip))
+        {
+          eXosip_process_message_within_dialog (jc, jd, transaction, evt);
+      } else if (MSG_IS_SUBSCRIBE (evt->sip))
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 489, NULL,
+                                      "Bad Event", __LINE__);
+      } else
+        {
+#if 0
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 405, NULL,
+                                      "Method Not Allowed", __LINE__);
+#else
+	  eXosip_process_message_within_dialog (jc, jd, transaction, evt);
+#endif
+        }
+      return;
+    }
+
+  if (MSG_IS_ACK (evt->sip))
+    {
+      /* no transaction has been found for this ACK! */
+      osip_event_free (evt);
+      return;
+    }
+
+  if (MSG_IS_INFO (evt->sip))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 481, NULL, NULL, __LINE__);
+      return;                   /* fixed */
+    }
+  if (MSG_IS_OPTIONS (evt->sip))
+    {
+      eXosip_process_new_options (transaction, evt);
+      return;
+  } else if (MSG_IS_INVITE (evt->sip))
+    {
+      eXosip_process_new_invite (transaction, evt);
+      return;
+  } else if (MSG_IS_BYE (evt->sip))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 481, NULL, NULL, __LINE__);
+      return;
+    }
+
+  js = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+    {
+      for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)
+            {
+              if (osip_dialog_match_as_uas (jd->d_dialog, evt->sip) == 0)
+                break;
+            }
+        }
+      if (jd != NULL)
+        break;
+    }
+
+  if (js != NULL)
+    {
+      /* dialog found */
+      osip_transaction_t *old_trn;
+
+      /* it can be:
+         1: a new INVITE offer.
+         2: a REFER request from one of the party.
+         2: a BYE request from one of the party.
+         3: a REQUEST with a wrong CSeq.
+         4: a NOT-SUPPORTED method with a wrong CSeq.
+       */
+      if (MSG_IS_MESSAGE (evt->sip))
+        {
+          /* eXosip_process_imessage_within_subscribe_dialog(transaction, evt); */
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt,
+                                      SIP_NOT_IMPLEMENTED, NULL,
+                                      "MESSAGEs within dialogs are not implemented.",
+                                      __LINE__);
+          return;
+      } else if (MSG_IS_NOTIFY (evt->sip))
+        {
+          /* the previous transaction MUST be freed */
+          old_trn = eXosip_find_last_inc_notify (js, jd);
+
+          /* shouldn't we wait for the COMPLETED state? */
+          if (old_trn != NULL && old_trn->state != NIST_TERMINATED)
+            {
+              /* retry later? */
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Retry Later",
+                                          "A pending NOTIFY is not terminated",
+                                          __LINE__);
+              return;
+            }
+
+          osip_dialog_update_osip_cseq_as_uas (jd->d_dialog, evt->sip);
+          osip_dialog_update_route_set_as_uas (jd->d_dialog, evt->sip);
+
+          eXosip_process_notify_within_dialog (js, jd, transaction, evt);
+      } else
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 501, NULL,
+                                      "Just Not Implemented", __LINE__);
+        }
+      return;
+    }
+
+  if (MSG_IS_NOTIFY (evt->sip))
+    {
+      /* let's try to check if the NOTIFY is related to an existing
+         subscribe */
+      js = NULL;
+      /* first, look for a Dialog in the map of element */
+      for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+        {
+          if (eXosip_match_notify_for_subscribe (js, evt->sip) == 0)
+            {
+              i = eXosip_dialog_init_as_uac (&jd, evt->sip);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: cannot establish a dialog\n"));
+                  return;
+                }
+
+              /* update local cseq from subscribe request */
+              if (js->s_out_tr != NULL && js->s_out_tr->cseq != NULL
+                  && js->s_out_tr->cseq->number != NULL)
+                {
+                  jd->d_dialog->local_cseq = atoi (js->s_out_tr->cseq->number);
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                               "eXosip: local cseq has been updated\n"));
+                }
+
+              ADD_ELEMENT (js->s_dialogs, jd);
+              eXosip_update ();
+
+              eXosip_process_notify_within_dialog (js, jd, transaction, evt);
+              return;
+            }
+        }
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (NULL, transaction, evt, 481, NULL, NULL,
+                                  __LINE__);
+      return;
+    }
+
+  jn = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (jn = eXosip.j_notifies; jn != NULL; jn = jn->next)
+    {
+      for (jd = jn->n_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)
+            {
+              if (osip_dialog_match_as_uas (jd->d_dialog, evt->sip) == 0)
+                break;
+            }
+        }
+      if (jd != NULL)
+        break;
+    }
+
+  if (jn != NULL)
+    {
+      /* dialog found */
+      osip_transaction_t *old_trn;
+
+      /* it can be:
+         1: a new INVITE offer.
+         2: a REFER request from one of the party.
+         2: a BYE request from one of the party.
+         3: a REQUEST with a wrong CSeq.
+         4: a NOT-SUPPORTED method with a wrong CSeq.
+       */
+      if (MSG_IS_MESSAGE (evt->sip))
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt,
+                                      SIP_NOT_IMPLEMENTED, NULL,
+                                      "MESSAGEs within dialogs are not implemented.",
+                                      __LINE__);
+          return;
+      } else if (MSG_IS_SUBSCRIBE (evt->sip))
+        {
+          /* the previous transaction MUST be freed */
+          old_trn = eXosip_find_last_inc_subscribe (jn, jd);
+
+          /* shouldn't we wait for the COMPLETED state? */
+          if (old_trn != NULL && old_trn->state != NIST_TERMINATED
+              && old_trn->state != NIST_COMPLETED)
+            {
+              /* retry later? */
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Retry Later",
+                                          "A SUBSCRIBE is not terminated",
+                                          __LINE__);
+              return;
+            }
+
+          osip_dialog_update_osip_cseq_as_uas (jd->d_dialog, evt->sip);
+          osip_dialog_update_route_set_as_uas (jd->d_dialog, evt->sip);
+
+          eXosip_process_subscribe_within_call (jn, jd, transaction, evt);
+      } else
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 501, NULL, NULL,
+                                      __LINE__);
+        }
+      return;
+    }
+
+  if (MSG_IS_MESSAGE (evt->sip))
+    {
+      eXosip_process_message_outside_of_dialog (transaction, evt);
+      return;
+    }
+
+  if (MSG_IS_REFER (evt->sip))
+    {
+      eXosip_process_refer_outside_of_dialog (transaction, evt);
+      return;
+    }
+
+  if (MSG_IS_SUBSCRIBE (evt->sip))
+    {
+
+      if (0 == eXosip_event_package_is_supported (transaction, evt))
+        {
+          return;
+        }
+      eXosip_process_new_subscribe (transaction, evt);
+      return;
+    }
+
+  /* default answer */
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+#if 0
+  eXosip_send_default_answer (NULL, transaction, evt, 501, NULL, NULL, __LINE__);
+#endif
+}
+
+static void
+eXosip_process_response_out_of_transaction (osip_event_t * evt)
+{
+  osip_event_free (evt);
+}
+
+static int _eXosip_handle_incoming_message(char *buf, size_t len, int socket,
+					   char *host, int port);
+
+static int _eXosip_handle_incoming_message(char *buf, size_t len, int socket,
+					   char *host, int port)
+{
+  osip_transaction_t *transaction = NULL;
+  osip_event_t *sipevent;
+  int i;
+
+  sipevent = osip_parse (buf, len);
+  transaction = NULL;
+  if (sipevent != NULL && sipevent->sip != NULL)
+    {
+    }
+  else
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "Could not parse SIP message\n"));
+      osip_event_free (sipevent);
+      return -1;
+    }
+
+  OSIP_TRACE (osip_trace
+	      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+	       "Message received from: %s:%i\n",
+	       host, port));
+  
+  osip_message_fix_last_via_header (sipevent->sip,
+				    host,
+				    port);
+  
+  i = osip_find_transaction_and_add_event (eXosip.j_osip, sipevent);
+  if (i != 0)
+    {
+      /* this event has no transaction, */
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+		   "This is a request\n", buf));
+      eXosip_lock ();
+      if (MSG_IS_REQUEST (sipevent->sip))
+	eXosip_process_newrequest (sipevent, socket);
+      else if (MSG_IS_RESPONSE (sipevent->sip))
+	eXosip_process_response_out_of_transaction (sipevent);
+      eXosip_unlock ();
+    }
+  else
+    {
+      /* handled by oSIP ! */
+      return 0;
+    }
+  return 0;
+}
+
+#if defined (WIN32) || defined (_WIN32_WCE)
+#define eXFD_SET(A, B)   FD_SET((unsigned int) A, B)
+#else
+#define eXFD_SET(A, B)   FD_SET(A, B)
+#endif
+
+/* if second==-1 && useconds==-1  -> wait for ever
+   if max_message_nb<=0  -> infinite loop....  */
+int
+eXosip_read_message (int max_message_nb, int sec_max, int usec_max)
+{
+  fd_set osip_fdset;
+  struct timeval tv;
+  char *buf;
+
+  tv.tv_sec = sec_max;
+  tv.tv_usec = usec_max;
+
+  buf = (char *) osip_malloc (SIP_MESSAGE_MAX_LENGTH * sizeof (char) + 1);
+  while (max_message_nb != 0 && eXosip.j_stop_ua == 0)
+    {
+      int i;
+      int max;
+      int wakeup_socket = jpipe_get_read_descr (eXosip.j_socketctl);
+
+      FD_ZERO (&osip_fdset);
+      if (eXosip.net_interfaces[0].net_socket>0)
+	{
+	  eXFD_SET (eXosip.net_interfaces[0].net_socket, &osip_fdset);
+	  max = eXosip.net_interfaces[0].net_socket;
+	}
+      if (eXosip.net_interfaces[1].net_socket>0)
+	{
+	  int pos;
+	  struct eXosip_net *net = &eXosip.net_interfaces[1];
+	  eXFD_SET (net->net_socket, &osip_fdset);
+	  if (net->net_socket>max)
+	    max = net->net_socket;
+
+	  for (pos=0;pos<EXOSIP_MAX_SOCKETS;pos++)
+	    {
+	      if (net->net_socket_tab[pos].socket!=0)
+		{
+		  eXFD_SET (net->net_socket_tab[pos].socket, &osip_fdset);
+		  if (net->net_socket_tab[pos].socket>max)
+		    max = net->net_socket_tab[pos].socket;
+		}
+	    }
+	}
+
+      if (eXosip.net_interfaces[2].net_socket>0)
+	{
+	  eXFD_SET (eXosip.net_interfaces[2].net_socket, &osip_fdset);
+	  if (eXosip.net_interfaces[2].net_socket>max)
+	    max = eXosip.net_interfaces[2].net_socket;
+	}
+
+
+      eXFD_SET (wakeup_socket, &osip_fdset);
+      if (wakeup_socket > max)
+        max = wakeup_socket;
+
+      if ((sec_max == -1) || (usec_max == -1))
+        i = select (max + 1, &osip_fdset, NULL, NULL, NULL);
+      else
+        i = select (max + 1, &osip_fdset, NULL, NULL, &tv);
+
+      if ((i == -1) && (errno == EINTR || errno == EAGAIN))
+        continue;
+
+      if ((i > 0) && FD_ISSET (wakeup_socket, &osip_fdset))
+        {
+          char buf2[500];
+
+          jpipe_read (eXosip.j_socketctl, buf2, 499);
+        }
+
+      if (0 == i || eXosip.j_stop_ua != 0)
+        {
+	} else if (-1 == i)
+	  {
+	    osip_free (buf);
+	    return -2;            /* error */
+	  } else if (FD_ISSET (eXosip.net_interfaces[1].net_socket, &osip_fdset))
+	    {
+	      /* accept incoming connection */
+	      char src6host[NI_MAXHOST];
+	      int recvport = 0;
+	      struct sockaddr_storage sa;
+	      int sock;
+	      int i;
+	      int pos;
+#ifdef __linux
+	      socklen_t slen;
+#else
+	      int slen;
+#endif
+	      if (ipv6_enable == 0)
+		slen = sizeof (struct sockaddr_in);
+	      else
+		slen = sizeof (struct sockaddr_in6);
+
+	      for (pos=0; pos<EXOSIP_MAX_SOCKETS; pos++)
+		{
+		  if (eXosip.net_interfaces[1].net_socket_tab[pos].socket==0)
+		    break;
+		}
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "creating TCP socket at index: %i\n", pos));
+	      sock = accept(eXosip.net_interfaces[1].net_socket, (struct sockaddr *) &sa, 
+			 &slen);
+	      if (sock<0)
+		{
+		  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					  "Error accepting TCP socket\n"));
+		  break;
+		}
+	      eXosip.net_interfaces[1].net_socket_tab[pos].socket = sock;
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "New TCP connection accepted\n"));
+
+	      memset(src6host, 0, sizeof(src6host));
+	      
+	      if (ipv6_enable == 0)
+		recvport = ntohs (((struct sockaddr_in*)&sa)->sin_port);
+	      else
+		recvport = ntohs (((struct sockaddr_in6*)&sa)->sin6_port);
+	      
+	      i = getnameinfo((struct sockaddr*)&sa, slen,
+			      src6host, NI_MAXHOST,
+			      NULL, 0,
+			      NI_NUMERICHOST);
+	      
+	      if (i!=0)
+		{
+		  OSIP_TRACE (osip_trace
+			      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+			       "Message received from: %s:%i Error with getnameinfo\n",
+			       src6host, recvport));
+		}
+	      else           
+		{
+		  OSIP_TRACE (osip_trace
+			      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			       "Message received from: %s:%i\n",
+			       src6host, recvport));
+		  osip_strncpy(eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip,
+			       src6host,
+			       sizeof(eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip));
+		  eXosip.net_interfaces[1].net_socket_tab[pos].remote_port = recvport;
+		}
+
+	  } else if (FD_ISSET (eXosip.net_interfaces[0].net_socket, &osip_fdset))
+	    {
+	      /*AMDstruct sockaddr_in sa; */
+	      struct sockaddr_storage sa;
+
+#ifdef __linux
+	      socklen_t slen;
+#else
+	      int slen;
+#endif
+	      if (ipv6_enable == 0)
+		slen = sizeof (struct sockaddr_in);
+	      else
+		slen = sizeof (struct sockaddr_in6);
+
+          i = _eXosip_recvfrom (eXosip.net_interfaces[0].net_socket, buf, SIP_MESSAGE_MAX_LENGTH, 0,
+			    (struct sockaddr *) &sa, &slen);
+
+         if (i > 5)            /* we expect at least one byte, otherwise there's no doubt that it is not a sip message ! */
+		{
+		  /* Message might not end with a "\0" but we know the number of */
+		  /* char received! */
+		  osip_transaction_t *transaction = NULL;
+		  osip_event_t *sipevent;
+
+		  osip_strncpy (buf + i, "\0", 1);
+		  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					  "Received message: \n%s\n", buf));
+#ifdef WIN32
+		  if (strlen (buf) > 412)
+		    {
+		      OSIP_TRACE (osip_trace
+				  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				   "Message suite: \n%s\n", buf + 412));
+		    }
+#endif
+
+		  sipevent = osip_parse (buf, i);
+		  transaction = NULL;
+		  if (sipevent != NULL && sipevent->sip != NULL)
+          {
+            if (!eXosip.http_port)
+            {
+		      char src6host[NI_MAXHOST];
+		      char src6buf[NI_MAXSERV];
+		      int recvport = 0;
+		      memset(src6host, 0, sizeof(src6host));
+		      memset(src6buf, 0, sizeof(src6buf));
+		  
+		      if (ipv6_enable == 0)
+			recvport = ntohs (((struct sockaddr_in*)&sa)->sin_port);
+		      else
+			recvport = ntohs (((struct sockaddr_in6*)&sa)->sin6_port);
+
+		      i = getnameinfo((struct sockaddr*)&sa, slen,
+				      src6host, NI_MAXHOST,
+				      NULL, 0,
+				      NI_NUMERICHOST);
+
+		      if (i!=0)
+			{
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+				       "Message received from: %s:%i (serv=%s) Error with getnameinfo\n",
+				       src6host, recvport, src6buf));
+			}
+		      else           
+			{
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				       "Message received from: %s:%i (serv=%s)\n",
+				       src6host, recvport, src6buf));          
+			}
+
+		      OSIP_TRACE (osip_trace
+				  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				   "Message received from: %s:%i (serv=%s)\n",
+				   src6host, recvport, src6buf));
+
+		      osip_message_fix_last_via_header (sipevent->sip,
+							src6host,
+							recvport);
+            }
+		      i =
+			osip_find_transaction_and_add_event (eXosip.j_osip, sipevent);
+		      if (i != 0)
+			{
+			  /* this event has no transaction, */
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				       "This is a request\n", buf));
+			  eXosip_lock ();
+			  if (MSG_IS_REQUEST (sipevent->sip))
+			    eXosip_process_newrequest (sipevent, 0);
+			  else if (MSG_IS_RESPONSE (sipevent->sip))
+			    eXosip_process_response_out_of_transaction (sipevent);
+			  eXosip_unlock ();
+			} else
+			  {
+			    /* handled by oSIP ! */
+			  }
+		    } else
+		      {
+			OSIP_TRACE (osip_trace
+				    (__FILE__, __LINE__, OSIP_ERROR, NULL,
+				     "Could not parse SIP message\n"));
+			osip_event_free (sipevent);
+		      }
+		} else if (i < 0)
+		  {
+		    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+					    "Could not read socket\n"));
+		  } else
+		    {
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "Dummy SIP message received\n"));
+		    }
+	    }
+      else
+	{
+	  /* loop over all TCP socket */
+	  int pos = 0;
+	  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				  "TCP DATA ready?\n"));
+	  for (pos=0; pos<EXOSIP_MAX_SOCKETS; pos++)
+	    {
+	      if (eXosip.net_interfaces[1].net_socket_tab[pos].socket>0
+		  && FD_ISSET (eXosip.net_interfaces[1].net_socket_tab[pos].socket, &osip_fdset))
+		{
+		  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					  "TCP DATA ready! message received\n"));
+		  i = recv (eXosip.net_interfaces[1].net_socket_tab[pos].socket,
+			    buf, SIP_MESSAGE_MAX_LENGTH, 0);
+		  if (i > 5)
+		    {
+		      osip_strncpy (buf + i, "\0", 1);
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "Received TCP message: \n%s\n", buf));
+#ifdef WIN32
+		      if (strlen (buf) > 412)
+			{
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				       "Message suite: \n%s\n", buf + 412));
+			}
+#endif
+		      _eXosip_handle_incoming_message(buf, i,
+						      eXosip.net_interfaces[1].net_socket_tab[pos].socket,
+						      eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip,
+						      eXosip.net_interfaces[1].net_socket_tab[pos].remote_port);
+		    }
+		  else if (i < 0)
+		    {
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+					      "Could not read socket - close it\n"));
+		      close(eXosip.net_interfaces[1].net_socket_tab[pos].socket);
+		      memset(&(eXosip.net_interfaces[1].net_socket_tab[pos]),
+			     0, sizeof(struct eXosip_socket));
+		    }
+		  else if (i==0)
+		    {
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "End of stream (read 0 byte from %s:%i)\n", eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip, eXosip.net_interfaces[1].net_socket_tab[pos].remote_port));
+		      close(eXosip.net_interfaces[1].net_socket_tab[pos].socket);
+		      memset(&(eXosip.net_interfaces[1].net_socket_tab[pos]),
+			     0, sizeof(struct eXosip_socket));
+		    }
+		  else
+		    {
+		      /* we expect at least one byte, otherwise there's no doubt that it is not a sip message ! */
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "Dummy SIP message received (size=%i)\n", i));
+		    }
+		}
+	    }
+	}
+
+
+      max_message_nb--;
+    }
+  osip_free (buf);
+  return 0;
+}
+
+
+static int
+eXosip_pendingosip_transaction_exist (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *tr;
+  int now = time (NULL);
+
+  tr = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+  if (tr != NULL && tr->state != NIST_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_out_transaction (jc, jd, "BYE");
+  if (tr != NULL && tr->state != NICT_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr != NULL && tr->state != IST_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          /* osip_remove_transaction(eXosip.j_osip, tr);
+             eXosip_remove_transaction_from_call(tr, jc);
+             osip_transaction_free(tr); */
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_out_invite (jc, jd);
+  if (tr != NULL && tr->state != ICT_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          /* osip_remove_transaction(eXosip.j_osip, tr);
+             eXosip_remove_transaction_from_call(tr, jc);
+             osip_transaction_free(tr); */
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_inc_transaction (jc, jd, "REFER");
+  if (tr != NULL && tr->state != IST_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_out_transaction (jc, jd, "REFER");
+  if (tr != NULL && tr->state != NICT_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  return -1;
+}
+
+static int
+eXosip_release_finished_calls (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+  if (tr == NULL)
+    tr = eXosip_find_last_out_transaction (jc, jd, "BYE");
+
+  if (tr != NULL && (tr->state == NIST_TERMINATED || tr->state == NICT_TERMINATED))
+    {
+        int did = -2;
+        if (jd!=NULL)
+            did = jd->d_id;
+        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+            "eXosip: eXosip_release_finished_calls remove a dialog (cid=%i did=%i)\n", jc->c_id, did));
+      /* Remove existing reference to the dialog from transactions! */
+      __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+      REMOVE_ELEMENT (jc->c_dialogs, jd);
+      eXosip_dialog_free (jd);
+      return 0;
+    }
+  return -1;
+}
+
+
+
+static void
+__eXosip_release_call (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  REMOVE_ELEMENT (eXosip.j_calls, jc);
+  report_call_event (EXOSIP_CALL_RELEASED, jc, jd, NULL);
+  eXosip_call_free (jc);
+  __eXosip_wakeup ();
+}
+
+
+static int
+eXosip_release_aborted_calls (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  int now = time (NULL);
+  osip_transaction_t *tr;
+
+#if 0
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    tr = eXosip_find_last_out_invite (jc, jd);
+#else
+  /* close calls only when the initial INVITE failed */
+  tr = jc->c_inc_tr;
+  if (tr==NULL)
+    tr = jc->c_out_tr;
+#endif
+
+  if (tr == NULL)
+    {
+      if (jd != NULL)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                  "eXosip: eXosip_release_aborted_calls remove an empty dialog\n"));
+          __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+          REMOVE_ELEMENT (jc->c_dialogs, jd);
+          eXosip_dialog_free (jd);
+          return 0;
+        }
+      return -1;
+    }
+
+  if (tr != NULL && tr->state != IST_TERMINATED && tr->state != ICT_TERMINATED && tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+    {
+      if (jd != NULL)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                  "eXosip: eXosip_release_aborted_calls remove a dialog for an unfinished transaction\n"));
+          __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+          REMOVE_ELEMENT (jc->c_dialogs, jd);
+          report_call_event (EXOSIP_CALL_NOANSWER, jc, jd, NULL);
+          eXosip_dialog_free (jd);
+          __eXosip_wakeup ();
+          return 0;
+        }
+    }
+
+  if (tr != NULL && (tr->state == IST_TERMINATED || tr->state == ICT_TERMINATED))
+    {
+      if (tr == jc->c_inc_tr)
+        {
+          if (jc->c_inc_tr->last_response == NULL)
+            {
+              /* OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_INFO2,NULL,
+                 "eXosip: eXosip_release_aborted_calls transaction with no answer\n")); */
+          } else if (MSG_IS_STATUS_3XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 3xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_4XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 4xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_5XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 5xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_6XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 6xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+            }
+      } else if (tr == jc->c_out_tr)
+        {
+          if (jc->c_out_tr->last_response == NULL)
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed with no answer\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_3XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 3xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_4XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 4xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_5XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 5xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_6XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 6xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+            }
+        }
+    }
+
+  return -1;
+}
+
+
+void
+eXosip_release_terminated_calls (void)
+{
+  eXosip_dialog_t *jd;
+  eXosip_dialog_t *jdnext;
+  eXosip_call_t *jc;
+  eXosip_call_t *jcnext;
+  int now = time (NULL);
+  int pos;
+
+
+  for (jc = eXosip.j_calls; jc != NULL;)
+    {
+      jcnext = jc->next;
+      /* free call terminated with a BYE */
+
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+          "eXosip: working on (cid=%i)\n", jc->c_id));
+      for (jd = jc->c_dialogs; jd != NULL;)
+        {
+          jdnext = jd->next;
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+              "eXosip: working on (cid=%i did=%i)\n", jc->c_id, jd->d_id));
+          if (0 == eXosip_pendingosip_transaction_exist (jc, jd))
+            {
+          } else if (0 == eXosip_release_finished_calls (jc, jd))
+            {
+              jd = jc->c_dialogs;
+          } else if (0 == eXosip_release_aborted_calls (jc, jd))
+            {
+              jdnext = NULL;
+          } else if (jd->d_id==-1)
+            {
+                OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                    "eXosip: eXosip_release_terminated_calls delete a removed dialog (cid=%i did=%i)\n", jc->c_id, jd->d_id));
+                /* Remove existing reference to the dialog from transactions! */
+                __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+                REMOVE_ELEMENT (jc->c_dialogs, jd);
+                eXosip_dialog_free (jd);
+
+                jd = jc->c_dialogs;
+            }
+          jd = jdnext;
+        }
+      jc = jcnext;
+    }
+
+  for (jc = eXosip.j_calls; jc != NULL;)
+    {
+      jcnext = jc->next;
+      if (jc->c_dialogs == NULL)
+        {
+          /* release call for options requests */
+          if (jc->c_inc_options_tr != NULL)
+            {
+              if (jc->c_inc_options_tr->state == NIST_TERMINATED)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an incoming OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+              } else if (jc->c_inc_options_tr->state != NIST_TERMINATED
+                         && jc->c_inc_options_tr->birth_time + 180 < now)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an incoming OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+                }
+          } else if (jc->c_out_options_tr != NULL)
+            {
+              if (jc->c_out_options_tr->state == NICT_TERMINATED)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an outgoing OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+              } else if (jc->c_out_options_tr->state != NIST_TERMINATED
+                         && jc->c_out_options_tr->birth_time + 180 < now)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an outgoing OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+                }
+          } else if (jc->c_inc_tr != NULL
+                     && jc->c_inc_tr->state != IST_TERMINATED
+                     && jc->c_inc_tr->birth_time + 180 < now)
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                      "eXosip: remove an incoming call with no final answer\n"));
+              __eXosip_release_call (jc, NULL);
+          } else if (jc->c_out_tr != NULL
+                     && jc->c_out_tr->state != ICT_TERMINATED
+                     && jc->c_out_tr->birth_time + 180 < now)
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                      "eXosip: remove an outgoing call with no final answer\n"));
+              __eXosip_release_call (jc, NULL);
+          } else if (jc->c_inc_tr != NULL && jc->c_inc_tr->state != IST_TERMINATED)
+            {
+          } else if (jc->c_out_tr != NULL && jc->c_out_tr->state != ICT_TERMINATED)
+            {
+          } else                /* no active pending transaction */
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                      "eXosip: remove a call\n"));
+              __eXosip_release_call (jc, NULL);
+            }
+        }
+      jc = jcnext;
+    }
+
+  pos = 0;
+  while (!osip_list_eol (eXosip.j_transactions, pos))
+    {
+      osip_transaction_t *tr =
+        (osip_transaction_t *) osip_list_get (eXosip.j_transactions, pos);
+      if (tr->state == IST_TERMINATED || tr->state == ICT_TERMINATED
+          || tr->state == NICT_TERMINATED || tr->state == NIST_TERMINATED)
+
+        {                       /* free (transaction is already removed from the oSIP stack) */
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a terminated transaction\n"));
+          osip_list_remove (eXosip.j_transactions, pos);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+      } else if (tr->birth_time + 180 < now)    /* Wait a max of 2 minutes */
+        {
+          osip_list_remove (eXosip.j_transactions, pos);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+      } else
+        pos++;
+    }
+}
+
+void
+eXosip_release_terminated_registrations (void)
+{
+  eXosip_reg_t *jr;
+  eXosip_reg_t *jrnext;
+  int now = time (NULL);
+
+  for (jr = eXosip.j_reg; jr != NULL;)
+    {
+      jrnext = jr->next;
+      if (jr->r_reg_period == 0 && jr->r_last_tr!=NULL)
+	{
+	  if (now - jr->r_last_tr->birth_time > 60)
+	    {
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "Release a terminated registration\n"));
+	      REMOVE_ELEMENT (eXosip.j_reg, jr);
+	      eXosip_reg_free (jr);
+	    }
+	  else if (jr->r_last_tr->last_response!=NULL
+		   && jr->r_last_tr->last_response->status_code>=200
+		   && jr->r_last_tr->last_response->status_code<=299)
+	    {
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "Release a terminated registration with 2xx\n"));
+	      REMOVE_ELEMENT (eXosip.j_reg, jr);
+	      eXosip_reg_free (jr);
+	    }
+	}
+
+      jr = jrnext;
+    }
+
+  return;
+}
diff --git a/libs/eXosip2/eXpublish_api.c b/libs/eXosip2/eXpublish_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..36a937664b4692db5e08a8a8505bf8430ba3f8ce
--- /dev/null
+++ b/libs/eXosip2/eXpublish_api.c
@@ -0,0 +1,168 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+extern eXosip_t eXosip;
+
+int
+eXosip_build_publish (osip_message_t ** message,
+                      const char *to,
+                      const char *from,
+                      const char *route,
+                      const char *event,
+                      const char *expires, const char *ctype, const char *body)
+{
+  int i;
+
+  *message = NULL;
+
+  if (to == NULL || to[0] == '\0')
+    return -1;
+  if (from == NULL || from[0] == '\0')
+    return -1;
+  if (event == NULL || event[0] == '\0')
+    return -1;
+  if (ctype == NULL || ctype[0] == '\0')
+    {
+      if (body != NULL && body[0] != '\0')
+        return -1;
+  } else
+    {
+      if (body == NULL || body[0] == '\0')
+        return -1;
+    }
+
+  i = generating_publish (message, to, from, route);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot send message (cannot build PUBLISH)! "));
+      return -1;
+    }
+
+  if (body != NULL && body[0] != '\0' && ctype != NULL && ctype[0] != '\0')
+    {
+      osip_message_set_content_type (*message, ctype);
+      osip_message_set_body (*message, body, strlen (body));
+      osip_message_set_header (*message, "Content-Disposition",
+                               "render;handling=required");
+    }
+  if (expires != NULL && expires[0] != '\0')
+    osip_message_set_expires (*message, expires);
+  else
+    osip_message_set_expires (*message, "3600");
+
+  osip_message_set_header (*message, "Event", event);
+  return 0;
+}
+
+int
+eXosip_publish (osip_message_t * message, const char *to)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+  eXosip_pub_t *pub = NULL;
+
+  if (message == NULL)
+    return -1;
+  if (message->cseq == NULL || message->cseq->number == NULL)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+  if (to == NULL)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+
+  i = _eXosip_pub_find_by_aor (&pub, to);
+  if (i != 0 || pub == NULL)
+    {
+      osip_header_t *expires;
+
+      osip_message_get_expires (message, 0, &expires);
+      if (expires == NULL || expires->hvalue == NULL)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: missing expires header in PUBLISH!"));
+          osip_message_free (message);
+          return -1;
+      } else
+        {
+          /* start a new publication context */
+          _eXosip_pub_init (&pub, to, expires->hvalue);
+          if (pub == NULL)
+	    {
+	      osip_message_free (message);
+	      return -1;
+	    }
+          ADD_ELEMENT (eXosip.j_pub, pub);
+        }
+  } else
+    {
+      if (pub->p_sip_etag != NULL && pub->p_sip_etag[0] != '\0')
+        {
+          /* increase cseq */
+          osip_message_set_header (message, "SIP-If-Match", pub->p_sip_etag);
+        }
+
+      if (pub->p_last_tr != NULL && pub->p_last_tr->cseq != NULL
+          && pub->p_last_tr->cseq->number != NULL)
+        {
+          int osip_cseq_num = osip_atoi (pub->p_last_tr->cseq->number);
+          int length = strlen (pub->p_last_tr->cseq->number);
+
+          osip_cseq_num++;
+          osip_free (message->cseq->number);
+          message->cseq->number = (char *) osip_malloc (length + 2);    /* +2 like for 9 to 10 */
+          sprintf (message->cseq->number, "%i", osip_cseq_num);
+        }
+    }
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, message);
+  if (i != 0)
+    {
+      osip_message_free (message);
+      return -1;
+    }
+
+  if (pub->p_last_tr != NULL)
+    osip_list_add (eXosip.j_transactions, pub->p_last_tr, 0);
+  pub->p_last_tr = transaction;
+
+  sipevent = osip_new_outgoing_sipmessage (message);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXrefer_api.c b/libs/eXosip2/eXrefer_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..9b6a2ec5a6c9fa1965c8d1bc7672db96c8c1d4e3
--- /dev/null
+++ b/libs/eXosip2/eXrefer_api.c
@@ -0,0 +1,74 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+extern eXosip_t eXosip;
+
+int
+eXosip_refer_build_request (osip_message_t ** refer, const char *refer_to,
+                            const char *from, const char *to, const char *proxy)
+{
+  int i;
+
+  *refer = NULL;
+  i = generating_request_out_of_dialog (refer, "REFER", to, "UDP", from, proxy);
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  osip_message_set_header (*refer, "Refer-to", refer_to);
+  return 0;
+}
+
+int
+eXosip_refer_send_request (osip_message_t * refer)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  if (refer == NULL)
+    return -1;
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, refer);
+  if (i != 0)
+    {
+      osip_message_free (refer);
+      return -1;
+    }
+
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (refer);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, NULL, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXregister_api.c b/libs/eXosip2/eXregister_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..23f61f240e635e20398088b2789c59a690ade776
--- /dev/null
+++ b/libs/eXosip2/eXregister_api.c
@@ -0,0 +1,376 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+static int _eXosip_register_build_register (eXosip_reg_t * jr,
+                                            osip_message_t ** _reg);
+
+static eXosip_reg_t *
+eXosip_reg_find (int rid)
+{
+  eXosip_reg_t *jr;
+
+  for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+      if (jr->r_id == rid)
+        {
+          return jr;
+        }
+    }
+  return NULL;
+}
+
+
+static int
+_eXosip_register_build_register (eXosip_reg_t * jr, osip_message_t ** _reg)
+{
+  osip_message_t *reg=NULL;
+  struct eXosip_net *net;
+  int i;
+
+  reg = NULL;
+  *_reg = NULL;
+
+  if (jr->r_last_tr != NULL)
+    {
+      if (jr->r_last_tr->state != NICT_TERMINATED
+          && jr->r_last_tr->state != NICT_COMPLETED)
+        return -1;
+      else
+        {
+          osip_message_t *last_response=NULL;
+	  osip_transaction_t *tr;
+	  osip_message_clone(jr->r_last_tr->orig_request, &reg);
+	  if (reg==NULL)
+	    return -1;
+          /* reg = jr->r_last_tr->orig_request; */
+	  if (jr->r_last_tr->last_response!=NULL)
+	    {
+	      osip_message_clone(jr->r_last_tr->last_response, &last_response);
+	      if (last_response==NULL)
+		{
+		  osip_message_free(reg);
+		  return -1;
+		}
+	    }
+
+	  __eXosip_delete_jinfo (jr->r_last_tr);
+	  tr = jr->r_last_tr;
+	  jr->r_last_tr = NULL;
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+
+          /* modify the REGISTER request */
+          {
+            int osip_cseq_num = osip_atoi (reg->cseq->number);
+            int length = strlen (reg->cseq->number);
+
+
+            osip_authorization_t *aut;
+            osip_proxy_authorization_t *proxy_aut;
+
+            aut = (osip_authorization_t *) osip_list_get (reg->authorizations, 0);
+            while (aut != NULL)
+              {
+                osip_list_remove (reg->authorizations, 0);
+                osip_authorization_free (aut);
+                aut =
+                  (osip_authorization_t *) osip_list_get (reg->authorizations, 0);
+              }
+
+            proxy_aut =
+              (osip_proxy_authorization_t *) osip_list_get (reg->
+                                                            proxy_authorizations,
+                                                            0);
+            while (proxy_aut != NULL)
+              {
+                osip_list_remove (reg->proxy_authorizations, 0);
+                osip_proxy_authorization_free (proxy_aut);
+                proxy_aut =
+                  (osip_proxy_authorization_t *) osip_list_get (reg->
+                                                                proxy_authorizations,
+                                                                0);
+              }
+
+            if (0==osip_strcasecmp(jr->transport, "udp"))
+              net = &eXosip.net_interfaces[0];
+            else if (0==osip_strcasecmp(jr->transport, "tcp"))
+              net = &eXosip.net_interfaces[1];
+            else
+              {
+                OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                             "eXosip: unsupported protocol '%s' (default to UDP)\n",
+                             jr->transport));
+                net = &eXosip.net_interfaces[0];
+              }
+
+	    /*
+	      modify the port number when masquerading is ON.
+	    */
+	    if (net->net_firewall_ip[0]!='\0')
+	      {
+		int pos=0;
+		while (!osip_list_eol(reg->contacts,pos))
+		  {
+		    osip_contact_t *co;
+		    co = (osip_contact_t *)osip_list_get(reg->contacts,pos);
+		    pos++;
+		    if (co!=NULL && co->url!=NULL && co->url->host!=NULL
+			&& 0==osip_strcasecmp(co->url->host,
+					      net->net_firewall_ip))
+		      {
+			if (co->url->port==NULL &&
+			    0!=osip_strcasecmp(net->net_port, "5060"))
+			  {
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+			else if (co->url->port!=NULL &&
+				 0!=osip_strcasecmp(net->net_port, co->url->port))
+			  {
+			    osip_free(co->url->port);
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+		      }
+		  }
+	      }
+
+	    if (-1 == eXosip_update_top_via (reg))
+	      {
+		osip_message_free (reg);
+		if (last_response != NULL)
+		  osip_message_free (last_response);
+                return -1;
+              }
+
+            osip_cseq_num++;
+            osip_free (reg->cseq->number);
+            reg->cseq->number = (char *) osip_malloc (length + 2);      /* +2 like for 9 to 10 */
+            sprintf (reg->cseq->number, "%i", osip_cseq_num);
+
+            {
+              osip_header_t *exp;
+
+              osip_message_header_get_byname (reg, "expires", 0, &exp);
+              osip_free (exp->hvalue);
+              exp->hvalue = (char *) osip_malloc (10);
+              snprintf (exp->hvalue, 9, "%i", jr->r_reg_period);
+            }
+
+            osip_message_force_update (reg);
+          }
+
+          if (last_response != NULL)
+            {
+              if (MSG_IS_STATUS_4XX (last_response))
+                {
+                  eXosip_add_authentication_information (reg, last_response);
+                }
+              osip_message_free (last_response);
+            }
+        }
+    }
+  if (reg == NULL)
+    {
+      i = generating_register (&reg, jr->transport,
+			       jr->r_aor, jr->r_registrar, jr->r_contact,
+			       jr->r_reg_period);
+      if (i != 0)
+        {
+          return -2;
+        }
+    }
+
+  *_reg = reg;
+  return 0;
+}
+
+int
+eXosip_register_build_initial_register (const char *from, const char *proxy,
+                                        const char *contact, int expires,
+                                        osip_message_t ** reg)
+{
+  eXosip_reg_t *jr = NULL;
+  int i;
+
+  *reg = NULL;
+
+  if (eXosip.net_interfaces[0].net_socket<=0
+      && eXosip.net_interfaces[1].net_socket<=0
+      && eXosip.net_interfaces[2].net_socket<=0)
+    return -1;
+
+  /* Avoid adding the same registration info twice to prevent mem leaks */
+  for (jr = eXosip.j_reg; jr != NULL; jr = jr->next)
+    {
+      if (strcmp (jr->r_aor, from) == 0 && strcmp (jr->r_registrar, proxy) == 0)
+        {
+          break;
+        }
+    }
+  if (jr == NULL)
+    {
+      /* Add new registration info */
+      i = eXosip_reg_init (&jr, from, proxy, contact);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot register! "));
+          return i;
+        }
+      ADD_ELEMENT (eXosip.j_reg, jr);
+    }
+
+  /* Guess transport from existing connections */
+  if (eXosip.net_interfaces[0].net_socket>0)
+    osip_strncpy(jr->transport, "UDP", sizeof(jr->transport)-1);
+  else if (eXosip.net_interfaces[1].net_socket>0)
+    osip_strncpy(jr->transport, "TCP", sizeof(jr->transport)-1);
+  else if (eXosip.net_interfaces[2].net_socket>0)
+    osip_strncpy(jr->transport, "TLS", sizeof(jr->transport)-1);
+
+  /* build register */
+  jr->r_reg_period = expires;
+
+  i = _eXosip_register_build_register (jr, reg);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot build REGISTER!"));
+      *reg = NULL;
+      return i;
+    }
+  return jr->r_id;
+}
+
+int
+eXosip_register_build_register (int rid, int expires, osip_message_t ** reg)
+{
+  eXosip_reg_t *jr;
+  int i;
+
+  *reg = NULL;
+  jr = eXosip_reg_find (rid);
+  if (jr == NULL)
+    {
+      /* fprintf(stderr, "eXosip: no registration info saved!\n"); */
+      return -1;
+    }
+  jr->r_reg_period = expires;
+  if (jr->r_reg_period == 0)
+    {
+    } /* unregistration */
+  else if (jr->r_reg_period > 3600)
+    jr->r_reg_period = 3600;
+  else if (jr->r_reg_period < 200)      /* too low */
+    jr->r_reg_period = 200;
+
+  if (jr->r_last_tr != NULL)
+    {
+      if (jr->r_last_tr->state != NICT_TERMINATED
+          && jr->r_last_tr->state != NICT_COMPLETED)
+        {
+          /* fprintf(stderr, "eXosip: a registration is already pending!\n"); */
+          return -1;
+        }
+    }
+
+  i = _eXosip_register_build_register (jr, reg);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot build REGISTER!"));
+      *reg = NULL;
+      return i;
+    }
+  return 0;
+}
+
+int
+eXosip_register_send_register (int rid, osip_message_t * reg)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  eXosip_reg_t *jr;
+  char *transport;
+  int i;
+
+  jr = eXosip_reg_find (rid);
+  if (jr == NULL)
+    {
+      osip_message_free (reg);
+      return -1;
+    }
+
+  if (jr->r_last_tr != NULL)
+    {
+      if (jr->r_last_tr->state != NICT_TERMINATED
+          && jr->r_last_tr->state != NICT_COMPLETED)
+        {
+          osip_message_free (reg);
+          return -1;
+        }
+    }
+
+  if (reg == NULL)
+    {
+      i = _eXosip_register_build_register (jr, &reg);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot build REGISTER!"));
+          return i;
+        }
+    }
+
+  transport = _eXosip_transport_protocol(reg);
+  osip_strncpy(jr->transport, transport, sizeof(jr->transport)-1);
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, reg);
+  if (i != 0)
+    {
+      /* TODO: release the j_call.. */
+
+      osip_message_free (reg);
+      return -2;
+    }
+
+  jr->r_last_tr = transaction;
+
+  /* send REGISTER */
+  sipevent = osip_new_outgoing_sipmessage (reg);
+  sipevent->transactionid = transaction->transactionid;
+  osip_message_force_update (reg);
+
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXsubscription_api.c b/libs/eXosip2/eXsubscription_api.c
new file mode 100644
index 0000000000000000000000000000000000000000..84c25f288007258335ddbe57ec4c2df5cf623761
--- /dev/null
+++ b/libs/eXosip2/eXsubscription_api.c
@@ -0,0 +1,372 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_subscribe_build_initial_request (osip_message_t ** sub, const char *to,
+                                        const char *from, const char *route,
+                                        const char *event, int expires)
+{
+  char tmp[10];
+  int i;
+  osip_uri_param_t *uri_param = NULL;
+  osip_to_t *_to=NULL;
+
+  *sub = NULL;
+  if (to != NULL && *to == '\0')
+    return -1;
+  if (from != NULL && *from == '\0')
+    return -1;
+  if (event != NULL && *event == '\0')
+    return -1;
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = osip_to_init(&_to);
+  if (i!=0)
+    return -1;
+  
+  i = osip_to_parse(_to, to);
+  if (i!=0)
+    {
+      osip_to_free(_to);
+      return -1;
+    }
+
+  osip_uri_uparam_get_byname(_to->url, "transport", &uri_param);
+  if (uri_param != NULL && uri_param->gvalue != NULL)
+    {
+      i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "UDP", from, route);
+    }
+  else
+    {
+      if (eXosip.net_interfaces[0].net_socket>0)
+	i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "UDP", from, route);
+      else if (eXosip.net_interfaces[1].net_socket>0)
+	i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "TCP", from, route);
+      else
+	i = generating_request_out_of_dialog (sub, "SUBSCRIBE", to, "UDP", from, route);
+    }
+
+  osip_to_free(_to);
+  if (i != 0)
+    return -1;
+
+  snprintf (tmp, 10, "%i", expires);
+  osip_message_set_expires (*sub, tmp);
+
+  osip_message_set_header (*sub, "Event", event);
+
+  return 0;
+}
+
+int
+eXosip_subscribe_send_initial_request (osip_message_t * subscribe)
+{
+  eXosip_subscribe_t *js = NULL;
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  i = eXosip_subscribe_init (&js);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot subscribe."));
+      osip_message_free (subscribe);
+      return -1;
+    }
+
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, subscribe);
+  if (i != 0)
+    {
+      eXosip_subscribe_free (js);
+      osip_message_free (subscribe);
+      return -1;
+    }
+
+  _eXosip_subscribe_set_refresh_interval (js, subscribe);
+  js->s_out_tr = transaction;
+
+  sipevent = osip_new_outgoing_sipmessage (subscribe);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, NULL, js, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+
+  ADD_ELEMENT (eXosip.j_subscribes, js);
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+eXosip_subscribe_build_refresh_request (int did, osip_message_t ** sub)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_subscribe_t *js = NULL;
+
+  osip_transaction_t *transaction;
+  char *transport;
+  int i;
+
+  *sub = NULL;
+  if (did > 0)
+    {
+      eXosip_subscribe_dialog_find (did, &js, &jd);
+    }
+  if (jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No subscribe here?\n"));
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_subscribe (js, jd);
+
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+        return -1;
+    }
+
+  transport = NULL;
+  if (transaction!=NULL && transaction->orig_request!=NULL)
+    transport = _eXosip_transport_protocol(transaction->orig_request);
+
+  transaction = NULL;
+
+  if (transport==NULL)
+    i = _eXosip_build_request_within_dialog (sub, "SUBSCRIBE", jd->d_dialog, "UDP");
+  else
+    i = _eXosip_build_request_within_dialog (sub, "SUBSCRIBE", jd->d_dialog, transport);
+
+  if (i != 0)
+    return -2;
+
+  return 0;
+}
+
+int
+eXosip_subscribe_send_refresh_request (int did, osip_message_t * sub)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_subscribe_t *js = NULL;
+
+  osip_transaction_t *transaction;
+  osip_event_t *sipevent;
+  int i;
+
+  if (did > 0)
+    {
+      eXosip_subscribe_dialog_find (did, &js, &jd);
+    }
+  if (jd == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No subscribe here?\n"));
+      osip_message_free (sub);
+      return -1;
+    }
+
+  transaction = NULL;
+  transaction = eXosip_find_last_out_subscribe (js, jd);
+
+  if (transaction != NULL)
+    {
+      if (transaction->state != NICT_TERMINATED &&
+          transaction->state != NIST_TERMINATED &&
+          transaction->state != NICT_COMPLETED &&
+          transaction->state != NIST_COMPLETED)
+	{
+	  osip_message_free (sub);
+	  return -1;
+	}
+      transaction = NULL;
+    }
+
+  transaction = NULL;
+  i = osip_transaction_init (&transaction, NICT, eXosip.j_osip, sub);
+
+  if (i != 0)
+    {
+      osip_message_free (sub);
+      return -2;
+    }
+
+  _eXosip_subscribe_set_refresh_interval (js, sub);
+  osip_list_add (jd->d_out_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (sub);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, js, NULL));
+  osip_transaction_add_event (transaction, sipevent);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_subscribe_send_request_with_credential (eXosip_subscribe_t * js,
+                                                eXosip_dialog_t * jd,
+                                                osip_transaction_t * out_tr)
+{
+  osip_transaction_t *tr = NULL;
+  osip_message_t *msg = NULL;
+  osip_event_t *sipevent;
+
+  char locip[256];
+  int cseq;
+  char tmp[256];
+  osip_via_t *via;
+  int i;
+
+  if (js == NULL)
+    return -1;
+  if (jd != NULL)
+    {
+      if (jd->d_out_trs == NULL)
+        return -1;
+    }
+
+  if (out_tr == NULL)
+    {
+      out_tr = eXosip_find_last_out_subscribe (js, jd);
+    }
+
+  if (out_tr == NULL
+      || out_tr->orig_request == NULL || out_tr->last_response == NULL)
+    return -1;
+
+  osip_message_clone (out_tr->orig_request, &msg);
+  if (msg == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: could not clone msg for authentication\n"));
+      return -1;
+    }
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || msg->cseq == NULL || msg->cseq->number == NULL)
+    {
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: missing via or cseq header\n"));
+      return -1;
+    }
+
+  /* increment cseq */
+  cseq = atoi (msg->cseq->number);
+  osip_free (msg->cseq->number);
+  msg->cseq->number = strdup_printf ("%i", cseq + 1);
+  if (jd != NULL && jd->d_dialog != NULL)
+    {
+      jd->d_dialog->local_cseq++;
+    }
+
+  osip_list_remove (msg->vias, 0);
+  osip_via_free (via);
+  i = _eXosip_find_protocol(out_tr->orig_request);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/UDP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/UDP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[0].net_port, via_branch_new_random ());
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip,
+			       sizeof (locip));
+      if (eXosip.net_interfaces[1].net_ip_family == AF_INET6)
+	snprintf (tmp, 256, "SIP/2.0/TCP [%s]:%s;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+      else
+	snprintf (tmp, 256, "SIP/2.0/TCP %s:%s;rport;branch=z9hG4bK%u",
+		  locip, eXosip.net_interfaces[1].net_port, via_branch_new_random ());
+    }
+  else
+    {
+      /* tls? */
+      osip_message_free (msg);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+  osip_via_init (&via);
+  osip_via_parse (via, tmp);
+  osip_list_add (msg->vias, via, 0);
+
+  eXosip_add_authentication_information (msg, out_tr->last_response);
+  osip_message_force_update (msg);
+
+  i = osip_transaction_init (&tr, NICT, eXosip.j_osip, msg);
+
+  if (i != 0)
+    {
+      osip_message_free (msg);
+      return -1;
+    }
+
+  if (out_tr == js->s_out_tr)
+    {
+      /* replace with the new tr */
+      osip_list_add (eXosip.j_transactions, js->s_out_tr, 0);
+      js->s_out_tr = tr;
+  } else
+    {
+      /* add the new tr for the current dialog */
+      osip_list_add (jd->d_out_trs, tr, 0);
+    }
+
+  sipevent = osip_new_outgoing_sipmessage (msg);
+
+  osip_transaction_set_your_instance (tr, __eXosip_new_jinfo (NULL, jd, js, NULL));
+  osip_transaction_add_event (tr, sipevent);
+
+  eXosip_update ();             /* fixed? */
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/eXtransport.c b/libs/eXosip2/eXtransport.c
new file mode 100644
index 0000000000000000000000000000000000000000..2624ab8a928396b2dd87f9d7e9453ec539cf84fc
--- /dev/null
+++ b/libs/eXosip2/eXtransport.c
@@ -0,0 +1,279 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002,2003,2004,2005  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+char *_eXosip_transport_protocol(osip_message_t *msg)
+{
+  osip_via_t *via;
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || via->protocol == NULL)
+    return NULL;
+  return via->protocol;
+}
+
+int _eXosip_find_protocol(osip_message_t *msg)
+{
+  osip_via_t *via;
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || via->protocol == NULL)
+    return -1;
+  else if (0==osip_strcasecmp(via->protocol, "UDP"))
+	return IPPROTO_UDP;
+  else if (0==osip_strcasecmp(via->protocol, "TCP"))
+    return IPPROTO_TCP;
+  return -1;;
+}
+
+int _eXosip_tcp_find_socket(char *host, int port)
+{
+  int pos;
+  struct eXosip_net *net;
+
+  net = &eXosip.net_interfaces[1];
+
+  for (pos=0;pos<EXOSIP_MAX_SOCKETS;pos++)
+    {
+      if (net->net_socket_tab[pos].socket!=0)
+	{
+	  if (0==osip_strcasecmp(net->net_socket_tab[pos].remote_ip, host)
+	      && port == net->net_socket_tab[pos].remote_port)
+	    return net->net_socket_tab[pos].socket;
+	}
+    }
+  return -1;
+}
+
+int _eXosip_tcp_connect_socket(char *host, int port)
+{
+  int pos;
+  struct eXosip_net *net;
+
+  int res;
+  struct addrinfo *addrinfo = NULL;
+  struct addrinfo *curinfo;
+  int sock = -1;
+
+  net = &eXosip.net_interfaces[1];
+
+  for (pos=0;pos<EXOSIP_MAX_SOCKETS;pos++)
+    {
+      if (net->net_socket_tab[pos].socket==0)
+	{
+	  break;
+	}
+    }
+
+  if (pos==EXOSIP_MAX_SOCKETS)
+    return -1;
+
+  res = eXosip_get_addrinfo(&addrinfo, host, port, IPPROTO_TCP);
+  if (res)
+    return -1;
+
+
+  for (curinfo = addrinfo; curinfo; curinfo = curinfo->ai_next)
+    {
+      if (curinfo->ai_protocol && curinfo->ai_protocol != IPPROTO_TCP)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Skipping protocol %d\n",
+		       curinfo->ai_protocol));
+	  continue;
+	}
+
+      sock = (int)socket(curinfo->ai_family, curinfo->ai_socktype,
+			 curinfo->ai_protocol);
+      if (sock < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Cannot create socket!\n",
+		       strerror(errno)));
+	  continue;
+	}
+      
+      if (curinfo->ai_family == AF_INET6)
+	{
+#ifdef IPV6_V6ONLY
+	  if (setsockopt_ipv6only(sock))
+	    {
+	      close(sock);
+	      sock = -1;
+	      OSIP_TRACE (osip_trace
+			  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+			   "eXosip: Cannot set socket option!\n",
+			   strerror(errno)));
+	      continue;
+	    }
+#endif	/* IPV6_V6ONLY */
+	}
+      
+#if 0
+      res = bind (sock, (struct sockaddr*)&net->ai_addr, curinfo->ai_addrlen);
+      if (res < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Cannot bind socket %s\n",
+		       strerror(errno)));
+	  close(sock);
+	  sock = -1;
+	  continue;
+	}
+#endif
+
+      res = connect (sock, curinfo->ai_addr, curinfo->ai_addrlen);
+      if (res < 0)
+	{
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_INFO2, NULL,
+		       "eXosip: Cannot bind socket node:%s family:%d %s\n",
+		       host, curinfo->ai_family, strerror(errno)));
+	  close(sock);
+	  sock = -1;
+	  continue;
+	}
+
+      break;
+    }
+
+  freeaddrinfo(addrinfo);
+
+  if (sock>0)
+    {
+      net->net_socket_tab[pos].socket = sock;
+      osip_strncpy(net->net_socket_tab[pos].remote_ip, host,
+		   sizeof(net->net_socket_tab[pos].remote_ip)-1);
+      net->net_socket_tab[pos].remote_port = port;
+      return sock;
+    }
+
+  return -1;
+}
+
+
+int eXosip_transport_set(osip_message_t *msg, const char *transport)
+{
+  osip_via_t *via;
+
+  via = (osip_via_t *) osip_list_get (msg->vias, 0);
+  if (via == NULL || via->protocol == NULL)
+    return -1;
+  
+  if (0==osip_strcasecmp(via->protocol, transport))
+    return 0;
+
+  osip_free(via->protocol);
+  via->protocol = osip_strdup(transport);
+  return 0;
+}
+
+int _eXosip_recvfrom(int s, char *buf, int len, unsigned int flags, struct sockaddr *from, socklen_t *fromlen)
+{
+    int message_size=0;
+    int length_done=0;
+    int real_size=0;
+    int i;
+    int extra_data_discarded;
+
+    if (!eXosip.http_port)
+    {
+        return recvfrom(s, buf, len, flags, from, fromlen);
+    }
+
+
+    /* we get the size of the HTTP data */
+    i = recv (eXosip.net_interfaces[0].net_socket, (char *) &(message_size), 4, 0);
+
+    real_size = message_size;
+    if (message_size<0)
+    {
+        return -1; /* Connection error? */
+    }
+    if (message_size==0)
+    {
+        buf[0]='\0';
+        return 0;
+    }
+    if (message_size>len-1)
+        message_size = len-1;
+
+    length_done=0;
+
+    i = recv (eXosip.net_interfaces[0].net_socket, buf, message_size, 0);
+    length_done = i;
+
+    if (length_done==real_size)
+    {
+        return length_done;
+    }
+
+    if (length_done<message_size)
+    {
+        /* continue reading up to message_size */
+        while (length_done<message_size)
+        {
+            i = recv (eXosip.net_interfaces[0].net_socket, buf+length_done, message_size-length_done, 0);
+            length_done = length_done+i;
+        }
+    }
+
+    extra_data_discarded = length_done;
+    while (extra_data_discarded<real_size)
+    {
+        char buf2[2048];
+        /* We have to discard the end of data... up to the next message */
+        i = recv (eXosip.net_interfaces[0].net_socket, buf2, 2048, 0);
+        extra_data_discarded = extra_data_discarded+i;
+    }
+    return length_done;
+}
+
+int _eXosip_sendto(int s,  const void* buf,  size_t len,  int flags,
+  const struct sockaddr* to,  socklen_t tolen)
+{
+    int i;
+    char buf2[10000];
+
+    if (!eXosip.http_port)
+    {
+       i = sendto(s, buf, len, flags, to, tolen);
+       return i;
+    }
+
+    memset(buf2, '\0', sizeof(buf2));
+    memcpy(buf2, &len, sizeof(int));
+    memcpy(buf2+sizeof(int), buf, len);
+
+    i = send(s, (char *) buf2, len+sizeof(int), 0); /* use TCP connection to proxy */
+    if (i>0)
+        i=i-sizeof(int);
+
+    return i;
+}
\ No newline at end of file
diff --git a/libs/eXosip2/eXutils.c b/libs/eXosip2/eXutils.c
new file mode 100644
index 0000000000000000000000000000000000000000..764209695b783d1957fdba62ae8fba608829ffef
--- /dev/null
+++ b/libs/eXosip2/eXutils.c
@@ -0,0 +1,694 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include <osipparser2/osip_port.h>
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+#ifdef WIN32
+
+/* You need the Platform SDK to compile this. */
+#include <Windows.h>
+#include <Iphlpapi.h>
+
+int
+ppl_dns_get_local_fqdn (char **servername, char **serverip,
+                        char **netmask, unsigned int WIN32_interface)
+{
+  unsigned int pos;
+
+  *servername = NULL;           /* no name on win32? */
+  *serverip = NULL;
+  *netmask = NULL;
+
+  /* First, try to get the interface where we should listen */
+  {
+    DWORD size_of_iptable = 0;
+    PMIB_IPADDRTABLE ipt;
+    PMIB_IFROW ifrow;
+
+    if (GetIpAddrTable (NULL, &size_of_iptable, TRUE) == ERROR_INSUFFICIENT_BUFFER)
+      {
+        ifrow = (PMIB_IFROW) _alloca (sizeof (MIB_IFROW));
+        ipt = (PMIB_IPADDRTABLE) _alloca (size_of_iptable);
+        if (ifrow == NULL || ipt == NULL)
+          {
+            /* not very usefull to continue */
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                    "ERROR alloca failed\r\n"));
+            return -1;
+          }
+
+        if (!GetIpAddrTable (ipt, &size_of_iptable, TRUE))
+          {
+            /* look for the best public interface */
+
+            for (pos = 0; pos < ipt->dwNumEntries && *netmask == NULL; ++pos)
+              {
+                /* index is */
+                struct in_addr addr;
+                struct in_addr mask;
+
+                ifrow->dwIndex = ipt->table[pos].dwIndex;
+                if (GetIfEntry (ifrow) == NO_ERROR)
+                  {
+                    switch (ifrow->dwType)
+                      {
+                        case MIB_IF_TYPE_LOOPBACK:
+                          /*    break; */
+                        case MIB_IF_TYPE_ETHERNET:
+                        default:
+                          addr.s_addr = ipt->table[pos].dwAddr;
+                          mask.s_addr = ipt->table[pos].dwMask;
+                          if (ipt->table[pos].dwIndex == WIN32_interface)
+                            {
+                              *servername = NULL;       /* no name on win32? */
+                              *serverip = osip_strdup (inet_ntoa (addr));
+                              *netmask = osip_strdup (inet_ntoa (mask));
+                              OSIP_TRACE (osip_trace
+                                          (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                           "Interface ethernet: %s/%s\r\n",
+                                           *serverip, *netmask));
+                              break;
+                            }
+                      }
+                  }
+              }
+          }
+      }
+  }
+
+  if (*serverip == NULL || *netmask == NULL)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                              "ERROR No network interface found\r\n"));
+      return -1;
+    }
+
+  return 0;
+}
+
+int
+eXosip_guess_ip_for_via (int family, char *address, int size)
+{
+  /* w2000 and W95/98 */
+  unsigned long best_interface_index;
+  DWORD hr;
+
+  /* NT4 (sp4 only?) */
+  PMIB_IPFORWARDTABLE ipfwdt;
+  DWORD siz_ipfwd_table = 0;
+  unsigned int ipf_cnt;
+
+  address[0] = '\0';
+  best_interface_index = -1;
+  /* w2000 and W95/98 only */
+
+  hr = GetBestInterface (inet_addr ("217.12.3.11"), &best_interface_index);
+  if (hr)
+    {
+      LPVOID lpMsgBuf;
+
+      FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                     FORMAT_MESSAGE_FROM_SYSTEM |
+                     FORMAT_MESSAGE_IGNORE_INSERTS,
+                     NULL,
+                     hr,
+                     MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
+                     (LPSTR) & lpMsgBuf, 0, NULL);
+
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                              "GetBestInterface: %s\r\n", lpMsgBuf));
+      best_interface_index = -1;
+    }
+
+  if (best_interface_index != -1)
+    {                           /* probably W2000 or W95/W98 */
+      char *servername;
+      char *serverip;
+      char *netmask;
+
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                              "Default Interface found %i\r\n",
+                              best_interface_index));
+
+      if (0 == ppl_dns_get_local_fqdn (&servername, &serverip, &netmask,
+                                       best_interface_index))
+        {
+          osip_strncpy (address, serverip, size - 1);
+          osip_free (servername);
+          osip_free (serverip);
+          osip_free (netmask);
+          return 0;
+        }
+      return -1;
+    }
+
+
+  if (!GetIpForwardTable (NULL, &siz_ipfwd_table, FALSE) ==
+      ERROR_INSUFFICIENT_BUFFER
+      || !(ipfwdt = (PMIB_IPFORWARDTABLE) alloca (siz_ipfwd_table)))
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                              "Allocation error\r\n"));
+      return -1;
+    }
+
+
+  /* NT4 (sp4 support only?) */
+  if (!GetIpForwardTable (ipfwdt, &siz_ipfwd_table, FALSE))
+    {
+      for (ipf_cnt = 0; ipf_cnt < ipfwdt->dwNumEntries; ++ipf_cnt)
+        {
+          if (ipfwdt->table[ipf_cnt].dwForwardDest == 0)
+            {                   /* default gateway found */
+              char *servername;
+              char *serverip;
+              char *netmask;
+
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                      "Default Interface found %i\r\n",
+                                      ipfwdt->table[ipf_cnt].dwForwardIfIndex));
+
+              if (0 == ppl_dns_get_local_fqdn (&servername,
+                                               &serverip,
+                                               &netmask,
+                                               ipfwdt->table[ipf_cnt].
+                                               dwForwardIfIndex))
+                {
+                  osip_strncpy (address, serverip, size);
+                  osip_free (servername);
+                  osip_free (serverip);
+                  osip_free (netmask);
+                  return 0;
+                }
+              return -1;
+            }
+        }
+
+    }
+
+    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                            "Please define a default network interface.\r\n"));
+#ifdef WANT_INTERFACE_ANYWAY
+
+
+  /* NT4 (sp4 support only?) */
+  if (!GetIpForwardTable (ipfwdt, &siz_ipfwd_table, FALSE))
+    {
+      for (ipf_cnt = 0; ipf_cnt < ipfwdt->dwNumEntries; ++ipf_cnt)
+        {
+            char *servername;
+            char *serverip;
+            char *netmask;
+
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                    "Default Interface found %i\r\n",
+                                    ipfwdt->table[ipf_cnt].dwForwardIfIndex));
+
+            if (0 == ppl_dns_get_local_fqdn (&servername,
+                                            &serverip,
+                                            &netmask,
+                                            ipfwdt->table[ipf_cnt].
+                                            dwForwardIfIndex))
+            {
+                /* search for public */
+                if (eXosip_is_public_address(serverip) == 0)
+                {
+                    osip_strncpy (address, serverip, size);
+                    osip_free (servername);
+                    osip_free (serverip);
+                    osip_free (netmask);
+                    return 0;
+                }
+                osip_free (servername);
+                osip_free (serverip);
+                osip_free (netmask);
+            }
+        }
+    }
+
+    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                            "No public interface found. searching private\r\n"));
+
+  /* NT4 (sp4 support only?) */
+  if (!GetIpForwardTable (ipfwdt, &siz_ipfwd_table, FALSE))
+    {
+      for (ipf_cnt = 0; ipf_cnt < ipfwdt->dwNumEntries; ++ipf_cnt)
+        {
+            char *servername;
+            char *serverip;
+            char *netmask;
+
+            OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                                    "Default Interface found %i\r\n",
+                                    ipfwdt->table[ipf_cnt].dwForwardIfIndex));
+
+            if (0 == ppl_dns_get_local_fqdn (&servername,
+                                            &serverip,
+                                            &netmask,
+                                            ipfwdt->table[ipf_cnt].
+                                            dwForwardIfIndex))
+            {
+                osip_strncpy (address, serverip, size);
+                osip_free (servername);
+                osip_free (serverip);
+                osip_free (netmask);
+                return 0;
+            }
+        }
+    }
+
+  {
+      char *lo = osip_strdup("127.0.0.1");
+      osip_strncpy (address, lo, size);
+      osip_free(lo);
+      return 0;
+  }
+
+    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                            "No interface found. returning 127.0.0.1\r\n"));
+  /* no default gateway interface found */
+  return 0;
+#else
+  return -1;
+#endif /* WANT_INTERFACE_ANYWAY */
+}
+
+
+#else /* sun, *BSD, linux, and other? */
+
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+
+#include <sys/ioctl.h>
+#include <net/if.h>
+#include <unistd.h>
+#include <sys/param.h>
+
+#include <stdio.h>
+
+static int ppl_dns_default_gateway_ipv4 (char *address, int size);
+static int ppl_dns_default_gateway_ipv6 (char *address, int size);
+
+
+int
+eXosip_guess_ip_for_via (int familiy, char *address, int size)
+{
+  if (familiy == AF_INET6)
+    {
+      return ppl_dns_default_gateway_ipv6 (address, size);
+  } else
+    {
+      return ppl_dns_default_gateway_ipv4 (address, size);
+    }
+}
+
+/* This is a portable way to find the default gateway.
+ * The ip of the default interface is returned.
+ */
+static int
+ppl_dns_default_gateway_ipv4 (char *address, int size)
+{
+#ifdef __APPLE_CC__
+  int len;
+#else
+  unsigned int len;
+#endif
+  int sock_rt, on = 1;
+  struct sockaddr_in iface_out;
+  struct sockaddr_in remote;
+
+  memset (&remote, 0, sizeof (struct sockaddr_in));
+
+  remote.sin_family = AF_INET;
+  remote.sin_addr.s_addr = inet_addr ("217.12.3.11");
+  remote.sin_port = htons (11111);
+
+  memset (&iface_out, 0, sizeof (iface_out));
+  sock_rt = socket (AF_INET, SOCK_DGRAM, 0);
+
+  if (setsockopt (sock_rt, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST");
+      close (sock_rt);
+      return -1;
+    }
+
+  if (connect
+      (sock_rt, (struct sockaddr *) &remote, sizeof (struct sockaddr_in)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] connect");
+      close (sock_rt);
+      return -1;
+    }
+
+  len = sizeof (iface_out);
+  if (getsockname (sock_rt, (struct sockaddr *) &iface_out, &len) == -1)
+    {
+      perror ("DEBUG: [get_output_if] getsockname");
+      close (sock_rt);
+      return -1;
+    }
+
+  close (sock_rt);
+  if (iface_out.sin_addr.s_addr == 0)
+    {                           /* what is this case?? */
+      return -1;
+    }
+  osip_strncpy (address, inet_ntoa (iface_out.sin_addr), size - 1);
+  return 0;
+}
+
+
+/* This is a portable way to find the default gateway.
+ * The ip of the default interface is returned.
+ */
+static int
+ppl_dns_default_gateway_ipv6 (char *address, int size)
+{
+#ifdef __APPLE_CC__
+  int len;
+#else
+  unsigned int len;
+#endif
+  int sock_rt, on = 1;
+  struct sockaddr_in6 iface_out;
+  struct sockaddr_in6 remote;
+
+  memset (&remote, 0, sizeof (struct sockaddr_in6));
+
+  remote.sin6_family = AF_INET6;
+  inet_pton (AF_INET6, "2001:638:500:101:2e0:81ff:fe24:37c6", &remote.sin6_addr);
+  remote.sin6_port = htons (11111);
+
+  memset (&iface_out, 0, sizeof (iface_out));
+  sock_rt = socket (AF_INET6, SOCK_DGRAM, 0);
+
+  if (setsockopt (sock_rt, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST");
+      close (sock_rt);
+      return -1;
+    }
+
+  if (connect
+      (sock_rt, (struct sockaddr *) &remote, sizeof (struct sockaddr_in6)) == -1)
+    {
+      perror ("DEBUG: [get_output_if] connect");
+      close (sock_rt);
+      return -1;
+    }
+
+  len = sizeof (iface_out);
+  if (getsockname (sock_rt, (struct sockaddr *) &iface_out, &len) == -1)
+    {
+      perror ("DEBUG: [get_output_if] getsockname");
+      close (sock_rt);
+      return -1;
+    }
+  close (sock_rt);
+
+  if (iface_out.sin6_addr.s6_addr == 0)
+    {                           /* what is this case?? */
+      return -1;
+    }
+  inet_ntop (AF_INET6, (const void *) &iface_out.sin6_addr, address, size - 1);
+  return 0;
+}
+
+#endif
+
+int
+eXosip_get_localip_for (const char *address_to_reach, char *loc, int size)
+{
+  int err, tmp;
+  struct addrinfo hints;
+  struct addrinfo *res = NULL;
+  struct sockaddr_storage addr;
+  int sock;
+
+#ifdef __APPLE_CC__
+  int s;
+#else
+  socklen_t s;
+#endif
+#ifdef MAXHOSTNAMELEN
+  if (size > MAXHOSTNAMELEN)
+    size = MAXHOSTNAMELEN;
+#else
+  if (size > 256)
+      size = 256;
+#endif
+  if (eXosip.forced_localip)
+    {
+      if (size > sizeof (eXosip.net_interfaces[0].net_firewall_ip))
+        size = sizeof (eXosip.net_interfaces[0].net_firewall_ip);
+      strncpy (loc, eXosip.net_interfaces[0].net_firewall_ip, size);
+      return 0;
+    }
+
+  strcpy (loc, "127.0.0.1");    /* always fallback to local loopback */
+
+  memset (&hints, 0, sizeof (hints));
+  hints.ai_family = PF_UNSPEC;
+  hints.ai_socktype = SOCK_DGRAM;
+  /*hints.ai_flags=AI_NUMERICHOST|AI_CANONNAME; */
+  err = getaddrinfo (address_to_reach, "5060", &hints, &res);
+  if (err != 0)
+    {
+      eXosip_trace (OSIP_ERROR,
+                    ("Error in getaddrinfo for %s: %s\n", address_to_reach,
+                     gai_strerror (err)));
+      return -1;
+    }
+  if (res == NULL)
+    {
+      eXosip_trace (OSIP_ERROR, ("getaddrinfo reported nothing !"));
+      return -1;
+    }
+  sock = socket (res->ai_family, SOCK_DGRAM, 0);
+  tmp = 1;
+  err = setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&tmp, sizeof (int));
+  if (err < 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("Error in setsockopt: %s\n", strerror (errno)));
+      return -1;
+    }
+  err = connect (sock, res->ai_addr, res->ai_addrlen);
+  if (err < 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("Error in connect: %s\n", strerror (errno)));
+      freeaddrinfo (res);
+      close (sock);
+      return -1;
+    }
+  freeaddrinfo (res);
+  res = NULL;
+  s = sizeof (addr);
+  err = getsockname (sock, (struct sockaddr *) &addr, &s);
+  if (err != 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("Error in getsockname: %s\n", strerror (errno)));
+      close (sock);
+      return -1;
+    }
+
+  err =
+    getnameinfo ((struct sockaddr *) &addr, s, loc, size, NULL, 0, NI_NUMERICHOST);
+  if (err != 0)
+    {
+      eXosip_trace (OSIP_ERROR, ("getnameinfo error:%s", strerror (errno)));
+      return -1;
+    }
+  close (sock);
+  eXosip_trace (OSIP_INFO1,
+                ("Outgoing interface to reach %s is %s.\n", address_to_reach,
+                 loc));
+  return 0;
+}
+
+
+#ifdef SM
+
+void
+eXosip_get_localip_from_via (osip_message_t * mesg, char *locip, int size)
+{
+  osip_via_t *via = NULL;
+  char *host;
+
+  via = (osip_via_t *) osip_list_get (mesg->vias, 0);
+  if (via == NULL)
+    {
+      host = "15.128.128.93";
+      eXosip_trace (OSIP_ERROR, ("Could not get via:%s"));
+  } else
+    host = via->host;
+  eXosip_get_localip_for (host, locip, size);
+
+}
+#endif
+
+char *
+strdup_printf (const char *fmt, ...)
+{
+  /* Guess we need no more than 100 bytes. */
+  int n, size = 100;
+  char *p;
+  va_list ap;
+
+  if ((p = osip_malloc (size)) == NULL)
+    return NULL;
+  while (1)
+    {
+      /* Try to print in the allocated space. */
+      va_start (ap, fmt);
+#ifdef WIN32
+      n = _vsnprintf (p, size, fmt, ap);
+#else
+      n = vsnprintf (p, size, fmt, ap);
+#endif
+      va_end (ap);
+      /* If that worked, return the string. */
+      if (n > -1 && n < size)
+        return p;
+      /* Else try again with more space. */
+      if (n > -1)               /* glibc 2.1 */
+        size = n + 1;           /* precisely what is needed */
+      else                      /* glibc 2.0 */
+        size *= 2;              /* twice the old size */
+      if ((p = realloc (p, size)) == NULL)
+        return NULL;
+    }
+}
+
+int
+eXosip_get_addrinfo (struct addrinfo **addrinfo, const char *hostname,
+		     int service, int protocol)
+{
+#ifndef WIN32
+  struct in_addr addr;
+  struct in6_addr addrv6;
+#else
+  unsigned long int one_inet_addr;
+#endif
+  struct addrinfo hints;
+  int error;
+  char portbuf[10];
+
+  if (hostname==NULL)
+    return -1;
+
+  if (service != -1) /* -1 for SRV record */
+    snprintf (portbuf, sizeof (portbuf), "%i", service);
+
+  memset (&hints, 0, sizeof (hints));
+#ifndef WIN32
+  if (inet_pton (AF_INET, hostname, &addr) > 0)
+    {
+      /* ipv4 address detected */
+      hints.ai_flags = AI_NUMERICHOST;
+      hints.ai_family = PF_INET;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "IPv4 address detected: %s\n", hostname));
+  } else if (inet_pton (AF_INET6, hostname, &addrv6) > 0)
+    {
+      /* ipv6 address detected */
+      /* Do the resolution anyway */
+      hints.ai_flags = AI_CANONNAME;
+      hints.ai_family = PF_INET6;
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "IPv6 address detected: %s\n", hostname));
+  } else
+    {
+      /* hostname must be resolved */
+      hints.ai_flags = AI_CANONNAME;
+      if (protocol==IPPROTO_UDP)
+	hints.ai_family = (eXosip.net_interfaces[0].net_ip_family == AF_INET) ? PF_INET : PF_INET6;
+      else if (protocol==IPPROTO_TCP)
+	hints.ai_family = (eXosip.net_interfaces[1].net_ip_family == AF_INET) ? PF_INET : PF_INET6;
+      else
+	{
+	  hints.ai_family = (eXosip.net_interfaces[0].net_ip_family == AF_INET) ? PF_INET : PF_INET6;
+	  OSIP_TRACE (osip_trace
+		      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		       "eXosip: unsupported protocol (default to UDP)\n"));
+	}
+
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "Not an IPv4 or IPv6 address: %s\n", hostname));
+    }
+#else
+  if ((int) (one_inet_addr = inet_addr (hostname)) == -1)
+    hints.ai_flags = AI_CANONNAME;
+  else
+    hints.ai_flags = AI_NUMERICHOST;
+
+#ifdef IPV6_SUPPORT
+  hints.ai_family = PF_UNSPEC;  /* ipv6 support */
+#else
+  hints.ai_family = PF_INET;    /* ipv4 only support */
+#endif
+
+#endif
+
+  if (protocol==IPPROTO_UDP)
+    hints.ai_socktype = SOCK_DGRAM;
+  else
+    hints.ai_socktype = SOCK_STREAM;
+
+  hints.ai_protocol = protocol; /* IPPROTO_UDP or IPPROTO_TCP */
+  if (service == -1) /* -1 for SRV record */
+    {
+      error = getaddrinfo (hostname, "sip", &hints, addrinfo);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "SRV resolution with udp-sip-%s\n", hostname));
+  } else
+    {
+      error = getaddrinfo (hostname, portbuf, &hints, addrinfo);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "DNS resolution with %s:%i\n", hostname, service));
+    }
+  if (error || *addrinfo == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                   "getaddrinfo failure. %s:%s (%s)\n", hostname, portbuf,
+                   gai_strerror (error)));
+      return -1;
+    }
+
+  return 0;
+}
+
diff --git a/libs/eXosip2/inet_ntop.c b/libs/eXosip2/inet_ntop.c
new file mode 100644
index 0000000000000000000000000000000000000000..d3d765c263801a8f322ce55b017d03d313c9ff3b
--- /dev/null
+++ b/libs/eXosip2/inet_ntop.c
@@ -0,0 +1,217 @@
+/* This is from the BIND 4.9.4 release, modified to compile by itself */
+
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#if defined(WIN32)
+
+#include <osipparser2/osip_port.h>
+#include "eXosip2.h"
+
+#include <windowsx.h>
+#include <winsock2.h>
+#include <Ws2tcpip.h>
+#include <Iphlpapi.h>
+
+#include "inet_ntop.h"
+
+/* added by adm */
+/*
+ * the definitions below are valid for 32-bit architectures and will have to
+ * be adjusted for 16- or 64-bit architectures
+ */
+typedef unsigned __int8		uint8_t;
+typedef unsigned __int16	uint16_t;
+typedef unsigned __int32	uint32_t;
+typedef unsigned __int64    uint64_t;
+typedef __int8		int8_t;
+typedef __int16		int16_t;
+typedef __int32		int32_t;
+typedef __int64		int64_t;
+typedef unsigned long	in_addr_t;
+
+/* !added by amd */
+
+#define	IN6ADDRSZ	16
+#define	INT16SZ		 2
+
+#ifndef	AF_INET6
+#define	AF_INET6	AF_MAX+1	/* just to let this compile */
+#endif
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static const char *_inet_ntop4(const u_char *src, char *dst, size_t size);
+static const char *_inet_ntop6(const u_char *src, char *dst, size_t size);
+
+/* char *
+ * inet_ntop(af, src, dst, size)
+ *	convert a network format address to presentation format.
+ * return:
+ *	pointer to presentation format address (`dst'), or NULL (see errno).
+ * author:
+ *	Paul Vixie, 1996.
+ */
+const char *
+_inet_ntop(af, src, dst, size)
+	int af;
+	const void *src;
+	char *dst;
+	size_t size;
+{
+	switch (af) {
+	case AF_INET:
+		return (_inet_ntop4(src, dst, size));
+	case AF_INET6:
+		return (_inet_ntop6(src, dst, size));
+	default:
+		errno = EAFNOSUPPORT;
+		return (NULL);
+	}
+	/* NOTREACHED */
+}
+
+/* const char *
+ * inet_ntop4(src, dst, size)
+ *	format an IPv4 address, more or less like inet_ntoa()
+ * return:
+ *	`dst' (as a const)
+ * notes:
+ *	(1) uses no statics
+ *	(2) takes a u_char* not an in_addr as input
+ * author:
+ *	Paul Vixie, 1996.
+ */
+static const char *
+_inet_ntop4(src, dst, size)
+	const u_char *src;
+	char *dst;
+	size_t size;
+{
+	static const char fmt[] = "%u.%u.%u.%u";
+	char tmp[sizeof "255.255.255.255"];
+
+	sprintf(tmp, fmt, src[0], src[1], src[2], src[3]);
+	if ((size_t)strlen(tmp) > size) {
+		errno = ENOSPC;
+		return (NULL);
+	}
+	strcpy(dst, tmp);
+	return (dst);
+}
+
+/* const char *
+ * inet_ntop6(src, dst, size)
+ *	convert IPv6 binary address into presentation (printable) format
+ * author:
+ *	Paul Vixie, 1996.
+ */
+static const char *
+_inet_ntop6(src, dst, size)
+	const u_char *src;
+	char *dst;
+	size_t size;
+{
+	/*
+	 * Note that int32_t and int16_t need only be "at least" large enough
+	 * to contain a value of the specified size.  On some systems, like
+	 * Crays, there is no such thing as an integer variable with 16 bits.
+	 * Keep this in mind if you think this function should have been coded
+	 * to use pointer overlays.  All the world's not a VAX.
+	 */
+	char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
+	struct { int base, len; } best, cur;
+	uint32_t words[IN6ADDRSZ / INT16SZ];
+	int i;
+
+	/*
+	 * Preprocess:
+	 *	Copy the input (bytewise) array into a wordwise array.
+	 *	Find the longest run of 0x00's in src[] for :: shorthanding.
+	 */
+	memset(words, 0, sizeof words);
+	for (i = 0; i < IN6ADDRSZ; i++)
+		words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
+	best.base = -1;
+	cur.base = -1;
+	for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+		if (words[i] == 0) {
+			if (cur.base == -1)
+				cur.base = i, cur.len = 1;
+			else
+				cur.len++;
+		} else {
+			if (cur.base != -1) {
+				if (best.base == -1 || cur.len > best.len)
+					best = cur;
+				cur.base = -1;
+			}
+		}
+	}
+	if (cur.base != -1) {
+		if (best.base == -1 || cur.len > best.len)
+			best = cur;
+	}
+	if (best.base != -1 && best.len < 2)
+		best.base = -1;
+
+	/*
+	 * Format the result.
+	 */
+	tp = tmp;
+	for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+		/* Are we inside the best run of 0x00's? */
+		if (best.base != -1 && i >= best.base &&
+		    i < (best.base + best.len)) {
+			if (i == best.base)
+				*tp++ = ':';
+			continue;
+		}
+		/* Are we following an initial run of 0x00s or any real hex? */
+		if (i != 0)
+			*tp++ = ':';
+		/* Is this address an encapsulated IPv4? */
+		if (i == 6 && best.base == 0 &&
+		    (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+			if (!_inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
+				return (NULL);
+			tp += strlen(tp);
+			break;
+		}
+		sprintf(tp, "%x", words[i]);
+		tp += strlen(tp);
+	}
+	/* Was it a trailing run of 0x00's? */
+	if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
+		*tp++ = ':';
+	*tp++ = '\0';
+
+	/*
+	 * Check for overflow, copy, and we're done.
+	 */
+	if ((size_t) (tp - tmp) > size) {
+		errno = ENOSPC;
+		return (NULL);
+	}
+	strcpy(dst, tmp);
+	return (dst);
+}
+
+#endif
+
diff --git a/libs/eXosip2/inet_ntop.h b/libs/eXosip2/inet_ntop.h
new file mode 100644
index 0000000000000000000000000000000000000000..d965806f77c7f9e1fbbc6286d7a98906840d9c52
--- /dev/null
+++ b/libs/eXosip2/inet_ntop.h
@@ -0,0 +1,21 @@
+
+#if defined(WIN32)
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#ifndef EAFNOSUPPORT
+#define EAFNOSUPPORT	WSAEAFNOSUPPORT
+#endif
+
+
+const char *_inet_ntop(int af, const void *src, char *dst, size_t size);
+
+#define inet_ntop _inet_ntop
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* WIN32 */
diff --git a/libs/eXosip2/jauth.c b/libs/eXosip2/jauth.c
new file mode 100644
index 0000000000000000000000000000000000000000..63c9539d9d1695c0ab13eec1e2c4de49d188cea6
--- /dev/null
+++ b/libs/eXosip2/jauth.c
@@ -0,0 +1,489 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+#include <osip2/osip_mt.h>
+#include <osip2/osip_condv.h>
+
+/* #include <osip2/global.h> */
+#include <osipparser2/osip_md5.h>
+
+/* TAKEN from rcf2617.txt */
+
+#define HASHLEN 16
+typedef char HASH[HASHLEN];
+
+#define HASHHEXLEN 32
+typedef char HASHHEX[HASHHEXLEN + 1];
+
+#define IN
+#define OUT
+
+extern eXosip_t eXosip;
+
+/* Private functions */
+static void CvtHex (IN HASH Bin, OUT HASHHEX Hex);
+static void DigestCalcHA1 (IN const char *pszAlg, IN const char *pszUserName,
+                           IN const char *pszRealm,
+                           IN const char *pszPassword,
+                           IN const char *pszNonce, IN const char *pszCNonce,
+                           OUT HASHHEX SessionKey);
+static void DigestCalcResponse (IN HASHHEX HA1, IN const char *pszNonce,
+                                IN const char *pszNonceCount,
+                                IN const char *pszCNonce,
+                                IN const char *pszQop,
+                                IN const char *pszMethod,
+                                IN const char *pszDigestUri,
+                                IN HASHHEX HEntity, OUT HASHHEX Response);
+
+static void
+CvtHex (IN HASH Bin, OUT HASHHEX Hex)
+{
+  unsigned short i;
+  unsigned char j;
+
+  for (i = 0; i < HASHLEN; i++)
+    {
+      j = (Bin[i] >> 4) & 0xf;
+      if (j <= 9)
+        Hex[i * 2] = (j + '0');
+      else
+        Hex[i * 2] = (j + 'a' - 10);
+      j = Bin[i] & 0xf;
+      if (j <= 9)
+        Hex[i * 2 + 1] = (j + '0');
+      else
+        Hex[i * 2 + 1] = (j + 'a' - 10);
+    };
+  Hex[HASHHEXLEN] = '\0';
+}
+
+/* calculate H(A1) as per spec */
+static void
+DigestCalcHA1 (IN const char *pszAlg,
+               IN const char *pszUserName,
+               IN const char *pszRealm,
+               IN const char *pszPassword,
+               IN const char *pszNonce,
+               IN const char *pszCNonce, OUT HASHHEX SessionKey)
+{
+  MD5_CTX Md5Ctx;
+  HASH HA1;
+
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) pszUserName, strlen (pszUserName));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszRealm, strlen (pszRealm));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszPassword, strlen (pszPassword));
+  MD5Final ((unsigned char *) HA1, &Md5Ctx);
+  if ((pszAlg != NULL) && osip_strcasecmp (pszAlg, "md5-sess") == 0)
+    {
+      MD5Init (&Md5Ctx);
+      MD5Update (&Md5Ctx, (unsigned char *) HA1, HASHLEN);
+      MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+      MD5Update (&Md5Ctx, (unsigned char *) pszNonce, strlen (pszNonce));
+      MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+      MD5Update (&Md5Ctx, (unsigned char *) pszCNonce, strlen (pszCNonce));
+      MD5Final ((unsigned char *) HA1, &Md5Ctx);
+    }
+  CvtHex (HA1, SessionKey);
+}
+
+/* calculate request-digest/response-digest as per HTTP Digest spec */
+static void
+DigestCalcResponse (IN HASHHEX HA1,     /* H(A1) */
+                    IN const char *pszNonce,    /* nonce from server */
+                    IN const char *pszNonceCount,       /* 8 hex digits */
+                    IN const char *pszCNonce,   /* client nonce */
+                    IN const char *pszQop,      /* qop-value: "", "auth", "auth-int" */
+                    IN const char *pszMethod,   /* method from the request */
+                    IN const char *pszDigestUri,        /* requested URL */
+                    IN HASHHEX HEntity, /* H(entity body) if qop="auth-int" */
+                    OUT HASHHEX Response
+                    /* request-digest or response-digest */ )
+{
+  MD5_CTX Md5Ctx;
+  HASH HA2;
+  HASH RespHash;
+  HASHHEX HA2Hex;
+
+  /* calculate H(A2) */
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) pszMethod, strlen (pszMethod));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszDigestUri, strlen (pszDigestUri));
+
+  if (pszQop != NULL)
+    {
+
+      /*#define AUTH_INT_SUPPORT *//* experimental  */
+#ifdef AUTH_INT_SUPPORT         /* experimental  */
+      char *index = strchr (pszQop, 'i');
+
+      while (index != NULL && index - pszQop >= 5 && strlen (index) >= 3)
+        {
+          if (osip_strncasecmp (index - 5, "auth-int", 8) == 0)
+            {
+              goto auth_withqop;
+            }
+          index = strchr (index + 1, 'i');
+        }
+
+      strchr (pszQop, 'a');
+      while (index != NULL && strlen (index) >= 4)
+        {
+          if (osip_strncasecmp (index - 5, "auth", 4) == 0)
+            {
+              /* and in the case of a unknown token
+                 like auth1. It is not auth, but this
+                 implementation will think it is!??
+                 This is may not happen but it's a bug!
+               */
+              goto auth_withqop;
+            }
+          index = strchr (index + 1, 'a');
+        }
+#endif
+      goto auth_withoutqop;
+
+    };
+
+auth_withoutqop:
+  MD5Final ((unsigned char *) HA2, &Md5Ctx);
+  CvtHex (HA2, HA2Hex);
+
+  /* calculate response */
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) HA1, HASHHEXLEN);
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszNonce, strlen (pszNonce));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+
+  goto end;
+
+#ifdef AUTH_INT_SUPPORT         /* experimental  */
+auth_withqop:
+#endif
+
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) HEntity, HASHHEXLEN);
+  MD5Final ((unsigned char *) HA2, &Md5Ctx);
+  CvtHex (HA2, HA2Hex);
+
+  /* calculate response */
+  MD5Init (&Md5Ctx);
+  MD5Update (&Md5Ctx, (unsigned char *) HA1, HASHHEXLEN);
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszNonce, strlen (pszNonce));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszNonceCount, strlen (pszNonceCount));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszCNonce, strlen (pszCNonce));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+  MD5Update (&Md5Ctx, (unsigned char *) pszQop, strlen (pszQop));
+  MD5Update (&Md5Ctx, (unsigned char *) ":", 1);
+
+end:
+  MD5Update (&Md5Ctx, (unsigned char *) HA2Hex, HASHHEXLEN);
+  MD5Final ((unsigned char *) RespHash, &Md5Ctx);
+  CvtHex (RespHash, Response);
+}
+
+
+int
+__eXosip_create_authorization_header (osip_message_t * previous_answer,
+                                      const char *rquri, const char *username,
+                                      const char *passwd, const char *ha1,
+                                      osip_authorization_t ** auth,
+				      const char *method)
+{
+  osip_authorization_t *aut;
+  osip_www_authenticate_t *wa = NULL;
+
+  osip_message_get_www_authenticate (previous_answer, 0, &wa);
+
+  /* make some test */
+  if (passwd == NULL)
+    return -1;
+  if (wa == NULL || wa->auth_type == NULL
+      || (wa->realm == NULL) || (wa->nonce == NULL))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "www_authenticate header is not acceptable.\n"));
+      return -1;
+    }
+  if (0 != osip_strcasecmp ("Digest", wa->auth_type))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (Digest only).\n"));
+      return -1;
+    }
+  /* "MD5" is invalid, but some servers use it. */
+  if (wa->algorithm != NULL && 0 != osip_strcasecmp ("MD5", wa->algorithm)
+      && 0 != osip_strcasecmp ("\"MD5\"", wa->algorithm))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (Digest only).\n"));
+      return -1;
+    }
+  if (0 != osip_authorization_init (&aut))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "allocation with authorization_init failed.\n"));
+      return -1;
+    }
+
+  /* just copy some feilds from response to new request */
+  osip_authorization_set_auth_type (aut, osip_strdup ("Digest"));
+  osip_authorization_set_realm (aut,
+                                osip_strdup (osip_www_authenticate_get_realm
+                                             (wa)));
+  osip_authorization_set_nonce (aut,
+                                osip_strdup (osip_www_authenticate_get_nonce
+                                             (wa)));
+  if (osip_www_authenticate_get_opaque (wa) != NULL)
+    osip_authorization_set_opaque (aut,
+                                   osip_strdup
+                                   (osip_www_authenticate_get_opaque (wa)));
+  /* copy the username field in new request */
+  aut->username = osip_malloc (strlen (username) + 3);
+  sprintf (aut->username, "\"%s\"", username);
+
+  {
+    char *tmp = osip_malloc (strlen (rquri) + 3);
+
+    sprintf (tmp, "\"%s\"", rquri);
+    osip_authorization_set_uri (aut, tmp);
+  }
+
+  osip_authorization_set_algorithm (aut, osip_strdup ("MD5"));
+
+  {
+    char *pszNonce =
+      osip_strdup_without_quote (osip_www_authenticate_get_nonce (wa));
+    char *pszCNonce = NULL;
+    const char *pszUser = username;
+    char *pszRealm =
+      osip_strdup_without_quote (osip_authorization_get_realm (aut));
+    const char *pszPass = NULL;
+    char *pszAlg = osip_strdup ("MD5");
+    char *szNonceCount = NULL;
+    const char *pszMethod = method; /* previous_answer->cseq->method; */
+    char *pszQop = NULL;
+    const char *pszURI = rquri;
+
+    HASHHEX HA1;
+    HASHHEX HA2 = "";
+    HASHHEX Response;
+    const char *pha1 = NULL;
+
+    pszPass = passwd;
+    if (osip_authorization_get_nonce_count (aut) != NULL)
+      szNonceCount = osip_strdup (osip_authorization_get_nonce_count (aut));
+    if (osip_authorization_get_message_qop (aut) != NULL)
+      pszQop = osip_strdup (osip_authorization_get_message_qop (aut));
+
+    if (ha1 && ha1[0])
+      {
+	/* Depending on algorithm=md5 */
+	pha1 = ha1;
+      }
+    else
+      {
+	DigestCalcHA1 (pszAlg, pszUser, pszRealm, pszPass, pszNonce, pszCNonce, HA1);
+	pha1 = HA1;
+      }
+
+    DigestCalcResponse ((char *)pha1, pszNonce, szNonceCount, pszCNonce, pszQop,
+                        pszMethod, pszURI, HA2, Response);
+    OSIP_TRACE (osip_trace
+                (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                 "Response in authorization |%s|\n", Response));
+    {
+      char *resp = osip_malloc (35);
+
+      sprintf (resp, "\"%s\"", Response);
+      osip_authorization_set_response (aut, resp);
+    }
+    osip_free (pszAlg);         /* xkd, 2004-5-13 */
+    osip_free (pszNonce);
+    osip_free (pszCNonce);
+    osip_free (pszRealm);
+    osip_free (pszQop);
+    osip_free (szNonceCount);
+  }
+
+  *auth = aut;
+  return 0;
+}
+
+int
+__eXosip_create_proxy_authorization_header (osip_message_t * previous_answer,
+                                            const char *rquri,
+                                            const char *username,
+                                            const char *passwd,
+                                            const char *ha1,
+                                            osip_proxy_authorization_t ** auth,
+					    const char *method)
+{
+  osip_proxy_authorization_t *aut;
+  osip_proxy_authenticate_t *wa;
+
+  osip_message_get_proxy_authenticate (previous_answer, 0, &wa);
+
+  /* make some test */
+  if (passwd == NULL)
+    return -1;
+  if (wa == NULL || wa->auth_type == NULL
+      || (wa->realm == NULL) || (wa->nonce == NULL))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "www_authenticate header is not acceptable.\n"));
+      return -1;
+    }
+  if (0 != osip_strcasecmp ("Digest", wa->auth_type))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (Digest only).\n"));
+      return -1;
+    }
+  /* "MD5" is invalid, but some servers use it. */
+  if (wa->algorithm != NULL && 0 != osip_strcasecmp ("MD5", wa->algorithm)
+      && 0 != osip_strcasecmp ("\"MD5\"", wa->algorithm))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "Authentication method not supported. (MD5 Digest only).\n"));
+      return -1;
+    }
+  if (0 != osip_proxy_authorization_init (&aut))
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "allocation with authorization_init failed.\n"));
+      return -1;
+    }
+
+  /* just copy some feilds from response to new request */
+  osip_proxy_authorization_set_auth_type (aut, osip_strdup ("Digest"));
+  osip_proxy_authorization_set_realm (aut,
+                                      osip_strdup
+                                      (osip_proxy_authenticate_get_realm (wa)));
+  osip_proxy_authorization_set_nonce (aut,
+                                      osip_strdup
+                                      (osip_proxy_authenticate_get_nonce (wa)));
+  if (osip_proxy_authenticate_get_opaque (wa) != NULL)
+    osip_proxy_authorization_set_opaque (aut,
+                                         osip_strdup
+                                         (osip_proxy_authenticate_get_opaque
+                                          (wa)));
+  /* copy the username field in new request */
+  aut->username = osip_malloc (strlen (username) + 3);
+  sprintf (aut->username, "\"%s\"", username);
+
+  {
+    char *tmp = osip_malloc (strlen (rquri) + 3);
+
+    sprintf (tmp, "\"%s\"", rquri);
+    osip_proxy_authorization_set_uri (aut, tmp);
+  }
+  osip_proxy_authorization_set_algorithm (aut, osip_strdup ("MD5"));
+
+  {
+    char *pszNonce = NULL;
+    char *pszCNonce = NULL;
+    const char *pszUser = username;
+    char *pszRealm =
+      osip_strdup_without_quote (osip_proxy_authorization_get_realm (aut));
+    const char *pszPass = NULL;
+    char *pszAlg = osip_strdup ("MD5");
+    char *szNonceCount = NULL;
+    char *pszMethod = (char *)method; /* previous_answer->cseq->method; */
+    char *pszQop = NULL;
+    const char *pszURI = rquri;
+
+    HASHHEX HA1;
+    HASHHEX HA2 = "";
+    HASHHEX Response;
+    const char *pha1 = NULL;
+
+    pszPass = passwd;
+
+    if (osip_www_authenticate_get_nonce (wa) == NULL)
+      return -1;
+    pszNonce = osip_strdup_without_quote (osip_www_authenticate_get_nonce (wa));
+
+    /* should upgrade szNonceCount */
+    /* should add szNonceCount in aut */
+    /* should upgrade pszCNonce */
+    /* should add pszCNonce in aut */
+
+    if (osip_proxy_authenticate_get_qop_options (wa) != NULL)
+      {
+        szNonceCount = osip_strdup ("00000001");
+        /* MUST be incremented on each */
+        pszQop = osip_strdup (osip_proxy_authenticate_get_qop_options (wa));
+        pszCNonce = osip_strdup ("234abcc436e2667097e7fe6eia53e8dd");
+      }
+    if (ha1 && ha1[0])
+      {
+	/* Depending on algorithm=md5 */
+	pha1 = ha1;
+      }
+    else
+      {
+	DigestCalcHA1 (pszAlg, pszUser, pszRealm, pszPass, pszNonce, pszCNonce, HA1);
+	pha1 = HA1;
+      }
+    DigestCalcResponse ((char *)pha1, pszNonce, szNonceCount, pszCNonce, pszQop,
+                        pszMethod, pszURI, HA2, Response);
+    OSIP_TRACE (osip_trace
+                (__FILE__, __LINE__, OSIP_INFO4, NULL,
+                 "Response in proxy_authorization |%s|\n", Response));
+    {
+      char *resp = osip_malloc (35);
+
+      sprintf (resp, "\"%s\"", Response);
+      osip_proxy_authorization_set_response (aut, resp);
+    }
+    osip_free (pszAlg);         /* xkd, 2004-5-13 */
+    osip_free (pszNonce);
+    osip_free (pszCNonce);
+    osip_free (pszRealm);
+    osip_free (pszQop);
+    osip_free (szNonceCount);
+  }
+
+  *auth = aut;
+  return 0;
+}
diff --git a/libs/eXosip2/jcall.c b/libs/eXosip2/jcall.c
new file mode 100644
index 0000000000000000000000000000000000000000..cd13c0432ea7d50002f961933cd1851529d6a68b
--- /dev/null
+++ b/libs/eXosip2/jcall.c
@@ -0,0 +1,119 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_call_find (int cid, eXosip_call_t ** jc)
+{
+  for (*jc = eXosip.j_calls; *jc != NULL; *jc = (*jc)->next)
+    {
+      if ((*jc)->c_id == cid)
+        {
+          return 0;
+        }
+    }
+  *jc = NULL;
+  return -1;
+}
+
+int
+eXosip_call_init (eXosip_call_t ** jc)
+{
+  *jc = (eXosip_call_t *) osip_malloc (sizeof (eXosip_call_t));
+  if (*jc == NULL)
+    return -1;
+  memset (*jc, 0, sizeof (eXosip_call_t));
+
+  (*jc)->c_id = -1;             /* make sure the eXosip_update will assign a valid id to the call */
+  return 0;
+}
+
+void
+__eXosip_call_remove_dialog_reference_in_call (eXosip_call_t * jc,
+                                               eXosip_dialog_t * jd)
+{
+  eXosip_dialog_t *_jd;
+  jinfo_t *ji;
+
+  if (jc == NULL)
+    return;
+  if (jd == NULL)
+    return;
+
+
+  for (_jd = jc->c_dialogs; _jd != NULL; _jd = _jd->next)
+    {
+      if (jd == _jd)
+        break;
+    }
+  if (_jd == NULL)
+    {
+      /* dialog not found??? */
+    }
+
+  ji = osip_transaction_get_your_instance (jc->c_inc_tr);
+  if (ji != NULL && ji->jd == jd)
+    ji->jd = NULL;
+  ji = osip_transaction_get_your_instance (jc->c_out_tr);
+  if (ji != NULL && ji->jd == jd)
+    ji->jd = NULL;
+}
+
+void
+eXosip_call_free (eXosip_call_t * jc)
+{
+  /* ... */
+
+  eXosip_dialog_t *jd;
+
+  if (jc->response_auth!=NULL)
+    osip_message_free(jc->response_auth);
+
+  for (jd = jc->c_dialogs; jd != NULL; jd = jc->c_dialogs)
+    {
+      REMOVE_ELEMENT (jc->c_dialogs, jd);
+      eXosip_dialog_free (jd);
+    }
+
+  __eXosip_delete_jinfo (jc->c_inc_tr);
+  __eXosip_delete_jinfo (jc->c_out_tr);
+  if (jc->c_inc_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_inc_tr, 0);
+  if (jc->c_out_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_out_tr, 0);
+
+  __eXosip_delete_jinfo (jc->c_inc_options_tr);
+  __eXosip_delete_jinfo (jc->c_out_options_tr);
+  if (jc->c_inc_options_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_inc_options_tr, 0);
+  if (jc->c_out_options_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jc->c_out_options_tr, 0);
+
+  osip_free (jc);
+
+}
diff --git a/libs/eXosip2/jcallback.c b/libs/eXosip2/jcallback.c
new file mode 100644
index 0000000000000000000000000000000000000000..84e9b646b722ca1eb701162182c4118dac52c92c
--- /dev/null
+++ b/libs/eXosip2/jcallback.c
@@ -0,0 +1,2053 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include <stdlib.h>
+
+#ifdef WIN32
+#include <windowsx.h>
+#include <winsock2.h>
+#include <Ws2tcpip.h>
+#include "inet_ntop.h"
+
+#else
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#endif
+
+#include <eXosip2/eXosip.h>
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+
+/* Private functions */
+static void rcvregister_failure (int type, osip_transaction_t * tr,
+                                 osip_message_t * sip);
+static void cb_ict_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_ist_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_nict_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_nist_kill_transaction (int type, osip_transaction_t * tr);
+static void cb_rcvinvite (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvack (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvack2 (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvregister (int type, osip_transaction_t * tr,
+                            osip_message_t * sip);
+static void cb_rcvcancel (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvrequest (int type, osip_transaction_t * tr,
+                              osip_message_t * sip);
+static void cb_sndinvite (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndack (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndregister (int type, osip_transaction_t * tr,
+                            osip_message_t * sip);
+static void cb_sndbye (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndcancel (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndinfo (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndoptions (int type, osip_transaction_t * tr,
+                           osip_message_t * sip);
+static void cb_sndnotify (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_sndsubscribe (int type, osip_transaction_t * tr,
+                             osip_message_t * sip);
+static void cb_sndunkrequest (int type, osip_transaction_t * tr,
+                              osip_message_t * sip);
+static void cb_rcv1xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv2xx_4invite (osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv2xx_4subscribe (osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv2xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv3xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv4xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv5xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcv6xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd1xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd2xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd3xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd4xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd5xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_snd6xx (int type, osip_transaction_t * tr, osip_message_t * sip);
+static void cb_rcvresp_retransmission (int type, osip_transaction_t * tr,
+                                       osip_message_t * sip);
+static void cb_sndreq_retransmission (int type, osip_transaction_t * tr,
+                                      osip_message_t * sip);
+static void cb_sndresp_retransmission (int type, osip_transaction_t * tr,
+                                       osip_message_t * sip);
+static void cb_rcvreq_retransmission (int type, osip_transaction_t * tr,
+                                      osip_message_t * sip);
+static void cb_transport_error (int type, osip_transaction_t * tr, int error);
+
+
+int
+cb_snd_message (osip_transaction_t * tr, osip_message_t * sip, char *host,
+		int port, int out_socket)
+{
+  int i;
+  osip_via_t *via;
+  if (eXosip.net_interfaces[0].net_socket == 0
+      && eXosip.net_interfaces[1].net_socket == 0)
+    return -1;
+
+  if (host == NULL)
+    {
+      host = sip->req_uri->host;
+      if (sip->req_uri->port != NULL)
+        port = osip_atoi (sip->req_uri->port);
+      else
+        port = 5060;
+    }
+
+  via = (osip_via_t *) osip_list_get(sip->vias, 0);
+  if (via==NULL || via->protocol==NULL)
+    return -1;
+
+  i = -1;
+  if (osip_strcasecmp(via->protocol, "udp")==0)
+    {
+      i = cb_udp_snd_message (tr, sip, host, port, out_socket);
+    }
+  else
+    {
+      i = cb_tcp_snd_message (tr, sip, host, port, out_socket);
+    }
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  return 0;
+
+}
+
+int
+cb_udp_snd_message (osip_transaction_t * tr, osip_message_t * sip, char *host,
+                    int port, int out_socket)
+{
+  int len = 0;
+  size_t length = 0;
+  struct addrinfo *addrinfo;
+  struct __eXosip_sockaddr addr;
+  char *message;
+#ifdef INET6_ADDRSTRLEN
+  char ipbuf[INET6_ADDRSTRLEN];
+#else
+  char ipbuf[46];
+#endif
+  int i;
+  struct eXosip_net *net;
+
+  if (eXosip.net_interfaces[0].net_socket == 0)
+    return -1;
+
+  net = &eXosip.net_interfaces[0];
+
+  if (eXosip.http_port)
+  {
+    i = osip_message_to_str (sip, &message, &length);
+
+    if (i != 0 || length <= 0)
+        {
+        return -1;
+        }
+    if (0 >
+        _eXosip_sendto (net->net_socket, (const void *) message, length, 0,
+	        (struct sockaddr *) &addr, len ))
+    {
+        /* should reopen connection! */
+        osip_free (message);
+        return -1;
+    }
+    return 0;
+  }
+
+  if (host == NULL)
+    {
+      host = sip->req_uri->host;
+      if (sip->req_uri->port != NULL)
+        port = osip_atoi (sip->req_uri->port);
+      else
+        port = 5060;
+    }
+
+  i = eXosip_get_addrinfo (&addrinfo, host, port, IPPROTO_UDP);
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+  len = addrinfo->ai_addrlen;
+
+  freeaddrinfo (addrinfo);
+
+  i = osip_message_to_str (sip, &message, &length);
+
+  if (i != 0 || length <= 0)
+    {
+      return -1;
+    }
+
+  switch (addr.ss_family)
+    {
+    case AF_INET:
+      inet_ntop(addr.ss_family, &(((struct sockaddr_in*)&addr)->sin_addr), ipbuf, sizeof(ipbuf));
+      break;
+    case AF_INET6:
+      inet_ntop(addr.ss_family, &(((struct sockaddr_in6*)&addr)->sin6_addr), ipbuf, sizeof(ipbuf));
+      break;
+    default:
+      strncpy(ipbuf, "(unknown)", sizeof(ipbuf));
+      break;
+    }
+  
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			  "Message sent: \n%s (to dest=%s:%i)\n",
+			  message, ipbuf, port));
+  if (0 >
+      _eXosip_sendto (net->net_socket, (const void *) message, length, 0,
+	      (struct sockaddr *) &addr, len ))
+    {
+#ifdef WIN32
+      if (WSAECONNREFUSED == WSAGetLastError ())
+#else
+      if (ECONNREFUSED == errno)
+#endif
+        {
+          /* This can be considered as an error, but for the moment,
+             I prefer that the application continue to try sending
+             message again and again... so we are not in a error case.
+             Nevertheless, this error should be announced!
+             ALSO, UAS may not have any other options than retry always
+             on the same port.
+           */
+          osip_free (message);
+          return 1;
+      } else
+        {
+          /* SIP_NETWORK_ERROR; */
+          osip_free (message);
+          return -1;
+        }
+    }
+
+
+    if (eXosip.keep_alive>0)
+    {
+        if (MSG_IS_REGISTER(sip))
+        {
+            eXosip_reg_t *reg = NULL;
+            if (_eXosip_reg_find(&reg, tr)==0)
+            {
+                memcpy (&(reg->addr), &addr, len);
+                reg->len = len;
+            }
+        }
+    }
+
+  osip_free (message);
+  return 0;
+
+}
+
+int
+cb_tcp_snd_message (osip_transaction_t * tr, osip_message_t * sip, char *host,
+                    int port, int out_socket)
+{
+  size_t length = 0;
+  char *message;
+  int i;
+  struct eXosip_net *net;
+  if (eXosip.net_interfaces[1].net_socket == 0)
+    return -1;
+
+  if (host == NULL)
+    {
+      host = sip->req_uri->host;
+      if (sip->req_uri->port != NULL)
+        port = osip_atoi (sip->req_uri->port);
+      else
+        port = 5060;
+    }
+
+  net = &eXosip.net_interfaces[1];
+
+  i = osip_message_to_str (sip, &message, &length);
+  
+  if (i != 0 || length <= 0)
+    {
+      return -1;
+    }
+
+  /* Step 1: find existing socket to send message */
+  if (out_socket<=0)
+    {
+      out_socket = _eXosip_tcp_find_socket(host, port);
+      
+      /* Step 2: create new socket with host:port */
+      if (out_socket<=0)
+	{
+	  out_socket = _eXosip_tcp_connect_socket(host, port);
+	}
+      
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			      "Message sent: \n%s (to dest=%s:%i)\n",
+			      message, host, port));
+    }
+  else
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			      "Message sent: \n%s (reusing REQUEST connection)\n",
+			      message, host, port));
+    }
+
+  if (out_socket<=0)
+    {
+      return -1;
+    }
+
+
+  if (0 > send (out_socket, (const void *) message, length, 0))
+    {
+#ifdef WIN32
+      if (WSAECONNREFUSED == WSAGetLastError ())
+#else
+      if (ECONNREFUSED == errno)
+#endif
+        {
+          /* This can be considered as an error, but for the moment,
+             I prefer that the application continue to try sending
+             message again and again... so we are not in a error case.
+             Nevertheless, this error should be announced!
+             ALSO, UAS may not have any other options than retry always
+             on the same port.
+           */
+          osip_free (message);
+          return 1;
+      } else
+        {
+          /* SIP_NETWORK_ERROR; */
+	  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				  "TCP error: \n%s\n",
+				  strerror(errno)));
+          osip_free (message);
+          return -1;
+        }
+    }
+
+  osip_free (message);
+  return 0;
+
+}
+
+static void
+cb_ict_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_ict_kill_transaction (id=%i)\r\n", tr->transactionid));
+
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_ict_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+}
+
+static void
+cb_ist_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_ist_kill_transaction (id=%i)\r\n", tr->transactionid));
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_ist_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+}
+
+static void
+cb_nict_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_nict_kill_transaction (id=%i)\r\n", tr->transactionid));
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_nict_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+
+  if (MSG_IS_REGISTER (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION && tr->last_response == NULL)
+    {
+      eXosip_event_t *je;
+      eXosip_reg_t *jreg = NULL;
+
+      /* find matching j_reg */
+      _eXosip_reg_find (&jreg, tr);
+      if (jreg != NULL)
+        {
+          je = eXosip_event_init_for_reg (EXOSIP_REGISTRATION_FAILURE, jreg, tr);
+          report_event (je, NULL);
+        }
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (jn == NULL && js == NULL)
+    return;
+
+  /* no answer to a NOTIFY request! */
+  if (MSG_IS_NOTIFY (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION && tr->last_response == NULL)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_notifies, jn);
+      eXosip_notify_free (jn);
+      return;
+    }
+
+  if (MSG_IS_NOTIFY (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION
+      && tr->last_response != NULL && tr->last_response->status_code > 299)
+    {
+      /* delete the dialog! */
+      if (tr->last_response->status_code != 407
+          && tr->last_response->status_code != 401)
+        {
+          REMOVE_ELEMENT (eXosip.j_notifies, jn);
+          eXosip_notify_free (jn);
+          return;
+        }
+    }
+
+  if (MSG_IS_NOTIFY (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION
+      && tr->last_response != NULL
+      && tr->last_response->status_code > 199
+      && tr->last_response->status_code < 300)
+    {
+      if (jn->n_ss_status == EXOSIP_SUBCRSTATE_TERMINATED)
+        {
+          /* delete the dialog! */
+          REMOVE_ELEMENT (eXosip.j_notifies, jn);
+          eXosip_notify_free (jn);
+          return;
+        }
+    }
+
+  /* no answer to a SUBSCRIBE request! */
+  if (MSG_IS_SUBSCRIBE (tr->orig_request)
+      && type == OSIP_NICT_KILL_TRANSACTION && tr->last_response == NULL)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+      return;
+    }
+
+  /* detect SUBSCRIBE request that close the dialogs! */
+  /* expires=0 with MSN */
+  if (MSG_IS_SUBSCRIBE (tr->orig_request) && type == OSIP_NICT_KILL_TRANSACTION)
+    {
+      osip_header_t *expires;
+
+      osip_message_get_expires (tr->orig_request, 0, &expires);
+      if (expires == NULL || expires->hvalue == NULL)
+        {
+      } else if (0 == strcmp (expires->hvalue, "0"))
+        {
+          /* delete the dialog! */
+          REMOVE_ELEMENT (eXosip.j_subscribes, js);
+          eXosip_subscribe_free (js);
+          return;
+        }
+    }
+}
+
+static void
+cb_nist_kill_transaction (int type, osip_transaction_t * tr)
+{
+  int i;
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_nist_kill_transaction (id=%i)\r\n", tr->transactionid));
+  i = osip_remove_transaction (eXosip.j_osip, tr);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_BUG, NULL,
+                   "cb_nist_kill_transaction Error: Could not remove transaction from the oSIP stack? (id=%i)\r\n",
+                   tr->transactionid));
+    }
+
+}
+
+static void
+cb_rcvinvite (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcvinvite (id=%i)\n",
+               tr->transactionid));
+}
+
+static void
+cb_rcvack (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcvack (id=%i)\n",
+               tr->transactionid));
+}
+
+static void
+cb_rcvack2 (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcvack2 (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_rcvregister (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_event_t *je;
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvregister (id=%i)\r\n", tr->transactionid));
+  
+  je = eXosip_event_init_for_message (EXOSIP_MESSAGE_NEW, tr);
+  eXosip_event_add (je);
+  return;
+}
+
+static void
+cb_rcvcancel (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvcancel (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_rcvrequest (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_notify_t *jn;
+  eXosip_subscribe_t *js;
+
+  eXosip_event_t *je;
+
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvunkrequest (id=%i)\r\n", tr->transactionid));
+
+  if (jinfo == NULL)
+    {
+      eXosip_event_t *je;
+      
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_NEW, tr);
+      eXosip_event_add (je);
+      return;
+    }
+
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+  if (jc == NULL && jn == NULL && js == NULL)
+    {
+      eXosip_event_t *je;
+      
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_NEW, tr);
+      eXosip_event_add (je);
+      return;
+    }
+  else if (jc!=NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "cb_rcv? (id=%i)\r\n", tr->transactionid));
+
+      report_call_event (EXOSIP_CALL_MESSAGE_NEW, jc, jd, tr);
+      return;
+    }
+  else if (jn!=NULL)
+    {
+      if (MSG_IS_SUBSCRIBE (sip))
+	{
+	  je = eXosip_event_init_for_notify (EXOSIP_IN_SUBSCRIPTION_NEW, jn, jd, tr);
+	  report_event (je, NULL);
+	  return;
+	}
+      return;
+    }
+  else if (js!=NULL)
+    {
+      if (MSG_IS_NOTIFY (sip))
+	{
+	  je = eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_NOTIFY, js, jd, tr);
+	  report_event (je, NULL);      
+	  return;
+	}
+      return;
+    }
+}
+
+static void
+cb_sndinvite (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndinvite (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndack (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_sndack (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_sndregister (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndregister (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndbye (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_sndbye (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_sndcancel (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndcancel (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndinfo (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_sndinfo (id=%i)\r\n",
+               tr->transactionid));
+}
+
+static void
+cb_sndoptions (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndoptions (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndnotify (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndnotify (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndsubscribe (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndsubscibe (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndunkrequest (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndunkrequest (id=%i)\r\n", tr->transactionid));
+}
+
+void
+__eXosip_delete_jinfo (osip_transaction_t * transaction)
+{
+  jinfo_t *ji;
+
+  if (transaction == NULL)
+    return;
+  ji = osip_transaction_get_your_instance (transaction);
+  osip_free (ji);
+  osip_transaction_set_your_instance (transaction, NULL);
+}
+
+jinfo_t *
+__eXosip_new_jinfo (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                    eXosip_subscribe_t * js, eXosip_notify_t * jn)
+{
+  jinfo_t *ji = (jinfo_t *) osip_malloc (sizeof (jinfo_t));
+
+  if (ji == NULL)
+    return NULL;
+  ji->jd = jd;
+  ji->jc = jc;
+  ji->js = js;
+  ji->jn = jn;
+  return ji;
+}
+
+static void
+cb_rcv1xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv1xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (eXosip.learn_port>0)
+  {
+      struct eXosip_net *net;
+      net = &eXosip.net_interfaces[0];
+      /* EXOSIP_OPT_UDP_LEARN_PORT option set */
+#if 1
+      /* learn through rport */
+      if (net->net_firewall_ip[0]!='\0')
+      {
+        osip_via_t *via=NULL;
+        osip_generic_param_t *br;
+        int i = osip_message_get_via (sip, 0, &via);
+        if (via!=NULL && via->protocol!=NULL
+            && osip_strcasecmp(via->protocol, "udp")==0)
+        {
+            osip_via_param_get_byname (via, "rport", &br);
+            if (br!=NULL && br->gvalue!=NULL)
+            {
+                snprintf(net->net_port, 20, "%s", br->gvalue);
+                OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                            "cb_rcv1xx (id=%i) SIP port modified from rport in REGISTER answer\r\n",
+                            tr->transactionid));
+            }
+        }
+      }
+#else
+      /* learn through REGISTER? */
+      if (net->net_firewall_ip[0]!='\0')
+	      {
+		int pos=0;
+		while (!osip_list_eol(reg->contacts,pos))
+		  {
+		    osip_contact_t *co;
+		    co = (osip_contact_t *)osip_list_get(reg->contacts,pos);
+		    pos++;
+		    if (co!=NULL && co->url!=NULL && co->url->host!=NULL
+			&& 0==osip_strcasecmp(co->url->host,
+					      net->net_firewall_ip))
+		      {
+			if (co->url->port==NULL &&
+			    0!=osip_strcasecmp(net->net_port, "5060"))
+			  {
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+			else if (co->url->port!=NULL &&
+				 0!=osip_strcasecmp(net->net_port, co->url->port))
+			  {
+			    osip_free(co->url->port);
+			    co->url->port=osip_strdup(net->net_port);
+			  }
+		      }
+		  }
+	      }
+#endif
+  }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "OPTIONS"))
+    {
+      if (jc == NULL)
+        {
+	  eXosip_event_t *je;
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                       "cb_rcv1xx (id=%i) OPTIONS outside of any call\r\n",
+                       tr->transactionid));
+      
+	  je = eXosip_event_init_for_message (EXOSIP_MESSAGE_PROCEEDING, tr);
+	  eXosip_event_add (je);
+          return;
+      }
+      report_call_event (EXOSIP_CALL_MESSAGE_PROCEEDING, jc, jd, tr);
+      return;
+    }
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE") && MSG_TEST_CODE (sip, 100))
+    {
+      report_call_event (EXOSIP_CALL_PROCEEDING, jc, jd, tr);
+    }
+
+  if ((MSG_IS_RESPONSE_FOR (sip, "INVITE")
+       || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE")) && !MSG_TEST_CODE (sip, 100))
+    {
+      int i;
+
+      /* for SUBSCRIBE, test if the dialog has been already created
+         with a previous NOTIFY */
+      if (jd == NULL && js != NULL && js->s_dialogs != NULL
+          && MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+        {
+          /* find if existing dialog match the to tag */
+          osip_generic_param_t *tag;
+          int i;
+
+          i = osip_to_get_tag (sip->to, &tag);
+          if (i == 0 && tag != NULL && tag->gvalue != NULL)
+            {
+              for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+                {
+                  if (0 == strcmp (jd->d_dialog->remote_tag, tag->gvalue))
+                    {
+                      OSIP_TRACE (osip_trace
+                                  (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                   "eXosip: found established early dialog for this subscribe\n"));
+                      jinfo->jd = jd;
+                      break;
+                    }
+                }
+            }
+        }
+
+      if (jd == NULL)           /* This transaction initiate a dialog in the case of
+                                   INVITE (else it would be attached to a "jd" element. */
+        {
+          /* allocate a jd */
+
+          i = eXosip_dialog_init_as_uac (&jd, sip);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot establish a dialog\n"));
+              return;
+            }
+          if (jc != NULL)
+            {
+              ADD_ELEMENT (jc->c_dialogs, jd);
+              jinfo->jd = jd;
+              eXosip_update ();
+          } else if (js != NULL)
+            {
+              ADD_ELEMENT (js->s_dialogs, jd);
+              jinfo->jd = jd;
+              eXosip_update ();
+          } else if (jn != NULL)
+            {
+              ADD_ELEMENT (jn->n_dialogs, jd);
+              jinfo->jd = jd;
+              eXosip_update ();
+          } else
+            {
+#ifndef WIN32
+              assert (0 == 0);
+#else
+              exit (0);
+#endif
+            }
+          osip_transaction_set_your_instance (tr, jinfo);
+      } else
+        {
+          osip_dialog_update_route_set_as_uac (jd->d_dialog, sip);
+        }
+
+      if (jd != NULL)
+        jd->d_STATE = JD_TRYING;
+      if (jd != NULL && MSG_IS_RESPONSE_FOR (sip, "INVITE")
+          && sip->status_code < 180)
+        {
+          report_call_event (EXOSIP_CALL_PROCEEDING, jc, jd, tr);
+      } else if (jd != NULL && MSG_IS_RESPONSE_FOR (sip, "INVITE")
+                 && sip->status_code >= 180)
+        {
+          report_call_event (EXOSIP_CALL_RINGING, jc, jd, tr);
+      } else if (jd != NULL && MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+        {
+          eXosip_event_t *je;
+
+          je =
+            eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_PROCEEDING,
+                                             js, jd, tr);
+          report_event (je, sip);
+        }
+      if (MSG_TEST_CODE (sip, 180) && jd != NULL)
+        {
+          jd->d_STATE = JD_RINGING;
+      } else if (MSG_TEST_CODE (sip, 183) && jd != NULL)
+        {
+          jd->d_STATE = JD_QUEUED;
+        }
+
+    }
+}
+
+static void
+cb_rcv2xx_4invite (osip_transaction_t * tr, osip_message_t * sip)
+{
+  int i;
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)               /* This transaction initiate a dialog in the case of
+                                   INVITE (else it would be attached to a "jd" element. */
+    {
+      /* allocate a jd */
+      i = eXosip_dialog_init_as_uac (&jd, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot establish a dialog\n"));
+          return;
+        }
+      ADD_ELEMENT (jc->c_dialogs, jd);
+      jinfo->jd = jd;
+      eXosip_update ();
+      osip_transaction_set_your_instance (tr, jinfo);
+  } else
+    {
+      /* Here is a special case:
+         We have initiated a dialog and we have received informationnal
+         answers from 2 or more remote SIP UA. Those answer can be
+         differentiated with the "To" header's tag.
+
+         We have used the first informationnal answer to create a
+         dialog, but we now want to be sure the 200ok received is
+         for the dialog this dialog.
+
+         We have to check the To tag and if it does not match, we
+         just have to modify the existing dialog and replace it. */
+      osip_generic_param_t *tag;
+      int i;
+
+      i = osip_to_get_tag (sip->to, &tag);
+      i = 1;                    /* default is the same dialog */
+
+      if (jd->d_dialog == NULL || jd->d_dialog->remote_tag == NULL)
+        {
+          /* There are real use-case where a BYE is received/processed before
+             the 200ok of the previous INVITE. In this case, jd->d_dialog is
+             empty and the transaction should be silently discarded. */
+          /* a ACK should still be sent... -but there is no dialog built- */
+          return;
+        }
+
+      if (jd->d_dialog->remote_tag == NULL && tag == NULL)
+        {
+        } /* non compliant remote UA -> assume it is the same dialog */
+      else if (jd->d_dialog->remote_tag != NULL && tag == NULL)
+        {
+          i = 0;
+        } /* different dialog! */
+      else if (jd->d_dialog->remote_tag == NULL && tag != NULL)
+        {
+          i = 0;
+        } /* different dialog! */
+      else if (jd->d_dialog->remote_tag != NULL && tag != NULL
+               && tag->gvalue != NULL
+               && 0 != strcmp (jd->d_dialog->remote_tag, tag->gvalue))
+        {
+          i = 0;
+        }
+      /* different dialog! */
+      if (i == 1)               /* just update the dialog */
+        {
+          osip_dialog_update_route_set_as_uac (jd->d_dialog, sip);
+          osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+      } else
+        {
+          /* the best thing is to update the repace the current dialog
+             information... Much easier than creating a useless dialog! */
+          osip_dialog_free (jd->d_dialog);
+          i = osip_dialog_init_as_uac (&(jd->d_dialog), sip);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "Cannot replace the dialog.\r\n"));
+          } else
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                           "The dialog has been replaced with the new one fro 200ok.\r\n"));
+            }
+        }
+    }
+
+  jd->d_STATE = JD_ESTABLISHED;
+
+  eXosip_dialog_set_200ok (jd, sip);
+
+  report_call_event (EXOSIP_CALL_ANSWERED, jc, jd, tr);
+
+  /* look for the SDP information and decide if this answer was for
+     an initial INVITE, an HoldCall, or a RetreiveCall */
+
+  /* don't handle hold/unhold by now... */
+  /* eXosip_update_audio_session(tr); */
+
+}
+
+static void
+cb_rcv2xx_4subscribe (osip_transaction_t * tr, osip_message_t * sip)
+{
+  int i;
+  eXosip_dialog_t *jd;
+  eXosip_subscribe_t *js;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  js = jinfo->js;
+  _eXosip_subscribe_set_refresh_interval (js, sip);
+
+
+  /* for SUBSCRIBE, test if the dialog has been already created
+     with a previous NOTIFY */
+  if (jd == NULL && js != NULL && js->s_dialogs != NULL
+      && MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      /* find if existing dialog match the to tag */
+      osip_generic_param_t *tag;
+      int i;
+
+      i = osip_to_get_tag (sip->to, &tag);
+      if (i == 0 && tag != NULL && tag->gvalue != NULL)
+        {
+          for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+            {
+              if (0 == strcmp (jd->d_dialog->remote_tag, tag->gvalue))
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                               "eXosip: found established early dialog for this subscribe\n"));
+                  jinfo->jd = jd;
+                  break;
+                }
+            }
+        }
+    }
+
+  if (jd == NULL)               /* This transaction initiate a dialog in the case of
+                                   SUBSCRIBE (else it would be attached to a "jd" element. */
+    {
+      /* allocate a jd */
+      i = eXosip_dialog_init_as_uac (&jd, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot establish a dialog\n"));
+          return;
+        }
+      ADD_ELEMENT (js->s_dialogs, jd);
+      jinfo->jd = jd;
+      eXosip_update ();
+      osip_transaction_set_your_instance (tr, jinfo);
+  } else
+    {
+      osip_dialog_update_route_set_as_uac (jd->d_dialog, sip);
+      osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+    }
+
+  jd->d_STATE = JD_ESTABLISHED;
+  /* look for the body information */
+
+  {
+    eXosip_event_t *je;
+
+    je =
+      eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_ANSWERED, js, jd, tr);
+    report_event (je, sip);
+  }
+
+}
+
+static void
+cb_rcv2xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv2xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv2xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_ANSWERED, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      eXosip_event_t *je;
+      eXosip_reg_t *jreg = NULL;
+
+      /* find matching j_reg */
+      _eXosip_reg_find (&jreg, tr);
+      if (jreg != NULL)
+        {
+          je = eXosip_event_init_for_reg (EXOSIP_REGISTRATION_SUCCESS, jreg, tr);
+          report_event (je, sip);
+          jreg->r_retry = 0;    /* reset value */
+        }
+
+
+        if (eXosip.learn_port>0)
+        {
+            struct eXosip_net *net;
+            net = &eXosip.net_interfaces[0];
+            /* EXOSIP_OPT_UDP_LEARN_PORT option set */
+#if 1
+            /* learn through rport */
+           if (net->net_firewall_ip[0]!='\0')
+           { 
+                osip_via_t *via=NULL;
+                osip_generic_param_t *br;
+                int i = osip_message_get_via (sip, 0, &via);
+                if (via!=NULL && via->protocol!=NULL
+                    && osip_strcasecmp(via->protocol, "udp")==0)
+                {
+                    osip_via_param_get_byname (via, "rport", &br);
+                    if (br!=NULL && br->gvalue!=NULL)
+                    {
+                        snprintf(net->net_port, 20, "%s", br->gvalue);
+                        OSIP_TRACE (osip_trace
+                            (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                            "cb_rcv1xx (id=%i) SIP port modified from rport in REGISTER answer\r\n",
+                            tr->transactionid));
+                    }
+                }
+            }
+#else
+            /* learn through REGISTER? */
+            if (net->net_firewall_ip[0]!='\0')
+            {
+                int pos=0;
+                while (!osip_list_eol(reg->contacts,pos))
+                {
+                    osip_contact_t *co;
+                    co = (osip_contact_t *)osip_list_get(reg->contacts,pos);
+                    pos++;
+                    if (co!=NULL && co->url!=NULL && co->url->host!=NULL
+                        && 0==osip_strcasecmp(co->url->host,
+                        net->net_firewall_ip))
+                    {
+                        if (co->url->port==NULL &&
+                            0!=osip_strcasecmp(net->net_port, "5060"))
+                        {
+                            co->url->port=osip_strdup(net->net_port);
+                        }
+                        else if (co->url->port!=NULL &&
+                            0!=osip_strcasecmp(net->net_port, co->url->port))
+                        {
+                            osip_free(co->url->port);
+                            co->url->port=osip_strdup(net->net_port);
+                        }
+                    }
+                }
+            }
+#endif
+        }
+
+        return;
+  }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (jd != NULL)
+    jd->d_retry = 0;            /* reset marker for authentication */
+  if (jc != NULL)
+    jc->c_retry = 0;            /* reset marker for authentication */
+  if (js != NULL)
+    js->s_retry = 0;            /* reset marker for authentication */
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      cb_rcv2xx_4invite (tr, sip);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      cb_rcv2xx_4subscribe (tr, sip);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "BYE"))
+    {
+      if (jd != NULL)
+        jd->d_STATE = JD_TERMINATED;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "NOTIFY"))
+    {
+#ifdef SUPPORT_MSN
+      osip_header_t *expires;
+
+      osip_message_header_get_byname (tr->orig_request, "expires", 0, &expires);
+      if (expires == NULL || expires->hvalue == NULL)
+        {
+          /* UNCOMPLIANT UA without a subscription-state header */
+      } else if (0 == osip_strcasecmp (expires->hvalue, "0"))
+        {
+          /* delete the dialog! */
+          if (jn != NULL)
+            {
+              REMOVE_ELEMENT (eXosip.j_notifies, jn);
+              eXosip_notify_free (jn);
+            }
+        }
+#else
+      osip_header_t *sub_state;
+
+      osip_message_header_get_byname (tr->orig_request, "subscription-state",
+                                      0, &sub_state);
+      if (sub_state == NULL || sub_state->hvalue == NULL)
+        {
+          /* UNCOMPLIANT UA without a subscription-state header */
+      } else if (0 == osip_strncasecmp (sub_state->hvalue, "terminated", 10))
+        {
+          /* delete the dialog! */
+          if (jn != NULL)
+            {
+              REMOVE_ELEMENT (eXosip.j_notifies, jn);
+              eXosip_notify_free (jn);
+            }
+        }
+#endif
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_ANSWERED, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_ANSWERED, tr);
+      report_event (je, sip);
+      return;
+    }
+}
+
+void
+eXosip_delete_early_dialog (eXosip_dialog_t * jd)
+{
+  if (jd == NULL)               /* bug? */
+    return;
+
+  /* an early dialog was created, but the call is not established */
+  if (jd->d_dialog != NULL && jd->d_dialog->state == DIALOG_EARLY)
+    {
+      osip_dialog_free (jd->d_dialog);
+      jd->d_dialog = NULL;
+      eXosip_update(); //AMD 30/09/05
+      eXosip_dialog_set_state (jd, JD_TERMINATED);
+    }
+}
+
+static void
+rcvregister_failure (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_event_t *je;
+  eXosip_reg_t *jreg = NULL;
+
+  /* find matching j_reg */
+  _eXosip_reg_find (&jreg, tr);
+  if (jreg != NULL)
+    {
+      je = eXosip_event_init_for_reg (EXOSIP_REGISTRATION_FAILURE, jreg, tr);
+      report_event (je, sip);
+    }
+}
+
+static void
+cb_rcv3xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv3xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_event_t *je;
+      eXosip_pub_t *pub;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv3xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REDIRECTED, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_REDIRECTED, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_REDIRECTED, js,
+                                         jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_REDIRECTED, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REDIRECTED, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      if (jd->d_dialog == NULL)
+        jd->d_STATE = JD_REDIRECTED;
+    }
+
+}
+
+static void
+cb_rcv4xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv4xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je; 
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv4xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REQUESTFAILURE, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_REQUESTFAILURE, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_REQUESTFAILURE,
+                                         js, jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_REQUESTFAILURE, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_REQUESTFAILURE, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jc!=NULL)
+    {
+      if (MSG_TEST_CODE (sip, 401) || MSG_TEST_CODE (sip, 407))
+	{
+	  if (jc->response_auth!=NULL)
+	    osip_message_free(jc->response_auth);
+	  
+	  osip_message_clone(sip, &jc->response_auth);
+	}
+    }
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      if (MSG_TEST_CODE (sip, 401) || MSG_TEST_CODE (sip, 407))
+        jd->d_STATE = JD_AUTH_REQUIRED;
+      else
+        jd->d_STATE = JD_CLIENTERROR;
+    }
+
+}
+
+static void
+cb_rcv5xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv5xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv3xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_SERVERFAILURE, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_SERVERFAILURE, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_SERVERFAILURE,
+                                         js, jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_SERVERFAILURE, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_SERVERFAILURE, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      jd->d_STATE = JD_SERVERERROR;
+    }
+
+}
+
+static void
+cb_rcv6xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_rcv6xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (MSG_IS_RESPONSE_FOR (sip, "PUBLISH"))
+    {
+      eXosip_pub_t *pub;
+      eXosip_event_t *je;
+      int i;
+
+      i = _eXosip_pub_update (&pub, tr, sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "cb_rcv6xx (id=%i) No publication to update\r\n",
+                       tr->transactionid));
+        }
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_GLOBALFAILURE, tr);
+      report_event (je, sip);
+      return;
+  } else if (MSG_IS_RESPONSE_FOR (sip, "REGISTER"))
+    {
+      rcvregister_failure (type, tr, sip);
+      return;
+    }
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      report_call_event (EXOSIP_CALL_GLOBALFAILURE, jc, jd, tr);
+  } else if (MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_event_t *je;
+
+      je =
+        eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_GLOBALFAILURE,
+                                         js, jd, tr);
+      report_event (je, sip);
+  } else if (jc!=NULL)
+    {
+      report_call_event (EXOSIP_CALL_MESSAGE_GLOBALFAILURE, jc, jd, tr);
+      return;
+  } else if (jc==NULL && js==NULL && jn==NULL)
+    {
+      eXosip_event_t *je;
+      /* For all requests outside of calls */
+      je = eXosip_event_init_for_message (EXOSIP_MESSAGE_GLOBALFAILURE, tr);
+      report_event (je, sip);
+      return;
+    }
+
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+      jd->d_STATE = JD_GLOBALFAILURE;
+    }
+
+}
+
+static void
+cb_snd1xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd1xx (id=%i)\r\n",
+               tr->transactionid));
+
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  jd->d_STATE = JD_TRYING;
+}
+
+static void
+cb_snd2xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd2xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      jd->d_STATE = JD_ESTABLISHED;
+      return;
+    }
+  jd->d_STATE = JD_ESTABLISHED;
+}
+
+static void
+cb_snd3xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd3xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_REDIRECTED;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+}
+
+static void
+cb_snd4xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd4xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_CLIENTERROR;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+
+}
+
+static void
+cb_snd5xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd5xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_SERVERERROR;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+
+}
+
+static void
+cb_snd6xx (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL, "cb_snd6xx (id=%i)\r\n",
+               tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  if (jd == NULL)
+    return;
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE")
+      || MSG_IS_RESPONSE_FOR (sip, "SUBSCRIBE"))
+    {
+      eXosip_delete_early_dialog (jd);
+    }
+  jd->d_STATE = JD_GLOBALFAILURE;
+
+  if (MSG_IS_RESPONSE_FOR (sip, "INVITE"))
+    {
+      /* only close calls if this is the initial INVITE */
+      if (jc!=NULL && tr == jc->c_inc_tr)
+	{
+	  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, tr);
+	}
+    }
+
+}
+
+static void
+cb_rcvresp_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvresp_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndreq_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndreq_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_sndresp_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_sndresp_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_rcvreq_retransmission (int type, osip_transaction_t * tr, osip_message_t * sip)
+{
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_rcvreq_retransmission (id=%i)\r\n", tr->transactionid));
+}
+
+static void
+cb_transport_error (int type, osip_transaction_t * tr, int error)
+{
+  eXosip_dialog_t *jd;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  jinfo_t *jinfo = (jinfo_t *) osip_transaction_get_your_instance (tr);
+
+  OSIP_TRACE (osip_trace
+              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+               "cb_transport_error (id=%i)\r\n", tr->transactionid));
+  if (jinfo == NULL)
+    return;
+  jd = jinfo->jd;
+  jc = jinfo->jc;
+  jn = jinfo->jn;
+  js = jinfo->js;
+
+  if (jn == NULL && js == NULL)
+    return;
+
+  if (MSG_IS_NOTIFY (tr->orig_request) && type == OSIP_NICT_TRANSPORT_ERROR)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_notifies, jn);
+      eXosip_notify_free (jn);
+    }
+
+  if (MSG_IS_SUBSCRIBE (tr->orig_request) && type == OSIP_NICT_TRANSPORT_ERROR)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+    }
+
+  if (MSG_IS_OPTIONS (tr->orig_request) && jc->c_dialogs == NULL
+      && type == OSIP_NICT_TRANSPORT_ERROR)
+    {
+      /* delete the dialog! */
+      REMOVE_ELEMENT (eXosip.j_calls, jc);
+      eXosip_call_free (jc);
+    }
+}
+
+
+
+int
+eXosip_set_callbacks (osip_t * osip)
+{
+  /* register all callbacks */
+
+  osip_set_cb_send_message (osip, &cb_snd_message);
+
+  osip_set_kill_transaction_callback (osip, OSIP_ICT_KILL_TRANSACTION,
+                                      &cb_ict_kill_transaction);
+  osip_set_kill_transaction_callback (osip, OSIP_IST_KILL_TRANSACTION,
+                                      &cb_ist_kill_transaction);
+  osip_set_kill_transaction_callback (osip, OSIP_NICT_KILL_TRANSACTION,
+                                      &cb_nict_kill_transaction);
+  osip_set_kill_transaction_callback (osip, OSIP_NIST_KILL_TRANSACTION,
+                                      &cb_nist_kill_transaction);
+
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_2XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_3456XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_ICT_INVITE_SENT_AGAIN,
+                             &cb_sndreq_retransmission);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_2XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_3456XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_IST_INVITE_RECEIVED_AGAIN,
+                             &cb_rcvreq_retransmission);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_2XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_3456XX_RECEIVED_AGAIN,
+                             &cb_rcvresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NICT_REQUEST_SENT_AGAIN,
+                             &cb_sndreq_retransmission);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_2XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_3456XX_SENT_AGAIN,
+                             &cb_sndresp_retransmission);
+  osip_set_message_callback (osip, OSIP_NIST_REQUEST_RECEIVED_AGAIN,
+                             &cb_rcvreq_retransmission);
+
+  osip_set_transport_error_callback (osip, OSIP_ICT_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+  osip_set_transport_error_callback (osip, OSIP_IST_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+  osip_set_transport_error_callback (osip, OSIP_NICT_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+  osip_set_transport_error_callback (osip, OSIP_NIST_TRANSPORT_ERROR,
+                                     &cb_transport_error);
+
+  osip_set_message_callback (osip, OSIP_ICT_INVITE_SENT, &cb_sndinvite);
+  osip_set_message_callback (osip, OSIP_ICT_ACK_SENT, &cb_sndack);
+  osip_set_message_callback (osip, OSIP_NICT_REGISTER_SENT, &cb_sndregister);
+  osip_set_message_callback (osip, OSIP_NICT_BYE_SENT, &cb_sndbye);
+  osip_set_message_callback (osip, OSIP_NICT_CANCEL_SENT, &cb_sndcancel);
+  osip_set_message_callback (osip, OSIP_NICT_INFO_SENT, &cb_sndinfo);
+  osip_set_message_callback (osip, OSIP_NICT_OPTIONS_SENT, &cb_sndoptions);
+  osip_set_message_callback (osip, OSIP_NICT_SUBSCRIBE_SENT, &cb_sndsubscribe);
+  osip_set_message_callback (osip, OSIP_NICT_NOTIFY_SENT, &cb_sndnotify);
+  /*  osip_set_cb_nict_sndprack   (osip,&cb_sndprack); */
+  osip_set_message_callback (osip, OSIP_NICT_UNKNOWN_REQUEST_SENT,
+                             &cb_sndunkrequest);
+
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_1XX_RECEIVED, &cb_rcv1xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_2XX_RECEIVED, &cb_rcv2xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_3XX_RECEIVED, &cb_rcv3xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_4XX_RECEIVED, &cb_rcv4xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_5XX_RECEIVED, &cb_rcv5xx);
+  osip_set_message_callback (osip, OSIP_ICT_STATUS_6XX_RECEIVED, &cb_rcv6xx);
+
+  osip_set_message_callback (osip, OSIP_IST_STATUS_1XX_SENT, &cb_snd1xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_2XX_SENT, &cb_snd2xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_3XX_SENT, &cb_snd3xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_4XX_SENT, &cb_snd4xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_5XX_SENT, &cb_snd5xx);
+  osip_set_message_callback (osip, OSIP_IST_STATUS_6XX_SENT, &cb_snd6xx);
+
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_1XX_RECEIVED, &cb_rcv1xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_2XX_RECEIVED, &cb_rcv2xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_3XX_RECEIVED, &cb_rcv3xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_4XX_RECEIVED, &cb_rcv4xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_5XX_RECEIVED, &cb_rcv5xx);
+  osip_set_message_callback (osip, OSIP_NICT_STATUS_6XX_RECEIVED, &cb_rcv6xx);
+
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_1XX_SENT, &cb_snd1xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_2XX_SENT, &cb_snd2xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_3XX_SENT, &cb_snd3xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_4XX_SENT, &cb_snd4xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_5XX_SENT, &cb_snd5xx);
+  osip_set_message_callback (osip, OSIP_NIST_STATUS_6XX_SENT, &cb_snd6xx);
+
+  osip_set_message_callback (osip, OSIP_IST_INVITE_RECEIVED, &cb_rcvinvite);
+  osip_set_message_callback (osip, OSIP_IST_ACK_RECEIVED, &cb_rcvack);
+  osip_set_message_callback (osip, OSIP_IST_ACK_RECEIVED_AGAIN, &cb_rcvack2);
+  osip_set_message_callback (osip, OSIP_NIST_REGISTER_RECEIVED, &cb_rcvregister);
+  osip_set_message_callback (osip, OSIP_NIST_CANCEL_RECEIVED, &cb_rcvcancel);
+  osip_set_message_callback (osip, OSIP_NIST_BYE_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_INFO_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_OPTIONS_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_SUBSCRIBE_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_NOTIFY_RECEIVED, &cb_rcvrequest);
+  osip_set_message_callback (osip, OSIP_NIST_UNKNOWN_REQUEST_RECEIVED,
+                             &cb_rcvrequest);
+
+  return 0;
+}
diff --git a/libs/eXosip2/jdialog.c b/libs/eXosip2/jdialog.c
new file mode 100644
index 0000000000000000000000000000000000000000..d8010252cb17b7816092d41ff4fc477f0157c6c0
--- /dev/null
+++ b/libs/eXosip2/jdialog.c
@@ -0,0 +1,217 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+void
+eXosip_dialog_set_state (eXosip_dialog_t * jd, int state)
+{
+  jd->d_STATE = state;
+}
+
+
+int
+eXosip_call_dialog_find (int jid, eXosip_call_t ** jc, eXosip_dialog_t ** jd)
+{
+  for (*jc = eXosip.j_calls; *jc != NULL; *jc = (*jc)->next)
+    {
+      for (*jd = (*jc)->c_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          if ((*jd)->d_id == jid)
+            return 0;
+        }
+    }
+  *jd = NULL;
+  *jc = NULL;
+  return -1;
+}
+
+int
+eXosip_notify_dialog_find (int nid, eXosip_notify_t ** jn, eXosip_dialog_t ** jd)
+{
+  for (*jn = eXosip.j_notifies; *jn != NULL; *jn = (*jn)->next)
+    {
+      for (*jd = (*jn)->n_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          if ((*jd)->d_id == nid)
+            return 0;
+        }
+    }
+  *jd = NULL;
+  *jn = NULL;
+  return -1;
+}
+
+int
+eXosip_subscribe_dialog_find (int sid, eXosip_subscribe_t ** js,
+                              eXosip_dialog_t ** jd)
+{
+  for (*js = eXosip.j_subscribes; *js != NULL; *js = (*js)->next)
+    {
+      *jd = NULL;
+      if ((*js)->s_id == sid)
+        return 0;
+      for (*jd = (*js)->s_dialogs; *jd != NULL; *jd = (*jd)->next)
+        {
+          if ((*jd)->d_id == sid)
+            return 0;
+        }
+    }
+  *jd = NULL;
+  *js = NULL;
+  return -1;
+}
+
+int
+eXosip_dialog_set_200ok (eXosip_dialog_t * jd, osip_message_t * _200Ok)
+{
+  int i;
+
+  if (jd == NULL)
+    return -1;
+  i = osip_message_clone (_200Ok, &(jd->d_200Ok));
+  if (i != 0)
+    {
+      return -1;
+    }
+  return 0;
+}
+
+int
+eXosip_dialog_init_as_uac (eXosip_dialog_t ** _jd, osip_message_t * _200Ok)
+{
+  int i;
+  eXosip_dialog_t *jd;
+
+  *_jd = NULL;
+  jd = (eXosip_dialog_t *) osip_malloc (sizeof (eXosip_dialog_t));
+  memset (jd, 0, sizeof (eXosip_dialog_t));
+
+  jd->d_id = -1;                /* not yet available to user */
+  jd->d_STATE = JD_EMPTY;
+
+  if (MSG_IS_REQUEST (_200Ok))
+    {
+      i =
+        osip_dialog_init_as_uac_with_remote_request (&(jd->d_dialog), _200Ok, -1);
+  } else
+    {                           /* normal usage with response */
+      i = osip_dialog_init_as_uac (&(jd->d_dialog), _200Ok);
+    }
+  if (i != 0)
+    {
+      osip_free (jd);
+      return -1;
+    }
+
+  jd->d_timer = time (NULL);
+  jd->d_200Ok = NULL;
+  jd->d_ack = NULL;
+  jd->next = NULL;
+  jd->parent = NULL;
+  jd->d_out_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_out_trs);
+  jd->d_inc_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_inc_trs);
+
+  /* jd->d_bh = sdp_handler_new(); */
+  *_jd = jd;
+  return 0;
+}
+
+int
+eXosip_dialog_init_as_uas (eXosip_dialog_t ** _jd, osip_message_t * _invite,
+                           osip_message_t * _200Ok)
+{
+  int i;
+  eXosip_dialog_t *jd;
+
+  *_jd = NULL;
+  jd = (eXosip_dialog_t *) osip_malloc (sizeof (eXosip_dialog_t));
+  memset (jd, 0, sizeof (eXosip_dialog_t));
+  jd->d_id = -1;                /* not yet available to user */
+  jd->d_STATE = JD_EMPTY;
+  i = osip_dialog_init_as_uas (&(jd->d_dialog), _invite, _200Ok);
+  if (i != 0)
+    {
+      osip_free (jd);
+      return -1;
+    }
+
+  jd->d_timer = time (NULL);
+  jd->d_200Ok = NULL;
+  jd->d_ack = NULL;
+  jd->next = NULL;
+  jd->parent = NULL;
+  jd->d_out_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_out_trs);
+  jd->d_inc_trs = (osip_list_t *) osip_malloc (sizeof (osip_list_t));
+  osip_list_init (jd->d_inc_trs);
+
+#ifdef SUPPORT_MSN
+  /* bugguy MSN */
+  jd->d_dialog->local_cseq = 1;
+#endif
+
+  /* jd->d_bh = sdp_handler_new(); */
+  *_jd = jd;
+  return 0;
+}
+
+void
+eXosip_dialog_free (eXosip_dialog_t * jd)
+{
+  while (!osip_list_eol (jd->d_inc_trs, 0))
+    {
+      osip_transaction_t *tr;
+
+      tr = (osip_transaction_t *) osip_list_get (jd->d_inc_trs, 0);
+      osip_list_remove (jd->d_inc_trs, 0);
+      __eXosip_delete_jinfo (tr);
+      osip_list_add (eXosip.j_transactions, tr, 0);
+    }
+
+  while (!osip_list_eol (jd->d_out_trs, 0))
+    {
+      osip_transaction_t *tr;
+
+      tr = (osip_transaction_t *) osip_list_get (jd->d_out_trs, 0);
+      osip_list_remove (jd->d_out_trs, 0);
+      __eXosip_delete_jinfo (tr);
+      osip_list_add (eXosip.j_transactions, tr, 0);
+    }
+
+  osip_message_free (jd->d_200Ok);
+  osip_message_free (jd->d_ack);
+
+  osip_dialog_free (jd->d_dialog);
+
+  osip_free (jd->d_out_trs);
+  osip_free (jd->d_inc_trs);
+  osip_free (jd);
+
+  eXosip_update ();
+}
diff --git a/libs/eXosip2/jevents.c b/libs/eXosip2/jevents.c
new file mode 100644
index 0000000000000000000000000000000000000000..a59092ce99047c0683612cb9650e4fc9f090f0f3
--- /dev/null
+++ b/libs/eXosip2/jevents.c
@@ -0,0 +1,511 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+#include <osip2/osip_condv.h>
+
+extern eXosip_t eXosip;
+
+static int _eXosip_event_fill_messages (eXosip_event_t * je,
+                                        osip_transaction_t * tr);
+
+static int
+_eXosip_event_fill_messages (eXosip_event_t * je, osip_transaction_t * tr)
+{
+  int i;
+
+  if (tr != NULL && tr->orig_request != NULL)
+    {
+      i = osip_message_clone (tr->orig_request, &je->request);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone request for event\n"));
+        }
+    }
+  if (tr != NULL && tr->last_response != NULL)
+    {
+      i = osip_message_clone (tr->last_response, &je->response);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone response for event\n"));
+        }
+    }
+  if (tr != NULL && tr->ack != NULL)
+    {
+      i = osip_message_clone (tr->ack, &je->ack);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone ACK for event\n"));
+        }
+    }
+  return 0;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_call (int type, eXosip_call_t * jc,
+                            eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (jc == NULL)
+    return NULL;
+
+  je->cid = jc->c_id;
+  if (jd != NULL)
+    je->did = jd->d_id;
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  je->external_reference = jc->external_reference;
+
+  _eXosip_event_fill_messages (je, tr);
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_subscribe (int type, eXosip_subscribe_t * js,
+                                 eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (js == NULL)
+    return NULL;
+
+  je->sid = js->s_id;
+  if (jd != NULL)
+    je->did = jd->d_id;
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  je->ss_status = js->s_ss_status;
+  je->ss_reason = js->s_ss_reason;
+
+  /* je->external_reference = js->external_reference; */
+
+  _eXosip_event_fill_messages (je, tr);
+
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_notify (int type, eXosip_notify_t * jn,
+                              eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (jn == NULL)
+    return NULL;
+
+  je->nid = jn->n_id;
+  if (jd != NULL)
+    je->did = jd->d_id;
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  je->ss_status = jn->n_ss_status;
+  je->ss_reason = jn->n_ss_reason;
+
+  /*je->external_reference = jc->external_reference; */
+
+  _eXosip_event_fill_messages (je, tr);
+
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_reg (int type, eXosip_reg_t * jr, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+  if (jr == NULL)
+    return NULL;
+  je->rid = jr->r_id;
+
+  _eXosip_event_fill_messages (je, tr);
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_init_for_message (int type, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, type);
+  if (je == NULL)
+    return NULL;
+
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  _eXosip_event_fill_messages (je, tr);
+
+  return je;
+}
+
+int
+eXosip_event_init (eXosip_event_t ** je, int type)
+{
+  *je = (eXosip_event_t *) osip_malloc (sizeof (eXosip_event_t));
+  if (*je == NULL)
+    return -1;
+
+  memset (*je, 0, sizeof (eXosip_event_t));
+  (*je)->type = type;
+
+  if (type == EXOSIP_CALL_NOANSWER)
+    {
+      sprintf ((*je)->textinfo, "No answer for this Call!");
+  } else if (type == EXOSIP_CALL_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "Call is being processed!");
+  } else if (type == EXOSIP_CALL_RINGING)
+    {
+      sprintf ((*je)->textinfo, "Remote phone is ringing!");
+  } else if (type == EXOSIP_CALL_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "Remote phone has answered!");
+  } else if (type == EXOSIP_CALL_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "Call is redirected!");
+  } else if (type == EXOSIP_CALL_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for Call!");
+  } else if (type == EXOSIP_CALL_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for Call!");
+  } else if (type == EXOSIP_CALL_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "6xx received for Call!");
+  } else if (type == EXOSIP_CALL_INVITE)
+    {
+      sprintf ((*je)->textinfo, "New call received!");
+  } else if (type == EXOSIP_CALL_ACK)
+    {
+      sprintf ((*je)->textinfo, "ACK received!");
+  } else if (type == EXOSIP_CALL_CANCELLED)
+    {
+      sprintf ((*je)->textinfo, "Call has been cancelled!");
+  } else if (type == EXOSIP_CALL_TIMEOUT)
+    {
+      sprintf ((*je)->textinfo, "Timeout. Gave up!");
+  } else if (type == EXOSIP_CALL_REINVITE)
+    {
+      sprintf ((*je)->textinfo, "INVITE within call received!");
+  } else if (type == EXOSIP_CALL_CLOSED)
+    {
+      sprintf ((*je)->textinfo, "Bye Received!");
+  } else if (type == EXOSIP_CALL_RELEASED)
+    {
+      sprintf ((*je)->textinfo, "Call Context is released!");
+  } else if (type == EXOSIP_REGISTRATION_SUCCESS)
+    {
+      sprintf ((*je)->textinfo, "User is successfully registred!");
+  } else if (type == EXOSIP_REGISTRATION_FAILURE)
+    {
+      sprintf ((*je)->textinfo, "Registration failed!");
+  } else if (type == EXOSIP_CALL_MESSAGE_NEW)
+    {
+      sprintf ((*je)->textinfo, "New request received!");
+  } else if (type == EXOSIP_CALL_MESSAGE_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "request is being processed!");
+  } else if (type == EXOSIP_CALL_MESSAGE_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "2xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "3xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request!");
+  } else if (type == EXOSIP_CALL_MESSAGE_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request!");
+  } else if (type == EXOSIP_MESSAGE_NEW)
+    {
+      sprintf ((*je)->textinfo, "New request outside call received!");
+  } else if (type == EXOSIP_MESSAGE_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "request outside call is being processed!");
+  } else if (type == EXOSIP_MESSAGE_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "2xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "3xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request outside call!");
+  } else if (type == EXOSIP_MESSAGE_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for request outside call!");
+  } else if (type == EXOSIP_SUBSCRIPTION_NOANSWER)
+    {
+      sprintf ((*je)->textinfo, "No answer for this SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_PROCEEDING)
+    {
+      sprintf ((*je)->textinfo, "SUBSCRIBE is being processed!");
+  } else if (type == EXOSIP_SUBSCRIPTION_ANSWERED)
+    {
+      sprintf ((*je)->textinfo, "2xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_REDIRECTED)
+    {
+      sprintf ((*je)->textinfo, "3xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_REQUESTFAILURE)
+    {
+      sprintf ((*je)->textinfo, "4xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_SERVERFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_GLOBALFAILURE)
+    {
+      sprintf ((*je)->textinfo, "5xx received for SUBSCRIBE!");
+  } else if (type == EXOSIP_SUBSCRIPTION_NOTIFY)
+    {
+      sprintf ((*je)->textinfo, "NOTIFY request for subscription!");
+  } else if (type == EXOSIP_SUBSCRIPTION_RELEASED)
+    {
+      sprintf ((*je)->textinfo, "Subscription has terminate!");
+  } else if (type == EXOSIP_IN_SUBSCRIPTION_NEW)
+    {
+      sprintf ((*je)->textinfo, "New incoming SUBSCRIBE!");
+  } else if (type == EXOSIP_IN_SUBSCRIPTION_RELEASED)
+    {
+      sprintf ((*je)->textinfo, "Incoming Subscription has terminate!");
+  } else
+    {
+      (*je)->textinfo[0] = '\0';
+    }
+  return 0;
+}
+
+void
+eXosip_event_free (eXosip_event_t * je)
+{
+  if (je == NULL)
+    return;
+  if (je->request != NULL)
+    osip_message_free (je->request);
+  if (je->response != NULL)
+    osip_message_free (je->response);
+  if (je->ack != NULL)
+    osip_message_free (je->ack);
+  osip_free (je);
+}
+
+void
+report_event (eXosip_event_t * je, osip_message_t * sip)
+{
+  if (je != NULL)
+    {
+      eXosip_event_add (je);
+    }
+}
+
+void
+report_call_event (int evt, eXosip_call_t * jc,
+                   eXosip_dialog_t * jd, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  je = eXosip_event_init_for_call (evt, jc, jd, tr);
+  report_event (je, NULL);
+}
+
+void
+report_options_event (int evt, osip_transaction_t * tr)
+{
+  eXosip_event_t *je;
+
+  eXosip_event_init (&je, evt);
+  if (je == NULL)
+    return;
+
+  if (tr != NULL)
+    je->tid = tr->transactionid;
+
+  _eXosip_event_fill_messages (je, tr);
+  report_event (je, NULL);
+}
+
+int
+eXosip_event_add (eXosip_event_t * je)
+{
+  int i = osip_fifo_add (eXosip.j_events, (void *) je);
+
+  osip_cond_signal ((struct osip_cond *) eXosip.j_cond);
+  __eXosip_wakeup_event ();
+  return i;
+}
+
+#if 0
+#ifdef CLOCK_REALTIME
+/* if CLOCK_REALTIME exist, then clock_gettime should be defined */
+
+#define OSIP_CLOCK_REALTIME CLOCK_REALTIME
+
+void
+__eXosip_clock_gettime (clockid_t cid, struct timespec *time)
+{
+  clock_gettime (cid, time);
+}
+
+#elif defined (WIN32) || defined (_WIN32_WCE)
+
+#include <sys/types.h>
+#include <sys/timeb.h>
+
+#define OSIP_CLOCK_REALTIME 4002
+
+void
+__eXosip_clock_gettime (unsigned int clock_id, struct timespec *time)
+{
+  struct _timeb time_val;
+
+  if (clock_id != OSIP_CLOCK_REALTIME)
+    return;
+
+  _ftime (&time_val);
+  time->tv_sec = time_val.time;
+  time->tv_nsec = time_val.millitm * 1000000;
+  return;
+}
+#endif
+#endif
+
+eXosip_event_t *
+eXosip_event_wait (int tv_s, int tv_ms)
+{
+  eXosip_event_t *je = NULL;
+
+#if 0                           /* this does not seems to work. by now */
+#if defined (CLOCK_REALTIME) || defined (WIN32) || defined (_WIN32_WCE)
+  int i;
+
+  struct timespec deadline;
+  struct timespec interval;
+  long tot_ms = (tv_s * 1000) + tv_ms;
+
+  static struct osip_mutex *mlock = NULL;
+
+  if (mlock == NULL)
+    mlock = osip_mutex_init ();
+
+  je = (eXosip_event_t *) osip_fifo_tryget (eXosip.j_events);
+  if (je)
+    return je;
+
+  interval.tv_sec = tot_ms / 1000;
+  interval.tv_nsec = (tot_ms % 1000) * 1000000L;
+
+  __eXosip_clock_gettime (OSIP_CLOCK_REALTIME, &deadline);
+
+  if ((deadline.tv_nsec += interval.tv_nsec) >= 1000000000L)
+    {
+      deadline.tv_nsec -= 1000000000L;
+      deadline.tv_sec += 1;
+  } else
+    deadline.tv_nsec += interval.tv_nsec;
+
+  deadline.tv_sec += interval.tv_sec;
+
+  i = osip_cond_timedwait ((struct osip_cond *) eXosip.j_cond,
+                           (struct osip_mutex *) mlock, &deadline);
+
+#endif
+#else
+  /* basic replacement */
+  {
+    fd_set fdset;
+    struct timeval tv;
+    int max, i;
+
+    FD_ZERO (&fdset);
+#if defined (WIN32) || defined (_WIN32_WCE)
+    FD_SET ((unsigned int) jpipe_get_read_descr (eXosip.j_socketctl_event),
+            &fdset);
+#else
+    FD_SET (jpipe_get_read_descr (eXosip.j_socketctl_event), &fdset);
+#endif
+    max = jpipe_get_read_descr (eXosip.j_socketctl_event);
+    tv.tv_sec = tv_s;
+    tv.tv_usec = tv_ms * 1000;
+
+    je = (eXosip_event_t *) osip_fifo_tryget (eXosip.j_events);
+    if (je != NULL)
+      return je;
+
+    if (tv_s == 0 && tv_ms == 0)
+      return NULL;
+
+    i = select (max + 1, &fdset, NULL, NULL, &tv);
+    if (i <= 0)
+      return 0;
+
+    if (FD_ISSET (jpipe_get_read_descr (eXosip.j_socketctl_event), &fdset))
+      {
+        char buf[500];
+
+        jpipe_read (eXosip.j_socketctl_event, buf, 499);
+      }
+
+    je = (eXosip_event_t *) osip_fifo_tryget (eXosip.j_events);
+    if (je != NULL)
+      return je;
+  }
+#endif
+
+  return je;
+}
+
+eXosip_event_t *
+eXosip_event_get ()
+{
+  eXosip_event_t *je;
+
+  je = (eXosip_event_t *) osip_fifo_get (eXosip.j_events);
+  return je;
+}
diff --git a/libs/eXosip2/jnotify.c b/libs/eXosip2/jnotify.c
new file mode 100644
index 0000000000000000000000000000000000000000..ab9049a173bdbbff8e0041d7e30308caa8df8e5a
--- /dev/null
+++ b/libs/eXosip2/jnotify.c
@@ -0,0 +1,202 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+osip_transaction_t *
+eXosip_find_last_inc_subscribe (eXosip_notify_t * jn, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *inc_tr;
+  int pos;
+
+  inc_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (0 == strcmp (inc_tr->cseq->method, "SUBSCRIBE"))
+            break;
+          else
+            inc_tr = NULL;
+          pos++;
+        }
+  } else
+    inc_tr = NULL;
+
+  if (inc_tr == NULL)
+    return jn->n_inc_tr;        /* can be NULL */
+
+  return inc_tr;
+}
+
+
+osip_transaction_t *
+eXosip_find_last_out_notify (eXosip_notify_t * jn, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "NOTIFY"))
+            return out_tr;
+          pos++;
+        }
+    }
+
+  return NULL;
+}
+
+int
+eXosip_notify_init (eXosip_notify_t ** jn, osip_message_t * inc_subscribe)
+{
+  osip_contact_t *co;
+  char *uri;
+  int i;
+  char locip[50];
+
+#ifdef SM
+  eXosip_get_localip_from_via (inc_subscribe, locip, 49);
+#else
+  i = _eXosip_find_protocol(inc_subscribe);
+  if (i==IPPROTO_UDP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip, 49);
+    }
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (default to UDP)\n"));
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+      return -1;
+    }
+    
+#endif
+  if (inc_subscribe == NULL
+      || inc_subscribe->to == NULL || inc_subscribe->to->url == NULL)
+    return -1;
+  co = (osip_contact_t *) osip_list_get (inc_subscribe->contacts, 0);
+  if (co == NULL || co->url == NULL)
+    return -1;
+
+  *jn = (eXosip_notify_t *) osip_malloc (sizeof (eXosip_notify_t));
+  if (*jn == NULL)
+    return -1;
+  memset (*jn, 0, sizeof (eXosip_notify_t));
+
+  i = osip_uri_to_str (co->url, &uri);
+  if (i != 0)
+    {
+      osip_free (*jn);
+      *jn = NULL;
+      return -1;
+    }
+  osip_strncpy ((*jn)->n_uri, uri, 254);
+  osip_free (uri);
+
+  return 0;
+}
+
+void
+eXosip_notify_free (eXosip_notify_t * jn)
+{
+  /* ... */
+
+  eXosip_dialog_t *jd;
+
+  for (jd = jn->n_dialogs; jd != NULL; jd = jn->n_dialogs)
+    {
+      REMOVE_ELEMENT (jn->n_dialogs, jd);
+      eXosip_dialog_free (jd);
+    }
+
+  __eXosip_delete_jinfo (jn->n_inc_tr);
+  __eXosip_delete_jinfo (jn->n_out_tr);
+  if (jn->n_inc_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jn->n_inc_tr, 0);
+  if (jn->n_out_tr != NULL)
+    osip_list_add (eXosip.j_transactions, jn->n_out_tr, 0);
+  osip_free (jn);
+}
+
+int
+_eXosip_notify_set_refresh_interval (eXosip_notify_t * jn,
+                                     osip_message_t * inc_subscribe)
+{
+  osip_header_t *exp;
+  int now;
+
+  now = time (NULL);
+  if (jn == NULL || inc_subscribe == NULL)
+    return -1;
+
+  osip_message_get_expires (inc_subscribe, 0, &exp);
+  if (exp == NULL || exp->hvalue == NULL)
+    jn->n_ss_expires = now + 600;
+  else
+    {
+      jn->n_ss_expires = osip_atoi (exp->hvalue);
+      if (jn->n_ss_expires != -1)
+        jn->n_ss_expires = now + jn->n_ss_expires;
+      else                      /* on error, set it to default */
+        jn->n_ss_expires = now + 600;
+    }
+
+  return 0;
+}
+
+void
+_eXosip_notify_add_expires_in_2XX_for_subscribe (eXosip_notify_t * jn,
+                                                 osip_message_t * answer)
+{
+  char tmp[20];
+  int now;
+
+  now = time (NULL);
+
+  if (jn->n_ss_expires - now < 0)
+    {
+      tmp[0] = '0';
+      tmp[1] = '\0';
+  } else
+    {
+      sprintf (tmp, "%i", jn->n_ss_expires - now);
+    }
+  osip_message_set_expires (answer, tmp);
+}
diff --git a/libs/eXosip2/jpipe.c b/libs/eXosip2/jpipe.c
new file mode 100644
index 0000000000000000000000000000000000000000..004306aa77f49cd8f64f29218c4a98cc3d332e9b
--- /dev/null
+++ b/libs/eXosip2/jpipe.c
@@ -0,0 +1,230 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "jpipe.h"
+
+#ifndef WIN32
+
+jpipe_t *
+jpipe ()
+{
+  jpipe_t *my_pipe = (jpipe_t *) osip_malloc (sizeof (jpipe_t));
+
+  if (my_pipe == NULL)
+    return NULL;
+
+  if (0 != pipe (my_pipe->pipes))
+    {
+      osip_free (my_pipe);
+      return NULL;
+    }
+  return my_pipe;
+}
+
+int
+jpipe_close (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  close (apipe->pipes[0]);
+  close (apipe->pipes[1]);
+  osip_free (apipe);
+  return 0;
+}
+
+
+/**
+ * Write in a pipe.
+ */
+int
+jpipe_write (jpipe_t * apipe, const void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return write (apipe->pipes[1], buf, count);
+}
+
+/**
+ * Read in a pipe.
+ */
+int
+jpipe_read (jpipe_t * apipe, void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return read (apipe->pipes[0], buf, count);
+}
+
+/**
+ * Get descriptor of reading pipe.
+ */
+int
+jpipe_get_read_descr (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  return apipe->pipes[0];
+}
+
+#else
+
+jpipe_t *
+jpipe ()
+{
+  int s = 0;
+  int timeout = 0;
+  static int aport = 10500;
+  struct sockaddr_in raddr;
+  int j;
+
+  jpipe_t *my_pipe = (jpipe_t *) osip_malloc (sizeof (jpipe_t));
+
+  if (my_pipe == NULL)
+    return NULL;
+
+  s = (int) socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
+  if (0 > s)
+    {
+      osip_free (my_pipe);
+      return NULL;
+    }
+  my_pipe->pipes[1] = (int) socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
+  if (0 > my_pipe->pipes[1])
+    {
+      closesocket (s);
+      osip_free (my_pipe);
+      return NULL;
+    }
+
+  raddr.sin_addr.s_addr = inet_addr ("127.0.0.1");
+  raddr.sin_family = AF_INET;
+
+  j = 50;
+  while (aport++ && j-- > 0)
+    {
+      raddr.sin_port = htons ((short) aport);
+      if (bind (s, (struct sockaddr *) &raddr, sizeof (raddr)) < 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                                  "Failed to bind one local socket %i!\n", aport));
+      } else
+        break;
+    }
+
+  if (j == 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "Failed to bind a local socket, aborting!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  j = listen (s, 1);
+  if (j != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "Failed to listen on a local socket, aborting!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  j = setsockopt (my_pipe->pipes[1],
+                  SOL_SOCKET,
+                  SO_RCVTIMEO, (const char *) &timeout, sizeof (timeout));
+  if (j != NO_ERROR)
+    {
+      /* failed for some reason... */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "udp plugin; cannot set O_NONBLOCK to the file desciptor!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  connect (my_pipe->pipes[1], (struct sockaddr *) &raddr, sizeof (raddr));
+
+  my_pipe->pipes[0] = accept (s, NULL, NULL);
+
+  if (my_pipe->pipes[0] <= 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "udp plugin; Failed to call accept!\n"));
+      closesocket (s);
+      closesocket (my_pipe->pipes[1]);
+      osip_free (my_pipe);
+    }
+
+  return my_pipe;
+}
+
+int
+jpipe_close (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  closesocket (apipe->pipes[0]);
+  closesocket (apipe->pipes[1]);
+  osip_free (apipe);
+  return 0;
+}
+
+
+/**
+ * Write in a pipe.
+ */
+int
+jpipe_write (jpipe_t * apipe, const void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return send (apipe->pipes[1], buf, count, 0);
+}
+
+/**
+ * Read in a pipe.
+ */
+int
+jpipe_read (jpipe_t * apipe, void *buf, int count)
+{
+  if (apipe == NULL)
+    return -1;
+  return recv (apipe->pipes[0], buf, count, 0 /* MSG_DONTWAIT */ );     /* BUG?? */
+}
+
+/**
+ * Get descriptor of reading pipe.
+ */
+int
+jpipe_get_read_descr (jpipe_t * apipe)
+{
+  if (apipe == NULL)
+    return -1;
+  return apipe->pipes[0];
+}
+
+#endif
diff --git a/libs/eXosip2/jpipe.h b/libs/eXosip2/jpipe.h
new file mode 100644
index 0000000000000000000000000000000000000000..1a8862c4f6d70efe7117c64a670a0be89e3f741b
--- /dev/null
+++ b/libs/eXosip2/jpipe.h
@@ -0,0 +1,109 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public 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 _JPIPE_H_
+#define _JPIPE_H_
+
+#include <eXosip2/eXosip.h>
+
+#ifndef WIN32
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#endif
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+/**
+ * @file jpipe.h
+ * @brief PPL Pipe Handling Routines
+ */
+
+/**
+ * @defgroup JPIPE Pipe Handling
+ * @ingroup PPL
+ * @{
+ */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#ifndef WIN32
+
+/**
+ * Structure for storing a pipe descriptor
+ * @defvar jpipe_t
+ */
+  typedef struct jpipe_t jpipe_t;
+
+  struct jpipe_t
+  {
+    int pipes[2];
+  };
+
+#else
+
+/**
+ * Structure for storing a pipe descriptor
+ * @defvar ppl_pipe_t
+ */
+  typedef struct jpipe_t jpipe_t;
+
+  struct jpipe_t
+  {
+    int pipes[2];
+  };
+
+#endif
+
+/**
+ * Get New pipe pair.
+ */
+  jpipe_t *jpipe (void);
+
+/**
+ * Close pipe
+ */
+  int jpipe_close (jpipe_t * apipe);
+
+/**
+ * Write in a pipe.
+ */
+  int jpipe_write (jpipe_t * pipe, const void *buf, int count);
+
+/**
+ * Read in a pipe.
+ */
+  int jpipe_read (jpipe_t * pipe, void *buf, int count);
+
+/**
+ * Get descriptor of reading pipe.
+ */
+  int jpipe_get_read_descr (jpipe_t * pipe);
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif
diff --git a/libs/eXosip2/jpublish.c b/libs/eXosip2/jpublish.c
new file mode 100644
index 0000000000000000000000000000000000000000..ef75828af598e781a45691b3be78b257e084266b
--- /dev/null
+++ b/libs/eXosip2/jpublish.c
@@ -0,0 +1,122 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+_eXosip_pub_update (eXosip_pub_t ** pub, osip_transaction_t * tr,
+                    osip_message_t * answer)
+{
+  eXosip_pub_t *jpub;
+
+  *pub = NULL;
+
+  for (jpub = eXosip.j_pub; jpub != NULL; jpub = jpub->next)
+    {
+      if (jpub->p_last_tr == NULL)
+        {                       /*bug? */
+      } else if (tr == jpub->p_last_tr)
+        {
+          /* update the sip_etag parameter */
+          if (answer == NULL)
+            {                   /* bug? */
+          } else if (MSG_IS_STATUS_2XX (answer))
+            {
+              osip_header_t *sip_etag = NULL;
+
+              osip_message_header_get_byname (answer, "SIP-ETag", 0, &sip_etag);
+              if (sip_etag != NULL && sip_etag->hvalue != NULL)
+                snprintf (jpub->p_sip_etag, 64, "%s", sip_etag->hvalue);
+            }
+          *pub = jpub;
+          return 0;
+        }
+    }
+  return -1;
+}
+
+int
+_eXosip_pub_find_by_aor (eXosip_pub_t ** pub, const char *aor)
+{
+  eXosip_pub_t *jpub;
+  eXosip_pub_t *ptr;
+  time_t now;
+
+  *pub = NULL;
+
+  /* delete expired publications */
+  now = time (NULL);
+  ptr = eXosip.j_pub;
+  for (jpub = ptr; jpub != NULL; jpub = ptr)
+    {
+      ptr = jpub->next;
+      if (now - jpub->p_expires > 60)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                       "eXosip: removing expired publication!"));
+          REMOVE_ELEMENT (eXosip.j_pub, jpub);
+          _eXosip_pub_free (jpub);
+        }
+    }
+
+  for (jpub = eXosip.j_pub; jpub != NULL; jpub = jpub->next)
+    {
+      if (osip_strcasecmp (aor, jpub->p_aor) == 0)
+        {
+          *pub = jpub;
+          return 0;
+        }
+    }
+  return -1;
+}
+
+int
+_eXosip_pub_init (eXosip_pub_t ** pub, const char *aor, const char *exp)
+{
+  eXosip_pub_t *jpub;
+
+  *pub = NULL;
+
+  jpub = (eXosip_pub_t *) osip_malloc (sizeof (eXosip_pub_t));
+  if (jpub == 0)
+    return -1;
+  memset (jpub, 0, sizeof (eXosip_pub_t));
+  snprintf (jpub->p_aor, 256, "%s", aor);
+
+  jpub->p_expires = atoi (exp) + time (NULL);
+  jpub->p_period = atoi (exp);
+
+  *pub = jpub;
+  return 0;
+}
+
+void
+_eXosip_pub_free (eXosip_pub_t * pub)
+{
+  if (pub->p_last_tr != NULL)
+    osip_list_add (eXosip.j_transactions, pub->p_last_tr, 0);
+  osip_free (pub);
+}
diff --git a/libs/eXosip2/jreg.c b/libs/eXosip2/jreg.c
new file mode 100644
index 0000000000000000000000000000000000000000..ecd32872b1ef47e44c3cb12ba779d0a5e06b1cd3
--- /dev/null
+++ b/libs/eXosip2/jreg.c
@@ -0,0 +1,104 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+int
+eXosip_reg_init (eXosip_reg_t ** jr, const char *from, const char *proxy,
+                 const char *contact)
+{
+  static int r_id;
+
+  *jr = (eXosip_reg_t *) osip_malloc (sizeof (eXosip_reg_t));
+  if (*jr == NULL)
+    return -1;
+
+  if (r_id > 1000000)           /* keep it non-negative */
+    r_id = 0;
+
+  memset (*jr, '\0', sizeof (eXosip_reg_t));
+
+  (*jr)->r_id = ++r_id;
+  (*jr)->r_reg_period = 3600;   /* delay between registration */
+  (*jr)->r_aor = osip_strdup (from);    /* sip identity */
+  (*jr)->r_contact = osip_strdup (contact);     /* sip identity */
+  (*jr)->r_registrar = osip_strdup (proxy);     /* registrar */
+
+  return 0;
+}
+
+void
+eXosip_reg_free (eXosip_reg_t * jreg)
+{
+
+  osip_free (jreg->r_aor);
+  osip_free (jreg->r_contact);
+  osip_free (jreg->r_registrar);
+
+  if (jreg->r_last_tr != NULL)
+    {
+      if (jreg->r_last_tr->state == IST_TERMINATED ||
+          jreg->r_last_tr->state == ICT_TERMINATED ||
+          jreg->r_last_tr->state == NICT_TERMINATED ||
+          jreg->r_last_tr->state == NIST_TERMINATED)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a terminated transaction\n"));
+          __eXosip_delete_jinfo (jreg->r_last_tr);
+          if (jreg->r_last_tr != NULL)
+            osip_list_add (eXosip.j_transactions, jreg->r_last_tr, 0);
+      } else
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a non-terminated transaction\n"));
+          __eXosip_delete_jinfo (jreg->r_last_tr);
+          if (jreg->r_last_tr != NULL)
+            osip_list_add (eXosip.j_transactions, jreg->r_last_tr, 0);
+        }
+    }
+
+  osip_free (jreg);
+}
+
+int
+_eXosip_reg_find (eXosip_reg_t ** reg, osip_transaction_t * tr)
+{
+  eXosip_reg_t *jreg;
+
+  *reg = NULL;
+  if (tr == NULL)
+    return -1;
+
+  for (jreg = eXosip.j_reg; jreg != NULL; jreg = jreg->next)
+    {
+      if (jreg->r_last_tr == tr)
+        {
+          *reg = jreg;
+          return 0;
+        }
+    }
+  return -1;
+}
diff --git a/libs/eXosip2/jrequest.c b/libs/eXosip2/jrequest.c
new file mode 100644
index 0000000000000000000000000000000000000000..ae24979e2f11046876f104ad26fa793512c6a32e
--- /dev/null
+++ b/libs/eXosip2/jrequest.c
@@ -0,0 +1,999 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+#ifndef WIN32
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#ifdef __APPLE_CC__
+#include <unistd.h>
+#endif
+#else
+#include <windows.h>
+#include <Iphlpapi.h>
+#endif
+
+extern eXosip_t eXosip;
+
+/* Private functions */
+static int dialog_fill_route_set (osip_dialog_t * dialog,
+                                  osip_message_t * request);
+
+/* should use cryptographically random identifier is RECOMMENDED.... */
+/* by now this should lead to identical call-id when application are
+   started at the same time...   */
+char *
+osip_call_id_new_random ()
+{
+  char *tmp = (char *) osip_malloc (33);
+  unsigned int number = osip_build_random_number ();
+
+  sprintf (tmp, "%u", number);
+  return tmp;
+}
+
+char *
+osip_from_tag_new_random (void)
+{
+  return osip_call_id_new_random ();
+}
+
+char *
+osip_to_tag_new_random (void)
+{
+  return osip_call_id_new_random ();
+}
+
+unsigned int
+via_branch_new_random (void)
+{
+  return osip_build_random_number ();
+}
+
+/* prepare a minimal request (outside of a dialog) with required headers */
+/* 
+   method is the type of request. ("INVITE", "REGISTER"...)
+   to is the remote target URI
+   transport is either "TCP" or "UDP" (by now, only UDP is implemented!)
+*/
+int
+generating_request_out_of_dialog (osip_message_t ** dest, const char *method,
+                                  const char *to, const char *transport,
+                                  const char *from, const char *proxy)
+{
+  /* Section 8.1:
+     A valid request contains at a minimum "To, From, Call-iD, Cseq,
+     Max-Forwards and Via
+   */
+  int i;
+  osip_message_t *request;
+  char locip[50];
+  int doing_register;
+  char *register_callid_number = NULL;
+  struct eXosip_net *net;
+
+  if (0==osip_strcasecmp(transport, "udp"))
+    net = &eXosip.net_interfaces[0];
+  else if (0==osip_strcasecmp(transport, "tcp"))
+    net = &eXosip.net_interfaces[1];
+  else
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "eXosip: unsupported protocol (default to UDP)\n"));
+    net = &eXosip.net_interfaces[0];
+    }
+
+  *dest = NULL;
+
+  i = osip_message_init (&request);
+  if (i != 0)
+    return -1;
+
+  /* prepare the request-line */
+  osip_message_set_method (request, osip_strdup (method));
+  osip_message_set_version (request, osip_strdup ("SIP/2.0"));
+  osip_message_set_status_code (request, 0);
+  osip_message_set_reason_phrase (request, NULL);
+
+  doing_register = 0 == strcmp ("REGISTER", method);
+
+  if (doing_register)
+    {
+      osip_uri_init (&(request->req_uri));
+      i = osip_uri_parse (request->req_uri, proxy);
+      if (i != 0)
+        {
+          goto brood_error_1;
+        }
+      osip_message_set_to (request, from);
+  } else
+    {
+      /* in any cases except REGISTER: */
+      i = osip_message_set_to (request, to);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "ERROR: callee address does not seems to be a sipurl: %s\n",
+                       to));
+          goto brood_error_1;
+        }
+      if (proxy != NULL && proxy[0] != 0)
+        {                       /* equal to a pre-existing route set */
+          /* if the pre-existing route set contains a "lr" (compliance
+             with bis-08) then the req_uri should contains the remote target
+             URI */
+          osip_uri_param_t *lr_param;
+          osip_route_t *o_proxy;
+
+#ifndef __VXWORKS_OS__
+          osip_route_init (&o_proxy);
+#else
+          osip_route_init2 (&o_proxy);
+#endif
+          i = osip_route_parse (o_proxy, proxy);
+          if (i != 0)
+            {
+              osip_route_free (o_proxy);
+              goto brood_error_1;
+            }
+
+          osip_uri_uparam_get_byname (o_proxy->url, "lr", &lr_param);
+          if (lr_param != NULL) /* to is the remote target URI in this case! */
+            {
+              osip_uri_clone (request->to->url, &(request->req_uri));
+              /* "[request] MUST includes a Route header field containing
+                 the route set values in order." */
+              osip_list_add (request->routes, o_proxy, 0);
+          } else
+            /* if the first URI of route set does not contain "lr", the req_uri
+               is set to the first uri of route set */
+            {
+              request->req_uri = o_proxy->url;
+              o_proxy->url = NULL;
+              osip_route_free (o_proxy);
+              /* add the route set */
+              /* "The UAC MUST add a route header field containing
+                 the remainder of the route set values in order.
+                 The UAC MUST then place the remote target URI into
+                 the route header field as the last value
+               */
+              osip_message_set_route (request, to);
+            }
+      } else                    /* No route set (outbound proxy) is used */
+        {
+          /* The UAC must put the remote target URI (to field) in the req_uri */
+          i = osip_uri_clone (request->to->url, &(request->req_uri));
+          if (i != 0)
+            goto brood_error_1;
+        }
+    }
+  /*guess the local ip since req uri is known */
+#ifdef SM
+  eXosip_get_localip_for (request->req_uri->host, locip, 49);
+#else
+  if (0==osip_strcasecmp(transport, "udp"))
+    eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+  else if (0==osip_strcasecmp(transport, "tcp"))
+    eXosip_guess_ip_for_via (eXosip.net_interfaces[1].net_ip_family, locip, 49);
+  else
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (default to UDP)\n"));
+      eXosip_guess_ip_for_via (eXosip.net_interfaces[0].net_ip_family, locip, 49);
+    }
+#endif
+  /* set To and From */
+  osip_message_set_from (request, from);
+  /* add a tag */
+  osip_from_set_tag (request->from, osip_from_tag_new_random ());
+
+  /* set the cseq and call_id header */
+  {
+    osip_call_id_t *callid;
+    osip_cseq_t *cseq;
+    char *num;
+    char *cidrand;
+
+    /* call-id is always the same for REGISTRATIONS */
+    i = osip_call_id_init (&callid);
+    if (i != 0)
+      goto brood_error_1;
+    cidrand = osip_call_id_new_random ();
+    osip_call_id_set_number (callid, cidrand);
+    if (doing_register)
+      register_callid_number = cidrand;
+
+    osip_call_id_set_host (callid, osip_strdup (locip));
+    request->call_id = callid;
+
+    i = osip_cseq_init (&cseq);
+    if (i != 0)
+      goto brood_error_1;
+    num = osip_strdup (doing_register ? "1" : "20");
+    osip_cseq_set_number (cseq, num);
+    osip_cseq_set_method (cseq, osip_strdup (method));
+    request->cseq = cseq;
+  }
+
+  /* always add the Max-Forward header */
+  osip_message_set_max_forwards (request, "5"); /* a UA should start a request with 70 */
+
+#define MASQUERADE_VIA
+#ifdef MASQUERADE_VIA
+  /* should be useless with compliant UA */
+  if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+    {
+      char *c_address = request->req_uri->host;
+
+      struct addrinfo *addrinfo;
+      struct __eXosip_sockaddr addr;
+
+      i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_UDP);
+      if (i == 0)
+        {
+          memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+          freeaddrinfo (addrinfo);
+          c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                       "eXosip: here is the resolved destination host=%s\n",
+                       c_address));
+        }
+
+      if (eXosip_is_public_address (c_address))
+        {
+          char tmp[200];
+
+          snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                    transport, eXosip.net_interfaces[0].net_firewall_ip,
+		    net->net_port,
+                    via_branch_new_random ());
+          osip_message_set_via (request, tmp);
+      } else
+        {
+          char tmp[200];
+
+          if (net->net_ip_family == AF_INET6)
+            snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+          else
+            snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+          osip_message_set_via (request, tmp);
+        }
+  } else
+    {
+      char tmp[200];
+
+      if (net->net_ip_family == AF_INET6)
+        snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+                  locip, net->net_port,
+		  via_branch_new_random ());
+      else
+        snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                  transport, locip, net->net_port,
+		  via_branch_new_random ());
+      osip_message_set_via (request, tmp);
+    }
+
+#else
+  {
+    char tmp[200];
+
+    if (net->net_ip_family == AF_INET6)
+      spnrintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+                locip, net->net_port,
+		via_branch_new_random ());
+    else
+      spnrintf (tmp, 200, "SIP/2.0/%s %s:%s;branch=z9hG4bK%u", transport,
+                locip, net->net_port,
+		via_branch_new_random ());
+
+    osip_message_set_via (request, tmp);
+  }
+#endif
+
+  /* add specific headers for each kind of request... */
+
+  if (0 == strcmp ("INVITE", method) || 0 == strcmp ("SUBSCRIBE", method))
+    {
+      char *contact;
+      osip_from_t *a_from;
+      int i;
+
+      i = osip_from_init (&a_from);
+      if (i == 0)
+        i = osip_from_parse (a_from, from);
+
+      if (i == 0 && a_from != NULL
+          && a_from->url != NULL && a_from->url->username != NULL)
+        {
+          contact = (char *) osip_malloc (50 + strlen (a_from->url->username));
+
+          if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+            {
+              char *c_address = request->req_uri->host;
+
+              struct addrinfo *addrinfo;
+              struct __eXosip_sockaddr addr;
+
+	      i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_TCP);
+              if (i == 0)
+                {
+                  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+                  freeaddrinfo (addrinfo);
+                  c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: here is the resolved destination host=%s\n",
+                               c_address));
+                }
+
+              if (eXosip_is_public_address (c_address))
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           eXosip.net_interfaces[0].net_firewall_ip,
+			   net->net_port);
+              } else
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           locip, net->net_port);
+                }
+          } else
+            {
+              sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                       locip, net->net_port);
+            }
+          osip_message_set_contact (request, contact);
+          osip_free (contact);
+        }
+      osip_from_free (a_from);
+
+      /* This is probably useless for other messages */
+      osip_message_set_allow (request, "INVITE");
+      osip_message_set_allow (request, "ACK");
+      osip_message_set_allow (request, "UPDATE");
+      osip_message_set_allow (request, "INFO");
+      osip_message_set_allow (request, "CANCEL");
+      osip_message_set_allow (request, "BYE");
+      osip_message_set_allow (request, "OPTIONS");
+      osip_message_set_allow (request, "REFER");
+      osip_message_set_allow (request, "SUBSCRIBE");
+      osip_message_set_allow (request, "NOTIFY");
+      osip_message_set_allow (request, "MESSAGE");
+    }
+
+  if (0 == strcmp ("REGISTER", method))
+    {
+  } else if (0 == strcmp ("INFO", method))
+    {
+  } else if (0 == strcmp ("OPTIONS", method))
+    {
+      osip_message_set_accept (request, "application/sdp");
+    }
+
+  osip_message_set_user_agent (request, eXosip.user_agent);
+  /*  else if ... */
+  *dest = request;
+  return 0;
+
+brood_error_1:
+  osip_message_free (request);
+  *dest = NULL;
+  return -1;
+}
+
+int
+generating_register (osip_message_t ** reg, char *transport, char *from,
+                     char *proxy, char *contact, int expires)
+{
+  osip_from_t *a_from;
+  int i;
+  char locip[50];
+  struct eXosip_net *net;
+
+  i = generating_request_out_of_dialog (reg, "REGISTER", NULL, transport, from, proxy);
+  if (i != 0)
+    return -1;
+
+  i = _eXosip_find_protocol(*reg);
+  if (i==IPPROTO_UDP)
+      net = &eXosip.net_interfaces[0];
+  else if (i==IPPROTO_TCP)
+      net = &eXosip.net_interfaces[1];
+  else
+    {
+      net = &eXosip.net_interfaces[0];
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol\n"));
+      return -1;
+    }
+
+#ifdef SM
+  eXosip_get_localip_for ((*reg)->req_uri->host, locip, 49);
+#else
+  eXosip_guess_ip_for_via (net->net_ip_family, locip, 49);
+#endif
+
+  if (contact == NULL)
+    {
+      i = osip_from_init (&a_from);
+      if (i == 0)
+        i = osip_from_parse (a_from, from);
+
+      if (i == 0 && a_from != NULL
+          && a_from->url != NULL && a_from->url->username != NULL)
+        {
+          contact = (char *) osip_malloc (50 + strlen (a_from->url->username));
+          if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+            {
+              char *c_address = (*reg)->req_uri->host;
+
+              struct addrinfo *addrinfo;
+              struct __eXosip_sockaddr addr;
+
+	      i = eXosip_get_addrinfo (&addrinfo, (*reg)->req_uri->host, 5060, IPPROTO_UDP);
+              if (i == 0)
+                {
+                  memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+                  freeaddrinfo (addrinfo);
+                  c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: here is the resolved destination host=%s\n",
+                               c_address));
+                }
+
+              if (eXosip_is_public_address (c_address))
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           eXosip.net_interfaces[0].net_firewall_ip,
+			   net->net_port);
+              } else
+                {
+                  sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                           locip, net->net_port);
+                }
+          } else
+            {
+              sprintf (contact, "<sip:%s@%s:%s>", a_from->url->username,
+                       locip, net->net_port);
+            }
+
+          osip_message_set_contact (*reg, contact);
+          osip_free (contact);
+        }
+      osip_from_free (a_from);
+  } else
+    {
+      osip_message_set_contact (*reg, contact);
+    }
+
+  {
+    char exp[10];               /* MUST never be ouside 1 and 3600 */
+
+    snprintf (exp, 9, "%i", expires);
+    osip_message_set_expires (*reg, exp);
+  }
+
+  osip_message_set_content_length (*reg, "0");
+
+  return 0;
+}
+
+int
+generating_publish (osip_message_t ** message, const char *to,
+                    const char *from, const char *route)
+{
+  int i;
+
+  if (to != NULL && *to == '\0')
+    return -1;
+
+  if (route != NULL && *route == '\0')
+    route = NULL;
+
+  i = generating_request_out_of_dialog (message, "PUBLISH", to, "UDP", from,
+					route);
+  if (i != 0)
+    return -1;
+
+  /* osip_message_set_organization(*message, "Jack's Org"); */
+
+  return 0;
+}
+
+static int
+dialog_fill_route_set (osip_dialog_t * dialog, osip_message_t * request)
+{
+  /* if the pre-existing route set contains a "lr" (compliance
+     with bis-08) then the req_uri should contains the remote target
+     URI */
+  int i;
+  int pos = 0;
+  osip_uri_param_t *lr_param;
+  osip_route_t *route;
+  char *last_route;
+
+  /* AMD bug: fixed 17/06/2002 */
+
+#ifdef OSIP_FUTURE_FIX_2_3
+    route = (osip_route_t *) osip_list_get (dialog->route_set, 0);
+#else
+  if (dialog->type == CALLER)
+    {
+      pos = osip_list_size (dialog->route_set) - 1;
+      route = (osip_route_t *) osip_list_get (dialog->route_set, pos);
+  } else
+    route = (osip_route_t *) osip_list_get (dialog->route_set, 0);
+#endif
+
+  osip_uri_uparam_get_byname (route->url, "lr", &lr_param);
+  if (lr_param != NULL)         /* the remote target URI is the req_uri! */
+    {
+      i = osip_uri_clone (dialog->remote_contact_uri->url, &(request->req_uri));
+      if (i != 0)
+        return -1;
+      /* "[request] MUST includes a Route header field containing
+         the route set values in order." */
+      /* AMD bug: fixed 17/06/2002 */
+      pos = 0;                  /* first element is at index 0 */
+      while (!osip_list_eol (dialog->route_set, pos))
+        {
+          osip_route_t *route2;
+
+          route = osip_list_get (dialog->route_set, pos);
+          i = osip_route_clone (route, &route2);
+          if (i != 0)
+            return -1;
+#ifdef OSIP_FUTURE_FIX_2_3
+            osip_list_add (request->routes, route2, -1);
+#else
+          if (dialog->type == CALLER)
+            osip_list_add (request->routes, route2, 0);
+          else
+            osip_list_add (request->routes, route2, -1);
+          pos++;
+#endif
+        }
+      return 0;
+    }
+
+  /* if the first URI of route set does not contain "lr", the req_uri
+     is set to the first uri of route set */
+
+
+  i = osip_uri_clone (route->url, &(request->req_uri));
+  if (i != 0)
+    return -1;
+  /* add the route set */
+  /* "The UAC MUST add a route header field containing
+     the remainder of the route set values in order. */
+  pos = 0;                      /* yes it is */
+
+  while (!osip_list_eol (dialog->route_set, pos))       /* not the first one in the list */
+    {
+      osip_route_t *route2;
+
+      route = osip_list_get (dialog->route_set, pos);
+      i = osip_route_clone (route, &route2);
+      if (i != 0)
+        return -1;
+#ifdef OSIP_FUTURE_FIX_2_3
+      if (!osip_list_eol (dialog->route_set, pos + 1))
+        osip_list_add (request->routes, route2, -1);
+      else
+        osip_route_free (route2);
+#else
+      if (dialog->type == CALLER)
+        {
+          if (pos != osip_list_size (dialog->route_set) - 1)
+            osip_list_add (request->routes, route2, 0);
+          else
+            osip_route_free (route2);
+      } else
+        {
+          if (!osip_list_eol (dialog->route_set, pos + 1))
+            osip_list_add (request->routes, route2, -1);
+          else
+            osip_route_free (route2);
+        }
+#endif
+      pos++;
+    }
+
+  /* The UAC MUST then place the remote target URI into
+     the route header field as the last value */
+  i = osip_uri_to_str (dialog->remote_contact_uri->url, &last_route);
+  if (i != 0)
+    return -1;
+  i = osip_message_set_route (request, last_route);
+  osip_free (last_route);
+  if (i != 0)
+    {
+      return -1;
+    }
+
+  /* route header and req_uri set */
+  return 0;
+}
+
+int
+_eXosip_build_request_within_dialog (osip_message_t ** dest,
+                                     const char *method,
+                                     osip_dialog_t * dialog, const char *transport)
+{
+  int i;
+  osip_message_t *request;
+  char locip[50];
+  struct eXosip_net *net;
+
+  i = osip_message_init (&request);
+  if (i != 0) 
+   return -1;
+
+  if (dialog->remote_contact_uri == NULL)
+    {
+      /* this dialog is probably not established! or the remote UA
+         is not compliant with the latest RFC
+       */
+      osip_message_free (request);
+      return -1;
+    }
+
+  if (0==osip_strcasecmp(transport, "udp"))
+    net = &eXosip.net_interfaces[0];
+  else if (0==osip_strcasecmp(transport, "tcp"))
+    net = &eXosip.net_interfaces[1];
+  else
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "eXosip: unsupported protocol -%s- (default to UDP)\n"));
+    net = &eXosip.net_interfaces[0];
+    }
+
+#ifdef SM
+  eXosip_get_localip_for (dialog->remote_contact_uri->url->host, locip, 49);
+#else
+  eXosip_guess_ip_for_via (net->net_ip_family, locip, 49);
+#endif
+  /* prepare the request-line */
+  request->sip_method = osip_strdup (method);
+  request->sip_version = osip_strdup ("SIP/2.0");
+  request->status_code = 0;
+  request->reason_phrase = NULL;
+
+  /* and the request uri???? */
+  if (osip_list_eol (dialog->route_set, 0))
+    {
+      /* The UAC must put the remote target URI (to field) in the req_uri */
+      i = osip_uri_clone (dialog->remote_contact_uri->url, &(request->req_uri));
+      if (i != 0)
+        goto grwd_error_1;
+  } else
+    {
+      /* fill the request-uri, and the route headers. */
+      dialog_fill_route_set (dialog, request);
+    }
+
+  /* To and From already contains the proper tag! */
+  i = osip_to_clone (dialog->remote_uri, &(request->to));
+  if (i != 0)
+    goto grwd_error_1;
+  i = osip_from_clone (dialog->local_uri, &(request->from));
+  if (i != 0)
+    goto grwd_error_1;
+
+  /* set the cseq and call_id header */
+  osip_message_set_call_id (request, dialog->call_id);
+
+  if (0 == strcmp ("ACK", method))
+    {
+      osip_cseq_t *cseq;
+      char *tmp;
+
+      i = osip_cseq_init (&cseq);
+      if (i != 0)
+        goto grwd_error_1;
+      tmp = osip_malloc (20);
+      sprintf (tmp, "%i", dialog->local_cseq);
+      osip_cseq_set_number (cseq, tmp);
+      osip_cseq_set_method (cseq, osip_strdup (method));
+      request->cseq = cseq;
+  } else
+    {
+      osip_cseq_t *cseq;
+      char *tmp;
+
+      i = osip_cseq_init (&cseq);
+      if (i != 0)
+        goto grwd_error_1;
+      dialog->local_cseq++;     /* we should we do that?? */
+      tmp = osip_malloc (20);
+      sprintf (tmp, "%i", dialog->local_cseq);
+      osip_cseq_set_number (cseq, tmp);
+      osip_cseq_set_method (cseq, osip_strdup (method));
+      request->cseq = cseq;
+    }
+
+  /* always add the Max-Forward header */
+  osip_message_set_max_forwards (request, "5"); /* a UA should start a request with 70 */
+
+
+  /* even for ACK for 2xx (ACK within a dialog), the branch ID MUST
+     be a new ONE! */
+#ifdef MASQUERADE_VIA
+  /* should be useless with compliant UA */
+  if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+    {
+      char *c_address = request->req_uri->host;
+
+      struct addrinfo *addrinfo;
+      struct __eXosip_sockaddr addr;
+
+      i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_UDP);
+      if (i == 0)
+        {
+          memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+          freeaddrinfo (addrinfo);
+          c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                       "eXosip: here is the resolved destination host=%s\n",
+                       c_address));
+        }
+
+      if (eXosip_is_public_address (c_address))
+        {
+          char tmp[200];
+
+          sprintf (tmp, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u", transport,
+                   eXosip.net_interfaces[0].net_firewall_ip,
+                   net->net_port,
+		   via_branch_new_random ());
+          osip_message_set_via (request, tmp);
+      } else
+        {
+          char tmp[200];
+
+          if (eXosip.net_interfaces[0].net_ip_family == AF_INET6)
+            snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+          else
+            snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                      transport, locip, net->net_port,
+                      via_branch_new_random ());
+
+          osip_message_set_via (request, tmp);
+        }
+  } else
+    {
+      char tmp[200];
+
+      if (net->net_ip_family == AF_INET6)
+        snprintf (tmp, 200, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+                  locip, net->net_port,
+		  via_branch_new_random ());
+      else
+        snprintf (tmp, 200, "SIP/2.0/%s %s:%s;rport;branch=z9hG4bK%u",
+                  transport, locip, net->net_port,
+		  via_branch_new_random ());
+
+      osip_message_set_via (request, tmp);
+    }
+
+#else
+  {
+    char tmp[200];
+
+    if (net->net_ip_family == AF_INET6)
+      sprintf (tmp, "SIP/2.0/%s [%s]:%s;branch=z9hG4bK%u", transport,
+               locip, net->net_port,
+	       via_branch_new_random ());
+    else
+      sprintf (tmp, "SIP/2.0/%s %s:%s;branch=z9hG4bK%u", transport,
+               locip, net->net_port,
+	       via_branch_new_random ());
+
+    osip_message_set_via (request, tmp);
+  }
+#endif
+
+  /* add specific headers for each kind of request... */
+
+  {
+    char contact[200];
+
+    if (net->net_firewall_ip[0] != '\0')
+      {
+        char *c_address = request->req_uri->host;
+
+        struct addrinfo *addrinfo;
+        struct __eXosip_sockaddr addr;
+
+        i = eXosip_get_addrinfo (&addrinfo, request->req_uri->host, 5060, IPPROTO_UDP);
+        if (i == 0)
+          {
+            memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+            freeaddrinfo (addrinfo);
+            c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+            OSIP_TRACE (osip_trace
+                        (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                         "eXosip: here is the resolved destination host=%s\n",
+                         c_address));
+          }
+
+        if (eXosip_is_public_address (c_address))
+          {
+            sprintf (contact, "<sip:%s@%s:%s>",
+                     dialog->local_uri->url->username,
+		     eXosip.net_interfaces[0].net_firewall_ip,
+                     net->net_port);
+        } else
+          {
+            sprintf (contact, "<sip:%s@%s:%s>",
+                     dialog->local_uri->url->username, locip,
+		     net->net_port);
+          }
+    } else
+      {
+        sprintf (contact, "<sip:%s@%s:%s>", dialog->local_uri->url->username,
+                 locip, net->net_port);
+      }
+    osip_message_set_contact (request, contact);
+    /* Here we'll add the supported header if it's needed! */
+    /* the require header must be added by the upper layer if needed */
+  }
+
+  if (0 == strcmp ("NOTIFY", method))
+    {
+  } else if (0 == strcmp ("INFO", method))
+    {
+
+  } else if (0 == strcmp ("OPTIONS", method))
+    {
+      osip_message_set_accept (request, "application/sdp");
+  } else if (0 == strcmp ("ACK", method))
+    {
+      /* The ACK MUST contains the same credential than the INVITE!! */
+      /* TODO... */
+    }
+
+  osip_message_set_user_agent (request, eXosip.user_agent);
+  /*  else if ... */
+  *dest = request;
+  return 0;
+
+  /* grwd_error_2: */
+  dialog->local_cseq--;
+grwd_error_1:
+  osip_message_free (request);
+  *dest = NULL;
+  return -1;
+}
+
+/* this request is only build within a dialog!! */
+int
+generating_bye (osip_message_t ** bye, osip_dialog_t * dialog, char *transport)
+{
+  int i;
+
+  i = _eXosip_build_request_within_dialog (bye, "BYE", dialog, transport);
+  if (i != 0)
+    return -1;
+
+  return 0;
+}
+
+/* It is RECOMMENDED to only cancel INVITE request */
+int
+generating_cancel (osip_message_t ** dest, osip_message_t * request_cancelled)
+{
+  int i;
+  osip_message_t *request;
+
+  i = osip_message_init (&request);
+  if (i != 0)
+    return -1;
+
+  /* prepare the request-line */
+  osip_message_set_method (request, osip_strdup ("CANCEL"));
+  osip_message_set_version (request, osip_strdup ("SIP/2.0"));
+  osip_message_set_status_code (request, 0);
+  osip_message_set_reason_phrase (request, NULL);
+
+  i = osip_uri_clone (request_cancelled->req_uri, &(request->req_uri));
+  if (i != 0)
+    goto gc_error_1;
+
+  i = osip_to_clone (request_cancelled->to, &(request->to));
+  if (i != 0)
+    goto gc_error_1;
+  i = osip_from_clone (request_cancelled->from, &(request->from));
+  if (i != 0)
+    goto gc_error_1;
+
+  /* set the cseq and call_id header */
+  i = osip_call_id_clone (request_cancelled->call_id, &(request->call_id));
+  if (i != 0)
+    goto gc_error_1;
+  i = osip_cseq_clone (request_cancelled->cseq, &(request->cseq));
+  if (i != 0)
+    goto gc_error_1;
+  osip_free (request->cseq->method);
+  request->cseq->method = osip_strdup ("CANCEL");
+
+  /* copy ONLY the top most Via Field (this method is also used by proxy) */
+  {
+    osip_via_t *via;
+    osip_via_t *via2;
+
+    i = osip_message_get_via (request_cancelled, 0, &via);
+    if (i != 0)
+      goto gc_error_1;
+    i = osip_via_clone (via, &via2);
+    if (i != 0)
+      goto gc_error_1;
+    osip_list_add (request->vias, via2, -1);
+  }
+
+  /* add the same route-set than in the previous request */
+  {
+    int pos = 0;
+    osip_route_t *route;
+    osip_route_t *route2;
+
+    while (!osip_list_eol (request_cancelled->routes, pos))
+      {
+        route = (osip_route_t *) osip_list_get (request_cancelled->routes, pos);
+        i = osip_route_clone (route, &route2);
+        if (i != 0)
+          goto gc_error_1;
+        osip_list_add (request->routes, route2, -1);
+        pos++;
+      }
+  }
+
+  osip_message_set_max_forwards (request, "70");        /* a UA should start a request with 70 */
+  osip_message_set_user_agent (request, eXosip.user_agent);
+
+  *dest = request;
+  return 0;
+
+gc_error_1:
+  osip_message_free (request);
+  *dest = NULL;
+  return -1;
+}
+
diff --git a/libs/eXosip2/jresponse.c b/libs/eXosip2/jresponse.c
new file mode 100644
index 0000000000000000000000000000000000000000..6135f56505c1594b2191af1bb6c242a3dc5b3ab9
--- /dev/null
+++ b/libs/eXosip2/jresponse.c
@@ -0,0 +1,736 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+
+int
+_eXosip_build_response_default (osip_message_t ** dest,
+                                osip_dialog_t * dialog, int status,
+                                osip_message_t * request)
+{
+  osip_generic_param_t *tag;
+  osip_message_t *response;
+  int pos;
+  int i;
+
+  *dest = NULL;
+  if (request == NULL)
+    return -1;
+
+  i = osip_message_init (&response);
+  if (i != 0)
+    return -1;
+  /* initialise osip_message_t structure */
+  /* yet done... */
+
+  response->sip_version = (char *) osip_malloc (8 * sizeof (char));
+  sprintf (response->sip_version, "SIP/2.0");
+  osip_message_set_status_code (response, status);
+
+  /* handle some internal reason definitions. */
+  if (MSG_IS_NOTIFY (request) && status == 481)
+    {
+      response->reason_phrase = osip_strdup ("Subcription Does Not Exist");
+  } else if (MSG_IS_SUBSCRIBE (request) && status == 202)
+    {
+      response->reason_phrase = osip_strdup ("Accepted subscription");
+  } else
+    {
+      response->reason_phrase = osip_strdup (osip_message_get_reason (status));
+      if (response->reason_phrase == NULL)
+        {
+          if (response->status_code == 101)
+            response->reason_phrase = osip_strdup ("Dialog Establishement");
+          else
+            response->reason_phrase = osip_strdup ("Unknown code");
+        }
+      response->req_uri = NULL;
+      response->sip_method = NULL;
+    }
+
+  i = osip_to_clone (request->to, &(response->to));
+  if (i != 0)
+    goto grd_error_1;
+
+  i = osip_to_get_tag (response->to, &tag);
+  if (i != 0)
+    {                           /* we only add a tag if it does not already contains one! */
+      if ((dialog != NULL) && (dialog->local_tag != NULL))
+        /* it should contain the local TAG we created */
+        {
+          osip_to_set_tag (response->to, osip_strdup (dialog->local_tag));
+      } else
+        {
+          if (status != 100)
+            osip_to_set_tag (response->to, osip_to_tag_new_random ());
+        }
+    }
+
+  i = osip_from_clone (request->from, &(response->from));
+  if (i != 0)
+    goto grd_error_1;
+
+  pos = 0;
+  while (!osip_list_eol (request->vias, pos))
+    {
+      osip_via_t *via;
+      osip_via_t *via2;
+
+      via = (osip_via_t *) osip_list_get (request->vias, pos);
+      i = osip_via_clone (via, &via2);
+      if (i != -0)
+        goto grd_error_1;
+      osip_list_add (response->vias, via2, -1);
+      pos++;
+    }
+
+  i = osip_call_id_clone (request->call_id, &(response->call_id));
+  if (i != 0)
+    goto grd_error_1;
+  i = osip_cseq_clone (request->cseq, &(response->cseq));
+  if (i != 0)
+    goto grd_error_1;
+
+  if (MSG_IS_SUBSCRIBE (request))
+    {
+      osip_header_t *exp;
+      osip_header_t *evt_hdr;
+
+      osip_message_header_get_byname (request, "event", 0, &evt_hdr);
+      if (evt_hdr != NULL && evt_hdr->hvalue != NULL)
+	osip_message_set_header (response, "Event", evt_hdr->hvalue);
+      else
+	osip_message_set_header (response, "Event", "presence");
+      i = osip_message_get_expires (request, 0, &exp);
+      if (exp == NULL)
+        {
+          osip_header_t *cp;
+
+          i = osip_header_clone (exp, &cp);
+          if (cp != NULL)
+            osip_list_add (response->headers, cp, 0);
+        }
+    }
+
+  osip_message_set_allow (response, "INVITE");
+  osip_message_set_allow (response, "ACK");
+  osip_message_set_allow (response, "OPTIONS");
+  osip_message_set_allow (response, "CANCEL");
+  osip_message_set_allow (response, "BYE");
+  osip_message_set_allow (response, "SUBSCRIBE");
+  osip_message_set_allow (response, "NOTIFY");
+  osip_message_set_allow (response, "MESSAGE");
+  osip_message_set_allow (response, "INFO");
+  osip_message_set_allow (response, "REFER");
+  osip_message_set_allow (response, "UPDATE");
+
+  *dest = response;
+  return 0;
+
+grd_error_1:
+  osip_message_free (response);
+  return -1;
+}
+
+int
+complete_answer_that_establish_a_dialog (osip_message_t * response,
+                                         osip_message_t * request)
+{
+  int i;
+  int pos = 0;
+  char contact[1000];
+  char locip[50];
+  struct eXosip_net *net;
+  /* 12.1.1:
+     copy all record-route in response
+     add a contact with global scope
+   */
+  while (!osip_list_eol (request->record_routes, pos))
+    {
+      osip_record_route_t *rr;
+      osip_record_route_t *rr2;
+
+      rr = osip_list_get (request->record_routes, pos);
+      i = osip_record_route_clone (rr, &rr2);
+      if (i != 0)
+        return -1;
+      osip_list_add (response->record_routes, rr2, -1);
+      pos++;
+    }
+
+  i = _eXosip_find_protocol(response);
+  if (i==IPPROTO_UDP)
+    {
+      net = &eXosip.net_interfaces[0];
+    }
+  else if (i==IPPROTO_TCP)
+    {
+      net = &eXosip.net_interfaces[1];
+    }
+  else
+    {
+      net = &eXosip.net_interfaces[0];
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: unsupported protocol (default to UDP)\n"));
+      return -1;
+    }
+
+#ifdef SM
+  eXosip_get_localip_from_via (response, locip, 49);
+#else
+  eXosip_guess_ip_for_via (net->net_ip_family, locip, 49);
+#endif
+
+  if (request->to->url->username == NULL)
+    snprintf (contact, 1000, "<sip:%s:%s>", locip, net->net_port);
+  else
+    snprintf (contact, 1000, "<sip:%s@%s:%s>", request->to->url->username,
+              locip, net->net_port);
+
+  if (eXosip.net_interfaces[0].net_firewall_ip[0] != '\0')
+    {
+      osip_contact_t *con =
+        (osip_contact_t *) osip_list_get (request->contacts, 0);
+      if (con != NULL && con->url != NULL && con->url->host != NULL)
+        {
+          char *c_address = con->url->host;
+
+          struct addrinfo *addrinfo;
+          struct __eXosip_sockaddr addr;
+	  i = eXosip_get_addrinfo (&addrinfo, con->url->host, 5060, IPPROTO_UDP);
+          if (i == 0)
+            {
+              memcpy (&addr, addrinfo->ai_addr, addrinfo->ai_addrlen);
+              freeaddrinfo (addrinfo);
+              c_address = inet_ntoa (((struct sockaddr_in *) &addr)->sin_addr);
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                           "eXosip: here is the resolved destination host=%s\n",
+                           c_address));
+            }
+
+          /* If c_address is a PUBLIC address, the request was
+             coming from the PUBLIC network. */
+          if (eXosip_is_public_address (c_address))
+            {
+              if (request->to->url->username == NULL)
+                snprintf (contact, 1000, "<sip:%s:%s>",
+			  eXosip.net_interfaces[0].net_firewall_ip,
+                          net->net_port);
+              else
+                snprintf (contact, 1000, "<sip:%s@%s:%s>",
+                          request->to->url->username,
+			  eXosip.net_interfaces[0].net_firewall_ip,
+                          net->net_port);
+            }
+        }
+    }
+
+  osip_message_set_contact (response, contact);
+
+  return 0;
+}
+
+int
+_eXosip_answer_invite_1xx (eXosip_call_t * jc, eXosip_dialog_t * jd, int code,
+                           osip_message_t ** answer)
+{
+  int i;
+  osip_transaction_t *tr;
+
+  *answer = NULL;
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (answer, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (answer, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -2;
+    }
+
+  osip_message_set_content_length (*answer, "0");
+  /*  send message to transaction layer */
+
+  if (code > 100)
+    {
+      i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+    }
+
+  return 0;
+}
+
+int
+_eXosip_answer_invite_2xx (eXosip_call_t * jc, eXosip_dialog_t * jd, int code,
+                           osip_message_t ** answer)
+{
+  int i;
+  osip_transaction_t *tr;
+
+  *answer = NULL;
+  tr = eXosip_find_last_inc_invite (jc, jd);
+
+  if (tr == NULL || tr->orig_request == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer\n"));
+      return -1;
+    }
+
+  if (jd != NULL && jd->d_dialog == NULL)
+    {                           /* element previously removed */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot answer this closed transaction\n"));
+      return -1;
+    }
+
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (answer, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (answer, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -1;
+    }
+
+  /* request that estabish a dialog: */
+  /* 12.1.1 UAS Behavior */
+  {
+    i = complete_answer_that_establish_a_dialog (*answer, tr->orig_request);
+    if (i != 0)
+      goto g2atii_error_1;;     /* ?? */
+  }
+
+  return 0;
+
+g2atii_error_1:
+  osip_message_free (*answer);
+  return -1;
+}
+
+int
+_eXosip_answer_invite_3456xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                              int code, osip_message_t ** answer)
+{
+  int i;
+  osip_transaction_t *tr;
+
+  *answer = NULL;
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  i =
+    _eXosip_build_response_default (answer, jd->d_dialog, code, tr->orig_request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -1;
+    }
+
+  if ((300 <= code) && (code <= 399))
+    {
+      /* Should add contact fields */
+      /* ... */
+    }
+
+  osip_message_set_content_length (*answer, "0");
+  /*  send message to transaction layer */
+
+  return 0;
+}
+
+int
+_eXosip_default_answer_invite_1xx (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                   int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -2;
+    }
+
+  osip_message_set_content_length (response, "0");
+  /*  send message to transaction layer */
+
+  if (code > 100)
+    {
+      /* request that estabish a dialog: */
+      /* 12.1.1 UAS Behavior */
+      i = complete_answer_that_establish_a_dialog (response, tr->orig_request);
+
+      if (jd == NULL)
+        {
+          i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, response);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot create dialog!\n"));
+          } else
+            {
+              ADD_ELEMENT (jc->c_dialogs, jd);
+            }
+        }
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+
+  return 0;
+}
+
+int
+_eXosip_default_answer_invite_3456xx (eXosip_call_t * jc,
+                                      eXosip_dialog_t * jd, int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  /* is the transaction already answered? */
+  if (tr->state == IST_COMPLETED
+      || tr->state == IST_CONFIRMED || tr->state == IST_TERMINATED)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: transaction already answered\n"));
+      return -1;
+    }
+
+  i =
+    _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                    tr->orig_request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for invite\n"));
+      return -1;
+    }
+
+  osip_message_set_content_length (response, "0");
+  /*  send message to transaction layer */
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+
+int
+_eXosip_insubscription_answer_1xx (eXosip_notify_t * jn, eXosip_dialog_t * jd,
+                                   int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_subscribe (jn, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "ERROR: Could not create response for subscribe\n"));
+      return -1;
+    }
+
+  if (code > 100)
+    {
+      /* request that estabish a dialog: */
+      /* 12.1.1 UAS Behavior */
+      i = complete_answer_that_establish_a_dialog (response, tr->orig_request);
+
+      if (jd == NULL)
+        {
+          i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, response);
+          if (i != 0)
+            {
+              OSIP_TRACE (osip_trace
+                          (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                           "eXosip: cannot create dialog!\n"));
+            }
+          ADD_ELEMENT (jn->n_dialogs, jd);
+        }
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
+
+int
+_eXosip_insubscription_answer_2xx (eXosip_notify_t * jn, eXosip_dialog_t * jd,
+                                   int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_subscribe (jn, jd);
+
+  if (tr == NULL || tr->orig_request == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer\n"));
+      return -1;
+    }
+
+  if (jd != NULL && jd->d_dialog == NULL)
+    {                           /* element previously removed, this is a no hop! */
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot answer this closed transaction\n"));
+      return -1;
+    }
+
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for subscribe\n"));
+      code = 500;               /* ? which code to use? */
+      return -1;
+    }
+
+  /* request that estabish a dialog: */
+  /* 12.1.1 UAS Behavior */
+  {
+    i = complete_answer_that_establish_a_dialog (response, tr->orig_request);
+    if (i != 0)
+      goto g2atii_error_1;;     /* ?? */
+  }
+
+  /* THIS RESPONSE MUST BE SENT RELIABILY until the final ACK is received !! */
+  /* this response must be stored at the upper layer!!! (it will be destroyed */
+  /* right after being sent! */
+
+  if (jd == NULL)
+    {
+      i = eXosip_dialog_init_as_uas (&jd, tr->orig_request, response);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot create dialog!\n"));
+          return -1;
+        }
+      ADD_ELEMENT (jn->n_dialogs, jd);
+    }
+
+  eXosip_dialog_set_200ok (jd, response);
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+
+  osip_dialog_set_state (jd->d_dialog, DIALOG_CONFIRMED);
+  return 0;
+
+g2atii_error_1:
+  osip_message_free (response);
+  return -1;
+}
+
+int
+_eXosip_insubscription_answer_3456xx (eXosip_notify_t * jn,
+                                      eXosip_dialog_t * jd, int code)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *response;
+  int i;
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_subscribe (jn, jd);
+  if (tr == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot find transaction to answer"));
+      return -1;
+    }
+  if (jd == NULL)
+    i = _eXosip_build_response_default (&response, NULL, code, tr->orig_request);
+  else
+    i =
+      _eXosip_build_response_default (&response, jd->d_dialog, code,
+                                      tr->orig_request);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                   "ERROR: Could not create response for subscribe\n"));
+      return -1;
+    }
+
+  if ((300 <= code) && (code <= 399))
+    {
+      /* Should add contact fields */
+      /* ... */
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (response);
+  evt_answer->transactionid = tr->transactionid;
+
+  osip_transaction_add_event (tr, evt_answer);
+  __eXosip_wakeup ();
+  return 0;
+}
diff --git a/libs/eXosip2/jsubscribe.c b/libs/eXosip2/jsubscribe.c
new file mode 100644
index 0000000000000000000000000000000000000000..7f58c793673d134522a715dd58bc7fa49642c4ce
--- /dev/null
+++ b/libs/eXosip2/jsubscribe.c
@@ -0,0 +1,150 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+osip_transaction_t *
+eXosip_find_last_out_subscribe (eXosip_subscribe_t * js, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "SUBSCRIBE"))
+            break;
+          else
+            out_tr = NULL;
+          pos++;
+        }
+  } else
+    out_tr = NULL;
+
+  if (out_tr == NULL)
+    return js->s_out_tr;        /* can be NULL */
+
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_inc_notify (eXosip_subscribe_t * js, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "NOTIFY"))
+            return out_tr;
+          pos++;
+        }
+    }
+
+  return NULL;
+}
+
+
+int
+eXosip_subscribe_init (eXosip_subscribe_t ** js)
+{
+  *js = (eXosip_subscribe_t *) osip_malloc (sizeof (eXosip_subscribe_t));
+  if (*js == NULL)
+    return -1;
+  memset (*js, 0, sizeof (eXosip_subscribe_t));
+  return 0;
+}
+
+void
+eXosip_subscribe_free (eXosip_subscribe_t * js)
+{
+  /* ... */
+
+  eXosip_dialog_t *jd;
+
+  for (jd = js->s_dialogs; jd != NULL; jd = js->s_dialogs)
+    {
+      REMOVE_ELEMENT (js->s_dialogs, jd);
+      eXosip_dialog_free (jd);
+    }
+
+  __eXosip_delete_jinfo (js->s_inc_tr);
+  __eXosip_delete_jinfo (js->s_out_tr);
+  if (js->s_inc_tr != NULL)
+    osip_list_add (eXosip.j_transactions, js->s_inc_tr, 0);
+  if (js->s_out_tr != NULL)
+    osip_list_add (eXosip.j_transactions, js->s_out_tr, 0);
+
+  osip_free (js);
+}
+
+int
+_eXosip_subscribe_set_refresh_interval (eXosip_subscribe_t * js,
+                                        osip_message_t * out_subscribe)
+{
+  osip_header_t *exp;
+
+  if (js == NULL || out_subscribe == NULL)
+    return -1;
+
+  osip_message_get_expires (out_subscribe, 0, &exp);
+  if (exp == NULL || exp->hvalue == NULL)
+    js->s_reg_period = 3600;
+  else
+    {
+      js->s_reg_period = osip_atoi (exp->hvalue);
+      if (js->s_reg_period < 0)
+        js->s_reg_period = 3600;
+    }
+
+  return 0;
+}
+
+int
+eXosip_subscribe_need_refresh (eXosip_subscribe_t * js, eXosip_dialog_t * jd,
+                               int now)
+{
+  osip_transaction_t *out_tr = NULL;
+
+  if (jd != NULL)
+    out_tr = osip_list_get (jd->d_out_trs, 0);
+  if (out_tr == NULL)
+    out_tr = js->s_out_tr;
+
+  if (now - out_tr->birth_time > js->s_reg_period - 60)
+    return 0;
+  return -1;
+}
diff --git a/libs/eXosip2/misc.c b/libs/eXosip2/misc.c
new file mode 100644
index 0000000000000000000000000000000000000000..b811c4764d9d8a28effff24848d65addf3877770
--- /dev/null
+++ b/libs/eXosip2/misc.c
@@ -0,0 +1,239 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+
+/* some methods to extract transaction information from a eXosip_call_t */
+
+int
+eXosip_remove_transaction_from_call (osip_transaction_t * tr, eXosip_call_t * jc)
+{
+  osip_transaction_t *inc_tr;
+  osip_transaction_t *out_tr;
+  eXosip_dialog_t *jd;
+  int pos = 0;
+
+  if (jc->c_inc_tr == tr)
+    {
+      jc->c_inc_tr = NULL;      /* can be NULL */
+      return 0;
+    }
+
+  for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+    {
+      pos = 0;
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (inc_tr == tr)
+            {
+              osip_list_remove (jd->d_inc_trs, pos);
+              return 0;
+            }
+          pos++;
+        }
+    }
+
+  if (jc->c_out_tr == tr)
+    {
+      jc->c_out_tr = NULL;      /* can be NULL */
+      return 0;
+    }
+
+  for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+    {
+      pos = 0;
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (out_tr == tr)
+            {
+              osip_list_remove (jd->d_out_trs, pos);
+              return 0;
+            }
+          pos++;
+        }
+    }
+
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                          "eXosip: No information.\n"));
+  return -1;
+}
+
+osip_transaction_t *
+eXosip_find_last_transaction (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                              const char *method)
+{
+  osip_transaction_t *inc_tr;
+  osip_transaction_t *out_tr;
+
+  inc_tr = eXosip_find_last_inc_transaction (jc, jd, method);
+  out_tr = eXosip_find_last_out_transaction (jc, jd, method);
+  if (inc_tr == NULL)
+    return out_tr;
+  if (out_tr == NULL)
+    return inc_tr;
+
+  if (inc_tr->birth_time > out_tr->birth_time)
+    return inc_tr;
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_inc_transaction (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  const char *method)
+{
+  osip_transaction_t *inc_tr;
+  int pos;
+
+  inc_tr = NULL;
+  pos = 0;
+  if (method == NULL || method[0] == '\0')
+    return NULL;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (0 == osip_strcasecmp (inc_tr->cseq->method, method))
+            break;
+          else
+            inc_tr = NULL;
+          pos++;
+        }
+  } else
+    inc_tr = NULL;
+
+  return inc_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_out_transaction (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  const char *method)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd == NULL && jc == NULL)
+    return NULL;
+  if (method == NULL || method[0] == '\0')
+    return NULL;
+
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == osip_strcasecmp (out_tr->cseq->method, method))
+            break;
+          else
+            out_tr = NULL;
+          pos++;
+        }
+    }
+
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_invite (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *inc_tr;
+  osip_transaction_t *out_tr;
+
+  inc_tr = eXosip_find_last_inc_invite (jc, jd);
+  out_tr = eXosip_find_last_out_invite (jc, jd);
+  if (inc_tr == NULL)
+    return out_tr;
+  if (out_tr == NULL)
+    return inc_tr;
+
+  if (inc_tr->birth_time > out_tr->birth_time)
+    return inc_tr;
+  return out_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_inc_invite (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *inc_tr;
+  int pos;
+
+  inc_tr = NULL;
+  pos = 0;
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_inc_trs, pos))
+        {
+          inc_tr = osip_list_get (jd->d_inc_trs, pos);
+          if (0 == strcmp (inc_tr->cseq->method, "INVITE"))
+            break;
+          else
+            inc_tr = NULL;
+          pos++;
+        }
+  } else
+    inc_tr = NULL;
+
+  if (inc_tr == NULL)
+    return jc->c_inc_tr;        /* can be NULL */
+
+  return inc_tr;
+}
+
+osip_transaction_t *
+eXosip_find_last_out_invite (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *out_tr;
+  int pos;
+
+  out_tr = NULL;
+  pos = 0;
+  if (jd == NULL && jc == NULL)
+    return NULL;
+
+  if (jd != NULL)
+    {
+      while (!osip_list_eol (jd->d_out_trs, pos))
+        {
+          out_tr = osip_list_get (jd->d_out_trs, pos);
+          if (0 == strcmp (out_tr->cseq->method, "INVITE"))
+            break;
+          else
+            out_tr = NULL;
+          pos++;
+        }
+    }
+
+  if (out_tr == NULL)
+    return jc->c_out_tr;        /* can be NULL */
+
+  return out_tr;
+}
diff --git a/libs/eXosip2/sdp_offans.c b/libs/eXosip2/sdp_offans.c
new file mode 100644
index 0000000000000000000000000000000000000000..0d30fdcc1935931f3458e1b50a2d5c2f1902b5f0
--- /dev/null
+++ b/libs/eXosip2/sdp_offans.c
@@ -0,0 +1,204 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+
+extern eXosip_t eXosip;
+
+sdp_message_t *_eXosip_get_remote_sdp (osip_transaction_t * invite_tr);
+sdp_message_t *_eXosip_get_local_sdp (osip_transaction_t * invite_tr);
+
+
+sdp_message_t *
+eXosip_get_remote_sdp (int jid)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *invite_tr = NULL;
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jc == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return NULL;
+    }
+  invite_tr = eXosip_find_last_invite (jc, jd);
+  if (invite_tr == NULL)
+    return NULL;
+
+  return _eXosip_get_remote_sdp (invite_tr);
+}
+
+sdp_message_t *
+eXosip_get_local_sdp (int jid)
+{
+  eXosip_dialog_t *jd = NULL;
+  eXosip_call_t *jc = NULL;
+  osip_transaction_t *invite_tr = NULL;
+
+  if (jid > 0)
+    {
+      eXosip_call_dialog_find (jid, &jc, &jd);
+    }
+  if (jc == NULL)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: No call here?\n"));
+      return NULL;
+    }
+  invite_tr = eXosip_find_last_invite (jc, jd);
+  if (invite_tr == NULL)
+    return NULL;
+
+  return _eXosip_get_local_sdp (invite_tr);
+}
+
+sdp_message_t *
+_eXosip_get_remote_sdp (osip_transaction_t * invite_tr)
+{
+  osip_message_t *message;
+
+  if (invite_tr == NULL)
+    return NULL;
+  if (invite_tr->ctx_type == IST)
+    message = invite_tr->orig_request;
+  else if (invite_tr->ctx_type == ICT)
+    message = invite_tr->last_response;
+  else
+    return NULL;
+  return eXosip_get_sdp_info (message);
+}
+
+sdp_message_t *
+_eXosip_get_local_sdp (osip_transaction_t * invite_tr)
+{
+  osip_message_t *message;
+
+  if (invite_tr == NULL)
+    return NULL;
+  if (invite_tr->ctx_type == IST)
+    message = invite_tr->last_response;
+  else if (invite_tr->ctx_type == ICT)
+    message = invite_tr->orig_request;
+  else
+    return NULL;
+  return eXosip_get_sdp_info (message);
+}
+
+sdp_message_t *
+eXosip_get_sdp_info (osip_message_t * message)
+{
+  osip_content_type_t *ctt;
+  osip_mime_version_t *mv;
+  sdp_message_t *sdp;
+  osip_body_t *oldbody;
+  int pos;
+
+  if (message == NULL)
+    return NULL;
+
+  /* get content-type info */
+  ctt = osip_message_get_content_type (message);
+  mv = osip_message_get_mime_version (message);
+  if (mv == NULL && ctt == NULL)
+    return NULL;                /* previous message was not correct or empty */
+  if (mv != NULL)
+    {
+      /* look for the SDP body */
+      /* ... */
+  } else if (ctt != NULL)
+    {
+      if (ctt->type == NULL || ctt->subtype == NULL)
+        /* it can be application/sdp or mime... */
+        return NULL;
+      if (osip_strcasecmp (ctt->type, "application") != 0 ||
+          osip_strcasecmp (ctt->subtype, "sdp") != 0)
+        {
+          return NULL;
+        }
+    }
+
+  pos = 0;
+  while (!osip_list_eol (message->bodies, pos))
+    {
+      int i;
+
+      oldbody = (osip_body_t *) osip_list_get (message->bodies, pos);
+      pos++;
+      sdp_message_init (&sdp);
+      i = sdp_message_parse (sdp, oldbody->body);
+      if (i == 0)
+        return sdp;
+      sdp_message_free (sdp);
+      sdp = NULL;
+    }
+  return NULL;
+}
+
+
+sdp_connection_t *
+eXosip_get_audio_connection (sdp_message_t * sdp)
+{
+  int pos = 0;
+  sdp_media_t *med = (sdp_media_t *) osip_list_get (sdp->m_medias, 0);
+
+  while (med != NULL)
+    {
+      if (med->m_media != NULL && osip_strcasecmp (med->m_media, "audio") == 0)
+        break;
+      pos++;
+      med = (sdp_media_t *) osip_list_get (sdp->m_medias, pos);
+    }
+  if (med == NULL)
+    return NULL;                /* no audio stream */
+  if (osip_list_eol (med->c_connections, 0))
+    return sdp->c_connection;
+
+  /* just return the first one... */
+  return (sdp_connection_t *) osip_list_get (med->c_connections, 0);
+}
+
+
+sdp_media_t *
+eXosip_get_audio_media (sdp_message_t * sdp)
+{
+  int pos = 0;
+  sdp_media_t *med = (sdp_media_t *) osip_list_get (sdp->m_medias, 0);
+
+  while (med != NULL)
+    {
+      if (med->m_media != NULL && osip_strcasecmp (med->m_media, "audio") == 0)
+        return med;
+      pos++;
+      med = (sdp_media_t *) osip_list_get (sdp->m_medias, pos);
+    }
+
+  return NULL;
+}
diff --git a/libs/eXosip2/udp.c b/libs/eXosip2/udp.c
new file mode 100644
index 0000000000000000000000000000000000000000..f70b12daa7198fd8ed5d54a2cd75f21d8df05db5
--- /dev/null
+++ b/libs/eXosip2/udp.c
@@ -0,0 +1,2307 @@
+/*
+  eXosip - This is the eXtended osip library.
+  Copyright (C) 2002, 2003  Aymeric MOIZARD  - jack@atosc.org
+  
+  eXosip is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+  
+  eXosip is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+
+#ifdef ENABLE_MPATROL
+#include <mpatrol.h>
+#endif
+
+#include "eXosip2.h"
+#include <eXosip2/eXosip.h>
+
+#ifndef WIN32
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#ifdef __APPLE_CC__
+#include <unistd.h>
+#endif
+#else
+#include <windows.h>
+#endif
+
+extern eXosip_t eXosip;
+extern int ipv6_enable;
+
+/* Private functions */
+static void eXosip_send_default_answer (eXosip_dialog_t * jd,
+                                        osip_transaction_t * transaction,
+                                        osip_event_t * evt,
+                                        int status,
+                                        char *reason_phrase,
+                                        char *warning, int line);
+static void eXosip_process_info (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 osip_transaction_t * transaction,
+                                 osip_event_t * evt);
+static void eXosip_process_options (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                    osip_transaction_t * transaction,
+                                    osip_event_t * evt);
+static void eXosip_process_bye (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                osip_transaction_t * transaction,
+                                osip_event_t * evt);
+static void eXosip_process_refer (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  osip_transaction_t * transaction,
+                                  osip_event_t * evt);
+static void eXosip_process_ack (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                osip_event_t * evt);
+static void eXosip_process_prack (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                  osip_transaction_t * transaction,
+                                  osip_event_t * evt);
+static int cancel_match_invite (osip_transaction_t * invite,
+                                osip_message_t * cancel);
+static void eXosip_process_cancel (osip_transaction_t * transaction,
+                                   osip_event_t * evt);
+static osip_event_t *eXosip_process_reinvite (eXosip_call_t * jc,
+                                              eXosip_dialog_t * jd,
+                                              osip_transaction_t *
+                                              transaction, osip_event_t * evt);
+static void eXosip_process_new_options (osip_transaction_t * transaction,
+                                        osip_event_t * evt);
+static void eXosip_process_new_invite (osip_transaction_t * transaction,
+                                       osip_event_t * evt);
+static int eXosip_event_package_is_supported (osip_transaction_t *
+                                              transaction, osip_event_t * evt);
+static void eXosip_process_new_subscribe (osip_transaction_t * transaction,
+                                          osip_event_t * evt);
+static void eXosip_process_subscribe_within_call (eXosip_notify_t * jn,
+                                                  eXosip_dialog_t * jd,
+                                                  osip_transaction_t *
+                                                  transaction, osip_event_t * evt);
+static void eXosip_process_notify_within_dialog (eXosip_subscribe_t * js,
+                                                 eXosip_dialog_t * jd,
+                                                 osip_transaction_t *
+                                                 transaction, osip_event_t * evt);
+static int eXosip_match_notify_for_subscribe (eXosip_subscribe_t * js,
+                                              osip_message_t * notify);
+static void eXosip_process_message_outside_of_dialog (osip_transaction_t * tr,
+						      osip_event_t * evt);
+static void eXosip_process_refer_outside_of_dialog (osip_transaction_t * tr,
+						    osip_event_t * evt);
+static void eXosip_process_message_within_dialog (eXosip_call_t * jc,
+						  eXosip_dialog_t * jd,
+						  osip_transaction_t * transaction,
+						  osip_event_t * evt);
+static void eXosip_process_newrequest (osip_event_t * evt, int socket);
+static void eXosip_process_response_out_of_transaction (osip_event_t * evt);
+static int eXosip_pendingosip_transaction_exist (eXosip_call_t * jc,
+                                                 eXosip_dialog_t * jd);
+static int eXosip_release_finished_calls (eXosip_call_t * jc,
+                                          eXosip_dialog_t * jd);
+static int eXosip_release_aborted_calls (eXosip_call_t * jc, eXosip_dialog_t * jd);
+
+
+static void
+eXosip_send_default_answer (eXosip_dialog_t * jd,
+                            osip_transaction_t * transaction,
+                            osip_event_t * evt,
+                            int status,
+                            char *reason_phrase, char *warning, int line)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  /* osip_list_add(eXosip.j_transactions, transaction, 0); */
+  osip_transaction_set_your_instance (transaction, NULL);
+
+  /* THIS METHOD DOES NOT ACCEPT STATUS CODE BETWEEN 101 and 299 */
+  if (status > 100 && status < 299 && MSG_IS_INVITE (evt->sip))
+    return;
+
+  if (jd != NULL)
+    i = _eXosip_build_response_default (&answer, jd->d_dialog, status, evt->sip);
+  else
+    i = _eXosip_build_response_default (&answer, NULL, status, evt->sip);
+
+  if (i != 0 || answer == NULL)
+    {
+      return;
+    }
+
+  if (reason_phrase != NULL)
+    {
+      char *_reason;
+
+      _reason = osip_message_get_reason_phrase (answer);
+      if (_reason != NULL)
+        osip_free (_reason);
+      _reason = osip_strdup (reason_phrase);
+      osip_message_set_reason_phrase (answer, _reason);
+    }
+
+  osip_message_set_content_length (answer, "0");
+
+  if (status == 500)
+    osip_message_set_retry_after (answer, "10");
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+
+}
+
+static void
+eXosip_process_options (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                        osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_info (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                     osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  __eXosip_wakeup ();
+}
+
+
+static void
+eXosip_process_bye (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                    osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, NULL /*jd */ ,
+                                                          NULL, NULL));
+
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      return;
+    }
+  osip_message_set_content_length (answer, "0");
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  /* Release the eXosip_dialog */
+  osip_dialog_free (jd->d_dialog);
+  jd->d_dialog = NULL;
+  report_call_event (EXOSIP_CALL_CLOSED, jc, jd, transaction);
+  eXosip_update(); /* AMD 30/09/05 */
+
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_refer (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                      osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_header_t *referto_head = NULL;
+  osip_contact_t *referto;
+  int i;
+
+  /* check if the refer is valid */
+  osip_message_header_get_byname (evt->sip, "refer-to", 0, &referto_head);
+  if (referto_head == NULL || referto_head->hvalue == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400,
+                                  "Missing Refer-To header",
+                                  "Missing Refer-To header", __LINE__);
+      return;
+    }
+  /* check if refer-to is well-formed */
+  osip_contact_init (&referto);
+  i = osip_contact_parse (referto, referto_head->hvalue);
+  if (i != 0)
+    {
+      osip_contact_free (referto);
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400,
+                                  "Non valid Refer-To header",
+                                  "Non valid Refer-To header", __LINE__);
+      return;
+    }
+
+  osip_contact_free (referto);
+
+  /* check policy so we can decline immediatly the refer */
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_notify_for_refer (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                                 osip_transaction_t * transaction,
+                                 osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+  osip_transaction_t *ref;
+  osip_header_t *event_hdr;
+  osip_header_t *sub_state;
+  osip_content_type_t *ctype;
+  osip_body_t *body = NULL;
+
+  /* get the event type and return "489 Bad Event". */
+  osip_message_header_get_byname (evt->sip, "event", 0, &event_hdr);
+  if (event_hdr == NULL || event_hdr->hvalue == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400,
+                                  "Missing Event header in Notify",
+                                  "Missing Event header in Notify", __LINE__);
+      return;
+    }
+  if (NULL==strstr(event_hdr->hvalue, "refer"))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 501,
+                                  "Unsupported Event header",
+                                  "Unsupported Event header in Notify", __LINE__);
+      return;
+    }
+  osip_message_header_get_byname (evt->sip, "subscription-state", 0, &sub_state);
+  if (sub_state == NULL || sub_state->hvalue == NULL)
+    {
+#ifndef CISCO_BUG
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, "Missing Header",
+                                  "Missing subscription-state Header", __LINE__);
+      return;
+#else
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_WARNING, NULL,
+                   "eXosip: Missing subscription-state Header (cisco 7960 bug)\n"));
+#endif
+    }
+
+  ctype = osip_message_get_content_type (evt->sip);
+  if (ctype == NULL || ctype->type == NULL || ctype->subtype == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, "Missing Header",
+                                  "Missing Content-Type Header", __LINE__);
+      return;
+    }
+  if (0 != osip_strcasecmp (ctype->type, "message")
+      || 0 != osip_strcasecmp (ctype->subtype, "sipfrag"))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 501,
+                                  "Unsupported body type",
+                                  "Unsupported body type", __LINE__);
+      return;
+    }
+
+  osip_message_get_body (evt->sip, 0, &body);
+  if (body == NULL || body->body == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, "Missing Body",
+                                  "Missing Body", __LINE__);
+      return;
+    }
+
+#if 0
+  report_call_event (EXOSIP_CALL_REFER_STATUS, jc, jd, transaction);
+#endif
+
+  /* check if a refer was sent previously! */
+  ref = eXosip_find_last_out_transaction (jc, jd, "REFER");
+  if (ref == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 481, NULL,
+                                  "No associated refer", __LINE__);
+      return;
+    }
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  /* for now, send default response of 200ok.  eventually, application should
+     be deciding how to answer NOTIFY messages */
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      return;
+    }
+
+  i = complete_answer_that_establish_a_dialog (answer, evt->sip);
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_ack (eXosip_call_t * jc, eXosip_dialog_t * jd, osip_event_t * evt)
+{
+  /* TODO: We should find the matching transaction for this ACK
+     and also add the ACK in the event. */
+  eXosip_event_t *je;
+  int i;
+
+  je = eXosip_event_init_for_call (EXOSIP_CALL_ACK, jc, jd, NULL);
+  if (je!=NULL)
+    {
+      i = osip_message_clone (evt->sip, &je->ack);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                  "failed to clone ACK for event\n"));
+        }
+      else
+	report_event (je, NULL);
+    }
+
+  osip_event_free (evt);
+}
+
+static void
+eXosip_process_prack (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                      osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      return;
+    }
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  osip_transaction_add_event (transaction, evt_answer);
+  __eXosip_wakeup ();
+}
+
+static int
+cancel_match_invite (osip_transaction_t * invite, osip_message_t * cancel)
+{
+  osip_generic_param_t *br;
+  osip_generic_param_t *br2;
+  osip_via_t *via;
+
+  osip_via_param_get_byname (invite->topvia, "branch", &br);
+  via = osip_list_get (cancel->vias, 0);
+  if (via == NULL)
+    return -1;                  /* request without via??? */
+  osip_via_param_get_byname (via, "branch", &br2);
+  if (br != NULL && br2 == NULL)
+    return -1;
+  if (br2 != NULL && br == NULL)
+    return -1;
+  if (br2 != NULL && br != NULL)        /* compliant UA  :) */
+    {
+      if (br->gvalue != NULL && br2->gvalue != NULL &&
+          0 == strcmp (br->gvalue, br2->gvalue))
+        return 0;
+      return -1;
+    }
+  /* old backward compatibility mechanism */
+  if (0 != osip_call_id_match (invite->callid, cancel->call_id))
+    return -1;
+  if (0 != osip_to_tag_match (invite->to, cancel->to))
+    return -1;
+  if (0 != osip_from_tag_match (invite->from, cancel->from))
+    return -1;
+  if (0 != osip_via_match (invite->topvia, via))
+    return -1;
+  return 0;
+}
+
+static void
+eXosip_process_cancel (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_transaction_t *tr;
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+
+  eXosip_call_t *jc;
+  eXosip_dialog_t *jd;
+
+  tr = NULL;
+  jd = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      if (jc->c_inc_tr != NULL)
+        {
+          i = cancel_match_invite (jc->c_inc_tr, evt->sip);
+          if (i == 0)
+            {
+              tr = jc->c_inc_tr;
+	      /* fixed */
+	      if (jc->c_dialogs!=NULL)
+		jd = jc->c_dialogs;
+              break;
+            }
+        }
+      tr = NULL;
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          int pos = 0;
+
+          while (!osip_list_eol (jd->d_inc_trs, pos))
+            {
+              tr = osip_list_get (jd->d_inc_trs, pos);
+              i = cancel_match_invite (tr, evt->sip);
+              if (i == 0)
+                break;
+              tr = NULL;
+              pos++;
+            }
+        }
+      if (jd != NULL)
+        break;                  /* tr has just been found! */
+    }
+
+  if (tr == NULL)               /* we didn't found the transaction to cancel */
+    {
+      i = _eXosip_build_response_default (&answer, NULL, 481, evt->sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot cancel transaction.\n"));
+          osip_list_add (eXosip.j_transactions, tr, 0);
+          osip_transaction_set_your_instance (tr, NULL);
+          return;
+        }
+      osip_message_set_content_length (answer, "0");
+      evt_answer = osip_new_outgoing_sipmessage (answer);
+      evt_answer->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, evt_answer);
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      __eXosip_wakeup ();
+      return;
+    }
+
+  if (tr->state == IST_TERMINATED || tr->state == IST_CONFIRMED
+      || tr->state == IST_COMPLETED)
+    {
+      /* I can't find the status code in the rfc?
+         (I read I must answer 200? wich I found strange)
+         I probably misunderstood it... and prefer to send 481
+         as the transaction has been answered. */
+      if (jd == NULL)
+        i = _eXosip_build_response_default (&answer, NULL, 481, evt->sip);
+      else
+        i = _eXosip_build_response_default (&answer, jd->d_dialog, 481, evt->sip);
+      if (i != 0)
+        {
+          OSIP_TRACE (osip_trace
+                      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                       "eXosip: cannot cancel transaction.\n"));
+          osip_list_add (eXosip.j_transactions, tr, 0);
+          osip_transaction_set_your_instance (tr, NULL);
+          return;
+        }
+      osip_message_set_content_length (answer, "0");
+      evt_answer = osip_new_outgoing_sipmessage (answer);
+      evt_answer->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, evt_answer);
+
+      if (jd != NULL)
+        osip_list_add (jd->d_inc_trs, transaction, 0);
+      else
+        osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      __eXosip_wakeup ();
+
+      return;
+    }
+
+  {
+    if (jd == NULL)
+      i = _eXosip_build_response_default (&answer, NULL, 200, evt->sip);
+    else
+      i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+    if (i != 0)
+      {
+        OSIP_TRACE (osip_trace
+                    (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                     "eXosip: cannot cancel transaction.\n"));
+        osip_list_add (eXosip.j_transactions, tr, 0);
+        osip_transaction_set_your_instance (tr, NULL);
+        return;
+      }
+    osip_message_set_content_length (answer, "0");
+    evt_answer = osip_new_outgoing_sipmessage (answer);
+    evt_answer->transactionid = transaction->transactionid;
+    osip_transaction_add_event (transaction, evt_answer);
+    __eXosip_wakeup ();
+
+    if (jd != NULL)
+      osip_list_add (jd->d_inc_trs, transaction, 0);
+    else
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+    osip_transaction_set_your_instance (transaction, NULL);
+
+    /* answer transaction to cancel */
+    if (jd == NULL)
+      i = _eXosip_build_response_default (&answer, NULL, 487, tr->orig_request);
+    else
+      i = _eXosip_build_response_default (&answer, jd->d_dialog, 487,
+                                          tr->orig_request);
+    if (i != 0)
+      {
+        OSIP_TRACE (osip_trace
+                    (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                     "eXosip: cannot cancel transaction.\n"));
+        osip_list_add (eXosip.j_transactions, tr, 0);
+        osip_transaction_set_your_instance (tr, NULL);
+        return;
+      }
+    osip_message_set_content_length (answer, "0");
+    evt_answer = osip_new_outgoing_sipmessage (answer);
+    evt_answer->transactionid = tr->transactionid;
+    osip_transaction_add_event (tr, evt_answer);
+    __eXosip_wakeup ();
+  }
+}
+
+static osip_event_t *
+eXosip_process_reinvite (eXosip_call_t * jc, eXosip_dialog_t * jd,
+                         osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_message_t *answer;
+  osip_event_t *sipevent;
+  int i;
+
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 100, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 500,
+                                  "Internal SIP Error",
+                                  "Failed to build Answer for INVITE within call",
+                                  __LINE__);
+      return NULL;
+    }
+
+  complete_answer_that_establish_a_dialog (answer, evt->sip);
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  sipevent = osip_new_outgoing_sipmessage (answer);
+  sipevent->transactionid = transaction->transactionid;
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  osip_ist_execute (eXosip.j_osip);
+
+  report_call_event (EXOSIP_CALL_REINVITE, jc, jd, transaction);
+  return sipevent;
+}
+
+static void
+eXosip_process_new_options (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+  __eXosip_wakeup ();           /* needed? */
+}
+
+static void
+eXosip_process_new_invite (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  int i;
+  eXosip_call_t *jc;
+  eXosip_dialog_t *jd;
+  osip_message_t *answer;
+
+  eXosip_call_init (&jc);
+
+  ADD_ELEMENT (eXosip.j_calls, jc);
+
+  i = _eXosip_build_response_default (&answer, NULL, 101, evt->sip);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot create dialog."));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for invite\n"));
+      return;
+    }
+  osip_message_set_content_length (answer, "0");
+  i = complete_answer_that_establish_a_dialog (answer, evt->sip);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot complete answer!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      osip_message_free (answer);
+      return;
+    }
+
+  i = eXosip_dialog_init_as_uas (&jd, evt->sip, answer);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot create dialog!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      osip_transaction_set_your_instance (transaction, NULL);
+      osip_message_free (answer);
+      return;
+    }
+  ADD_ELEMENT (jc->c_dialogs, jd);
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+
+  eXosip_update ();
+  jc->c_inc_tr = transaction;
+  osip_transaction_add_event (transaction, evt_answer);
+
+  /* be sure the invite will be processed
+     before any API call on this dialog */
+  osip_ist_execute (eXosip.j_osip);
+
+  if (transaction->orig_request != NULL)
+    {
+      report_call_event (EXOSIP_CALL_INVITE, jc, jd, transaction);
+    }
+
+  __eXosip_wakeup ();
+
+}
+
+static int
+eXosip_event_package_is_supported (osip_transaction_t * transaction,
+                                   osip_event_t * evt)
+{
+  osip_header_t *event_hdr;
+  int code;
+
+  /* get the event type and return "489 Bad Event". */
+  osip_message_header_get_byname (evt->sip, "event", 0, &event_hdr);
+  if (event_hdr == NULL || event_hdr->hvalue == NULL)
+    {
+#ifdef SUPPORT_MSN
+      /* msn don't show any event header */
+      code = 200;               /* Bad Request... anyway... */
+#else
+      code = 400;               /* Bad Request */
+#endif
+  } else if (0 != osip_strcasecmp (event_hdr->hvalue, "presence"))
+    code = 489;
+  else
+    code = 200;
+  if (code != 200)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (NULL, transaction, evt, code, NULL, NULL,
+                                  __LINE__);
+      return 0;
+    }
+  return -1;
+}
+
+static void
+eXosip_process_new_subscribe (osip_transaction_t * transaction, osip_event_t * evt)
+{
+  osip_event_t *evt_answer;
+  eXosip_notify_t *jn;
+  eXosip_dialog_t *jd;
+  osip_message_t *answer;
+  int i;
+
+  eXosip_notify_init (&jn, evt->sip);
+  _eXosip_notify_set_refresh_interval (jn, evt->sip);
+
+  i = _eXosip_build_response_default (&answer, NULL, 101, evt->sip);
+  if (i != 0)
+    {
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                              "ERROR: Could not create response for invite\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_notify_free (jn);
+      return;
+    }
+  i = complete_answer_that_establish_a_dialog (answer, evt->sip);
+  if (i != 0)
+    {
+      osip_message_free (answer);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot complete answer!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_notify_free (jn);
+      return;
+    }
+
+  i = eXosip_dialog_init_as_uas (&jd, evt->sip, answer);
+  if (i != 0)
+    {
+      osip_message_free (answer);
+      OSIP_TRACE (osip_trace
+                  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                   "eXosip: cannot create dialog!\n"));
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_notify_free (jn);
+      return;
+    }
+  ADD_ELEMENT (jn->n_dialogs, jd);
+
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, NULL, jn));
+
+  evt_answer = osip_new_outgoing_sipmessage (answer);
+  evt_answer->transactionid = transaction->transactionid;
+  osip_transaction_add_event (transaction, evt_answer);
+
+  ADD_ELEMENT (eXosip.j_notifies, jn);
+  __eXosip_wakeup ();
+
+  jn->n_inc_tr = transaction;
+
+  eXosip_update ();
+  __eXosip_wakeup ();
+}
+
+static void
+eXosip_process_subscribe_within_call (eXosip_notify_t * jn,
+                                      eXosip_dialog_t * jd,
+                                      osip_transaction_t * transaction,
+                                      osip_event_t * evt)
+{
+  _eXosip_notify_set_refresh_interval (jn, evt->sip);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (NULL, jd, NULL, jn));
+
+  /* if subscribe request contains expires="0", close the subscription */
+  {
+    int now = time (NULL);
+
+    if (jn->n_ss_expires - now <= 0)
+      {
+        jn->n_ss_status = EXOSIP_SUBCRSTATE_TERMINATED;
+        jn->n_ss_reason = TIMEOUT;
+      }
+  }
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  __eXosip_wakeup ();
+  return;
+}
+
+static void
+eXosip_process_notify_within_dialog (eXosip_subscribe_t * js,
+                                     eXosip_dialog_t * jd,
+                                     osip_transaction_t * transaction,
+                                     osip_event_t * evt)
+{
+  osip_message_t *answer;
+  osip_event_t *sipevent;
+  osip_header_t *sub_state;
+
+#ifdef SUPPORT_MSN
+  osip_header_t *expires;
+#endif
+  int i;
+
+  if (jd == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 500,
+                                  "Internal SIP Error",
+                                  "No dialog for this NOTIFY", __LINE__);
+      return;
+    }
+
+  /* if subscription-state has a reason state set to terminated,
+     we close the dialog */
+#ifndef SUPPORT_MSN
+  osip_message_header_get_byname (evt->sip, "subscription-state", 0, &sub_state);
+  if (sub_state == NULL || sub_state->hvalue == NULL)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 400, NULL, NULL, __LINE__);
+      return;
+    }
+#endif
+
+  i = _eXosip_build_response_default (&answer, jd->d_dialog, 200, evt->sip);
+  if (i != 0)
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 500,
+                                  "Internal SIP Error",
+                                  "Failed to build Answer for NOTIFY", __LINE__);
+      return;
+    }
+#ifdef SUPPORT_MSN
+  osip_message_header_get_byname (evt->sip, "expires", 0, &expires);
+  if (expires != NULL && expires->hvalue != NULL
+      && 0 == osip_strcasecmp (expires->hvalue, "0"))
+    {
+      /* delete the dialog! */
+      js->s_ss_status = EXOSIP_SUBCRSTATE_TERMINATED;
+      {
+        eXosip_event_t *je;
+
+        je = eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_NOTIFY, js, jd);
+        eXosip_event_add (je);
+      }
+
+      sipevent = osip_new_outgoing_sipmessage (answer);
+      sipevent->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, sipevent);
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+      __eXosip_wakeup ();
+
+      return;
+  } else
+    {
+      osip_transaction_set_your_instance (transaction,
+                                          __eXosip_new_jinfo (NULL, jd, js, NULL));
+      js->s_ss_status = EXOSIP_SUBCRSTATE_ACTIVE;
+    }
+#else
+  /* modify the status of user */
+  if (0 == osip_strncasecmp (sub_state->hvalue, "active", 6))
+    {
+      js->s_ss_status = EXOSIP_SUBCRSTATE_ACTIVE;
+  } else if (0 == osip_strncasecmp (sub_state->hvalue, "pending", 7))
+    {
+      js->s_ss_status = EXOSIP_SUBCRSTATE_PENDING;
+    }
+
+  if (0 == osip_strncasecmp (sub_state->hvalue, "terminated", 10))
+    {
+      /* delete the dialog! */
+      js->s_ss_status = EXOSIP_SUBCRSTATE_TERMINATED;
+
+      {
+        eXosip_event_t *je;
+
+        je =
+          eXosip_event_init_for_subscribe (EXOSIP_SUBSCRIPTION_NOTIFY, js, jd,
+                                           transaction);
+        eXosip_event_add (je);
+      }
+
+      sipevent = osip_new_outgoing_sipmessage (answer);
+      sipevent->transactionid = transaction->transactionid;
+      osip_transaction_add_event (transaction, sipevent);
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+
+      REMOVE_ELEMENT (eXosip.j_subscribes, js);
+      eXosip_subscribe_free (js);
+      __eXosip_wakeup ();
+      return;
+  } else
+    {
+      osip_transaction_set_your_instance (transaction,
+                                          __eXosip_new_jinfo (NULL, jd, js, NULL));
+    }
+#endif
+
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+
+  sipevent = osip_new_outgoing_sipmessage (answer);
+  sipevent->transactionid = transaction->transactionid;
+  osip_transaction_add_event (transaction, sipevent);
+
+  __eXosip_wakeup ();
+  return;
+}
+
+static int
+eXosip_match_notify_for_subscribe (eXosip_subscribe_t * js,
+                                   osip_message_t * notify)
+{
+  osip_transaction_t *out_sub;
+
+  if (js == NULL)
+    return -1;
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                          "Trying to match notify with subscribe\n"));
+
+  out_sub = eXosip_find_last_out_subscribe (js, NULL);
+  if (out_sub == NULL || out_sub->orig_request == NULL)
+    return -1;
+  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                          "subscribe transaction found\n"));
+
+  /* some checks to avoid crashing on bad requests */
+  if (notify == NULL || notify->cseq == NULL
+      || notify->cseq->method == NULL || notify->to == NULL)
+    return -1;
+
+  if (0 != osip_call_id_match (out_sub->callid, notify->call_id))
+    return -1;
+
+  {
+    /* The From tag of outgoing request must match
+       the To tag of incoming notify:
+     */
+    osip_generic_param_t *tag_from;
+    osip_generic_param_t *tag_to;
+
+    osip_from_param_get_byname (out_sub->from, "tag", &tag_from);
+    osip_from_param_get_byname (notify->to, "tag", &tag_to);
+    if (tag_to == NULL || tag_to->gvalue == NULL)
+      {
+        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                "Uncompliant user agent: no tag in from of outgoing request\n"));
+        return -1;
+      }
+    if (tag_from == NULL || tag_to->gvalue == NULL)
+      {
+        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                                "Uncompliant user agent: no tag in to of incoming request\n"));
+        return -1;
+      }
+
+    if (0 != strcmp (tag_from->gvalue, tag_to->gvalue))
+      return -1;
+  }
+
+  return 0;
+}
+
+static void
+eXosip_process_message_outside_of_dialog (osip_transaction_t * transaction,
+                                          osip_event_t * evt)
+{
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+  __eXosip_wakeup ();           /* needed? */
+  return;
+}
+
+static void
+eXosip_process_refer_outside_of_dialog (osip_transaction_t * transaction,
+					osip_event_t * evt)
+{
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+  __eXosip_wakeup ();           /* needed? */
+  return;
+}
+
+static void
+eXosip_process_message_within_dialog (eXosip_call_t * jc,
+				      eXosip_dialog_t * jd,
+				      osip_transaction_t * transaction,
+				      osip_event_t * evt)
+{
+  osip_list_add (jd->d_inc_trs, transaction, 0);
+  osip_transaction_set_your_instance (transaction,
+                                      __eXosip_new_jinfo (jc, jd, NULL, NULL));
+  __eXosip_wakeup ();
+  return;
+}
+
+
+static void
+eXosip_process_newrequest (osip_event_t * evt, int socket)
+{
+  osip_transaction_t *transaction;
+  osip_event_t *evt_answer;
+  osip_message_t *answer;
+  int i;
+  int ctx_type;
+  eXosip_call_t *jc;
+  eXosip_subscribe_t *js;
+  eXosip_notify_t *jn;
+  eXosip_dialog_t *jd;
+
+  if (MSG_IS_INVITE (evt->sip))
+    {
+      ctx_type = IST;
+  } else if (MSG_IS_ACK (evt->sip))
+    {                           /* this should be a ACK for 2xx (but could be a late ACK!) */
+      ctx_type = -1;
+  } else if (MSG_IS_REQUEST (evt->sip))
+    {
+      ctx_type = NIST;
+  } else
+    {                           /* We should handle late response and 200 OK before coming here. */
+      ctx_type = -1;
+      osip_event_free (evt);
+      return;
+    }
+
+  transaction = NULL;
+  if (ctx_type != -1)
+    {
+      i = osip_transaction_init (&transaction,
+                                 (osip_fsm_type_t) ctx_type,
+                                 eXosip.j_osip, evt->sip);
+      if (i != 0)
+        {
+          osip_event_free (evt);
+          return;
+        }
+
+      osip_transaction_set_in_socket(transaction, socket);
+      osip_transaction_set_out_socket(transaction, socket);
+
+      evt->transactionid = transaction->transactionid;
+      osip_transaction_set_your_instance (transaction, NULL);
+
+      osip_transaction_add_event (transaction, evt);
+      if (ctx_type == IST)
+        {
+          i = _eXosip_build_response_default (&answer, NULL, 100, evt->sip);
+          if (i != 0)
+            {
+              __eXosip_delete_jinfo (transaction);
+              osip_transaction_free (transaction);
+              return;
+            }
+
+          osip_message_set_content_length (answer, "0");
+          /*  send message to transaction layer */
+
+          evt_answer = osip_new_outgoing_sipmessage (answer);
+          evt_answer->transactionid = transaction->transactionid;
+
+          /* add the REQUEST & the 100 Trying */
+          osip_transaction_add_event (transaction, evt_answer);
+          __eXosip_wakeup ();
+        }
+    }
+
+  if (MSG_IS_CANCEL (evt->sip))
+    {
+      /* special handling for CANCEL */
+      /* in the new spec, if the CANCEL has a Via branch, then it
+         is the same as the one in the original INVITE */
+      eXosip_process_cancel (transaction, evt);
+      return;
+    }
+
+  jd = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (jc = eXosip.j_calls; jc != NULL; jc = jc->next)
+    {
+      for (jd = jc->c_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)
+            {
+              if (osip_dialog_match_as_uas (jd->d_dialog, evt->sip) == 0)
+                break;
+            }
+        }
+      if (jd != NULL)
+        break;
+    }
+
+
+  if (jd != NULL)
+    {
+      osip_transaction_t *old_trn;
+
+      /* it can be:
+         1: a new INVITE offer.
+         2: a REFER request from one of the party.
+         2: a BYE request from one of the party.
+         3: a REQUEST with a wrong CSeq.
+         4: a NOT-SUPPORTED method with a wrong CSeq.
+       */
+
+      if (!MSG_IS_BYE (evt->sip))
+        {
+          /* reject all requests for a closed dialog */
+          old_trn = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+          if (old_trn == NULL)
+            old_trn = eXosip_find_last_out_transaction (jc, jd, "BYE");
+
+          if (old_trn != NULL)
+            {
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 481, NULL,
+                                          NULL, __LINE__);
+              return;
+            }
+        }
+
+      if (MSG_IS_INVITE (evt->sip))
+        {
+          /* the previous transaction MUST be freed */
+          old_trn = eXosip_find_last_inc_invite (jc, jd);
+
+          if (old_trn != NULL && old_trn->state != IST_TERMINATED)
+            {
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Retry Later",
+                                          "An INVITE is not terminated", __LINE__);
+              return;
+            }
+
+          old_trn = eXosip_find_last_out_invite (jc, jd);
+          if (old_trn != NULL && old_trn->state != ICT_TERMINATED)
+            {
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 491, NULL,
+                                          NULL, __LINE__);
+              return;
+            }
+
+          osip_dialog_update_osip_cseq_as_uas (jd->d_dialog, evt->sip);
+          osip_dialog_update_route_set_as_uas (jd->d_dialog, evt->sip);
+
+          eXosip_process_reinvite (jc, jd, transaction, evt);
+      } else if (MSG_IS_BYE (evt->sip))
+        {
+          old_trn = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+
+          if (old_trn != NULL)  /* && old_trn->state!=NIST_TERMINATED) */
+            {                   /* this situation should NEVER occur?? (we can't receive
+                                   two different BYE for one call! */
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Call Already Terminated",
+                                          "A pending BYE has already terminate this call",
+                                          __LINE__);
+              return;
+            }
+          /* osip_transaction_free(old_trn); */
+          eXosip_process_bye (jc, jd, transaction, evt);
+      } else if (MSG_IS_ACK (evt->sip))
+        {
+          eXosip_process_ack (jc, jd, evt);
+      } else if (MSG_IS_REFER (evt->sip))
+        {
+          eXosip_process_refer (jc, jd, transaction, evt);
+      } else if (MSG_IS_OPTIONS (evt->sip))
+        {
+          eXosip_process_options (jc, jd, transaction, evt);
+      } else if (MSG_IS_INFO (evt->sip))
+        {
+          eXosip_process_info (jc, jd, transaction, evt);
+      } else if (MSG_IS_NOTIFY (evt->sip))
+        {
+          eXosip_process_notify_for_refer (jc, jd, transaction, evt);
+      } else if (MSG_IS_PRACK (evt->sip))
+        {
+          eXosip_process_prack (jc, jd, transaction, evt);
+      } else if (MSG_IS_MESSAGE (evt->sip))
+        {
+          eXosip_process_message_within_dialog (jc, jd, transaction, evt);
+      } else if (MSG_IS_SUBSCRIBE (evt->sip))
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 489, NULL,
+                                      "Bad Event", __LINE__);
+      } else
+        {
+#if 0
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 405, NULL,
+                                      "Method Not Allowed", __LINE__);
+#else
+	  eXosip_process_message_within_dialog (jc, jd, transaction, evt);
+#endif
+        }
+      return;
+    }
+
+  if (MSG_IS_ACK (evt->sip))
+    {
+      /* no transaction has been found for this ACK! */
+      osip_event_free (evt);
+      return;
+    }
+
+  if (MSG_IS_INFO (evt->sip))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 481, NULL, NULL, __LINE__);
+      return;                   /* fixed */
+    }
+  if (MSG_IS_OPTIONS (evt->sip))
+    {
+      eXosip_process_new_options (transaction, evt);
+      return;
+  } else if (MSG_IS_INVITE (evt->sip))
+    {
+      eXosip_process_new_invite (transaction, evt);
+      return;
+  } else if (MSG_IS_BYE (evt->sip))
+    {
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (jd, transaction, evt, 481, NULL, NULL, __LINE__);
+      return;
+    }
+
+  js = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+    {
+      for (jd = js->s_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)
+            {
+              if (osip_dialog_match_as_uas (jd->d_dialog, evt->sip) == 0)
+                break;
+            }
+        }
+      if (jd != NULL)
+        break;
+    }
+
+  if (js != NULL)
+    {
+      /* dialog found */
+      osip_transaction_t *old_trn;
+
+      /* it can be:
+         1: a new INVITE offer.
+         2: a REFER request from one of the party.
+         2: a BYE request from one of the party.
+         3: a REQUEST with a wrong CSeq.
+         4: a NOT-SUPPORTED method with a wrong CSeq.
+       */
+      if (MSG_IS_MESSAGE (evt->sip))
+        {
+          /* eXosip_process_imessage_within_subscribe_dialog(transaction, evt); */
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt,
+                                      SIP_NOT_IMPLEMENTED, NULL,
+                                      "MESSAGEs within dialogs are not implemented.",
+                                      __LINE__);
+          return;
+      } else if (MSG_IS_NOTIFY (evt->sip))
+        {
+          /* the previous transaction MUST be freed */
+          old_trn = eXosip_find_last_inc_notify (js, jd);
+
+          /* shouldn't we wait for the COMPLETED state? */
+          if (old_trn != NULL && old_trn->state != NIST_TERMINATED)
+            {
+              /* retry later? */
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Retry Later",
+                                          "A pending NOTIFY is not terminated",
+                                          __LINE__);
+              return;
+            }
+
+          osip_dialog_update_osip_cseq_as_uas (jd->d_dialog, evt->sip);
+          osip_dialog_update_route_set_as_uas (jd->d_dialog, evt->sip);
+
+          eXosip_process_notify_within_dialog (js, jd, transaction, evt);
+      } else
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 501, NULL,
+                                      "Just Not Implemented", __LINE__);
+        }
+      return;
+    }
+
+  if (MSG_IS_NOTIFY (evt->sip))
+    {
+      /* let's try to check if the NOTIFY is related to an existing
+         subscribe */
+      js = NULL;
+      /* first, look for a Dialog in the map of element */
+      for (js = eXosip.j_subscribes; js != NULL; js = js->next)
+        {
+          if (eXosip_match_notify_for_subscribe (js, evt->sip) == 0)
+            {
+              i = eXosip_dialog_init_as_uac (&jd, evt->sip);
+              if (i != 0)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_ERROR, NULL,
+                               "eXosip: cannot establish a dialog\n"));
+                  return;
+                }
+
+              /* update local cseq from subscribe request */
+              if (js->s_out_tr != NULL && js->s_out_tr->cseq != NULL
+                  && js->s_out_tr->cseq->number != NULL)
+                {
+                  jd->d_dialog->local_cseq = atoi (js->s_out_tr->cseq->number);
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                               "eXosip: local cseq has been updated\n"));
+                }
+
+              ADD_ELEMENT (js->s_dialogs, jd);
+              eXosip_update ();
+
+              eXosip_process_notify_within_dialog (js, jd, transaction, evt);
+              return;
+            }
+        }
+
+      osip_list_add (eXosip.j_transactions, transaction, 0);
+      eXosip_send_default_answer (NULL, transaction, evt, 481, NULL, NULL,
+                                  __LINE__);
+      return;
+    }
+
+  jn = NULL;
+  /* first, look for a Dialog in the map of element */
+  for (jn = eXosip.j_notifies; jn != NULL; jn = jn->next)
+    {
+      for (jd = jn->n_dialogs; jd != NULL; jd = jd->next)
+        {
+          if (jd->d_dialog != NULL)
+            {
+              if (osip_dialog_match_as_uas (jd->d_dialog, evt->sip) == 0)
+                break;
+            }
+        }
+      if (jd != NULL)
+        break;
+    }
+
+  if (jn != NULL)
+    {
+      /* dialog found */
+      osip_transaction_t *old_trn;
+
+      /* it can be:
+         1: a new INVITE offer.
+         2: a REFER request from one of the party.
+         2: a BYE request from one of the party.
+         3: a REQUEST with a wrong CSeq.
+         4: a NOT-SUPPORTED method with a wrong CSeq.
+       */
+      if (MSG_IS_MESSAGE (evt->sip))
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt,
+                                      SIP_NOT_IMPLEMENTED, NULL,
+                                      "MESSAGEs within dialogs are not implemented.",
+                                      __LINE__);
+          return;
+      } else if (MSG_IS_SUBSCRIBE (evt->sip))
+        {
+          /* the previous transaction MUST be freed */
+          old_trn = eXosip_find_last_inc_subscribe (jn, jd);
+
+          /* shouldn't we wait for the COMPLETED state? */
+          if (old_trn != NULL && old_trn->state != NIST_TERMINATED
+              && old_trn->state != NIST_COMPLETED)
+            {
+              /* retry later? */
+              osip_list_add (eXosip.j_transactions, transaction, 0);
+              eXosip_send_default_answer (jd, transaction, evt, 500,
+                                          "Retry Later",
+                                          "A SUBSCRIBE is not terminated",
+                                          __LINE__);
+              return;
+            }
+
+          osip_dialog_update_osip_cseq_as_uas (jd->d_dialog, evt->sip);
+          osip_dialog_update_route_set_as_uas (jd->d_dialog, evt->sip);
+
+          eXosip_process_subscribe_within_call (jn, jd, transaction, evt);
+      } else
+        {
+          osip_list_add (eXosip.j_transactions, transaction, 0);
+          eXosip_send_default_answer (jd, transaction, evt, 501, NULL, NULL,
+                                      __LINE__);
+        }
+      return;
+    }
+
+  if (MSG_IS_MESSAGE (evt->sip))
+    {
+      eXosip_process_message_outside_of_dialog (transaction, evt);
+      return;
+    }
+
+  if (MSG_IS_REFER (evt->sip))
+    {
+      eXosip_process_refer_outside_of_dialog (transaction, evt);
+      return;
+    }
+
+  if (MSG_IS_SUBSCRIBE (evt->sip))
+    {
+
+      if (0 == eXosip_event_package_is_supported (transaction, evt))
+        {
+          return;
+        }
+      eXosip_process_new_subscribe (transaction, evt);
+      return;
+    }
+
+  /* default answer */
+  osip_list_add (eXosip.j_transactions, transaction, 0);
+#if 0
+  eXosip_send_default_answer (NULL, transaction, evt, 501, NULL, NULL, __LINE__);
+#endif
+}
+
+static void
+eXosip_process_response_out_of_transaction (osip_event_t * evt)
+{
+  osip_event_free (evt);
+}
+
+static int _eXosip_handle_incoming_message(char *buf, size_t len, int socket,
+					   char *host, int port);
+
+static int _eXosip_handle_incoming_message(char *buf, size_t len, int socket,
+					   char *host, int port)
+{
+  osip_transaction_t *transaction = NULL;
+  osip_event_t *sipevent;
+  int i;
+
+  sipevent = osip_parse (buf, len);
+  transaction = NULL;
+  if (sipevent != NULL && sipevent->sip != NULL)
+    {
+    }
+  else
+    {
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_ERROR, NULL,
+		   "Could not parse SIP message\n"));
+      osip_event_free (sipevent);
+      return -1;
+    }
+
+  OSIP_TRACE (osip_trace
+	      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+	       "Message received from: %s:%i\n",
+	       host, port));
+  
+  osip_message_fix_last_via_header (sipevent->sip,
+				    host,
+				    port);
+  
+  i = osip_find_transaction_and_add_event (eXosip.j_osip, sipevent);
+  if (i != 0)
+    {
+      /* this event has no transaction, */
+      OSIP_TRACE (osip_trace
+		  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+		   "This is a request\n", buf));
+      eXosip_lock ();
+      if (MSG_IS_REQUEST (sipevent->sip))
+	eXosip_process_newrequest (sipevent, socket);
+      else if (MSG_IS_RESPONSE (sipevent->sip))
+	eXosip_process_response_out_of_transaction (sipevent);
+      eXosip_unlock ();
+    }
+  else
+    {
+      /* handled by oSIP ! */
+      return 0;
+    }
+  return 0;
+}
+
+#if defined (WIN32) || defined (_WIN32_WCE)
+#define eXFD_SET(A, B)   FD_SET((unsigned int) A, B)
+#else
+#define eXFD_SET(A, B)   FD_SET(A, B)
+#endif
+
+/* if second==-1 && useconds==-1  -> wait for ever
+   if max_message_nb<=0  -> infinite loop....  */
+int
+eXosip_read_message (int max_message_nb, int sec_max, int usec_max)
+{
+  fd_set osip_fdset;
+  struct timeval tv;
+  char *buf;
+
+  tv.tv_sec = sec_max;
+  tv.tv_usec = usec_max;
+
+  buf = (char *) osip_malloc (SIP_MESSAGE_MAX_LENGTH * sizeof (char) + 1);
+  while (max_message_nb != 0 && eXosip.j_stop_ua == 0)
+    {
+      int i;
+      int max;
+      int wakeup_socket = jpipe_get_read_descr (eXosip.j_socketctl);
+
+      FD_ZERO (&osip_fdset);
+      if (eXosip.net_interfaces[0].net_socket>0)
+	{
+	  eXFD_SET (eXosip.net_interfaces[0].net_socket, &osip_fdset);
+	  max = eXosip.net_interfaces[0].net_socket;
+	}
+      if (eXosip.net_interfaces[1].net_socket>0)
+	{
+	  int pos;
+	  struct eXosip_net *net = &eXosip.net_interfaces[1];
+	  eXFD_SET (net->net_socket, &osip_fdset);
+	  if (net->net_socket>max)
+	    max = net->net_socket;
+
+	  for (pos=0;pos<EXOSIP_MAX_SOCKETS;pos++)
+	    {
+	      if (net->net_socket_tab[pos].socket!=0)
+		{
+		  eXFD_SET (net->net_socket_tab[pos].socket, &osip_fdset);
+		  if (net->net_socket_tab[pos].socket>max)
+		    max = net->net_socket_tab[pos].socket;
+		}
+	    }
+	}
+
+      if (eXosip.net_interfaces[2].net_socket>0)
+	{
+	  eXFD_SET (eXosip.net_interfaces[2].net_socket, &osip_fdset);
+	  if (eXosip.net_interfaces[2].net_socket>max)
+	    max = eXosip.net_interfaces[2].net_socket;
+	}
+
+
+      eXFD_SET (wakeup_socket, &osip_fdset);
+      if (wakeup_socket > max)
+        max = wakeup_socket;
+
+      if ((sec_max == -1) || (usec_max == -1))
+        i = select (max + 1, &osip_fdset, NULL, NULL, NULL);
+      else
+        i = select (max + 1, &osip_fdset, NULL, NULL, &tv);
+
+      if ((i == -1) && (errno == EINTR || errno == EAGAIN))
+        continue;
+
+      if ((i > 0) && FD_ISSET (wakeup_socket, &osip_fdset))
+        {
+          char buf2[500];
+
+          jpipe_read (eXosip.j_socketctl, buf2, 499);
+        }
+
+      if (0 == i || eXosip.j_stop_ua != 0)
+        {
+	} else if (-1 == i)
+	  {
+	    osip_free (buf);
+	    return -2;            /* error */
+	  } else if (FD_ISSET (eXosip.net_interfaces[1].net_socket, &osip_fdset))
+	    {
+	      /* accept incoming connection */
+	      char src6host[NI_MAXHOST];
+	      int recvport = 0;
+	      struct sockaddr_storage sa;
+	      int sock;
+	      int i;
+	      int pos;
+#ifdef __linux
+	      socklen_t slen;
+#else
+	      int slen;
+#endif
+	      if (ipv6_enable == 0)
+		slen = sizeof (struct sockaddr_in);
+	      else
+		slen = sizeof (struct sockaddr_in6);
+
+	      for (pos=0; pos<EXOSIP_MAX_SOCKETS; pos++)
+		{
+		  if (eXosip.net_interfaces[1].net_socket_tab[pos].socket==0)
+		    break;
+		}
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "creating TCP socket at index: %i\n", pos));
+	      sock = accept(eXosip.net_interfaces[1].net_socket, (struct sockaddr *) &sa, 
+			 &slen);
+	      if (sock<0)
+		{
+		  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					  "Error accepting TCP socket\n"));
+		  break;
+		}
+	      eXosip.net_interfaces[1].net_socket_tab[pos].socket = sock;
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "New TCP connection accepted\n"));
+
+	      memset(src6host, 0, sizeof(src6host));
+	      
+	      if (ipv6_enable == 0)
+		recvport = ntohs (((struct sockaddr_in*)&sa)->sin_port);
+	      else
+		recvport = ntohs (((struct sockaddr_in6*)&sa)->sin6_port);
+	      
+	      i = getnameinfo((struct sockaddr*)&sa, slen,
+			      src6host, NI_MAXHOST,
+			      NULL, 0,
+			      NI_NUMERICHOST);
+	      
+	      if (i!=0)
+		{
+		  OSIP_TRACE (osip_trace
+			      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+			       "Message received from: %s:%i Error with getnameinfo\n",
+			       src6host, recvport));
+		}
+	      else           
+		{
+		  OSIP_TRACE (osip_trace
+			      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+			       "Message received from: %s:%i\n",
+			       src6host, recvport));
+		  osip_strncpy(eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip,
+			       src6host,
+			       sizeof(eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip));
+		  eXosip.net_interfaces[1].net_socket_tab[pos].remote_port = recvport;
+		}
+
+	  } else if (FD_ISSET (eXosip.net_interfaces[0].net_socket, &osip_fdset))
+	    {
+	      /*AMDstruct sockaddr_in sa; */
+	      struct sockaddr_storage sa;
+
+#ifdef __linux
+	      socklen_t slen;
+#else
+	      int slen;
+#endif
+	      if (ipv6_enable == 0)
+		slen = sizeof (struct sockaddr_in);
+	      else
+		slen = sizeof (struct sockaddr_in6);
+
+          i = _eXosip_recvfrom (eXosip.net_interfaces[0].net_socket, buf, SIP_MESSAGE_MAX_LENGTH, 0,
+			    (struct sockaddr *) &sa, &slen);
+
+         if (i > 5)            /* we expect at least one byte, otherwise there's no doubt that it is not a sip message ! */
+		{
+		  /* Message might not end with a "\0" but we know the number of */
+		  /* char received! */
+		  osip_transaction_t *transaction = NULL;
+		  osip_event_t *sipevent;
+
+		  osip_strncpy (buf + i, "\0", 1);
+		  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					  "Received message: \n%s\n", buf));
+#ifdef WIN32
+		  if (strlen (buf) > 412)
+		    {
+		      OSIP_TRACE (osip_trace
+				  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				   "Message suite: \n%s\n", buf + 412));
+		    }
+#endif
+
+		  sipevent = osip_parse (buf, i);
+		  transaction = NULL;
+		  if (sipevent != NULL && sipevent->sip != NULL)
+          {
+            if (!eXosip.http_port)
+            {
+		      char src6host[NI_MAXHOST];
+		      char src6buf[NI_MAXSERV];
+		      int recvport = 0;
+		      memset(src6host, 0, sizeof(src6host));
+		      memset(src6buf, 0, sizeof(src6buf));
+		  
+		      if (ipv6_enable == 0)
+			recvport = ntohs (((struct sockaddr_in*)&sa)->sin_port);
+		      else
+			recvport = ntohs (((struct sockaddr_in6*)&sa)->sin6_port);
+
+		      i = getnameinfo((struct sockaddr*)&sa, slen,
+				      src6host, NI_MAXHOST,
+				      NULL, 0,
+				      NI_NUMERICHOST);
+
+		      if (i!=0)
+			{
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_ERROR, NULL,
+				       "Message received from: %s:%i (serv=%s) Error with getnameinfo\n",
+				       src6host, recvport, src6buf));
+			}
+		      else           
+			{
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				       "Message received from: %s:%i (serv=%s)\n",
+				       src6host, recvport, src6buf));          
+			}
+
+		      OSIP_TRACE (osip_trace
+				  (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				   "Message received from: %s:%i (serv=%s)\n",
+				   src6host, recvport, src6buf));
+
+		      osip_message_fix_last_via_header (sipevent->sip,
+							src6host,
+							recvport);
+            }
+		      i =
+			osip_find_transaction_and_add_event (eXosip.j_osip, sipevent);
+		      if (i != 0)
+			{
+			  /* this event has no transaction, */
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				       "This is a request\n", buf));
+			  eXosip_lock ();
+			  if (MSG_IS_REQUEST (sipevent->sip))
+			    eXosip_process_newrequest (sipevent, 0);
+			  else if (MSG_IS_RESPONSE (sipevent->sip))
+			    eXosip_process_response_out_of_transaction (sipevent);
+			  eXosip_unlock ();
+			} else
+			  {
+			    /* handled by oSIP ! */
+			  }
+		    } else
+		      {
+			OSIP_TRACE (osip_trace
+				    (__FILE__, __LINE__, OSIP_ERROR, NULL,
+				     "Could not parse SIP message\n"));
+			osip_event_free (sipevent);
+		      }
+		} else if (i < 0)
+		  {
+		    OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+					    "Could not read socket\n"));
+		  } else
+		    {
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "Dummy SIP message received\n"));
+		    }
+	    }
+      else
+	{
+	  /* loop over all TCP socket */
+	  int pos = 0;
+	  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				  "TCP DATA ready?\n"));
+	  for (pos=0; pos<EXOSIP_MAX_SOCKETS; pos++)
+	    {
+	      if (eXosip.net_interfaces[1].net_socket_tab[pos].socket>0
+		  && FD_ISSET (eXosip.net_interfaces[1].net_socket_tab[pos].socket, &osip_fdset))
+		{
+		  OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					  "TCP DATA ready! message received\n"));
+		  i = recv (eXosip.net_interfaces[1].net_socket_tab[pos].socket,
+			    buf, SIP_MESSAGE_MAX_LENGTH, 0);
+		  if (i > 5)
+		    {
+		      osip_strncpy (buf + i, "\0", 1);
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "Received TCP message: \n%s\n", buf));
+#ifdef WIN32
+		      if (strlen (buf) > 412)
+			{
+			  OSIP_TRACE (osip_trace
+				      (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				       "Message suite: \n%s\n", buf + 412));
+			}
+#endif
+		      _eXosip_handle_incoming_message(buf, i,
+						      eXosip.net_interfaces[1].net_socket_tab[pos].socket,
+						      eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip,
+						      eXosip.net_interfaces[1].net_socket_tab[pos].remote_port);
+		    }
+		  else if (i < 0)
+		    {
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL,
+					      "Could not read socket - close it\n"));
+		      close(eXosip.net_interfaces[1].net_socket_tab[pos].socket);
+		      memset(&(eXosip.net_interfaces[1].net_socket_tab[pos]),
+			     0, sizeof(struct eXosip_socket));
+		    }
+		  else if (i==0)
+		    {
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "End of stream (read 0 byte from %s:%i)\n", eXosip.net_interfaces[1].net_socket_tab[pos].remote_ip, eXosip.net_interfaces[1].net_socket_tab[pos].remote_port));
+		      close(eXosip.net_interfaces[1].net_socket_tab[pos].socket);
+		      memset(&(eXosip.net_interfaces[1].net_socket_tab[pos]),
+			     0, sizeof(struct eXosip_socket));
+		    }
+		  else
+		    {
+		      /* we expect at least one byte, otherwise there's no doubt that it is not a sip message ! */
+		      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+					      "Dummy SIP message received (size=%i)\n", i));
+		    }
+		}
+	    }
+	}
+
+
+      max_message_nb--;
+    }
+  osip_free (buf);
+  return 0;
+}
+
+
+static int
+eXosip_pendingosip_transaction_exist (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *tr;
+  int now = time (NULL);
+
+  tr = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+  if (tr != NULL && tr->state != NIST_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_out_transaction (jc, jd, "BYE");
+  if (tr != NULL && tr->state != NICT_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr != NULL && tr->state != IST_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          /* osip_remove_transaction(eXosip.j_osip, tr);
+             eXosip_remove_transaction_from_call(tr, jc);
+             osip_transaction_free(tr); */
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_out_invite (jc, jd);
+  if (tr != NULL && tr->state != ICT_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          /* osip_remove_transaction(eXosip.j_osip, tr);
+             eXosip_remove_transaction_from_call(tr, jc);
+             osip_transaction_free(tr); */
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_inc_transaction (jc, jd, "REFER");
+  if (tr != NULL && tr->state != IST_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  tr = eXosip_find_last_out_transaction (jc, jd, "REFER");
+  if (tr != NULL && tr->state != NICT_TERMINATED)
+    {                           /* Don't want to wait forever on broken transaction!! */
+      if (tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+        {
+          /* remove the transaction from oSIP: */
+          osip_remove_transaction (eXosip.j_osip, tr);
+          eXosip_remove_transaction_from_call (tr, jc);
+	  osip_list_add (eXosip.j_transactions, tr, 0);
+      } else
+        return 0;
+    }
+
+  return -1;
+}
+
+static int
+eXosip_release_finished_calls (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  osip_transaction_t *tr;
+
+  tr = eXosip_find_last_inc_transaction (jc, jd, "BYE");
+  if (tr == NULL)
+    tr = eXosip_find_last_out_transaction (jc, jd, "BYE");
+
+  if (tr != NULL && (tr->state == NIST_TERMINATED || tr->state == NICT_TERMINATED))
+    {
+        int did = -2;
+        if (jd!=NULL)
+            did = jd->d_id;
+        OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+            "eXosip: eXosip_release_finished_calls remove a dialog (cid=%i did=%i)\n", jc->c_id, did));
+      /* Remove existing reference to the dialog from transactions! */
+      __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+      REMOVE_ELEMENT (jc->c_dialogs, jd);
+      eXosip_dialog_free (jd);
+      return 0;
+    }
+  return -1;
+}
+
+
+
+static void
+__eXosip_release_call (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  REMOVE_ELEMENT (eXosip.j_calls, jc);
+  report_call_event (EXOSIP_CALL_RELEASED, jc, jd, NULL);
+  eXosip_call_free (jc);
+  __eXosip_wakeup ();
+}
+
+
+static int
+eXosip_release_aborted_calls (eXosip_call_t * jc, eXosip_dialog_t * jd)
+{
+  int now = time (NULL);
+  osip_transaction_t *tr;
+
+#if 0
+  tr = eXosip_find_last_inc_invite (jc, jd);
+  if (tr == NULL)
+    tr = eXosip_find_last_out_invite (jc, jd);
+#else
+  /* close calls only when the initial INVITE failed */
+  tr = jc->c_inc_tr;
+  if (tr==NULL)
+    tr = jc->c_out_tr;
+#endif
+
+  if (tr == NULL)
+    {
+      if (jd != NULL)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                  "eXosip: eXosip_release_aborted_calls remove an empty dialog\n"));
+          __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+          REMOVE_ELEMENT (jc->c_dialogs, jd);
+          eXosip_dialog_free (jd);
+          return 0;
+        }
+      return -1;
+    }
+
+  if (tr != NULL && tr->state != IST_TERMINATED && tr->state != ICT_TERMINATED && tr->birth_time + 180 < now)   /* Wait a max of 2 minutes */
+    {
+      if (jd != NULL)
+        {
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                  "eXosip: eXosip_release_aborted_calls remove a dialog for an unfinished transaction\n"));
+          __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+          REMOVE_ELEMENT (jc->c_dialogs, jd);
+          report_call_event (EXOSIP_CALL_NOANSWER, jc, jd, NULL);
+          eXosip_dialog_free (jd);
+          __eXosip_wakeup ();
+          return 0;
+        }
+    }
+
+  if (tr != NULL && (tr->state == IST_TERMINATED || tr->state == ICT_TERMINATED))
+    {
+      if (tr == jc->c_inc_tr)
+        {
+          if (jc->c_inc_tr->last_response == NULL)
+            {
+              /* OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_INFO2,NULL,
+                 "eXosip: eXosip_release_aborted_calls transaction with no answer\n")); */
+          } else if (MSG_IS_STATUS_3XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 3xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_4XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 4xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_5XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 5xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_6XX (jc->c_inc_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls answered with a 6xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+            }
+      } else if (tr == jc->c_out_tr)
+        {
+          if (jc->c_out_tr->last_response == NULL)
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed with no answer\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_3XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 3xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_4XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 4xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_5XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 5xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+          } else if (MSG_IS_STATUS_6XX (jc->c_out_tr->last_response))
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                                      "eXosip: eXosip_release_aborted_calls completed answered with 6xx\n"));
+              __eXosip_release_call (jc, jd);
+              return 0;
+            }
+        }
+    }
+
+  return -1;
+}
+
+
+void
+eXosip_release_terminated_calls (void)
+{
+  eXosip_dialog_t *jd;
+  eXosip_dialog_t *jdnext;
+  eXosip_call_t *jc;
+  eXosip_call_t *jcnext;
+  int now = time (NULL);
+  int pos;
+
+
+  for (jc = eXosip.j_calls; jc != NULL;)
+    {
+      jcnext = jc->next;
+      /* free call terminated with a BYE */
+
+      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+          "eXosip: working on (cid=%i)\n", jc->c_id));
+      for (jd = jc->c_dialogs; jd != NULL;)
+        {
+          jdnext = jd->next;
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+              "eXosip: working on (cid=%i did=%i)\n", jc->c_id, jd->d_id));
+          if (0 == eXosip_pendingosip_transaction_exist (jc, jd))
+            {
+          } else if (0 == eXosip_release_finished_calls (jc, jd))
+            {
+              jd = jc->c_dialogs;
+          } else if (0 == eXosip_release_aborted_calls (jc, jd))
+            {
+              jdnext = NULL;
+          } else if (jd->d_id==-1)
+            {
+                OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO2, NULL,
+                    "eXosip: eXosip_release_terminated_calls delete a removed dialog (cid=%i did=%i)\n", jc->c_id, jd->d_id));
+                /* Remove existing reference to the dialog from transactions! */
+                __eXosip_call_remove_dialog_reference_in_call (jc, jd);
+                REMOVE_ELEMENT (jc->c_dialogs, jd);
+                eXosip_dialog_free (jd);
+
+                jd = jc->c_dialogs;
+            }
+          jd = jdnext;
+        }
+      jc = jcnext;
+    }
+
+  for (jc = eXosip.j_calls; jc != NULL;)
+    {
+      jcnext = jc->next;
+      if (jc->c_dialogs == NULL)
+        {
+          /* release call for options requests */
+          if (jc->c_inc_options_tr != NULL)
+            {
+              if (jc->c_inc_options_tr->state == NIST_TERMINATED)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an incoming OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+              } else if (jc->c_inc_options_tr->state != NIST_TERMINATED
+                         && jc->c_inc_options_tr->birth_time + 180 < now)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an incoming OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+                }
+          } else if (jc->c_out_options_tr != NULL)
+            {
+              if (jc->c_out_options_tr->state == NICT_TERMINATED)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an outgoing OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+              } else if (jc->c_out_options_tr->state != NIST_TERMINATED
+                         && jc->c_out_options_tr->birth_time + 180 < now)
+                {
+                  OSIP_TRACE (osip_trace
+                              (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                               "eXosip: remove an outgoing OPTIONS with no final answer\n"));
+                  __eXosip_release_call (jc, NULL);
+                }
+          } else if (jc->c_inc_tr != NULL
+                     && jc->c_inc_tr->state != IST_TERMINATED
+                     && jc->c_inc_tr->birth_time + 180 < now)
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                      "eXosip: remove an incoming call with no final answer\n"));
+              __eXosip_release_call (jc, NULL);
+          } else if (jc->c_out_tr != NULL
+                     && jc->c_out_tr->state != ICT_TERMINATED
+                     && jc->c_out_tr->birth_time + 180 < now)
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                      "eXosip: remove an outgoing call with no final answer\n"));
+              __eXosip_release_call (jc, NULL);
+          } else if (jc->c_inc_tr != NULL && jc->c_inc_tr->state != IST_TERMINATED)
+            {
+          } else if (jc->c_out_tr != NULL && jc->c_out_tr->state != ICT_TERMINATED)
+            {
+          } else                /* no active pending transaction */
+            {
+              OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                      "eXosip: remove a call\n"));
+              __eXosip_release_call (jc, NULL);
+            }
+        }
+      jc = jcnext;
+    }
+
+  pos = 0;
+  while (!osip_list_eol (eXosip.j_transactions, pos))
+    {
+      osip_transaction_t *tr =
+        (osip_transaction_t *) osip_list_get (eXosip.j_transactions, pos);
+      if (tr->state == IST_TERMINATED || tr->state == ICT_TERMINATED
+          || tr->state == NICT_TERMINATED || tr->state == NIST_TERMINATED)
+
+        {                       /* free (transaction is already removed from the oSIP stack) */
+          OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+                                  "Release a terminated transaction\n"));
+          osip_list_remove (eXosip.j_transactions, pos);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+      } else if (tr->birth_time + 180 < now)    /* Wait a max of 2 minutes */
+        {
+          osip_list_remove (eXosip.j_transactions, pos);
+          __eXosip_delete_jinfo (tr);
+          osip_transaction_free (tr);
+      } else
+        pos++;
+    }
+}
+
+void
+eXosip_release_terminated_registrations (void)
+{
+  eXosip_reg_t *jr;
+  eXosip_reg_t *jrnext;
+  int now = time (NULL);
+
+  for (jr = eXosip.j_reg; jr != NULL;)
+    {
+      jrnext = jr->next;
+      if (jr->r_reg_period == 0 && jr->r_last_tr!=NULL)
+	{
+	  if (now - jr->r_last_tr->birth_time > 60)
+	    {
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "Release a terminated registration\n"));
+	      REMOVE_ELEMENT (eXosip.j_reg, jr);
+	      eXosip_reg_free (jr);
+	    }
+	  else if (jr->r_last_tr->last_response!=NULL
+		   && jr->r_last_tr->last_response->status_code>=200
+		   && jr->r_last_tr->last_response->status_code<=299)
+	    {
+	      OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL,
+				      "Release a terminated registration with 2xx\n"));
+	      REMOVE_ELEMENT (eXosip.j_reg, jr);
+	      eXosip_reg_free (jr);
+	    }
+	}
+
+      jr = jrnext;
+    }
+
+  return;
+}
diff --git a/libs/portaudio/Makefile.am b/libs/portaudio/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..82672e9e22d33006ab4949d94d44e11ec79d2023
--- /dev/null
+++ b/libs/portaudio/Makefile.am
@@ -0,0 +1,63 @@
+noinst_LTLIBRARIES = libportaudio.la
+libportaudio_la_CFLAGS = $(PORTAUDIO_CFLAGS) 
+libportaudio_la_LIBADD = $(PORTAUDIO_LIBS)
+libportaudio_la_CXXFLAGS = $(PORTAUDIO_CXXFLAGS)
+libportaudio_la_CPPFLAGS = $(PORTAUDIO_CPPFLAGS) -I$(top_srcdir)/libs/portaudio/pa_common/
+
+
+if ENABLE_OSS
+OSS=pa_unix_oss/pa_unix_oss.c
+else 
+OSS=
+endif
+
+if ENABLE_UNIX
+UNIX=pa_unix/pa_unix_hostapis.c pa_unix/pa_unix_util.c
+else
+UNIX=
+endif
+
+if ENABLE_DARWIN
+DARWIN=pa_mac/pa_mac_hostapis.c pa_unix/pa_unix_util.c pa_mac_core/pa_mac_core.c
+else
+DARWIN=
+endif
+
+if ENABLE_ALSA
+ALSA=pa_linux_alsa/pa_linux_alsa.c
+else
+ALSA=
+endif
+
+if ENABLE_JACK
+JACK=pa_jack/pa_jack.c pablio/ringbuffer.c
+else
+JACK=
+endif
+
+#if ENABLE_ASIO
+#ASIO=pa_asio/iasiothiscallresolver.cpp $(ASIODIR)/host/asiodrivers.c $(ASIODIR)/common/asio.c $(ASIODIR)/host/mac/asioshlib.c
+#else
+ASIO=
+#endif
+
+PLATFORM_SOURCES=$(OSS) $(UNIX) $(ALSA) $(DARWIN) $(JACK) $(ASIO)
+
+noinst_HEADERS = pa_common/portaudio.h \
+pa_common/pa_allocation.h  pa_common/pa_dither.h      pa_common/pa_process.h  pa_common/pa_types.h  \
+pa_common/pa_converters.h  pa_common/pa_endianness.h  pa_common/pa_stream.h   pa_common/pa_util.h   \
+pa_common/pa_cpuload.h     pa_common/pa_hostapi.h     pa_common/pa_trace.h    pa_common/portaudio.h \
+pa_unix/pa_unix_util.h pa_linux_alsa/pa_linux_alsa.h \
+pablio/ringbuffer.h
+
+libportaudio_la_SOURCES = $(PLATFORM_SOURCES) \
+	pa_common/pa_allocation.c \
+	pa_common/pa_converters.c \
+	pa_common/pa_cpuload.c \
+	pa_common/pa_dither.c \
+	pa_common/pa_front.c \
+	pa_common/pa_process.c \
+	pa_common/pa_skeleton.c \
+	pa_common/pa_stream.c \
+	pa_common/pa_trace.c
+
diff --git a/libs/portaudio/pa_asio/iasiothiscallresolver.h b/libs/portaudio/pa_asio/iasiothiscallresolver.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ecfed799aece45fa32ee15140f30705de9b5ec0
--- /dev/null
+++ b/libs/portaudio/pa_asio/iasiothiscallresolver.h
@@ -0,0 +1,197 @@
+// ****************************************************************************
+// File:			IASIOThiscallResolver.h
+// Description:     The IASIOThiscallResolver class implements the IASIO
+//					interface and acts as a proxy to the real IASIO interface by
+//                  calling through its vptr table using the thiscall calling
+//                  convention. To put it another way, we interpose
+//                  IASIOThiscallResolver between ASIO SDK code and the driver.
+//                  This is necessary because most non-Microsoft compilers don't
+//                  implement the thiscall calling convention used by IASIO.
+//
+//					iasiothiscallresolver.cpp contains the background of this
+//					problem plus a technical description of the vptr
+//                  manipulations.
+//
+//					In order to use this mechanism one simply has to add
+//					iasiothiscallresolver.cpp to the list of files to compile
+//                  and #include <iasiothiscallresolver.h>
+//
+//					Note that this #include must come after the other ASIO SDK
+//                  #includes, for example:
+//
+//					#include <windows.h>
+//					#include <asiosys.h>
+//					#include <asio.h>
+//					#include <asiodrivers.h>
+//					#include <iasiothiscallresolver.h>
+//
+//					Actually the important thing is to #include
+//                  <iasiothiscallresolver.h> after <asio.h>. We have
+//                  incorporated a test to enforce this ordering.
+//
+//					The code transparently takes care of the interposition by
+//                  using macro substitution to intercept calls to ASIOInit()
+//                  and ASIOExit(). We save the original ASIO global
+//                  "theAsioDriver" in our "that" variable, and then set
+//                  "theAsioDriver" to equal our IASIOThiscallResolver instance.
+//
+// 					Whilst this method of resolving the thiscall problem requires
+//					the addition of #include <iasiothiscallresolver.h> to client
+//                  code it has the advantage that it does not break the terms
+//                  of the ASIO licence by publishing it. We are NOT modifying
+//                  any Steinberg code here, we are merely implementing the IASIO
+//					interface in the same way that we would need to do if we
+//					wished to provide an open source ASIO driver.
+//
+//					For compilation with MinGW -lole32 needs to be added to the
+//                  linker options. For BORLAND, linking with Import32.lib is
+//                  sufficient.
+//
+//					The dependencies are with: CoInitialize, CoUninitialize,
+//					CoCreateInstance, CLSIDFromString - used by asiolist.cpp
+//					and are required on Windows whether ThiscallResolver is used
+//					or not.
+//
+//					Searching for the above strings in the root library path
+//					of your compiler should enable the correct libraries to be
+//					identified if they aren't immediately obvious.
+//
+//                  Note that the current implementation of IASIOThiscallResolver
+//                  is not COM compliant - it does not correctly implement the
+//                  IUnknown interface. Implementing it is not necessary because
+//                  it is not called by parts of the ASIO SDK which call through
+//                  theAsioDriver ptr. The IUnknown methods are implemented as
+//                  assert(false) to ensure that the code fails if they are
+//                  ever called.
+// Restrictions:	None. Public Domain & Open Source distribute freely
+//					You may use IASIOThiscallResolver commercially as well as
+//                  privately.
+//					You the user assume the responsibility for the use of the
+//					files, binary or text, and there is no guarantee or warranty,
+//					expressed or implied, including but not limited to the
+//					implied warranties of merchantability and fitness for a
+//					particular purpose. You assume all responsibility and agree
+//					to hold no entity, copyright holder or distributors liable
+//					for any loss of data or inaccurate representations of data
+//					as a result of using IASIOThiscallResolver.
+// Version:         1.4 Added separate macro CALL_THISCALL_1_DOUBLE from
+//                  Andrew Baldwin, and volatile for whole gcc asm blocks,
+//                  both for compatibility with newer gcc versions. Cleaned up
+//                  Borland asm to use one less register.
+//                  1.3 Switched to including assert.h for better compatibility.
+//                  Wrapped entire .h and .cpp contents with a check for
+//                  _MSC_VER to provide better compatibility with MS compilers.
+//                  Changed Singleton implementation to use static instance
+//                  instead of freestore allocated instance. Removed ASIOExit
+//                  macro as it is no longer needed.
+//                  1.2 Removed semicolons from ASIOInit and ASIOExit macros to
+//                  allow them to be embedded in expressions (if statements).
+//                  Cleaned up some comments. Removed combase.c dependency (it
+//                  doesn't compile with BCB anyway) by stubbing IUnknown.
+//                  1.1 Incorporated comments from Ross Bencina including things
+//					such as changing name from ThiscallResolver to
+//					IASIOThiscallResolver, tidying up the constructor, fixing
+//					a bug in IASIOThiscallResolver::ASIOExit() and improving
+//					portability through the use of conditional compilation
+//					1.0 Initial working version.
+// Created:			6/09/2003
+// Authors:         Fraser Adams
+//                  Ross Bencina
+//                  Rene G. Ceballos
+//                  Martin Fay
+//                  Antti Silvast
+//                  Andrew Baldwin
+//
+// ****************************************************************************
+
+
+#ifndef included_iasiothiscallresolver_h
+#define included_iasiothiscallresolver_h
+
+// We only need IASIOThiscallResolver at all if we are on Win32. For other
+// platforms we simply bypass the IASIOThiscallResolver definition to allow us
+// to be safely #include'd whatever the platform to keep client code portable
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
+
+
+// If microsoft compiler we can call IASIO directly so IASIOThiscallResolver
+// is not used.
+#if !defined(_MSC_VER)
+
+
+// The following is in order to ensure that this header is only included after
+// the other ASIO headers (except for the case of iasiothiscallresolver.cpp).
+// We need to do this because IASIOThiscallResolver works by eclipsing the
+// original definition of ASIOInit() with a macro (see below).
+#if !defined(iasiothiscallresolver_sourcefile)
+	#if !defined(__ASIO_H)
+	#error iasiothiscallresolver.h must be included AFTER asio.h
+	#endif
+#endif
+
+#include <windows.h>
+#include <asiodrvr.h> /* From ASIO SDK */
+
+
+class IASIOThiscallResolver : public IASIO {
+private:
+	IASIO* that_; // Points to the real IASIO
+
+	static IASIOThiscallResolver instance; // Singleton instance
+
+	// Constructors - declared private so construction is limited to
+    // our Singleton instance
+    IASIOThiscallResolver();
+	IASIOThiscallResolver(IASIO* that);
+public:
+
+    // Methods from the IUnknown interface. We don't fully implement IUnknown
+    // because the ASIO SDK never calls these methods through theAsioDriver ptr.
+    // These methods are implemented as assert(false).
+    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv);
+    virtual ULONG STDMETHODCALLTYPE AddRef();
+    virtual ULONG STDMETHODCALLTYPE Release();
+
+    // Methods from the IASIO interface, implemented as forwarning calls to that.
+	virtual ASIOBool init(void *sysHandle);
+	virtual void getDriverName(char *name);
+	virtual long getDriverVersion();
+	virtual void getErrorMessage(char *string);
+	virtual ASIOError start();
+	virtual ASIOError stop();
+	virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels);
+	virtual ASIOError getLatencies(long *inputLatency, long *outputLatency);
+	virtual ASIOError getBufferSize(long *minSize, long *maxSize, long *preferredSize, long *granularity);
+	virtual ASIOError canSampleRate(ASIOSampleRate sampleRate);
+	virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate);
+	virtual ASIOError setSampleRate(ASIOSampleRate sampleRate);
+	virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources);
+	virtual ASIOError setClockSource(long reference);
+	virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp);
+	virtual ASIOError getChannelInfo(ASIOChannelInfo *info);
+	virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, long bufferSize, ASIOCallbacks *callbacks);
+	virtual ASIOError disposeBuffers();
+	virtual ASIOError controlPanel();
+	virtual ASIOError future(long selector,void *opt);
+	virtual ASIOError outputReady();
+
+    // Class method, see ASIOInit() macro below.
+    static ASIOError ASIOInit(ASIODriverInfo *info); // Delegates to ::ASIOInit
+};
+
+
+// Replace calls to ASIOInit with our interposing version.
+// This macro enables us to perform thiscall resolution simply by #including
+// <iasiothiscallresolver.h> after the asio #includes (this file _must_ be
+// included _after_ the asio #includes)
+
+#define ASIOInit(name) IASIOThiscallResolver::ASIOInit((name))
+
+
+#endif /* !defined(_MSC_VER) */
+
+#endif /* Win32 */
+
+#endif /* included_iasiothiscallresolver_h */
+
+
diff --git a/libs/portaudio/pa_asio/pa_asio.h b/libs/portaudio/pa_asio/pa_asio.h
new file mode 100644
index 0000000000000000000000000000000000000000..573930572423c5b08dd942ba87fc968664569312
--- /dev/null
+++ b/libs/portaudio/pa_asio/pa_asio.h
@@ -0,0 +1,122 @@
+#ifndef PA_ASIO_H
+#define PA_ASIO_H
+/*
+ * $Id$
+ * PortAudio Portable Real-Time Audio Library
+ * ASIO 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 ASIO-specific PortAudio API extension header file.
+*/
+
+
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/** Retrieve legal latency settings for the specificed device, in samples.
+
+ @param device The global index of the device about which the query is being made.
+ @param minLatency A pointer to the location which will recieve the minimum latency value.
+ @param maxLatency A pointer to the location which will recieve the maximum latency value.
+ @param preferredLatency A pointer to the location which will recieve the preferred latency value.
+ @param granularity A pointer to the location which will recieve the granularity. This value 
+ determines which values between minLatency and maxLatency are available. ie the step size,
+ if granularity is -1 then available latency settings are powers of two.
+
+ @see ASIOGetBufferSize in the ASIO SDK.
+
+ @todo This function should have a better name, any suggestions?
+*/
+PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
+		long *minLatency, long *maxLatency, long *preferredLatency, long *granularity );
+
+        
+/** Display the ASIO control panel for the specified device.
+
+  @param device The global index of the device whose control panel is to be displayed.
+  @param systemSpecific On Windows, the calling application's main window handle,
+  on Macintosh this value should be zero.
+*/
+PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific );
+
+
+
+
+/** Retrieve a pointer to a string containing the name of the specified
+ input channel. The string is valid until Pa_Terminate is called.
+
+ The string will be no longer than 32 characters including the null terminator.
+*/
+PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
+        const char** channelName );
+
+        
+/** Retrieve a pointer to a string containing the name of the specified
+ input channel. The string is valid until Pa_Terminate is called.
+
+ The string will be no longer than 32 characters including the null terminator.
+*/
+PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
+        const char** channelName );
+
+
+#define paAsioUseChannelSelectors      (0x01)
+
+typedef struct PaAsioStreamInfo{
+    unsigned long size;             /**< sizeof(PaAsioStreamInfo) */
+    PaHostApiTypeId hostApiType;    /**< paASIO */
+    unsigned long version;          /**< 1 */
+
+    unsigned long flags;
+
+    /* Support for opening only specific channels of an ASIO device.
+        If the paAsioUseChannelSelectors flag is set, channelSelectors is a
+        pointer to an array of integers specifying the device channels to use.
+        When used, the length of the channelSelectors array must match the
+        corresponding channelCount parameter to Pa_OpenStream() otherwise a
+        crash may result.
+        The values in the selectors array must specify channels within the
+        range of supported channels for the device or paInvalidChannelCount will
+        result.
+    */
+    int *channelSelectors;
+}PaAsioStreamInfo;
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_ASIO_H */
diff --git a/libs/portaudio/pa_common/pa_allocation.c b/libs/portaudio/pa_common/pa_allocation.c
new file mode 100644
index 0000000000000000000000000000000000000000..98239c48f00400932a826763f1b87c39cacabc0a
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_allocation.c
@@ -0,0 +1,234 @@
+/*
+ * $Id$
+ * 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;
+    }
+}
+
diff --git a/libs/portaudio/pa_common/pa_allocation.h b/libs/portaudio/pa_common/pa_allocation.h
new file mode 100644
index 0000000000000000000000000000000000000000..5bcfe75a67674da671de89962c866b6fc5c46285
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_allocation.h
@@ -0,0 +1,95 @@
+#ifndef PA_ALLOCATION_H
+#define PA_ALLOCATION_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_converters.c b/libs/portaudio/pa_common/pa_converters.c
new file mode 100644
index 0000000000000000000000000000000000000000..39f83e481943297ad8bc67edd21712487d316a9d
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_converters.c
@@ -0,0 +1,1926 @@
+/*
+ * $Id$
+ * 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;
+    PaInt32 *dest =  (PaInt32*)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 = (PaInt32) 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;
+    PaInt32 *dest =  (PaInt32*)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 = (PaInt32) 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;
+    PaInt32 *dest =  (PaInt32*)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 = (PaInt32) 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;
+    PaInt32 *dest =  (PaInt32*)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 = (PaInt32) 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;
+    PaInt32 temp;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        /* convert to 32 bit and drop the low 8 bits */
+        double scaled = *src * 0x7FFFFFFF;
+        temp = (PaInt32) 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;
+    PaInt32 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 = (PaInt32) 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;
+    PaInt32 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 = (PaInt32) 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;
+    PaInt32 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 = (PaInt32) 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;
+    PaInt16 *dest =  (PaInt16*)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;
+    PaInt16 *dest = (PaInt16*)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 = (PaInt16) 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;
+    PaInt16 *dest =  (PaInt16*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+#ifdef PA_USE_C99_LRINTF
+        long samp = lrintf((*src * (32767.0f)) -0.5f);
+#else
+        long samp = (PaInt32) (*src * (32767.0f));
+#endif
+        PA_CLIP_( samp, -0x8000, 0x7FFF );
+        *dest = (PaInt16) 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;
+    PaInt16 *dest =  (PaInt16*)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;
+        PaInt32 samp = (PaInt32) dithered;
+        PA_CLIP_( samp, -0x8000, 0x7FFF );
+#ifdef PA_USE_C99_LRINTF
+        *dest = lrintf(samp-0.5f);
+#else
+        *dest = (PaInt16) 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;
+        PaInt32 samp = (PaInt32) 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-- )
+    {
+        PaInt32 samp = (PaInt32)(*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;
+        PaInt32 samp = (PaInt32) 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 )
+{
+    PaInt32 *src = (PaInt32*)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 )
+{
+    PaInt32 *src    = (PaInt32*)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 )
+{
+    PaInt32 *src = (PaInt32*)sourceBuffer;
+    PaInt16 *dest =  (PaInt16*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        *dest = (PaInt16) ((*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 )
+{
+    PaInt32 *src = (PaInt32*)sourceBuffer;
+    PaInt16 *dest =  (PaInt16*)destinationBuffer;
+    PaInt32 dither;
+
+    while( count-- )
+    {
+        /* REVIEW */
+        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );
+        *dest = (PaInt16) ((((*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 )
+{
+    PaInt32 *src = (PaInt32*)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 )
+{
+    PaInt32 *src = (PaInt32*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    PaInt32 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 )
+{
+    PaInt32 *src = (PaInt32*)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 )
+{
+    PaInt32 *src = (PaInt32*)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;
+    PaInt32 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;
+    PaInt32 *dest = (PaInt32*)  destinationBuffer;
+    PaInt32 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;
+    PaInt16 *dest = (PaInt16*)destinationBuffer;
+    
+    PaInt16 temp;
+
+    (void) ditherGenerator; /* unused parameter */
+        
+    while( count-- )
+    {
+		
+#if defined(PA_LITTLE_ENDIAN)
+		/* src[0] is discarded */
+        temp = (((PaInt16)src[1]));
+        temp = temp | (PaInt16)(((PaInt16)src[2]) << 8);
+#elif defined(PA_BIG_ENDIAN)
+		/* src[2] is discarded */
+        temp = (PaInt16)(((PaInt16)src[0]) << 8);
+        temp = temp | (((PaInt16)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 )
+{
+    PaInt16 *src = (PaInt16*)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 )
+{
+    PaInt16 *src = (PaInt16*)sourceBuffer;
+    PaInt32 *dest =  (PaInt32*)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 )
+{
+    PaInt16 *src   = (PaInt16*) sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    PaInt16 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 )
+{
+    PaInt16 *src = (PaInt16*)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 )
+{
+    PaInt16 *src = (PaInt16*)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 )
+{
+    PaInt16 *src = (PaInt16*)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 )
+{
+    PaInt16 *src = (PaInt16*)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;
+    PaInt32 *dest =  (PaInt32*)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;
+    PaInt16 *dest =  (PaInt16*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        (*dest) = (PaInt16)((*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;
+    PaInt32 *dest = (PaInt32*)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;
+    PaInt16 *dest =  (PaInt16*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        (*dest) = (PaInt16)((*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;
+                                                        
+    (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 */
diff --git a/libs/portaudio/pa_common/pa_converters.h b/libs/portaudio/pa_common/pa_converters.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d83c990bb48f3355801019aa914062d982bbefd
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_converters.h
@@ -0,0 +1,254 @@
+#ifndef PA_CONVERTERS_H
+#define PA_CONVERTERS_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_cpuload.c b/libs/portaudio/pa_common/pa_cpuload.c
new file mode 100644
index 0000000000000000000000000000000000000000..ee2147dc33fdfbda07255729acd5d8b79560f8e0
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_cpuload.c
@@ -0,0 +1,96 @@
+/*
+ * $Id$
+ * 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;
+}
diff --git a/libs/portaudio/pa_common/pa_cpuload.h b/libs/portaudio/pa_common/pa_cpuload.h
new file mode 100644
index 0000000000000000000000000000000000000000..131ad10bd30f706048328f6fe08430fbe7ca0197
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_cpuload.h
@@ -0,0 +1,63 @@
+#ifndef PA_CPULOAD_H
+#define PA_CPULOAD_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_dither.c b/libs/portaudio/pa_common/pa_dither.c
new file mode 100644
index 0000000000000000000000000000000000000000..d44a060cd20312368973143e278d170556e77a3b
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_dither.c
@@ -0,0 +1,204 @@
+/*
+ * $Id$
+ * 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; 
+} 
+*/
diff --git a/libs/portaudio/pa_common/pa_dither.h b/libs/portaudio/pa_common/pa_dither.h
new file mode 100644
index 0000000000000000000000000000000000000000..148db275fb8b77c3dbd51e19ae68cd537e5d08d9
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_dither.h
@@ -0,0 +1,91 @@
+#ifndef PA_DITHER_H
+#define PA_DITHER_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_endianness.h b/libs/portaudio/pa_common/pa_endianness.h
new file mode 100644
index 0000000000000000000000000000000000000000..3a573929b36edbf657441b868039bfee700e6752
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_endianness.h
@@ -0,0 +1,111 @@
+#ifndef PA_ENDIANNESS_H
+#define PA_ENDIANNESS_H
+/*
+ * $Id$
+ * 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 */
+
+
+#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 */
diff --git a/libs/portaudio/pa_common/pa_front.c b/libs/portaudio/pa_common/pa_front.c
new file mode 100644
index 0000000000000000000000000000000000000000..3b4a026b5524e31fa88d9f87cda7bf1c1fdd0ebc
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_front.c
@@ -0,0 +1,1976 @@
+/*
+ * $Id$
+ * 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;
+}
+
diff --git a/libs/portaudio/pa_common/pa_hostapi.h b/libs/portaudio/pa_common/pa_hostapi.h
new file mode 100644
index 0000000000000000000000000000000000000000..fec4e4871bbd7bce7a46237a139fee10644bdc8b
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_hostapi.h
@@ -0,0 +1,244 @@
+#ifndef PA_HOSTAPI_H
+#define PA_HOSTAPI_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_process.c b/libs/portaudio/pa_common/pa_process.c
new file mode 100644
index 0000000000000000000000000000000000000000..837bbef35b66bf1fcfee2e60fc75008b8f7cde76
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_process.c
@@ -0,0 +1,1763 @@
+/*
+ * $Id$
+ * 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;
+
+    if( streamFlags & paNeverDropInput )
+    {
+        /* paNeverDropInput is only valid for full-duplex callback streams, with an unspecified number of frames per buffer. */
+        if( !streamCallback || !(inputChannelCount > 0 && outputChannelCount > 0) ||
+                framesPerUserBuffer != paFramesPerBufferUnspecified )
+            return paInvalidFlag;
+    }
+
+    /* 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 );
+    assert( data != NULL );
+
+    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 )
+    {
+        PaUtil_SetOutputChannel( bp, channel + i, p, channelCount );
+        p += bp->bytesPerHostOutputSample;
+    }
+}
+
+
+void PaUtil_SetNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data )
+{
+    assert( channel < bp->outputChannelCount );
+
+    PaUtil_SetOutputChannel( bp, channel, data, 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 );
+    assert( data != NULL );
+
+    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 )
+    {
+        PaUtil_Set2ndOutputChannel( bp, channel + i, p, channelCount );
+        p += bp->bytesPerHostOutputSample;
+    }
+}
+
+        
+void PaUtil_Set2ndNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data )
+{
+    assert( channel < bp->outputChannelCount );
+    
+    PaUtil_Set2ndOutputChannel( bp, channel, data, 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 )
+         {
+             assert( hostOutputChannels[i].data != NULL );
+             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;
+}
diff --git a/libs/portaudio/pa_common/pa_process.h b/libs/portaudio/pa_common/pa_process.h
new file mode 100644
index 0000000000000000000000000000000000000000..8d13d903a4428416ec1d176f8afc548509006bb4
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_process.h
@@ -0,0 +1,741 @@
+#ifndef PA_PROCESS_H
+#define PA_PROCESS_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_skeleton.c b/libs/portaudio/pa_common/pa_skeleton.c
new file mode 100644
index 0000000000000000000000000000000000000000..51f95c8a3201d5605baf89dece660c402e8c9a7e
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_skeleton.c
@@ -0,0 +1,807 @@
+/*
+ * $Id$
+ * 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;
+}
+
+
+
+
diff --git a/libs/portaudio/pa_common/pa_stream.c b/libs/portaudio/pa_common/pa_stream.c
new file mode 100644
index 0000000000000000000000000000000000000000..e820671bc1c5b0daf47b364d94ff0d8471f8f8d3
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_stream.c
@@ -0,0 +1,141 @@
+/*
+ * $Id$
+ * 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;
+}
diff --git a/libs/portaudio/pa_common/pa_stream.h b/libs/portaudio/pa_common/pa_stream.h
new file mode 100644
index 0000000000000000000000000000000000000000..aaf89cf210c6f02367b1fbc57176c73a7d64b930
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_stream.h
@@ -0,0 +1,196 @@
+#ifndef PA_STREAM_H
+#define PA_STREAM_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_trace.c b/libs/portaudio/pa_common/pa_trace.c
new file mode 100644
index 0000000000000000000000000000000000000000..6619d423af4a3106418d331cae8b74fcbc35280c
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_trace.c
@@ -0,0 +1,88 @@
+/*
+ * $Id$
+ * 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[PA_MAX_TRACE_RECORDS];
+static int traceIntArray[PA_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] );
+    }
+    PaUtil_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 */
diff --git a/libs/portaudio/pa_common/pa_trace.h b/libs/portaudio/pa_common/pa_trace.h
new file mode 100644
index 0000000000000000000000000000000000000000..256c3e6911bf887d76b5a36d9ed9a972ab34f81f
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_trace.h
@@ -0,0 +1,70 @@
+#ifndef PA_TRACE_H
+#define PA_TRACE_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/pa_types.h b/libs/portaudio/pa_common/pa_types.h
new file mode 100644
index 0000000000000000000000000000000000000000..343dc8cf8a69284ef906fe62c7e76f7a3eb8fb35
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_types.h
@@ -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 */
diff --git a/libs/portaudio/pa_common/pa_util.h b/libs/portaudio/pa_common/pa_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d060d814a7f95891c45e5eb5b251e25af230109
--- /dev/null
+++ b/libs/portaudio/pa_common/pa_util.h
@@ -0,0 +1,167 @@
+#ifndef PA_UTIL_H
+#define PA_UTIL_H
+/*
+ * $Id$
+ * 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 */
diff --git a/libs/portaudio/pa_common/portaudio.h b/libs/portaudio/pa_common/portaudio.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac071d7eac66743eb495fdeb69a25d0195ec784d
--- /dev/null
+++ b/libs/portaudio/pa_common/portaudio.h
@@ -0,0 +1,1123 @@
+
+#ifndef PORTAUDIO_H
+#define PORTAUDIO_H
+/*
+ * $Id$
+ * 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 = -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 */
diff --git a/libs/portaudio/pa_jack/pa_jack.c b/libs/portaudio/pa_jack/pa_jack.c
new file mode 100644
index 0000000000000000000000000000000000000000..17bf3d371bcd1937232f9f495536d03af5197165
--- /dev/null
+++ b/libs/portaudio/pa_jack/pa_jack.c
@@ -0,0 +1,1714 @@
+/*
+ * $Id$
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * JACK Implementation by Joshua Haberman
+ *
+ * Copyright (c) 2004 Stefan Westerfeld <stefan@space.twc.de>
+ * Copyright (c) 2004 Arve Knudsen <aknuds-1@broadpark.no>
+ * Copyright (c) 2002 Joshua Haberman <joshua@haberman.com>
+ *
+ * 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 <string.h>
+#include <regex.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>  /* EBUSY */
+#include <signal.h> /* sig_atomic_t */
+#include <math.h>
+#include <semaphore.h>
+
+#include <jack/types.h>
+#include <jack/jack.h>
+
+#include "pa_util.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_process.h"
+#include "pa_allocation.h"
+#include "pa_cpuload.h"
+#include "../pablio/ringbuffer.c"
+
+static int aErr_;
+static PaError paErr_;     /* For use with ENSURE_PA */
+static pthread_t mainThread_;
+static char *jackErr_ = NULL;
+
+#define STRINGIZE_HELPER(expr) #expr
+#define STRINGIZE(expr) STRINGIZE_HELPER(expr)
+
+/* Check PaError */
+#define ENSURE_PA(expr) \
+    do { \
+        if( (paErr_ = (expr)) < paNoError ) \
+        { \
+            if( (paErr_) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \
+            { \
+                assert( jackErr_ ); \
+                PaUtil_SetLastHostErrorInfo( paJACK, -1, jackErr_ ); \
+            } \
+            PaUtil_DebugPrint(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+            result = paErr_; \
+            goto error; \
+        } \
+    } while( 0 )
+
+#define UNLESS(expr, code) \
+    do { \
+        if( (expr) == 0 ) \
+        { \
+            if( (code) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \
+            { \
+                assert( jackErr_ ); \
+                PaUtil_SetLastHostErrorInfo( paJACK, -1, jackErr_ ); \
+            } \
+            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 );
+
+/*
+ * Functions that directly map to the PortAudio stream interface
+ */
+
+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 GetStreamInputLatency( PaStream *stream );*/
+/*static PaTime GetStreamOutputLatency( PaStream *stream );*/
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+
+
+/*
+ * Data specific to this API
+ */
+
+struct PaJackStream;
+
+typedef struct
+{
+    PaUtilHostApiRepresentation commonHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+
+    PaUtilAllocationGroup *deviceInfoMemory;
+
+    jack_client_t *jack_client;
+    int jack_buffer_size;
+    PaHostApiIndex hostApiIndex;
+
+    pthread_mutex_t mtx;
+    pthread_cond_t cond;
+    unsigned long inputBase, outputBase;
+
+    /* For dealing with the process thread */
+    volatile int xrun;     /* Received xrun notification from JACK? */
+    struct PaJackStream * volatile toAdd, * volatile toRemove;
+    struct PaJackStream *processQueue;
+    volatile sig_atomic_t jackIsDown;
+}
+PaJackHostApiRepresentation;
+
+/* PaJackStream - a stream data structure specifically for this implementation */
+
+typedef struct PaJackStream
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilBufferProcessor bufferProcessor;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaJackHostApiRepresentation *hostApi;
+
+    /* our input and output ports */
+    jack_port_t **local_input_ports;
+    jack_port_t **local_output_ports;
+
+    /* the input and output ports of the client we are connecting to */
+    jack_port_t **remote_input_ports;
+    jack_port_t **remote_output_ports;
+
+    int num_incoming_connections;
+    int num_outgoing_connections;
+
+    jack_client_t *jack_client;
+
+    /* The stream is running if it's still producing samples.
+     * The stream is active if samples it produced are still being heard.
+     */
+    volatile sig_atomic_t is_running;
+    volatile sig_atomic_t is_active;
+    /* Used to signal processing thread that stream should start or stop, respectively */
+    volatile sig_atomic_t doStart, doStop, doAbort;
+
+    jack_nframes_t t0;
+
+    PaUtilAllocationGroup *stream_memory;
+
+    /* These are useful in the process callback */
+
+    int callbackResult;
+    int isSilenced;
+    int xrun;
+
+    /* These are useful for the blocking API */
+
+    int                     isBlockingStream;
+    RingBuffer              inFIFO;
+    RingBuffer              outFIFO;
+    volatile sig_atomic_t   data_available;
+    sem_t                   data_semaphore;
+    int                     bytesPerFrame;
+    int                     samplesPerFrame;
+
+    struct PaJackStream *next;
+}
+PaJackStream;
+
+#define TRUE 1
+#define FALSE 0
+
+/*
+ * Functions specific to this API
+ */
+
+static int JackCallback( jack_nframes_t frames, void *userData );
+
+
+/*
+ *
+ * Implementation
+ *
+ */
+
+/* ---- blocking emulation layer ---- */
+
+/* Allocate buffer. */
+static PaError BlockingInitFIFO( RingBuffer *rbuf, long numFrames, long bytesPerFrame )
+{
+    long numBytes = numFrames * bytesPerFrame;
+    char *buffer = (char *) malloc( numBytes );
+    if( buffer == NULL ) return paInsufficientMemory;
+    memset( buffer, 0, numBytes );
+    return (PaError) RingBuffer_Init( rbuf, numBytes, buffer );
+}
+
+/* Free buffer. */
+static PaError BlockingTermFIFO( RingBuffer *rbuf )
+{
+    if( rbuf->buffer ) free( rbuf->buffer );
+    rbuf->buffer = NULL;
+    return paNoError;
+}
+
+static int
+BlockingCallback( const void                      *inputBuffer,
+                  void                            *outputBuffer,
+		  unsigned long                    framesPerBuffer,
+		  const PaStreamCallbackTimeInfo*  timeInfo,
+		  PaStreamCallbackFlags            statusFlags,
+		  void                             *userData )
+{
+    struct PaJackStream *stream = (PaJackStream *)userData;
+    long numBytes = stream->bytesPerFrame * framesPerBuffer;
+
+    /* This may get called with NULL inputBuffer during initial setup. */
+    if( inputBuffer != NULL )
+    {
+        RingBuffer_Write( &stream->inFIFO, inputBuffer, numBytes );
+    }
+    if( outputBuffer != NULL )
+    {
+        int numRead = RingBuffer_Read( &stream->outFIFO, outputBuffer, numBytes );
+        /* Zero out remainder of buffer if we run out of data. */
+        memset( (char *)outputBuffer + numRead, 0, numBytes - numRead );
+    }
+
+    if( !stream->data_available )
+    {
+        stream->data_available = 1;
+        sem_post( &stream->data_semaphore );
+    }
+    return paContinue;
+}
+
+static PaError
+BlockingBegin( PaJackStream *stream, int minimum_buffer_size )
+{
+    long    doRead = 0;
+    long    doWrite = 0;
+    PaError result = paNoError;
+    long    numFrames;
+
+    doRead = stream->local_input_ports != NULL;
+    doWrite = stream->local_output_ports != NULL;
+    /* <FIXME> */
+    stream->samplesPerFrame = 2;
+    stream->bytesPerFrame = sizeof(float) * stream->samplesPerFrame;
+    /* </FIXME> */
+    numFrames = 32;
+    while (numFrames < minimum_buffer_size)
+        numFrames *= 2;
+
+    if( doRead )
+    {
+        ENSURE_PA( BlockingInitFIFO( &stream->inFIFO, numFrames, stream->bytesPerFrame ) );
+    }
+    if( doWrite )
+    {
+        long numBytes;
+
+        ENSURE_PA( BlockingInitFIFO( &stream->outFIFO, numFrames, stream->bytesPerFrame ) );
+
+        /* Make Write FIFO appear full initially. */
+        numBytes = RingBuffer_GetWriteAvailable( &stream->outFIFO );
+        RingBuffer_AdvanceWriteIndex( &stream->outFIFO, numBytes );
+    }
+
+    stream->data_available = 0;
+    sem_init( &stream->data_semaphore, 0, 0 );
+
+error:
+    return result;
+}
+
+static void
+BlockingEnd( PaJackStream *stream )
+{
+    BlockingTermFIFO( &stream->inFIFO );
+    BlockingTermFIFO( &stream->outFIFO );
+
+    sem_destroy( &stream->data_semaphore );
+}
+
+static PaError BlockingReadStream( PaStream* s, void *data, unsigned long numFrames )
+{
+    PaError result = paNoError;
+    PaJackStream *stream = (PaJackStream *)s;
+
+    long bytesRead;
+    char *p = (char *) data;
+    long numBytes = stream->bytesPerFrame * numFrames;
+    while( numBytes > 0 )
+    {
+        bytesRead = RingBuffer_Read( &stream->inFIFO, p, numBytes );
+        numBytes -= bytesRead;
+        p += bytesRead;
+        if( numBytes > 0 )
+        {
+            /* see write for an explanation */
+            if( stream->data_available )
+                stream->data_available = 0;
+            else
+                sem_wait( &stream->data_semaphore );
+        }
+    }
+
+    return result;
+}
+
+static PaError BlockingWriteStream( PaStream* s, const void *data, unsigned long numFrames )
+{
+    PaError result = paNoError;
+    PaJackStream *stream = (PaJackStream *)s;
+    long bytesWritten;
+    char *p = (char *) data;
+    long numBytes = stream->bytesPerFrame * numFrames;
+    while( numBytes > 0 )
+    {
+        bytesWritten = RingBuffer_Write( &stream->outFIFO, p, numBytes );
+        numBytes -= bytesWritten;
+        p += bytesWritten;
+        if( numBytes > 0 ) 
+        {
+            /* we use the following algorithm: 
+             *   (1) write data
+             *   (2) if some data didn't fit into the ringbuffer, set data_available to 0
+             *       to indicate to the audio that if space becomes available, we want to know
+             *   (3) retry to write data (because it might be that between (1) and (2)
+             *       new space in the buffer became available)
+             *   (4) if this failed, we are sure that the buffer is really empty and
+             *       we will definitely receive a notification when it becomes available
+             *       thus we can safely sleep
+             *
+             * if the algorithm bailed out in step (3) before, it leaks a count of 1
+             * on the semaphore; however, it doesn't matter, because if we block in (4),
+             * we also do it in a loop
+             */
+            if( stream->data_available )
+                stream->data_available = 0;
+            else
+                sem_wait( &stream->data_semaphore );
+        }
+    }
+
+    return result;
+}
+
+static signed long
+BlockingGetStreamReadAvailable( PaStream* s )
+{
+    PaJackStream *stream = (PaJackStream *)s;
+
+    int bytesFull = RingBuffer_GetReadAvailable( &stream->inFIFO );
+    return bytesFull / stream->bytesPerFrame;
+}
+
+static signed long
+BlockingGetStreamWriteAvailable( PaStream* s )
+{
+    PaJackStream *stream = (PaJackStream *)s;
+
+    int bytesEmpty = RingBuffer_GetWriteAvailable( &stream->outFIFO );
+    return bytesEmpty / stream->bytesPerFrame;
+}
+
+static PaError
+BlockingWaitEmpty( PaStream *s )
+{
+    PaJackStream *stream = (PaJackStream *)s;
+
+    while( RingBuffer_GetReadAvailable( &stream->outFIFO ) > 0 )
+    {
+        stream->data_available = 0;
+        sem_wait( &stream->data_semaphore );
+    }
+    return 0;
+}
+
+/* ---- jack driver ---- */
+
+/* BuildDeviceList():
+ *
+ * The process of determining a list of PortAudio "devices" from
+ * JACK's client/port system is fairly involved, so it is separated
+ * into its own routine.
+ */
+
+static PaError BuildDeviceList( PaJackHostApiRepresentation *jackApi )
+{
+    /* Utility macros for the repetitive process of allocating memory */
+
+    /* ... MALLOC: allocate memory as part of the device list
+     * allocation group */
+#define MALLOC(size) \
+     (PaUtil_GroupAllocateMemory( jackApi->deviceInfoMemory, (size) ))
+
+    /* JACK has no concept of a device.  To JACK, there are clients
+     * which have an arbitrary number of ports.  To make this
+     * intelligible to PortAudio clients, we will group each JACK client
+     * into a device, and make each port of that client a channel */
+
+    PaError result = paNoError;
+    PaUtilHostApiRepresentation *commonApi = &jackApi->commonHostApiRep;
+
+    const char **jack_ports = NULL;
+    char **client_names = NULL;
+    char *regex_pattern = alloca( jack_client_name_size() + 3 );
+    int port_index, client_index, i;
+    double globalSampleRate;
+    regex_t port_regex;
+    unsigned long numClients = 0, numPorts = 0;
+    char *tmp_client_name = alloca( jack_client_name_size() );
+
+    commonApi->info.defaultInputDevice = paNoDevice;
+    commonApi->info.defaultOutputDevice = paNoDevice;
+    commonApi->info.deviceCount = 0;
+
+    /* Parse the list of ports, using a regex to grab the client names */
+    ASSERT_CALL( regcomp( &port_regex, "^[^:]*", REG_EXTENDED ), 0 );
+
+    /* since we are rebuilding the list of devices, free all memory
+     * associated with the previous list */
+    PaUtil_FreeAllAllocations( jackApi->deviceInfoMemory );
+
+    /* We can only retrieve the list of clients indirectly, by first
+     * asking for a list of all ports, then parsing the port names
+     * according to the client_name:port_name convention (which is
+     * enforced by jackd)
+     * A: If jack_get_ports returns NULL, there's nothing for us to do */
+    UNLESS( (jack_ports = jack_get_ports( jackApi->jack_client, "", "", 0 )) && jack_ports[0], paNoError );
+    /* Find number of ports */
+    while( jack_ports[numPorts] )
+        ++numPorts;
+    /* At least there will be one port per client :) */
+    UNLESS( client_names = alloca( numPorts * sizeof (char *) ), paInsufficientMemory );
+
+    /* Build a list of clients from the list of ports */
+    for( numClients = 0, port_index = 0; jack_ports[port_index] != NULL; port_index++ )
+    {
+        int client_seen = FALSE;
+        regmatch_t match_info;
+        const char *port = jack_ports[port_index];
+
+        /* extract the client name from the port name, using a regex
+         * that parses the clientname:portname syntax */
+        UNLESS( !regexec( &port_regex, port, 1, &match_info, 0 ), paInternalError );
+        assert(match_info.rm_eo - match_info.rm_so < jack_client_name_size());
+        memcpy( tmp_client_name, port + match_info.rm_so,
+                match_info.rm_eo - match_info.rm_so );
+        tmp_client_name[match_info.rm_eo - match_info.rm_so] = '\0';
+
+        /* do we know about this port's client yet? */
+        for( i = 0; i < numClients; i++ )
+        {
+            if( strcmp( tmp_client_name, client_names[i] ) == 0 )
+                client_seen = TRUE;
+        }
+
+        if (client_seen)
+            continue;   /* A: Nothing to see here, move along */
+
+        UNLESS( client_names[numClients] = (char*)MALLOC(strlen(tmp_client_name) + 1), paInsufficientMemory );
+
+        /* The alsa_pcm client should go in spot 0.  If this
+         * is the alsa_pcm client AND we are NOT about to put
+         * it in spot 0 put it in spot 0 and move whatever
+         * was already in spot 0 to the end. */
+        if( strcmp( "alsa_pcm", tmp_client_name ) == 0 && numClients > 0 )
+        {
+            /* alsa_pcm goes in spot 0 */
+            strcpy( client_names[ numClients ], client_names[0] );
+            strcpy( client_names[0], tmp_client_name );
+        }
+        else
+        {
+            /* put the new client at the end of the client list */
+            strcpy( client_names[ numClients ], tmp_client_name );
+        }
+        ++numClients;
+    }
+
+    /* Now we have a list of clients, which will become the list of
+     * PortAudio devices. */
+
+    /* there is one global sample rate all clients must conform to */
+
+    globalSampleRate = jack_get_sample_rate( jackApi->jack_client );
+    UNLESS( commonApi->deviceInfos = (PaDeviceInfo**)MALLOC( sizeof(PaDeviceInfo*) *
+                                                     numClients ), paInsufficientMemory );
+
+    assert( commonApi->info.deviceCount == 0 );
+
+    /* Create a PaDeviceInfo structure for every client */
+    for( client_index = 0; client_index < numClients; client_index++ )
+    {
+        PaDeviceInfo *curDevInfo;
+        const char **clientPorts = NULL;
+
+        UNLESS( curDevInfo = (PaDeviceInfo*)MALLOC( sizeof(PaDeviceInfo) ), paInsufficientMemory );
+        UNLESS( curDevInfo->name = (char*)MALLOC( strlen(client_names[client_index]) + 1 ), paInsufficientMemory );
+        strcpy( (char *)curDevInfo->name, client_names[client_index] );
+
+        curDevInfo->structVersion = 2;
+        curDevInfo->hostApi = jackApi->hostApiIndex;
+
+        /* JACK is very inflexible: there is one sample rate the whole
+         * system must run at, and all clients must speak IEEE float. */
+        curDevInfo->defaultSampleRate = globalSampleRate;
+
+        /* To determine how many input and output channels are available,
+         * we re-query jackd with more specific parameters. */
+
+        sprintf( regex_pattern, "%s:.*", client_names[client_index] );
+
+        /* ... what are your output ports (that we could input from)? */
+        clientPorts = jack_get_ports( jackApi->jack_client, regex_pattern,
+                                     NULL, JackPortIsOutput);
+        curDevInfo->maxInputChannels = 0;
+        curDevInfo->defaultLowInputLatency = 0.;
+        curDevInfo->defaultHighInputLatency = 0.;
+        if( clientPorts )
+        {
+            jack_port_t *p = jack_port_by_name( jackApi->jack_client, clientPorts[0] );
+            curDevInfo->defaultLowInputLatency = curDevInfo->defaultHighInputLatency =
+                jack_port_get_latency( p ) / globalSampleRate;
+
+            for( i = 0; clientPorts[i] != NULL; i++)
+            {
+                /* The number of ports returned is the number of output channels.
+                 * We don't care what they are, we just care how many */
+                curDevInfo->maxInputChannels++;
+            }
+            free(clientPorts);
+        }
+
+        /* ... what are your input ports (that we could output to)? */
+        clientPorts = jack_get_ports( jackApi->jack_client, regex_pattern,
+                                     NULL, JackPortIsInput);
+        curDevInfo->maxOutputChannels = 0;
+        curDevInfo->defaultLowOutputLatency = 0.;
+        curDevInfo->defaultHighOutputLatency = 0.;
+        if( clientPorts )
+        {
+            jack_port_t *p = jack_port_by_name( jackApi->jack_client, clientPorts[0] );
+            curDevInfo->defaultLowOutputLatency = curDevInfo->defaultHighOutputLatency =
+                jack_port_get_latency( p ) / globalSampleRate;
+
+            for( i = 0; clientPorts[i] != NULL; i++)
+            {
+                /* The number of ports returned is the number of input channels.
+                 * We don't care what they are, we just care how many */
+                curDevInfo->maxOutputChannels++;
+            }
+            free(clientPorts);
+        }
+
+        /* Add this client to the list of devices */
+        commonApi->deviceInfos[client_index] = curDevInfo;
+        ++commonApi->info.deviceCount;
+        if( commonApi->info.defaultInputDevice == paNoDevice && curDevInfo->maxInputChannels > 0 )
+            commonApi->info.defaultInputDevice = client_index;
+        if( commonApi->info.defaultOutputDevice == paNoDevice && curDevInfo->maxOutputChannels > 0 )
+            commonApi->info.defaultOutputDevice = client_index;
+    }
+
+error:
+    regfree( &port_regex );
+    free( jack_ports );
+    return result;
+}
+#undef MALLOC
+
+static void UpdateSampleRate( PaJackStream *stream, double sampleRate )
+{
+    /* XXX: Maybe not the cleanest way of going about this? */
+    stream->cpuLoadMeasurer.samplingPeriod = stream->bufferProcessor.samplePeriod = 1. / sampleRate;
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+}
+
+static void JackErrorCallback( const char *msg )
+{
+    if( pthread_self() == mainThread_ )
+    {
+        assert( msg );
+        free( jackErr_ );
+        jackErr_ = malloc( strlen( msg ) );
+        sprintf( jackErr_, msg );
+    }
+}
+
+static void JackOnShutdown( void *arg )
+{
+    PaJackHostApiRepresentation *jackApi = (PaJackHostApiRepresentation *)arg;
+    PaJackStream *stream = jackApi->processQueue;
+
+    PA_DEBUG(( "%s: JACK server is shutting down\n", __FUNCTION__ ));
+    for( ; stream; stream = stream->next )
+    {
+        stream->is_active = 0;
+    }
+
+    /* Make sure that the main thread doesn't get stuck waiting on the condition */
+    ASSERT_CALL( pthread_mutex_lock( &jackApi->mtx ), 0 );
+    jackApi->jackIsDown = 1;
+    ASSERT_CALL( pthread_cond_signal( &jackApi->cond ), 0 );
+    ASSERT_CALL( pthread_mutex_unlock( &jackApi->mtx ), 0 );
+
+}
+
+static int JackSrCb( jack_nframes_t nframes, void *arg )
+{
+    PaJackHostApiRepresentation *jackApi = (PaJackHostApiRepresentation *)arg;
+    double sampleRate = (double)nframes;
+    PaJackStream *stream = jackApi->processQueue;
+
+    /* Update all streams in process queue */
+    PA_DEBUG(( "%s: Acting on change in JACK samplerate: %f\n", __FUNCTION__, sampleRate ));
+    for( ; stream; stream = stream->next )
+    {
+        if( stream->streamRepresentation.streamInfo.sampleRate != sampleRate )
+        {
+            PA_DEBUG(( "%s: Updating samplerate\n", __FUNCTION__ ));
+            UpdateSampleRate( stream, sampleRate );
+        }
+    }
+
+    return 0;
+}
+
+static int JackXRunCb(void *arg) {
+    PaJackHostApiRepresentation *hostApi = (PaJackHostApiRepresentation *)arg;
+    assert( hostApi );
+    hostApi->xrun = TRUE;
+    PA_DEBUG(( "%s: JACK signalled xrun\n", __FUNCTION__ ));
+    return 0;
+}
+
+PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi,
+                           PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    PaJackHostApiRepresentation *jackHostApi;
+    int activated = 0;
+    char *clientName;
+    int written;
+    *hostApi = NULL;    /* Initialize to NULL */
+
+    UNLESS( jackHostApi = (PaJackHostApiRepresentation*)
+        PaUtil_AllocateMemory( sizeof(PaJackHostApiRepresentation) ), paInsufficientMemory );
+    jackHostApi->deviceInfoMemory = NULL;
+
+    mainThread_ = pthread_self();
+    ASSERT_CALL( pthread_mutex_init( &jackHostApi->mtx, NULL ), 0 );
+    ASSERT_CALL( pthread_cond_init( &jackHostApi->cond, NULL ), 0 );
+
+    /* Try to become a client of the JACK server.  If we cannot do
+     * this, then this API cannot be used. */
+
+    clientName = alloca( jack_client_name_size() );
+    written = snprintf( clientName, jack_client_name_size(), "PortAudio-%d", getpid() );
+    assert( written < jack_client_name_size() );
+    jackHostApi->jack_client = jack_client_new( clientName );
+    if( jackHostApi->jack_client == NULL )
+    {
+       /* the V19 development docs say that if an implementation
+        * detects that it cannot be used, it should return a NULL
+        * interface and paNoError */
+       result = paNoError;
+       goto error;
+    }
+
+    UNLESS( jackHostApi->deviceInfoMemory = PaUtil_CreateAllocationGroup(), paInsufficientMemory );
+    jackHostApi->hostApiIndex = hostApiIndex;
+
+    *hostApi = &jackHostApi->commonHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paJACK;
+    (*hostApi)->info.name = "JACK Audio Connection Kit";
+
+    /* Build a device list by querying the JACK server */
+
+    ENSURE_PA( BuildDeviceList( jackHostApi ) );
+
+    /* Register functions */
+
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PaUtil_InitializeStreamInterface( &jackHostApi->callbackStreamInterface,
+                                      CloseStream, StartStream,
+                                      StopStream, AbortStream,
+                                      IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable,
+                                      PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &jackHostApi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      BlockingReadStream, BlockingWriteStream,
+                                      BlockingGetStreamReadAvailable, BlockingGetStreamWriteAvailable );
+
+    jackHostApi->inputBase = jackHostApi->outputBase = 0;
+    jackHostApi->xrun = 0;
+    jackHostApi->toAdd = jackHostApi->toRemove = NULL;
+    jackHostApi->processQueue = NULL;
+    jackHostApi->jackIsDown = 0;
+
+    jack_on_shutdown( jackHostApi->jack_client, JackOnShutdown, jackHostApi );
+    jack_set_error_function( JackErrorCallback );
+    jackHostApi->jack_buffer_size = jack_get_buffer_size ( jackHostApi->jack_client );
+    UNLESS( !jack_set_sample_rate_callback( jackHostApi->jack_client, JackSrCb, jackHostApi ), paUnanticipatedHostError );
+    UNLESS( !jack_set_xrun_callback( jackHostApi->jack_client, JackXRunCb, jackHostApi ), paUnanticipatedHostError );
+    UNLESS( !jack_set_process_callback( jackHostApi->jack_client, JackCallback, jackHostApi ), paUnanticipatedHostError );
+    UNLESS( !jack_activate( jackHostApi->jack_client ), paUnanticipatedHostError );
+    activated = 1;
+
+    return result;
+
+error:
+    if( activated )
+        ASSERT_CALL( jack_deactivate( jackHostApi->jack_client ), 0 );
+
+    if( jackHostApi )
+    {
+        if( jackHostApi->jack_client )
+            ASSERT_CALL( jack_client_close( jackHostApi->jack_client ), 0 );
+
+        if( jackHostApi->deviceInfoMemory )
+        {
+            PaUtil_FreeAllAllocations( jackHostApi->deviceInfoMemory );
+            PaUtil_DestroyAllocationGroup( jackHostApi->deviceInfoMemory );
+        }
+
+        PaUtil_FreeMemory( jackHostApi );
+    }
+    return result;
+}
+
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaJackHostApiRepresentation *jackHostApi = (PaJackHostApiRepresentation*)hostApi;
+
+    /* note: this automatically disconnects all ports, since a deactivated
+     * client is not allowed to have any ports connected */
+    ASSERT_CALL( jack_deactivate( jackHostApi->jack_client ), 0 );
+
+    ASSERT_CALL( pthread_mutex_destroy( &jackHostApi->mtx ), 0 );
+    ASSERT_CALL( pthread_cond_destroy( &jackHostApi->cond ), 0 );
+
+    ASSERT_CALL( jack_client_close( jackHostApi->jack_client ), 0 );
+
+    if( jackHostApi->deviceInfoMemory )
+    {
+        PaUtil_FreeAllAllocations( jackHostApi->deviceInfoMemory );
+        PaUtil_DestroyAllocationGroup( jackHostApi->deviceInfoMemory );
+    }
+
+    PaUtil_FreeMemory( jackHostApi );
+
+    free( jackErr_ );
+}
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    int inputChannelCount = 0, outputChannelCount = 0;
+    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;
+    }
+
+    /*
+        The following check is not necessary for JACK.
+        
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported
+
+
+        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
+    */
+
+    /* check that the device supports sampleRate */
+    
+#define ABS(x) ( (x) > 0 ? (x) : -(x) )
+    if( ABS(sampleRate - jack_get_sample_rate(((PaJackHostApiRepresentation *) hostApi)->jack_client )) > 1 )
+       return paInvalidSampleRate;
+#undef ABS
+
+    return paFormatIsSupported;
+}
+
+/* Basic stream initialization */
+static PaError InitializeStream( PaJackStream *stream, PaJackHostApiRepresentation *hostApi, int numInputChannels,
+        int numOutputChannels )
+{
+    PaError result = paNoError;
+    assert( stream );
+
+    memset( stream, 0, sizeof (PaJackStream) );
+    UNLESS( stream->stream_memory = PaUtil_CreateAllocationGroup(), paInsufficientMemory );
+    stream->jack_client = hostApi->jack_client;
+    stream->hostApi = hostApi;
+
+    if( numInputChannels > 0 )
+    {
+        UNLESS( stream->local_input_ports =
+                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numInputChannels ),
+                paInsufficientMemory );
+        memset( stream->local_input_ports, 0, sizeof(jack_port_t*) * numInputChannels );
+        UNLESS( stream->remote_output_ports =
+                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numInputChannels ),
+                paInsufficientMemory );
+        memset( stream->remote_output_ports, 0, sizeof(jack_port_t*) * numInputChannels );
+    }
+    if( numOutputChannels > 0 )
+    {
+        UNLESS( stream->local_output_ports =
+                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numOutputChannels ),
+                paInsufficientMemory );
+        memset( stream->local_output_ports, 0, sizeof(jack_port_t*) * numOutputChannels );
+        UNLESS( stream->remote_input_ports =
+                (jack_port_t**) PaUtil_GroupAllocateMemory( stream->stream_memory, sizeof(jack_port_t*) * numOutputChannels ),
+                paInsufficientMemory );
+        memset( stream->remote_input_ports, 0, sizeof(jack_port_t*) * numOutputChannels );
+    }
+
+    stream->num_incoming_connections = numInputChannels;
+    stream->num_outgoing_connections = numOutputChannels;
+
+error:
+    return result;
+}
+
+/*!
+ * Free resources associated with stream, and eventually stream itself.
+ *
+ * Frees allocated memory, and closes opened pcms.
+ */
+static void CleanUpStream( PaJackStream *stream, int terminateStreamRepresentation, int terminateBufferProcessor )
+{
+    int i;
+    assert( stream );
+
+    if( stream->isBlockingStream )
+        BlockingEnd( stream );
+
+    for( i = 0; i < stream->num_incoming_connections; ++i )
+    {
+        if( stream->local_input_ports[i] )
+            ASSERT_CALL( jack_port_unregister( stream->jack_client, stream->local_input_ports[i] ), 0 );
+    }
+    for( i = 0; i < stream->num_outgoing_connections; ++i )
+    {
+        if( stream->local_output_ports[i] )
+            ASSERT_CALL( jack_port_unregister( stream->jack_client, stream->local_output_ports[i] ), 0 );
+    }
+
+    if( terminateStreamRepresentation )
+        PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+    if( terminateBufferProcessor )
+        PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+
+    if( stream->stream_memory )
+    {
+        PaUtil_FreeAllAllocations( stream->stream_memory );
+        PaUtil_DestroyAllocationGroup( stream->stream_memory );
+    }
+    PaUtil_FreeMemory( stream );
+}
+
+static PaError WaitCondition( PaJackHostApiRepresentation *hostApi )
+{
+    PaError result = paNoError;
+    int err = 0;
+    PaTime pt = PaUtil_GetTime();
+    struct timespec ts;
+
+    ts.tv_sec = (time_t) floor( pt + 1 );
+    ts.tv_nsec = (long) ((pt - floor( pt )) * 1000000000);
+    /* XXX: Best enclose in loop, in case of spurious wakeups? */
+    err = pthread_cond_timedwait( &hostApi->cond, &hostApi->mtx, &ts );
+
+    /* Make sure we didn't time out */
+    UNLESS( err != ETIMEDOUT, paTimedOut );
+    UNLESS( !err, paInternalError );
+
+error:
+    return result;
+}
+
+static PaError AddStream( PaJackStream *stream )
+{
+    PaError result = paNoError;
+    PaJackHostApiRepresentation *hostApi = stream->hostApi;
+    /* Add to queue of streams that should be processed */
+    ASSERT_CALL( pthread_mutex_lock( &hostApi->mtx ), 0 );
+    if( !hostApi->jackIsDown )
+    {
+        hostApi->toAdd = stream;
+        /* Unlock mutex and await signal from processing thread */
+        result = WaitCondition( stream->hostApi );
+    }
+    ASSERT_CALL( pthread_mutex_unlock( &hostApi->mtx ), 0 );
+    ENSURE_PA( result );
+
+    UNLESS( !hostApi->jackIsDown, paDeviceUnavailable );
+
+error:
+    return result;
+}
+
+/* Remove stream from processing queue */
+static PaError RemoveStream( PaJackStream *stream )
+{
+    PaError result = paNoError;
+    PaJackHostApiRepresentation *hostApi = stream->hostApi;
+
+    /* Add to queue over streams that should be processed */
+    ASSERT_CALL( pthread_mutex_lock( &hostApi->mtx ), 0 );
+    if( !hostApi->jackIsDown )
+    {
+        hostApi->toRemove = stream;
+        /* Unlock mutex and await signal from processing thread */
+        result = WaitCondition( stream->hostApi );
+    }
+    ASSERT_CALL( pthread_mutex_unlock( &hostApi->mtx ), 0 );
+    ENSURE_PA( result );
+
+error:
+    return result;
+}
+
+/* Add stream to processing queue */
+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;
+    PaJackHostApiRepresentation *jackHostApi = (PaJackHostApiRepresentation*)hostApi;
+    PaJackStream *stream = NULL;
+    char *port_string = alloca( jack_port_name_size() );
+    unsigned long regexSz = jack_client_name_size() + 3;
+    char *regex_pattern = alloca( regexSz );
+    const char **jack_ports = NULL;
+    /* int jack_max_buffer_size = jack_get_buffer_size( jackHostApi->jack_client ); */
+    int i;
+    int inputChannelCount, outputChannelCount;
+    const double jackSr = jack_get_sample_rate( jackHostApi->jack_client );
+    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;
+    int bpInitialized = 0, srInitialized = 0;   /* Initialized buffer processor and stream representation? */
+    unsigned long ofs;
+
+    /* validate platform specific flags */
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag; /* unexpected platform specific flag */
+    if( (streamFlags & paPrimeOutputBuffersUsingStreamCallback) != 0 )
+    {
+        streamFlags &= ~paPrimeOutputBuffersUsingStreamCallback;
+        /*return paInvalidFlag;*/   /* This implementation does not support buffer priming */
+    }
+
+    if( framesPerBuffer != paFramesPerBufferUnspecified )
+    {
+        /* Jack operates with power of two buffers, and we don't support non-integer buffer adaption (yet) */
+        /*UNLESS( !(framesPerBuffer & (framesPerBuffer - 1)), paBufferTooBig );*/  /* TODO: Add descriptive error code? */
+    }
+
+    /* Preliminary checks */
+
+    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;
+    }
+
+    /* ... check that the sample rate exactly matches the ONE acceptable rate
+     * A: This rate isn't necessarily constant though? */
+
+#define ABS(x) ( (x) > 0 ? (x) : -(x) )
+    if( ABS(sampleRate - jackSr) > 1 )
+       return paInvalidSampleRate;
+#undef ABS
+
+    UNLESS( stream = (PaJackStream*)PaUtil_AllocateMemory( sizeof(PaJackStream) ), paInsufficientMemory );
+    ENSURE_PA( InitializeStream( stream, jackHostApi, inputChannelCount, outputChannelCount ) );
+
+    /* the blocking emulation, if necessary */
+    stream->isBlockingStream = !streamCallback;
+    if( stream->isBlockingStream )
+    {
+        float latency = 0.001; /* 1ms is the absolute minimum we support */
+        int   minimum_buffer_frames = 0;
+
+        if( inputParameters && inputParameters->suggestedLatency > latency )
+            latency = inputParameters->suggestedLatency;
+        else if( outputParameters && outputParameters->suggestedLatency > latency )
+            latency = outputParameters->suggestedLatency;
+
+        /* the latency the user asked for indicates the minimum buffer size in frames */
+        minimum_buffer_frames = (int) (latency * jack_get_sample_rate( jackHostApi->jack_client ));
+
+        /* we also need to be able to store at least three full jack buffers to avoid dropouts */
+        if( jackHostApi->jack_buffer_size * 3 > minimum_buffer_frames )
+            minimum_buffer_frames = jackHostApi->jack_buffer_size * 3;
+
+        /* setup blocking API data structures (FIXME: can fail) */
+	BlockingBegin( stream, minimum_buffer_frames );
+
+        /* install our own callback for the blocking API */
+        streamCallback = BlockingCallback;
+        userData = stream;
+
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &jackHostApi->blockingStreamInterface, streamCallback, userData );
+    }
+    else
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &jackHostApi->callbackStreamInterface, streamCallback, userData );
+    }
+    srInitialized = 1;
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, jackSr );
+
+    /* create the JACK ports.  We cannot connect them until audio
+     * processing begins */
+
+    /* Register a unique set of ports for this stream
+     * TODO: Robust allocation of new port names */
+
+    ofs = jackHostApi->inputBase;
+    for( i = 0; i < inputChannelCount; i++ )
+    {
+        snprintf( port_string, jack_port_name_size(), "in_%lu", ofs + i );
+        UNLESS( stream->local_input_ports[i] = jack_port_register(
+              jackHostApi->jack_client, port_string,
+              JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0 ), paInsufficientMemory );
+    }
+    jackHostApi->inputBase += inputChannelCount;
+
+    ofs = jackHostApi->outputBase;
+    for( i = 0; i < outputChannelCount; i++ )
+    {
+        snprintf( port_string, jack_port_name_size(), "out_%lu", ofs + i );
+        UNLESS( stream->local_output_ports[i] = jack_port_register(
+             jackHostApi->jack_client, port_string,
+             JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0 ), paInsufficientMemory );
+    }
+    jackHostApi->outputBase += outputChannelCount;
+
+    /* look up the jack_port_t's for the remote ports.  We could do
+     * this at stream start time, but doing it here ensures the
+     * name lookup only happens once. */
+
+    if( inputChannelCount > 0 )
+    {
+        int err = 0;
+        
+        /* ... remote output ports (that we input from) */
+        snprintf( regex_pattern, regexSz, "%s:.*", hostApi->deviceInfos[ inputParameters->device ]->name );
+        UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern,
+                                     NULL, JackPortIsOutput ), paUnanticipatedHostError );
+        for( i = 0; i < inputChannelCount && jack_ports[i]; i++ )
+        {
+            if( (stream->remote_output_ports[i] = jack_port_by_name(
+                 jackHostApi->jack_client, jack_ports[i] )) == NULL ) 
+            {
+                err = 1;
+                break;
+            }
+        }
+        free( jack_ports );
+        UNLESS( !err, paInsufficientMemory );
+
+        /* Fewer ports than expected? */
+        UNLESS( i == inputChannelCount, paInternalError );
+    }
+
+    if( outputChannelCount > 0 )
+    {
+        int err = 0;
+
+        /* ... remote input ports (that we output to) */
+        snprintf( regex_pattern, regexSz, "%s:.*", hostApi->deviceInfos[ outputParameters->device ]->name );
+        UNLESS( jack_ports = jack_get_ports( jackHostApi->jack_client, regex_pattern,
+                                     NULL, JackPortIsInput ), paUnanticipatedHostError );
+        for( i = 0; i < outputChannelCount && jack_ports[i]; i++ )
+        {
+            if( (stream->remote_input_ports[i] = jack_port_by_name(
+                 jackHostApi->jack_client, jack_ports[i] )) == 0 )
+            {
+                err = 1;
+                break;
+            }
+        }
+        free( jack_ports );
+        UNLESS( !err , paInsufficientMemory );
+
+        /* Fewer ports than expected? */
+        UNLESS( i == outputChannelCount, paInternalError );
+    }
+
+    ENSURE_PA( PaUtil_InitializeBufferProcessor(
+                  &stream->bufferProcessor,
+                  inputChannelCount,
+                  inputSampleFormat,
+                  paFloat32,            /* hostInputSampleFormat */
+                  outputChannelCount,
+                  outputSampleFormat,
+                  paFloat32,            /* hostOutputSampleFormat */
+                  jackSr,
+                  streamFlags,
+                  framesPerBuffer,
+                  0,                            /* Ignored */
+                  paUtilUnknownHostBufferSize,  /* Buffer size may vary on JACK's discretion */
+                  streamCallback,
+                  userData ) );
+    bpInitialized = 1;
+
+    if( stream->num_incoming_connections > 0 )
+        stream->streamRepresentation.streamInfo.inputLatency = (jack_port_get_latency( stream->remote_output_ports[0] )
+                - jack_get_buffer_size( jackHostApi->jack_client )  /* One buffer is not counted as latency */
+            + PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor )) / sampleRate;
+    if( stream->num_outgoing_connections > 0 )
+        stream->streamRepresentation.streamInfo.outputLatency = (jack_port_get_latency( stream->remote_input_ports[0] )
+                - jack_get_buffer_size( jackHostApi->jack_client )  /* One buffer is not counted as latency */
+            + PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor )) / sampleRate;
+
+    stream->streamRepresentation.streamInfo.sampleRate = jackSr;
+    stream->t0 = jack_frame_time( jackHostApi->jack_client );   /* A: Time should run from Pa_OpenStream */
+
+    ENSURE_PA( AddStream( stream ) );  /* Add to queue over opened streams */
+    
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+    if( stream )
+        CleanUpStream( stream, srInitialized, bpInitialized );
+
+    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 = paNoError;
+    PaJackStream *stream = (PaJackStream*)s;
+
+    /* Remove this stream from the processing queue */
+    ENSURE_PA( RemoveStream( stream ) );
+
+error:
+    CleanUpStream( stream, 1, 1 );
+    return result;
+}
+
+static PaError RealProcess( PaJackStream *stream, jack_nframes_t frames )
+{
+    PaError result = paNoError;
+    PaStreamCallbackTimeInfo timeInfo = {0,0,0};
+    int chn;
+    int framesProcessed;
+    const double sr = jack_get_sample_rate( stream->jack_client );    /* Shouldn't change during the process callback */
+    PaStreamCallbackFlags cbFlags = 0;
+
+    /* If the user has returned !paContinue from the callback we'll want to flush the internal buffers,
+     * when these are empty we can finally mark the stream as inactive */
+    if( stream->callbackResult != paContinue &&
+            PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )
+    {
+        stream->is_active = 0;
+        if( stream->streamRepresentation.streamFinishedCallback )
+            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+        PA_DEBUG(( "%s: Callback finished\n", __FUNCTION__ ));
+
+        goto end;
+    }
+
+    timeInfo.currentTime = (jack_frame_time( stream->jack_client ) - stream->t0) / sr;
+    if( stream->num_incoming_connections > 0 )
+        timeInfo.inputBufferAdcTime = timeInfo.currentTime - jack_port_get_latency( stream->remote_output_ports[0] )
+            / sr;
+    if( stream->num_outgoing_connections > 0 )
+        timeInfo.outputBufferDacTime = timeInfo.currentTime + jack_port_get_latency( stream->remote_input_ports[0] )
+            / sr;
+
+    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+    if( stream->xrun )
+    {
+        /* XXX: Any way to tell which of these occurred? */
+        cbFlags = paOutputUnderflow | paInputOverflow;
+        stream->xrun = FALSE;
+    }
+    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo,
+            cbFlags );
+
+    if( stream->num_incoming_connections > 0 )
+        PaUtil_SetInputFrameCount( &stream->bufferProcessor, frames );
+    if( stream->num_outgoing_connections > 0 )
+        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, frames );
+
+    for( chn = 0; chn < stream->num_incoming_connections; chn++ )
+    {
+        jack_default_audio_sample_t *channel_buf = (jack_default_audio_sample_t*)
+            jack_port_get_buffer( stream->local_input_ports[chn],
+                    frames );
+
+        PaUtil_SetNonInterleavedInputChannel( &stream->bufferProcessor,
+                chn,
+                channel_buf );
+    }
+
+    for( chn = 0; chn < stream->num_outgoing_connections; chn++ )
+    {
+        jack_default_audio_sample_t *channel_buf = (jack_default_audio_sample_t*)
+            jack_port_get_buffer( stream->local_output_ports[chn],
+                    frames );
+
+        PaUtil_SetNonInterleavedOutputChannel( &stream->bufferProcessor,
+                chn,
+                channel_buf );
+    }
+
+    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor,
+            &stream->callbackResult );
+    /* We've specified a host buffer size mode where every frame should be consumed by the buffer processor */
+    assert( framesProcessed == frames );
+
+    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+
+end:
+    return result;
+}
+
+/* Alter the processing queue if necessary */
+static PaError UpdateQueue( PaJackHostApiRepresentation *hostApi )
+{
+    PaError result = paNoError;
+    int queueModified = 0;
+    const double jackSr = jack_get_sample_rate( hostApi->jack_client );
+    int err;
+
+    if( (err = pthread_mutex_trylock( &hostApi->mtx )) != 0 )
+    {
+        assert( err == EBUSY );
+        return paNoError;
+    }
+
+    if( hostApi->toAdd )
+    {
+        if( hostApi->processQueue )
+        {
+            PaJackStream *node = hostApi->processQueue;
+            /* Advance to end of queue */
+            while( node->next )
+                node = node->next;
+
+            node->next = hostApi->toAdd;
+        }
+        else
+            hostApi->processQueue = (PaJackStream *)hostApi->toAdd;
+
+        /* If necessary, update stream state */
+        if( hostApi->toAdd->streamRepresentation.streamInfo.sampleRate != jackSr )
+            UpdateSampleRate( hostApi->toAdd, jackSr );
+
+        hostApi->toAdd = NULL;
+        queueModified = 1;
+    }
+    if( hostApi->toRemove )
+    {
+        int removed = 0;
+        PaJackStream *node = hostApi->processQueue, *prev = NULL;
+        assert( hostApi->processQueue );
+
+        while( node )
+        {
+            if( node == hostApi->toRemove )
+            {
+                if( prev )
+                    prev->next = node->next;
+                else
+                    hostApi->processQueue = (PaJackStream *)node->next;
+
+                removed = 1;
+                break;
+            }
+
+            prev = node;
+            node = node->next;
+        }
+        UNLESS( removed, paInternalError );
+        hostApi->toRemove = NULL;
+        PA_DEBUG(( "%s: Removed stream from processing queue\n", __FUNCTION__ ));
+        queueModified = 1;
+    }
+
+    if( queueModified )
+    {
+        /* Signal that we've done what was asked of us */
+        ASSERT_CALL( pthread_cond_signal( &hostApi->cond ), 0 );
+    }
+
+error:
+    ASSERT_CALL( pthread_mutex_unlock( &hostApi->mtx ), 0 );
+
+    return result;
+}
+
+static int JackCallback( jack_nframes_t frames, void *userData )
+{
+    PaError result = paNoError;
+    PaJackHostApiRepresentation *hostApi = (PaJackHostApiRepresentation *)userData;
+    PaJackStream *stream = NULL;
+    int xrun = hostApi->xrun;
+    hostApi->xrun = 0;
+
+    assert( hostApi );
+
+    ENSURE_PA( UpdateQueue( hostApi ) );
+
+    /* Process each stream */
+    stream = hostApi->processQueue;
+    for( ; stream; stream = stream->next )
+    {
+        if( xrun )  /* Don't override if already set */
+            stream->xrun = 1;
+
+        /* See if this stream is to be started */
+        if( stream->doStart )
+        {
+            /* If we can't obtain a lock, we'll try next time */
+            int err = pthread_mutex_trylock( &stream->hostApi->mtx );
+            if( !err )
+            {
+                if( stream->doStart )   /* Could potentially change before obtaining the lock */
+                {
+                    stream->is_active = 1;
+                    stream->doStart = 0;
+                    PA_DEBUG(( "%s: Starting stream\n", __FUNCTION__ ));
+                    ASSERT_CALL( pthread_cond_signal( &stream->hostApi->cond ), 0 );
+                    stream->callbackResult = paContinue;
+                    stream->isSilenced = 0;
+                }
+
+                ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );
+            }
+            else
+                assert( err == EBUSY );
+        }
+        else if( stream->doStop || stream->doAbort )    /* Should we stop/abort stream? */
+        {
+            if( stream->callbackResult == paContinue )     /* Ok, make it stop */
+            {
+                PA_DEBUG(( "%s: Stopping stream\n", __FUNCTION__ ));
+                stream->callbackResult = stream->doStop ? paComplete : paAbort;
+            }
+        }
+
+        if( stream->is_active )
+            ENSURE_PA( RealProcess( stream, frames ) );
+        /* If we have just entered inactive state, silence output */
+        if( !stream->is_active && !stream->isSilenced )
+        {
+            int i;
+
+            /* Silence buffer after entering inactive state */
+            PA_DEBUG(( "Silencing the output\n" ));
+            for( i = 0; i < stream->num_outgoing_connections; ++i )
+            {
+                jack_default_audio_sample_t *buffer = jack_port_get_buffer( stream->local_output_ports[i], frames );
+                memset( buffer, 0, sizeof (jack_default_audio_sample_t) * frames );
+            }
+
+            stream->isSilenced = 1;
+        }
+
+        if( stream->doStop || stream->doAbort )
+        {
+            /* See if RealProcess has acted on the request */
+            if( !stream->is_active )   /* Ok, signal to the main thread that we've carried out the operation */
+            {
+                /* If we can't obtain a lock, we'll try next time */
+                int err = pthread_mutex_trylock( &stream->hostApi->mtx );
+                if( !err )
+                {
+                    stream->doStop = stream->doAbort = 0;
+                    ASSERT_CALL( pthread_cond_signal( &stream->hostApi->cond ), 0 );
+                    ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );
+                }
+                else
+                    assert( err == EBUSY );
+            }
+        }
+    }
+
+    return 0;
+error:
+    return -1;
+}
+
+static PaError StartStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaJackStream *stream = (PaJackStream*)s;
+    int i;
+
+    /* Ready the processor */
+    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+
+    /* connect the ports */
+
+    /* NOTE: I would rather use jack_port_connect which uses jack_port_t's
+     * instead of port names, but it is not implemented yet. */
+    if( stream->num_incoming_connections > 0 )
+    {
+        for( i = 0; i < stream->num_incoming_connections; i++ )
+            UNLESS( jack_connect( stream->jack_client,
+                    jack_port_name( stream->remote_output_ports[i] ),
+                    jack_port_name( stream->local_input_ports[i] ) ) == 0, paUnanticipatedHostError );
+    }
+
+    if( stream->num_outgoing_connections > 0 )
+    {
+        for( i = 0; i < stream->num_outgoing_connections; i++ )
+            UNLESS( jack_connect( stream->jack_client,
+                    jack_port_name( stream->local_output_ports[i] ),
+                    jack_port_name( stream->remote_input_ports[i] ) ) == 0, paUnanticipatedHostError );
+    }
+
+    stream->xrun = FALSE;
+
+    /* Enable processing */
+
+    ASSERT_CALL( pthread_mutex_lock( &stream->hostApi->mtx ), 0 );
+    stream->doStart = 1;
+
+    /* Wait for stream to be started */
+    result = WaitCondition( stream->hostApi );
+    /*
+    do
+    {
+        err = pthread_cond_timedwait( &stream->hostApi->cond, &stream->hostApi->mtx, &ts );
+    } while( !stream->is_active && !err );
+    */
+    if( result != paNoError )   /* Something went wrong, call off the stream start */
+    {
+        stream->doStart = 0;
+        stream->is_active = 0;  /* Cancel any processing */
+    }
+    ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );
+
+    ENSURE_PA( result );
+
+    stream->is_running = TRUE;
+    PA_DEBUG(( "%s: Stream started\n", __FUNCTION__ ));
+
+error:
+    return result;
+}
+
+static PaError RealStop( PaJackStream *stream, int abort )
+{
+    PaError result = paNoError;
+    int i;
+
+    if( stream->isBlockingStream )
+        BlockingWaitEmpty ( stream );
+
+    ASSERT_CALL( pthread_mutex_lock( &stream->hostApi->mtx ), 0 );
+    if( abort )
+        stream->doAbort = 1;
+    else
+        stream->doStop = 1;
+
+    /* Wait for stream to be stopped */
+    result = WaitCondition( stream->hostApi );
+    ASSERT_CALL( pthread_mutex_unlock( &stream->hostApi->mtx ), 0 );
+    ENSURE_PA( result );
+
+    UNLESS( !stream->is_active, paInternalError );
+    
+    PA_DEBUG(( "%s: Stream stopped\n", __FUNCTION__ ));
+
+error:
+    stream->is_running = FALSE;
+
+    /* Disconnect ports belonging to this stream */
+
+    if( !stream->hostApi->jackIsDown )  /* XXX: Well? */
+    {
+        if( stream->num_incoming_connections > 0 )
+        {
+            for( i = 0; i < stream->num_incoming_connections; i++ )
+                UNLESS( !jack_disconnect( stream->jack_client,
+                            jack_port_name( stream->remote_output_ports[i] ),
+                            jack_port_name( stream->local_input_ports[i] ) ), paUnanticipatedHostError );
+        }
+        if( stream->num_outgoing_connections > 0 )
+        {
+            for( i = 0; i < stream->num_outgoing_connections; i++ )
+                UNLESS( !jack_disconnect( stream->jack_client,
+                            jack_port_name( stream->local_output_ports[i] ),
+                            jack_port_name( stream->remote_input_ports[i] ) ), paUnanticipatedHostError );
+        }
+    }
+
+    return result;
+}
+
+static PaError StopStream( PaStream *s )
+{
+    assert(s);
+    return RealStop( (PaJackStream *)s, 0 );
+}
+
+static PaError AbortStream( PaStream *s )
+{
+    assert(s);
+    return RealStop( (PaJackStream *)s, 1 );
+}
+
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaJackStream *stream = (PaJackStream*)s;
+    return !stream->is_running;
+}
+
+
+static PaError IsStreamActive( PaStream *s )
+{
+    PaJackStream *stream = (PaJackStream*)s;
+    return stream->is_active;
+}
+
+
+static PaTime GetStreamTime( PaStream *s )
+{
+    PaJackStream *stream = (PaJackStream*)s;
+
+    /* A: Is this relevant?? --> TODO: what if we're recording-only? */
+    return (jack_frame_time( stream->jack_client ) - stream->t0) / (PaTime)jack_get_sample_rate( stream->jack_client );
+}
+
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaJackStream *stream = (PaJackStream*)s;
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
diff --git a/libs/portaudio/pa_linux_alsa/pa_linux_alsa.c b/libs/portaudio/pa_linux_alsa/pa_linux_alsa.c
new file mode 100644
index 0000000000000000000000000000000000000000..283c3e9fe328af35817eb2dbce67e092820e157e
--- /dev/null
+++ b/libs/portaudio/pa_linux_alsa/pa_linux_alsa.c
@@ -0,0 +1,3379 @@
+/*
+ * $Id$
+ * 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/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 ENSURE_SYSTEM_(expr, success) \
+    do { \
+        if( UNLIKELY( (aErr_ = (expr)) != success ) ) \
+        { \
+            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \
+            if( pthread_self() != callbackThread_ ) \
+            { \
+                PaUtil_SetLastHostErrorInfo( paALSA, aErr_, strerror( aErr_ ) ); \
+            } \
+            PaUtil_DebugPrint( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" ); \
+            result = paUnanticipatedHostError; \
+            goto error; \
+        } \
+    } while( 0 );
+
+#define ASSERT_CALL_(expr, success) \
+    aErr_ = (expr); \
+    assert( success == aErr_ );
+
+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 );
+        ENSURE_SYSTEM_( 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? */
+        PA_DEBUG(( "Canceled callback thread\n" ));
+    }
+    ENSURE_SYSTEM_( pthread_join( th->callbackThread, &pret ), 0 );
+
+    if( pret && pret != PTHREAD_CANCELED )
+    {
+        if( exitResult )
+            *exitResult = *(PaError *) pret;
+        free( pret );
+    }
+
+error:
+    return result;
+}
+
+/** Lock a pthread_mutex_t.
+ *
+ * @concern ThreadCancellation We're disabling thread cancellation while the thread is holding a lock, so mutexes are 
+ * properly unlocked at termination time.
+ */
+static PaError LockMutex( pthread_mutex_t *mtx )
+{
+    PaError result = paNoError;
+    int oldState;
+    
+    ENSURE_SYSTEM_( pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, &oldState ), 0 );
+    ENSURE_SYSTEM_( pthread_mutex_lock( mtx ), 0 );
+
+error:
+    return result;
+}
+
+/** Unlock a pthread_mutex_t.
+ *
+ * @concern ThreadCancellation Thread cancellation is enabled again after the mutex is properly unlocked.
+ */
+static PaError UnlockMutex( pthread_mutex_t *mtx )
+{
+    PaError result = paNoError;
+    int oldState;
+
+    ENSURE_SYSTEM_( pthread_mutex_unlock( mtx ), 0 );
+    ENSURE_SYSTEM_( pthread_setcancelstate( PTHREAD_CANCEL_ENABLE, &oldState ), 0 );
+
+error:
+    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;
+                ENSURE_SYSTEM_( 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 */
+    if( NULL == snd_config )
+    {
+        /* snd_config_update is called implicitly by some functions, if this hasn't happened snd_config will be NULL (bleh) */
+        ENSURE_( snd_config_update(), paUnanticipatedHostError );
+        PA_DEBUG(( "Updating snd_config\n" ));
+    }
+    assert( snd_config );
+    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:
+    /* No particular action */
+    goto end;
+}
+
+/* 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 );
+        PA_UNLESS( streamInfo->deviceString != NULL, paInvalidDevice );
+
+        /* Skip further checking */
+        return paNoError;
+    }
+
+    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;
+
+    PA_DEBUG(( "%s: Opening device %s\n", __FUNCTION__, deviceName ));
+    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 );
+
+            /* PaAlsaStream_Configure 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;    /* 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 )
+    {
+        PA_DEBUG(( "\nStream in error, terminating\n\n" ));
+        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;
+
+    LockMutex( &stream->stateMtx );
+    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_( UnlockMutex( &stream->stateMtx ), paNoError );
+
+    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) */
+        PA_ENSURE( LockMutex( &stream->startMtx ) );
+
+        /* 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 );
+        }
+        PA_ENSURE( UnlockMutex( &stream->startMtx ) );
+
+        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;
+
+    PA_ENSURE( LockMutex( &stream->stateMtx ) );
+    PA_ENSURE( AlsaStop( stream, 0 ) );
+    PA_ENSURE( AlsaStart( stream, 0 ) );
+
+    PA_DEBUG(( "%s: Restarted audio\n", __FUNCTION__ ));
+
+error:
+    PA_ENSURE( UnlockMutex( &stream->stateMtx ) );
+
+    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 );
+        /*PA_DEBUG(("capture: %lu, playback: %lu, combined: %lu\n", captureFrames, playbackFrames, *available));*/
+    }
+    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. Output is normally preferred over capture however, so capture frames may be
+         * discarded to avoid overrun unless paNeverDropInput is 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 )
+            {
+                /* Drop input, a period's worth */
+                assert( self->capture.ready );
+                PaAlsaStreamComponent_EndProcessing( &self->capture, PA_MIN( self->capture.framesPerBuffer,
+                            *framesAvail ), &xrun );
+                *framesAvail = 0;
+                self->capture.ready = 0;
+            }
+        }
+        else if( self->capture.pcm )
+            assert( self->capture.ready );
+        else
+            assert( self->playback.ready );
+    }
+
+end:
+error:
+    if( xrun )
+    {
+        /* Recover from the xrun state */
+        PA_ENSURE( PaAlsaStream_HandleXrun( self ) );
+        *framesAvail = 0;
+    }
+    else
+    {
+        PA_UNLESS( self->capture.ready || self->playback.ready, paInternalError );
+    }
+    *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;
+
+    if( *xrunOccurred )
+    {
+        *numFrames = 0;
+        return result;
+    }
+    /* If we got here at least one of the pcm's should be marked ready */
+    PA_UNLESS( self->capture.ready || self->playback.ready, paInternalError );
+
+    /* 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 ); */
+    if( commonFrames > *numFrames )
+    {
+        /* Hmmm ... how come there are more frames available than we requested!? Blah. */
+        PA_DEBUG(( "%s: Common available frames are reported to be more than number requested: %lu, %lu, callbackMode: %d\n", __FUNCTION__,
+                    commonFrames, *numFrames, self->callbackMode ));
+        if( self->capture.pcm )
+        {
+            PA_DEBUG(( "%s: captureFrames: %lu, capture.ready: %d\n", __FUNCTION__, captureFrames, self->capture.ready ));
+        }
+        if( self->playback.pcm )
+        {
+            PA_DEBUG(( "%s: playbackFrames: %lu, playback.ready: %d\n", __FUNCTION__, playbackFrames, self->playback.ready ));
+        }
+        
+        commonFrames = 0;
+        goto end;
+    }
+
+    /* 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 );
+            assert( self->capture.pcm != NULL );
+            PA_DEBUG(( "%s: Setting output buffers to NULL\n", __FUNCTION__ ));
+            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
+    {
+        PA_ENSURE( LockMutex( &stream->startMtx ) );
+        PA_ENSURE( AlsaStart( stream, 0 ) );    /* Buffer will be zeroed */
+        ENSURE_SYSTEM_( pthread_cond_signal( &stream->startCond ), 0 );
+        PA_ENSURE( UnlockMutex( &stream->startMtx ) );
+
+        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;
+        }
+
+        /* Start stream after one period of samples worth */
+
+        /* Frames residing in buffer */
+        PA_ENSURE( err = GetStreamWriteAvailable( stream ) );
+        framesAvail = err;
+        hwAvail = stream->playback.bufferSize - framesAvail;
+
+        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;
+}
diff --git a/libs/portaudio/pa_linux_alsa/pa_linux_alsa.h b/libs/portaudio/pa_linux_alsa/pa_linux_alsa.h
new file mode 100644
index 0000000000000000000000000000000000000000..b9d43c9291c20c5088b654bc83566821a0969409
--- /dev/null
+++ b/libs/portaudio/pa_linux_alsa/pa_linux_alsa.h
@@ -0,0 +1,64 @@
+#ifndef PA_LINUX_ALSA_H
+#define PA_LINUX_ALSA_H
+
+/*
+ * $Id$
+ * 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
diff --git a/libs/portaudio/pa_mac/pa_mac_hostapis.c b/libs/portaudio/pa_mac/pa_mac_hostapis.c
new file mode 100644
index 0000000000000000000000000000000000000000..f8306c302f4c5a669eb64e419ded5a3a91440c7d
--- /dev/null
+++ b/libs/portaudio/pa_mac/pa_mac_hostapis.c
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+ * 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
+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;
diff --git a/libs/portaudio/pa_mac_core/pa_mac_core.c b/libs/portaudio/pa_mac_core/pa_mac_core.c
new file mode 100644
index 0000000000000000000000000000000000000000..020b5aeb4bb734fd69dad4f6bdb94edbee200bcd
--- /dev/null
+++ b/libs/portaudio/pa_mac_core/pa_mac_core.c
@@ -0,0 +1,896 @@
+/*
+ * $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.
+ *
+ * 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 <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;
+        case kAudioHardwareUnsupportedOperationError:
+            result = paInternalError; break;
+        case kAudioDeviceUnsupportedFormatError:
+            result = paSampleFormatNotSupported; break;
+        case kAudioDevicePermissionsError:
+            result = paDeviceUnavailable; break;
+        default:
+            result = paInternalError;
+    }
+    
+    return result;
+}
+
+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;
+    }
+}
+
+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;
+    }    
+}
+
+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);
+    }
+}
+
+// This is not for input-only streams, this is for streams where the input device is different from the output device
+// TODO: This needs to store the output data in a buffer, to be written to the device the next time AudioOutputProc is called
+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);
+    clientData->callback(clientData->inputBuffer, NULL, frameCount, timeInfo, paNoFlag, clientData->userData);
+    
+    PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
+}
+
+// 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 );
+}
+
+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;
+}
\ No newline at end of file
diff --git a/libs/portaudio/pa_mac_sm/pa_mac_sm.c b/libs/portaudio/pa_mac_sm/pa_mac_sm.c
new file mode 100644
index 0000000000000000000000000000000000000000..7a8e03009d25cf823c729c795708a21f3be9090b
--- /dev/null
+++ b/libs/portaudio/pa_mac_sm/pa_mac_sm.c
@@ -0,0 +1,1656 @@
+/*
+ * $Id$
+ * Portable Audio I/O Library for Macintosh
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Special thanks to Chris Rolfe for his many helpful suggestions, bug fixes,
+ * and code contributions.
+ * Thanks also to Tue Haste Andersen, Alberto Ricci, Nico Wald,
+ * Roelf Toxopeus and Tom Erbe for testing the code and making
+ * numerous suggestions.
+ *
+ * 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
+   PLB20010415 - ScanInputDevices was setting sDefaultOutputDeviceID instead of sDefaultInputDeviceID
+   PLB20010415 - Device Scan was crashing for anything other than siBadSoundInDevice, but some Macs may return other errors!
+   PLB20010420 - Fix TIMEOUT in record mode.
+   PLB20010420 - Change CARBON_COMPATIBLE to TARGET_API_MAC_CARBON
+   PLB20010907 - Pass unused event to WaitNextEvent to prevent Mac OSX crash. Thanks Dominic Mazzoni.
+   PLB20010908 - Use requested number of input channels. Thanks Dominic Mazzoni.
+   PLB20011009 - Use NewSndCallBackUPP() for CARBON
+   PLB20020417 - I used to call Pa_GetMinNumBuffers() which doesn't take into account the
+                 variable minFramesPerHostBuffer. Now I call PaMac_GetMinNumBuffers() which will
+                 give lower latency when virtual memory is turned off.
+                 Thanks Kristoffer Jensen and Georgios Marentakis for spotting this bug.
+   PLB20020423 - Use new method to calculate CPU load similar to other ports. Based on num frames calculated.
+                 Fixed Pa_StreamTime(). Now estimates how many frames have played based on MicroSecond timer.
+                 Added PA_MAX_USAGE_ALLOWED to prevent Mac form hanging when CPU load approaches 100%.
+   PLB20020424 - Fixed return value in Pa_StreamTime
+*/
+
+/*
+COMPATIBILITY
+This Macintosh implementation is designed for use with Mac OS 7, 8 and
+9 on PowerMacs, and OS X if compiled with CARBON
+ 
+OUTPUT
+A circular array of CmpSoundHeaders is used as a queue. For low latency situations
+there will only be two small buffers used. For higher latency, more and larger buffers
+may be used.
+To play the sound we use SndDoCommand() with bufferCmd. Each buffer is followed
+by a callbackCmd which informs us when the buffer has been processsed.
+ 
+INPUT
+The SndInput Manager SPBRecord call is used for sound input. If only
+input is used, then the PA user callback is called from the Input completion proc.
+For full-duplex, or output only operation, the PA callback is called from the
+HostBuffer output completion proc. In that case, input sound is passed to the
+callback by a simple FIFO.
+ 
+TODO:
+O- Add support for native sample data formats other than int16.
+O- Review buffer sizing. Should it be based on result of siDeviceBufferInfo query?
+O- Determine default devices somehow.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <memory.h>
+#include <math.h>
+
+/* Mac specific includes */
+#include "OSUtils.h"
+#include <MacTypes.h>
+#include <Math64.h>
+#include <Errors.h>
+#include <Sound.h>
+#include <SoundInput.h>
+#include <SoundComponents.h>
+#include <Devices.h>
+#include <DateTimeUtils.h>
+#include <Timer.h>
+#include <Gestalt.h>
+
+#include "portaudio.h"
+#include "pa_host.h"
+#include "pa_trace.h"
+
+#ifndef FALSE
+ #define FALSE  (0)
+ #define TRUE   (!FALSE)
+#endif
+
+/* #define TARGET_API_MAC_CARBON (1) */
+
+/*
+ * Define maximum CPU load that will be allowed. User callback will
+ * be skipped if load exceeds this limit. This is to prevent the Mac
+ * from hanging when the CPU is hogged by the sound thread.
+ * On my PowerBook G3, the mac hung when I used 94% of CPU ( usage = 0.94 ).
+ */
+#define PA_MAX_USAGE_ALLOWED    (0.92)
+
+/* Debugging output macros. */
+#define PRINT(x) { printf x; fflush(stdout); }
+#define ERR_RPT(x) PRINT(x)
+#define DBUG(x)   /* PRINT(x) /**/
+#define DBUGX(x)  /* PRINT(x) /**/
+
+#define MAC_PHYSICAL_FRAMES_PER_BUFFER   (512)  /* Minimum number of stereo frames per SoundManager double buffer. */
+#define MAC_VIRTUAL_FRAMES_PER_BUFFER   (4096) /* Need this many when using Virtual Memory for recording. */
+#define PA_MIN_NUM_HOST_BUFFERS            (2)
+#define PA_MAX_NUM_HOST_BUFFERS           (16)   /* Do not exceed!! */
+#define PA_MAX_DEVICE_INFO                (32)
+
+/* Conversions for 16.16 fixed point code. */
+#define DoubleToUnsignedFixed(x) ((UnsignedFixed) ((x) * 65536.0))
+#define UnsignedFixedToDouble(fx) (((double)(fx)) * (1.0/(1<<16)))
+
+/************************************************************************************/
+/****************** Structures ******************************************************/
+/************************************************************************************/
+/* Use for passing buffers from input callback to output callback for processing. */
+typedef struct MultiBuffer
+{
+    char    *buffers[PA_MAX_NUM_HOST_BUFFERS];
+    int      numBuffers;
+    int      nextWrite;
+    int      nextRead;
+}
+MultiBuffer;
+
+/* Define structure to contain all Macintosh specific data. */
+typedef struct PaHostSoundControl
+{
+    UInt64                  pahsc_EntryCount;
+	double                  pahsc_InverseMicrosPerHostBuffer; /* 1/Microseconds of real-time audio per user buffer. */
+
+    /* Use char instead of Boolean for atomic operation. */
+    volatile char           pahsc_IsRecording;   /* Recording in progress. Set by foreground. Cleared by background. */
+    volatile char           pahsc_StopRecording; /* Signal sent to background. */
+    volatile char           pahsc_IfInsideCallback;
+    /* Input */
+    SPB                     pahsc_InputParams;
+    SICompletionUPP         pahsc_InputCompletionProc;
+    MultiBuffer             pahsc_InputMultiBuffer;
+    int32                   pahsc_BytesPerInputHostBuffer;
+    int32                   pahsc_InputRefNum;
+    /* Output */
+    CmpSoundHeader          pahsc_SoundHeaders[PA_MAX_NUM_HOST_BUFFERS];
+    int32                   pahsc_BytesPerOutputHostBuffer;
+    SndChannelPtr           pahsc_Channel;
+    SndCallBackUPP          pahsc_OutputCompletionProc;
+    int32                   pahsc_NumOutsQueued;
+    int32                   pahsc_NumOutsPlayed;
+    PaTimestamp             pahsc_NumFramesDone;
+    UInt64                  pahsc_WhenFramesDoneIncremented;
+    /* Init Time -------------- */
+    int32                   pahsc_NumHostBuffers;
+    int32                   pahsc_FramesPerHostBuffer;
+    int32                   pahsc_UserBuffersPerHostBuffer;
+    int32                   pahsc_MinFramesPerHostBuffer; /* Can vary depending on virtual memory usage. */
+}
+PaHostSoundControl;
+
+/* Mac specific device information. */
+typedef struct internalPortAudioDevice
+{
+    long                    pad_DeviceRefNum;
+    long                    pad_DeviceBufferSize;
+    Component               pad_Identifier;
+    PaDeviceInfo            pad_Info;
+}
+internalPortAudioDevice;
+
+/************************************************************************************/
+/****************** Data ************************************************************/
+/************************************************************************************/
+static int                 sNumDevices = 0;
+static internalPortAudioDevice sDevices[PA_MAX_DEVICE_INFO] = { 0 };
+static int32               sPaHostError = 0;
+static int                 sDefaultOutputDeviceID;
+static int                 sDefaultInputDeviceID;
+
+/************************************************************************************/
+/****************** Prototypes ******************************************************/
+/************************************************************************************/
+static PaError PaMac_TimeSlice( internalPortAudioStream   *past,  int16 *macOutputBufPtr );
+static PaError PaMac_CallUserLoop( internalPortAudioStream   *past, int16 *outPtr );
+static PaError PaMac_RecordNext( internalPortAudioStream   *past );
+static void    PaMac_StartLoadCalculation( internalPortAudioStream   *past );
+static int     PaMac_GetMinNumBuffers( int minFramesPerHostBuffer, int framesPerBuffer, double sampleRate );
+static double *PaMac_GetSampleRatesFromHandle ( int numRates, Handle h );
+static PaError PaMac_ScanInputDevices( void );
+static PaError PaMac_ScanOutputDevices( void );
+static PaError PaMac_QueryOutputDeviceInfo( Component identifier, internalPortAudioDevice *ipad );
+static PaError PaMac_QueryInputDeviceInfo( Str255 deviceName, internalPortAudioDevice *ipad );
+static void    PaMac_InitSoundHeader( internalPortAudioStream   *past, CmpSoundHeader *sndHeader );
+static void    PaMac_EndLoadCalculation( internalPortAudioStream   *past );
+static void    PaMac_PlayNext ( internalPortAudioStream *past, int index );
+static long    PaMac_FillNextOutputBuffer( internalPortAudioStream   *past, int index );
+static pascal void PaMac_InputCompletionProc(SPBPtr recParams);
+static pascal void PaMac_OutputCompletionProc (SndChannelPtr theChannel, SndCommand * theCmd);
+static PaError PaMac_BackgroundManager( internalPortAudioStream   *past, int index );
+long PaHost_GetTotalBufferFrames( internalPortAudioStream   *past );
+static int     Mac_IsVirtualMemoryOn( void );
+static void    PToCString(unsigned char* inString, char* outString);
+char *MultiBuffer_GetNextWriteBuffer( MultiBuffer *mbuf );
+char *MultiBuffer_GetNextReadBuffer( MultiBuffer *mbuf );
+int   MultiBuffer_GetNextReadIndex( MultiBuffer *mbuf );
+int   MultiBuffer_GetNextWriteIndex( MultiBuffer *mbuf );
+int   MultiBuffer_IsWriteable(  MultiBuffer *mbuf );
+int   MultiBuffer_IsReadable(  MultiBuffer *mbuf );
+void  MultiBuffer_AdvanceReadIndex(  MultiBuffer *mbuf );
+void  MultiBuffer_AdvanceWriteIndex(  MultiBuffer *mbuf );
+
+/*************************************************************************
+** Simple FIFO index control for multiple buffers.
+** Read and Write indices range from 0 to 2N-1.
+** This allows us to distinguish between full and empty.
+*/
+char *MultiBuffer_GetNextWriteBuffer( MultiBuffer *mbuf )
+{
+    return mbuf->buffers[mbuf->nextWrite % mbuf->numBuffers];
+}
+char *MultiBuffer_GetNextReadBuffer( MultiBuffer *mbuf )
+{
+    return mbuf->buffers[mbuf->nextRead % mbuf->numBuffers];
+}
+int MultiBuffer_GetNextReadIndex( MultiBuffer *mbuf )
+{
+    return mbuf->nextRead % mbuf->numBuffers;
+}
+int MultiBuffer_GetNextWriteIndex( MultiBuffer *mbuf )
+{
+    return mbuf->nextWrite % mbuf->numBuffers;
+}
+
+int MultiBuffer_IsWriteable(  MultiBuffer *mbuf )
+{
+    int bufsFull = mbuf->nextWrite - mbuf->nextRead;
+    if( bufsFull < 0 ) bufsFull += (2 * mbuf->numBuffers);
+    return (bufsFull < mbuf->numBuffers);
+}
+int MultiBuffer_IsReadable(  MultiBuffer *mbuf )
+{
+    int bufsFull = mbuf->nextWrite - mbuf->nextRead;
+    if( bufsFull < 0 ) bufsFull += (2 * mbuf->numBuffers);
+    return (bufsFull > 0);
+}
+void MultiBuffer_AdvanceReadIndex(  MultiBuffer *mbuf )
+{
+    int temp = mbuf->nextRead + 1;
+    mbuf->nextRead = (temp >= (2 * mbuf->numBuffers)) ? 0 : temp;
+}
+void MultiBuffer_AdvanceWriteIndex(  MultiBuffer *mbuf )
+{
+    int temp = mbuf->nextWrite + 1;
+    mbuf->nextWrite = (temp >= (2 * mbuf->numBuffers)) ? 0 : temp;
+}
+
+/*************************************************************************
+** String Utility by Chris Rolfe
+*/
+static void PToCString(unsigned char* inString, char* outString)
+{
+    long i;
+    for(i=0; i<inString[0]; i++)  /* convert Pascal to C string */
+        outString[i] = inString[i+1];
+    outString[i]=0;
+}
+
+/*************************************************************************/
+PaError PaHost_Term( void )
+{
+    int           i;
+    PaDeviceInfo *dev;
+    double       *rates;
+    /* Free any allocated sample rate arrays. */
+    for( i=0; i<sNumDevices; i++ )
+    {
+        dev =  &sDevices[i].pad_Info;
+        rates = (double *) dev->sampleRates;
+        if( (rates != NULL) ) free( rates ); /* MEM_011 */
+        dev->sampleRates = NULL;
+        if( dev->name != NULL ) free( (void *) dev->name ); /* MEM_010 */
+        dev->name = NULL;
+    }
+    sNumDevices = 0;
+    return paNoError;
+}
+
+/*************************************************************************
+ PaHost_Init() is the library initialization function - call this before
+    using the library.
+*/
+PaError PaHost_Init( void )
+{
+    PaError err;
+    NumVersionVariant version;
+
+    version.parts = SndSoundManagerVersion();
+    DBUG(("SndSoundManagerVersion = 0x%x\n", version.whole));
+
+    /* Have we already initialized the device info? */
+    err = (PaError) Pa_CountDevices();
+    if( err < 0 ) return err;
+    else return paNoError;
+}
+
+/*************************************************************************
+ PaMac_ScanOutputDevices() queries the properties of all output devices.
+*/
+static PaError PaMac_ScanOutputDevices( void )
+{
+    PaError       err;
+    Component     identifier=0;
+    ComponentDescription criteria = { kSoundOutputDeviceType, 0, 0, 0, 0 };
+    long       numComponents, i;
+
+    /* Search the system linked list for output components  */
+    numComponents = CountComponents (&criteria);
+    identifier = 0;
+    sDefaultOutputDeviceID = sNumDevices; /* FIXME - query somehow */
+    for (i = 0; i < numComponents; i++)
+    {
+        /* passing nil returns first matching component. */
+        identifier = FindNextComponent( identifier, &criteria);
+        sDevices[sNumDevices].pad_Identifier = identifier;
+
+        /* Set up for default OUTPUT devices. */
+        err = PaMac_QueryOutputDeviceInfo( identifier, &sDevices[sNumDevices] );
+        if( err < 0 ) return err;
+        else  sNumDevices++;
+
+    }
+
+    return paNoError;
+}
+
+/*************************************************************************
+ PaMac_ScanInputDevices() queries the properties of all input devices.
+*/
+static PaError PaMac_ScanInputDevices( void )
+{
+    Str255     deviceName;
+    int        count;
+    Handle     iconHandle;
+    PaError    err;
+    OSErr      oserr;
+    count = 1;
+    sDefaultInputDeviceID = sNumDevices; /* FIXME - query somehow */ /* PLB20010415 - was setting sDefaultOutputDeviceID */
+    while(true)
+    {
+        /* Thanks Chris Rolfe and Alberto Ricci for this trick. */
+        oserr = SPBGetIndexedDevice(count++, deviceName, &iconHandle);
+        DBUG(("PaMac_ScanInputDevices: SPBGetIndexedDevice returned %d\n", oserr ));
+#if 1
+        /* PLB20010415 - was giving error for anything other than siBadSoundInDevice, but some Macs may return other errors! */
+        if(oserr != noErr) break; /* Some type of error is expected when count > devices */
+#else
+        if(oserr == siBadSoundInDevice)
+        {  /* it's expected when count > devices */
+            oserr = noErr;
+            break;
+        }
+        if(oserr != noErr)
+        {
+            ERR_RPT(("ERROR: SPBGetIndexedDevice(%d,,) returned %d\n", count-1, oserr ));
+            sPaHostError = oserr;
+            return paHostError;
+        }
+#endif
+        DisposeHandle(iconHandle);   /* Don't need the icon */
+
+        err = PaMac_QueryInputDeviceInfo( deviceName, &sDevices[sNumDevices] );
+        DBUG(("PaMac_ScanInputDevices: PaMac_QueryInputDeviceInfo returned %d\n", err ));
+        if( err < 0 ) return err;
+        else if( err == 1 ) sNumDevices++;
+    }
+
+    return paNoError;
+}
+
+/* Sample rate info returned by using siSampleRateAvailable selector in SPBGetDeviceInfo() */
+/* Thanks to Chris Rolfe for help with this query. */
+#pragma options align=mac68k
+typedef  struct
+{
+    int16                   numRates;
+    UnsignedFixed           (**rates)[]; /* Handle created by SPBGetDeviceInfo */
+}
+SRateInfo;
+#pragma options align=reset
+
+/*************************************************************************
+** PaMac_QueryOutputDeviceInfo()
+** Query information about a named output device.
+** Clears contents of ipad and writes info based on queries.
+** Return one if OK,
+**        zero if device cannot be used,
+**        or negative error.
+*/
+static PaError PaMac_QueryOutputDeviceInfo( Component identifier, internalPortAudioDevice *ipad )
+{
+    int     len;
+    OSErr   err;
+    PaDeviceInfo *dev =  &ipad->pad_Info;
+    SRateInfo srinfo = {0};
+    int     numRates;
+    ComponentDescription tempD;
+    Handle nameH=nil, infoH=nil, iconH=nil;
+
+    memset( ipad, 0, sizeof(internalPortAudioDevice) );
+
+    dev->structVersion = 1;
+    dev->maxInputChannels = 0;
+    dev->maxOutputChannels = 2;
+    dev->nativeSampleFormats = paInt16; /* FIXME - query to see if 24 or 32 bit data can be handled. */
+
+    /* Get sample rates supported. */
+    err = GetSoundOutputInfo(identifier, siSampleRateAvailable, (Ptr) &srinfo);
+    if(err != noErr)
+    {
+        ERR_RPT(("Error in PaMac_QueryOutputDeviceInfo: GetSoundOutputInfo siSampleRateAvailable returned %d\n", err ));
+        goto error;
+    }
+    numRates = srinfo.numRates;
+    DBUG(("PaMac_QueryOutputDeviceInfo: srinfo.numRates = 0x%x\n", srinfo.numRates ));
+    if( numRates == 0 )
+    {
+        dev->numSampleRates = -1;
+        numRates = 2;
+    }
+    else
+    {
+        dev->numSampleRates = numRates;
+    }
+    dev->sampleRates = PaMac_GetSampleRatesFromHandle( numRates, (Handle) srinfo.rates );
+    /* SPBGetDeviceInfo created the handle, but it's OUR job to release it. */
+    DisposeHandle((Handle) srinfo.rates);
+
+    /* Device name */
+    /*  we pass an existing handle for the component name;
+     we don't care about the info (type, subtype, etc.) or icon, so set them to nil */
+    infoH = nil;
+    iconH = nil;
+    nameH = NewHandle(0);
+    if(nameH == nil)  return paInsufficientMemory;
+    err = GetComponentInfo(identifier, &tempD, nameH, infoH, iconH);
+    if (err)
+    {
+        ERR_RPT(("Error in PaMac_QueryOutputDeviceInfo: GetComponentInfo returned %d\n", err ));
+        goto error;
+    }
+    len = (*nameH)[0] + 1;
+    dev->name = (char *) malloc(len);  /* MEM_010 */
+    if( dev->name == NULL )
+    {
+        DisposeHandle(nameH);
+        return paInsufficientMemory;
+    }
+    else
+    {
+        PToCString((unsigned char *)(*nameH), (char *) dev->name);
+        DisposeHandle(nameH);
+    }
+
+    DBUG(("PaMac_QueryOutputDeviceInfo: dev->name = %s\n", dev->name ));
+    return paNoError;
+
+error:
+    sPaHostError = err;
+    return paHostError;
+
+}
+
+/*************************************************************************
+** PaMac_QueryInputDeviceInfo()
+** Query information about a named input device.
+** Clears contents of ipad and writes info based on queries.
+** Return one if OK,
+**        zero if device cannot be used,
+**        or negative error.
+*/
+static PaError PaMac_QueryInputDeviceInfo( Str255 deviceName, internalPortAudioDevice *ipad )
+{
+    PaError result = paNoError;
+    int     len;
+    OSErr   err;
+    long    mRefNum = 0;
+    long    tempL;
+    int16   tempS;
+    Fixed   tempF;
+    PaDeviceInfo *dev =  &ipad->pad_Info;
+    SRateInfo srinfo = {0};
+    int     numRates;
+
+    memset( ipad, 0, sizeof(internalPortAudioDevice) );
+    dev->maxOutputChannels = 0;
+
+    /* Open device based on name. If device is in use, it may not be able to open in write mode. */
+    err = SPBOpenDevice( deviceName, siWritePermission, &mRefNum);
+    if (err)
+    {
+        /* If device is in use, it may not be able to open in write mode so try read mode. */
+        err = SPBOpenDevice( deviceName, siReadPermission, &mRefNum);
+        if (err)
+        {
+            ERR_RPT(("Error in PaMac_QueryInputDeviceInfo: SPBOpenDevice returned %d\n", err ));
+            sPaHostError = err;
+            return paHostError;
+        }
+    }
+
+    /* Define macros for printing out device info. */
+#define PrintDeviceInfo(selector,var) \
+    err = SPBGetDeviceInfo(mRefNum, selector, (Ptr) &var); \
+    if (err) { \
+        DBUG(("query %s failed\n", #selector )); \
+    }\
+    else { \
+        DBUG(("query %s = 0x%x\n", #selector, var )); \
+    }
+
+    PrintDeviceInfo( siContinuous, tempS );
+    PrintDeviceInfo( siAsync, tempS );
+    PrintDeviceInfo( siNumberChannels, tempS );
+    PrintDeviceInfo( siSampleSize, tempS );
+    PrintDeviceInfo( siSampleRate, tempF );
+    PrintDeviceInfo( siChannelAvailable, tempS );
+    PrintDeviceInfo( siActiveChannels, tempL );
+    PrintDeviceInfo( siDeviceBufferInfo, tempL );
+
+    err = SPBGetDeviceInfo(mRefNum, siActiveChannels, (Ptr) &tempL);
+    if (err == 0) DBUG(("%s = 0x%x\n", "siActiveChannels", tempL ));
+    /* Can we use this device? */
+    err = SPBGetDeviceInfo(mRefNum, siAsync, (Ptr) &tempS);
+    if (err)
+    {
+        ERR_RPT(("Error in PaMac_QueryInputDeviceInfo: SPBGetDeviceInfo siAsync returned %d\n", err ));
+        goto error;
+    }
+    if( tempS == 0 ) goto useless; /* Does not support async recording so forget about it. */
+
+    err = SPBGetDeviceInfo(mRefNum, siChannelAvailable, (Ptr) &tempS);
+    if (err)
+    {
+        ERR_RPT(("Error in PaMac_QueryInputDeviceInfo: SPBGetDeviceInfo siChannelAvailable returned %d\n", err ));
+        goto error;
+    }
+    dev->maxInputChannels = tempS;
+
+    /* Get sample rates supported. */
+    err = SPBGetDeviceInfo(mRefNum, siSampleRateAvailable, (Ptr) &srinfo);
+    if (err)
+    {
+        ERR_RPT(("Error in PaMac_QueryInputDeviceInfo: SPBGetDeviceInfo siSampleRateAvailable returned %d\n", err ));
+        goto error;
+    }
+
+    numRates = srinfo.numRates;
+    DBUG(("numRates = 0x%x\n", numRates ));
+    if( numRates == 0 )
+    {
+        dev->numSampleRates = -1;
+        numRates = 2;
+    }
+    else
+    {
+        dev->numSampleRates = numRates;
+    }
+    dev->sampleRates = PaMac_GetSampleRatesFromHandle( numRates, (Handle) srinfo.rates );
+    /* SPBGetDeviceInfo created the handle, but it's OUR job to release it. */
+    DisposeHandle((Handle) srinfo.rates);
+
+    /* Get size of device buffer. */
+    err = SPBGetDeviceInfo(mRefNum, siDeviceBufferInfo, (Ptr) &tempL);
+    if (err)
+    {
+        ERR_RPT(("Error in PaMac_QueryInputDeviceInfo: SPBGetDeviceInfo siDeviceBufferInfo returned %d\n", err ));
+        goto error;
+    }
+    ipad->pad_DeviceBufferSize = tempL;
+    DBUG(("siDeviceBufferInfo = %d\n", tempL ));
+
+    /* Set format based on sample size. */
+    err = SPBGetDeviceInfo(mRefNum, siSampleSize, (Ptr) &tempS);
+    if (err)
+    {
+        ERR_RPT(("Error in PaMac_QueryInputDeviceInfo: SPBGetDeviceInfo siSampleSize returned %d\n", err ));
+        goto error;
+    }
+    switch( tempS )
+    {
+    case 0x0020:
+        dev->nativeSampleFormats = paInt32;  /* FIXME - warning, code probably won't support this! */
+        break;
+    case 0x0010:
+    default: /* FIXME - What about other formats? */
+        dev->nativeSampleFormats = paInt16;
+        break;
+    }
+    DBUG(("nativeSampleFormats = %d\n", dev->nativeSampleFormats ));
+
+    /* Device name */
+    len = deviceName[0] + 1;  /* Get length of Pascal string */
+    dev->name = (char *) malloc(len);  /* MEM_010 */
+    if( dev->name == NULL )
+    {
+        result = paInsufficientMemory;
+        goto cleanup;
+    }
+    PToCString(deviceName, (char *) dev->name);
+    DBUG(("deviceName = %s\n", dev->name ));
+    result = (PaError) 1;
+    /* All done so close up device. */
+cleanup:
+    if( mRefNum )  SPBCloseDevice(mRefNum);
+    return result;
+
+error:
+    if( mRefNum )  SPBCloseDevice(mRefNum);
+    sPaHostError = err;
+    return paHostError;
+
+useless:
+    if( mRefNum )  SPBCloseDevice(mRefNum);
+    return (PaError) 0;
+}
+
+/*************************************************************************
+** Allocate a double array and fill it with listed sample rates.
+*/
+static double * PaMac_GetSampleRatesFromHandle ( int numRates, Handle h )
+{
+    OSErr   err = noErr;
+    SInt8   hState;
+    int     i;
+    UnsignedFixed *fixedRates;
+    double *rates = (double *) malloc( numRates * sizeof(double) ); /* MEM_011 */
+    if( rates == NULL ) return NULL;
+    /* Save and restore handle state as suggested by TechNote at:
+            http://developer.apple.com/technotes/tn/tn1122.html
+    */
+    hState = HGetState (h);
+    if (!(err = MemError ()))
+    {
+        HLock (h);
+        if (!(err = MemError ( )))
+        {
+            fixedRates = (UInt32 *) *h;
+            for( i=0; i<numRates; i++ )
+            {
+                rates[i] = UnsignedFixedToDouble(fixedRates[i]);
+            }
+
+            HSetState (h,hState);
+            err = MemError ( );
+        }
+    }
+    if( err )
+    {
+        free( rates );
+        ERR_RPT(("Error in PaMac_GetSampleRatesFromHandle = %d\n", err ));
+    }
+    return rates;
+}
+
+/*************************************************************************/
+int Pa_CountDevices()
+{
+    PaError err;
+    DBUG(("Pa_CountDevices()\n"));
+    /* If no devices, go find some. */
+    if( sNumDevices <= 0 )
+    {
+        err = PaMac_ScanOutputDevices();
+        if( err != paNoError ) goto error;
+        err = PaMac_ScanInputDevices();
+        if( err != paNoError ) goto error;
+    }
+    return sNumDevices;
+
+error:
+    PaHost_Term();
+    DBUG(("Pa_CountDevices: returns %d\n", err ));
+    return err;
+
+}
+
+/*************************************************************************/
+const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID id )
+{
+    if( (id < 0) || ( id >= Pa_CountDevices()) ) return NULL;
+    return &sDevices[id].pad_Info;
+}
+/*************************************************************************/
+PaDeviceID Pa_GetDefaultInputDeviceID( void )
+{
+    return sDefaultInputDeviceID;
+}
+
+/*************************************************************************/
+PaDeviceID Pa_GetDefaultOutputDeviceID( void )
+{
+    return sDefaultOutputDeviceID;
+}
+
+/********************************* BEGIN CPU UTILIZATION MEASUREMENT ****/
+static void PaMac_StartLoadCalculation( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    UnsignedWide widePad;
+    if( pahsc == NULL ) return;
+    /* Query system timer for usage analysis and to prevent overuse of CPU. */
+    Microseconds( &widePad );
+    pahsc->pahsc_EntryCount = UnsignedWideToUInt64( widePad );
+}
+
+/******************************************************************************
+** Measure fractional CPU load based on real-time it took to calculate
+** buffers worth of output.
+*/
+/**************************************************************************/
+static void PaMac_EndLoadCalculation( internalPortAudioStream   *past )
+{
+    UnsignedWide widePad;
+    UInt64    currentCount;
+    long      usecsElapsed;
+    double    newUsage;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return;
+    
+    /* Measure CPU utilization during this callback. Note that this calculation
+    ** assumes that we had the processor the whole time.
+    */
+#define LOWPASS_COEFFICIENT_0   (0.95)
+#define LOWPASS_COEFFICIENT_1   (0.99999 - LOWPASS_COEFFICIENT_0)
+    Microseconds( &widePad );
+    currentCount = UnsignedWideToUInt64( widePad );
+
+	usecsElapsed = (long) U64Subtract(currentCount, pahsc->pahsc_EntryCount);
+	
+        /* Use inverse because it is faster than the divide. */
+	newUsage =  usecsElapsed * pahsc->pahsc_InverseMicrosPerHostBuffer;
+	
+	past->past_Usage = (LOWPASS_COEFFICIENT_0 * past->past_Usage) +
+                           (LOWPASS_COEFFICIENT_1 * newUsage);
+ 
+}
+
+/***********************************************************************
+** Called by Pa_StartStream()
+*/
+PaError PaHost_StartInput( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    pahsc->pahsc_IsRecording = 0;
+    pahsc->pahsc_StopRecording = 0;
+    pahsc->pahsc_InputMultiBuffer.nextWrite = 0;
+    pahsc->pahsc_InputMultiBuffer.nextRead = 0;
+    return PaMac_RecordNext( past );
+}
+
+/***********************************************************************
+** Called by Pa_StopStream().
+** May be called during error recovery or cleanup code
+** so protect against NULL pointers.
+*/
+PaError PaHost_StopInput( internalPortAudioStream   *past, int abort )
+{
+    int32   timeOutMsec;
+    PaError result = paNoError;
+    OSErr   err = 0;
+    long    mRefNum;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paNoError;
+
+    (void) abort;
+
+    mRefNum = pahsc->pahsc_InputRefNum;
+
+    DBUG(("PaHost_StopInput: mRefNum = %d\n", mRefNum ));
+    if( mRefNum )
+    {
+        DBUG(("PaHost_StopInput: pahsc_IsRecording = %d\n", pahsc->pahsc_IsRecording ));
+        if( pahsc->pahsc_IsRecording )
+        {
+            /* PLB20010420 - Fix TIMEOUT in record mode. */
+            pahsc->pahsc_StopRecording = 1; /* Request that we stop recording. */
+            err = SPBStopRecording(mRefNum);
+            DBUG(("PaHost_StopInput: then pahsc_IsRecording = %d\n", pahsc->pahsc_IsRecording ));
+
+            /* Calculate timeOut longer than longest time it could take to play one buffer. */
+            timeOutMsec = (int32) ((1500.0 * pahsc->pahsc_FramesPerHostBuffer) / past->past_SampleRate);
+            /* Keep querying sound channel until it is no longer busy playing. */
+            while( !err && pahsc->pahsc_IsRecording && (timeOutMsec > 0))
+            {
+                Pa_Sleep(20);
+                timeOutMsec -= 20;
+            }
+            if( timeOutMsec <= 0 )
+            {
+                ERR_RPT(("PaHost_StopInput: timed out!\n"));
+                return paTimedOut;
+            }
+        }
+    }
+    if( err )
+    {
+        sPaHostError = err;
+        result = paHostError;
+    }
+
+    DBUG(("PaHost_StopInput: finished.\n", mRefNum ));
+    return result;
+}
+
+/***********************************************************************/
+static void PaMac_InitSoundHeader( internalPortAudioStream   *past, CmpSoundHeader *sndHeader )
+{
+    sndHeader->numChannels = past->past_NumOutputChannels;
+    sndHeader->sampleRate = DoubleToUnsignedFixed(past->past_SampleRate);
+    sndHeader->loopStart = 0;
+    sndHeader->loopEnd = 0;
+    sndHeader->encode = cmpSH;
+    sndHeader->baseFrequency = kMiddleC;
+    sndHeader->markerChunk = nil;
+    sndHeader->futureUse2 = nil;
+    sndHeader->stateVars = nil;
+    sndHeader->leftOverSamples = nil;
+    sndHeader->compressionID = 0;
+    sndHeader->packetSize = 0;
+    sndHeader->snthID = 0;
+    sndHeader->sampleSize = 8 * sizeof(int16); // FIXME - might be 24 or 32 bits some day;
+    sndHeader->sampleArea[0] = 0;
+    sndHeader->format = kSoundNotCompressed;
+}
+
+static void SetFramesDone( PaHostSoundControl *pahsc, PaTimestamp framesDone )
+{
+	UnsignedWide     now;
+ 	Microseconds( &now );
+ 	pahsc->pahsc_NumFramesDone = framesDone;
+ 	pahsc->pahsc_WhenFramesDoneIncremented = UnsignedWideToUInt64( now );
+}
+
+/***********************************************************************/
+PaError PaHost_StartOutput( internalPortAudioStream   *past )
+{
+    SndCommand  pauseCommand;
+    SndCommand  resumeCommand;
+    int          i;
+    OSErr         error;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paInternalError;
+    if( pahsc->pahsc_Channel == NULL ) return paInternalError;
+
+    past->past_StopSoon = 0;
+    past->past_IsActive = 1;
+    pahsc->pahsc_NumOutsQueued = 0;
+    pahsc->pahsc_NumOutsPlayed = 0;
+    
+    SetFramesDone( pahsc, 0.0 );
+
+    /* Pause channel so it does not do back ground processing while we are still filling the queue. */
+    pauseCommand.cmd = pauseCmd;
+    pauseCommand.param1 = pauseCommand.param2 = 0;
+    error = SndDoCommand (pahsc->pahsc_Channel, &pauseCommand, true);
+    if (noErr != error) goto exit;
+
+    /* Queue all of the buffers so we start off full. */
+    for (i = 0; i<pahsc->pahsc_NumHostBuffers; i++)
+    {
+        PaMac_PlayNext( past, i );
+    }
+    
+    /* Resume channel now that the queue is full. */
+    resumeCommand.cmd = resumeCmd;
+    resumeCommand.param1 = resumeCommand.param2 = 0;
+    error = SndDoImmediate( pahsc->pahsc_Channel, &resumeCommand );
+    if (noErr != error) goto exit;
+
+    return paNoError;
+exit:
+    past->past_IsActive = 0;
+    sPaHostError = error;
+    ERR_RPT(("Error in PaHost_StartOutput: SndDoCommand returned %d\n", error ));
+    return paHostError;
+}
+
+/*******************************************************************/
+long PaHost_GetTotalBufferFrames( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    return (long) (pahsc->pahsc_NumHostBuffers * pahsc->pahsc_FramesPerHostBuffer);
+}
+
+/***********************************************************************
+** Called by Pa_StopStream().
+** May be called during error recovery or cleanup code
+** so protect against NULL pointers.
+*/
+PaError PaHost_StopOutput( internalPortAudioStream   *past, int abort )
+{
+    int32 timeOutMsec;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paNoError;
+    if( pahsc->pahsc_Channel == NULL ) return paNoError;
+
+    DBUG(("PaHost_StopOutput()\n"));
+    if( past->past_IsActive == 0 ) return paNoError;
+
+    /* Set flags for callback function to see. */
+    if( abort ) past->past_StopNow = 1;
+    past->past_StopSoon = 1;
+    /* Calculate timeOut longer than longest time it could take to play all buffers. */
+    timeOutMsec = (int32) ((1500.0 * PaHost_GetTotalBufferFrames( past )) / past->past_SampleRate);
+    /* Keep querying sound channel until it is no longer busy playing. */
+    while( past->past_IsActive && (timeOutMsec > 0))
+    {
+        Pa_Sleep(20);
+        timeOutMsec -= 20;
+    }
+    if( timeOutMsec <= 0 )
+    {
+        ERR_RPT(("PaHost_StopOutput: timed out!\n"));
+        return paTimedOut;
+    }
+    else return paNoError;
+}
+
+/***********************************************************************/
+PaError PaHost_StartEngine( internalPortAudioStream   *past )
+{
+    (void) past; /* Prevent unused variable warnings. */
+    return paNoError;
+}
+
+/***********************************************************************/
+PaError PaHost_StopEngine( internalPortAudioStream   *past, int abort )
+{
+    (void) past; /* Prevent unused variable warnings. */
+    (void) abort; /* Prevent unused variable warnings. */
+    return paNoError;
+}
+/***********************************************************************/
+PaError PaHost_StreamActive( internalPortAudioStream   *past )
+{
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    return (PaError) ( past->past_IsActive + pahsc->pahsc_IsRecording );
+}
+int Mac_IsVirtualMemoryOn( void )
+{
+    long  attr;
+    OSErr result = Gestalt( gestaltVMAttr, &attr );
+    DBUG(("gestaltVMAttr : 0x%x\n", attr ));
+    return ((attr >> gestaltVMHasPagingControl ) & 1);
+}
+
+/*******************************************************************
+* Determine number of host Buffers
+* and how many User Buffers we can put into each host buffer.
+*/
+static void PaHost_CalcNumHostBuffers( internalPortAudioStream *past )
+{
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    int32  minNumBuffers;
+    int32  minFramesPerHostBuffer;
+    int32  minTotalFrames;
+    int32  userBuffersPerHostBuffer;
+    int32  framesPerHostBuffer;
+    int32  numHostBuffers;
+    
+    minFramesPerHostBuffer = pahsc->pahsc_MinFramesPerHostBuffer;
+    minFramesPerHostBuffer = (minFramesPerHostBuffer + 7) & ~7;
+    DBUG(("PaHost_CalcNumHostBuffers: minFramesPerHostBuffer = %d\n", minFramesPerHostBuffer ));
+    
+    /* Determine number of user buffers based on minimum latency. */
+	/* PLB20020417 I used to call Pa_GetMinNumBuffers() which doesn't take into account the
+	**    variable minFramesPerHostBuffer. Now I call PaMac_GetMinNumBuffers() which will
+	**    gove lower latency when virtual memory is turned off. */
+    /* minNumBuffers = Pa_GetMinNumBuffers( past->past_FramesPerUserBuffer, past->past_SampleRate ); WRONG */
+    minNumBuffers = PaMac_GetMinNumBuffers( minFramesPerHostBuffer, past->past_FramesPerUserBuffer, past->past_SampleRate );
+    
+    past->past_NumUserBuffers = ( minNumBuffers > past->past_NumUserBuffers ) ? minNumBuffers : past->past_NumUserBuffers;
+    DBUG(("PaHost_CalcNumHostBuffers: min past_NumUserBuffers = %d\n", past->past_NumUserBuffers ));
+    minTotalFrames = past->past_NumUserBuffers * past->past_FramesPerUserBuffer;
+    
+    /* We cannot make the buffers too small because they may not get serviced quickly enough. */
+    if( (int32) past->past_FramesPerUserBuffer < minFramesPerHostBuffer )
+    {
+        userBuffersPerHostBuffer =
+            (minFramesPerHostBuffer + past->past_FramesPerUserBuffer - 1) /
+            past->past_FramesPerUserBuffer;
+    }
+    else
+    {
+        userBuffersPerHostBuffer = 1;
+    }
+    framesPerHostBuffer = past->past_FramesPerUserBuffer * userBuffersPerHostBuffer;
+    
+    /* Calculate number of host buffers needed. Round up to cover minTotalFrames. */
+    numHostBuffers = (minTotalFrames + framesPerHostBuffer - 1) / framesPerHostBuffer;
+    /* Make sure we have enough host buffers. */
+    if( numHostBuffers < PA_MIN_NUM_HOST_BUFFERS)
+    {
+        numHostBuffers = PA_MIN_NUM_HOST_BUFFERS;
+    }
+    else
+    {
+        /* If we have too many host buffers, try to put more user buffers in a host buffer. */
+        while(numHostBuffers > PA_MAX_NUM_HOST_BUFFERS)
+        {
+            userBuffersPerHostBuffer += 1;
+            framesPerHostBuffer = past->past_FramesPerUserBuffer * userBuffersPerHostBuffer;
+            numHostBuffers = (minTotalFrames + framesPerHostBuffer - 1) / framesPerHostBuffer;
+        }
+    }
+
+    pahsc->pahsc_UserBuffersPerHostBuffer = userBuffersPerHostBuffer;
+    pahsc->pahsc_FramesPerHostBuffer = framesPerHostBuffer;
+    pahsc->pahsc_NumHostBuffers = numHostBuffers;
+    DBUG(("PaHost_CalcNumHostBuffers: pahsc_UserBuffersPerHostBuffer = %d\n", pahsc->pahsc_UserBuffersPerHostBuffer ));
+    DBUG(("PaHost_CalcNumHostBuffers: pahsc_NumHostBuffers = %d\n", pahsc->pahsc_NumHostBuffers ));
+    DBUG(("PaHost_CalcNumHostBuffers: pahsc_FramesPerHostBuffer = %d\n", pahsc->pahsc_FramesPerHostBuffer ));
+    DBUG(("PaHost_CalcNumHostBuffers: past_NumUserBuffers = %d\n", past->past_NumUserBuffers ));
+}
+
+/*******************************************************************/
+PaError PaHost_OpenStream( internalPortAudioStream   *past )
+{
+    OSErr             err;
+    PaError             result = paHostError;
+    PaHostSoundControl *pahsc;
+    int                 i;
+    /* Allocate and initialize host data. */
+    pahsc = (PaHostSoundControl *) PaHost_AllocateFastMemory(sizeof(PaHostSoundControl));
+    if( pahsc == NULL )
+    {
+        return paInsufficientMemory;
+    }
+    past->past_DeviceData = (void *) pahsc;
+
+    /* If recording, and virtual memory is turned on, then use bigger buffers to prevent glitches. */
+    if( (past->past_NumInputChannels > 0)  && Mac_IsVirtualMemoryOn() )
+    {
+        pahsc->pahsc_MinFramesPerHostBuffer = MAC_VIRTUAL_FRAMES_PER_BUFFER;
+    }
+    else
+    {
+        pahsc->pahsc_MinFramesPerHostBuffer = MAC_PHYSICAL_FRAMES_PER_BUFFER;
+    }
+
+    PaHost_CalcNumHostBuffers( past );
+    
+    /* Setup constants for CPU load measurement. */
+    pahsc->pahsc_InverseMicrosPerHostBuffer = past->past_SampleRate / (1000000.0 * 	pahsc->pahsc_FramesPerHostBuffer);
+
+    /* ------------------ OUTPUT */
+    if( past->past_NumOutputChannels > 0 )
+    {
+        /* Create sound channel to which we can send commands. */
+        pahsc->pahsc_Channel = 0L;
+        err = SndNewChannel(&pahsc->pahsc_Channel, sampledSynth, 0, nil); /* FIXME - use kUseOptionalOutputDevice if not default. */
+        if(err != 0)
+        {
+            ERR_RPT(("Error in PaHost_OpenStream: SndNewChannel returned 0x%x\n", err ));
+            goto error;
+        }
+
+        /* Install our callback function pointer straight into the sound channel structure */
+        /* Use new CARBON name for callback procedure. */
+#if TARGET_API_MAC_CARBON
+        pahsc->pahsc_OutputCompletionProc = NewSndCallBackUPP(PaMac_OutputCompletionProc);
+#else
+        pahsc->pahsc_OutputCompletionProc = NewSndCallBackProc(PaMac_OutputCompletionProc);
+#endif
+
+        pahsc->pahsc_Channel->callBack = pahsc->pahsc_OutputCompletionProc;
+
+        pahsc->pahsc_BytesPerOutputHostBuffer = pahsc->pahsc_FramesPerHostBuffer * past->past_NumOutputChannels * sizeof(int16);
+        for (i = 0; i<pahsc->pahsc_NumHostBuffers; i++)
+        {
+            char *buf = (char *)PaHost_AllocateFastMemory(pahsc->pahsc_BytesPerOutputHostBuffer);
+            if (buf == NULL)
+            {
+                ERR_RPT(("Error in PaHost_OpenStream: could not allocate output buffer. Size = \n", pahsc->pahsc_BytesPerOutputHostBuffer ));
+                goto memerror;
+            }
+
+            PaMac_InitSoundHeader( past, &pahsc->pahsc_SoundHeaders[i] );
+            pahsc->pahsc_SoundHeaders[i].samplePtr = buf;
+            pahsc->pahsc_SoundHeaders[i].numFrames = (unsigned long) pahsc->pahsc_FramesPerHostBuffer;
+
+        }
+    }
+#ifdef SUPPORT_AUDIO_CAPTURE
+    /* ------------------ INPUT */
+    /* Use double buffer scheme that matches output. */
+    if( past->past_NumInputChannels > 0 )
+    {
+        int16   tempS;
+        long    tempL;
+        Fixed   tempF;
+        long    mRefNum;
+        unsigned char noname = 0; /* FIXME - use real device names. */
+#if TARGET_API_MAC_CARBON
+        pahsc->pahsc_InputCompletionProc = NewSICompletionUPP((SICompletionProcPtr)PaMac_InputCompletionProc);
+#else
+        pahsc->pahsc_InputCompletionProc = NewSICompletionProc((ProcPtr)PaMac_InputCompletionProc);
+#endif
+        pahsc->pahsc_BytesPerInputHostBuffer = pahsc->pahsc_FramesPerHostBuffer * past->past_NumInputChannels * sizeof(int16);
+        for (i = 0; i<pahsc->pahsc_NumHostBuffers; i++)
+        {
+            char *buf = (char *) PaHost_AllocateFastMemory(pahsc->pahsc_BytesPerInputHostBuffer);
+            if ( buf == NULL )
+            {
+                ERR_RPT(("PaHost_OpenStream: could not allocate input  buffer. Size = \n", pahsc->pahsc_BytesPerInputHostBuffer ));
+                goto memerror;
+            }
+            pahsc->pahsc_InputMultiBuffer.buffers[i] = buf;
+        }
+        pahsc->pahsc_InputMultiBuffer.numBuffers = pahsc->pahsc_NumHostBuffers;
+
+        err = SPBOpenDevice( (const unsigned char *) &noname, siWritePermission, &mRefNum); /* FIXME - use name so we get selected device */
+        // FIXME err = SPBOpenDevice( (const unsigned char *) sDevices[past->past_InputDeviceID].pad_Info.name, siWritePermission, &mRefNum);
+        if (err) goto error;
+        pahsc->pahsc_InputRefNum = mRefNum;
+        DBUG(("PaHost_OpenStream: mRefNum = %d\n", mRefNum ));
+
+        /* Set input device characteristics. */
+        tempS = 1;
+        err = SPBSetDeviceInfo(mRefNum, siContinuous, (Ptr) &tempS);
+        if (err)
+        {
+            ERR_RPT(("Error in PaHost_OpenStream: SPBSetDeviceInfo siContinuous returned %d\n", err ));
+            goto error;
+        }
+
+        tempL = 0x03;
+        err = SPBSetDeviceInfo(mRefNum, siActiveChannels, (Ptr) &tempL);
+        if (err)
+        {
+            DBUG(("PaHost_OpenStream: setting siActiveChannels returned 0x%x. Error ignored.\n", err ));
+        }
+
+        /* PLB20010908 - Use requested number of input channels. Thanks Dominic Mazzoni. */
+        tempS = past->past_NumInputChannels;
+        err = SPBSetDeviceInfo(mRefNum, siNumberChannels, (Ptr) &tempS);
+        if (err)
+        {
+            ERR_RPT(("Error in PaHost_OpenStream: SPBSetDeviceInfo siNumberChannels returned %d\n", err ));
+            goto error;
+        }
+
+        tempF = ((unsigned long)past->past_SampleRate) << 16;
+        err = SPBSetDeviceInfo(mRefNum, siSampleRate, (Ptr) &tempF);
+        if (err)
+        {
+            ERR_RPT(("Error in PaHost_OpenStream: SPBSetDeviceInfo siSampleRate returned %d\n", err ));
+            goto error;
+        }
+
+        /* Setup record-parameter block */
+        pahsc->pahsc_InputParams.inRefNum          = mRefNum;
+        pahsc->pahsc_InputParams.milliseconds      = 0;   // not used
+        pahsc->pahsc_InputParams.completionRoutine = pahsc->pahsc_InputCompletionProc;
+        pahsc->pahsc_InputParams.interruptRoutine  = 0;
+        pahsc->pahsc_InputParams.userLong          = (long) past;
+        pahsc->pahsc_InputParams.unused1           = 0;
+    }
+#endif /* SUPPORT_AUDIO_CAPTURE */
+    DBUG(("PaHost_OpenStream: complete.\n"));
+    return paNoError;
+
+error:
+    PaHost_CloseStream( past );
+    ERR_RPT(("PaHost_OpenStream: sPaHostError =  0x%x.\n", err ));
+    sPaHostError = err;
+    return paHostError;
+
+memerror:
+    PaHost_CloseStream( past );
+    return paInsufficientMemory;
+}
+
+/***********************************************************************
+** Called by Pa_CloseStream().
+** May be called during error recovery or cleanup code
+** so protect against NULL pointers.
+*/
+PaError PaHost_CloseStream( internalPortAudioStream   *past )
+{
+    PaError result = paNoError;
+    OSErr   err = 0;
+    int     i;
+    PaHostSoundControl *pahsc;
+
+    DBUG(("PaHost_CloseStream( 0x%x )\n", past ));
+
+    if( past == NULL ) return paBadStreamPtr;
+
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return paNoError;
+
+    if( past->past_NumOutputChannels > 0 )
+    {
+        /* TRUE means flush now instead of waiting for quietCmd to be processed. */
+        if( pahsc->pahsc_Channel != NULL ) SndDisposeChannel(pahsc->pahsc_Channel, TRUE);
+        {
+            for (i = 0; i<pahsc->pahsc_NumHostBuffers; i++)
+            {
+                Ptr p = (Ptr) pahsc->pahsc_SoundHeaders[i].samplePtr;
+                if( p != NULL ) PaHost_FreeFastMemory( p, pahsc->pahsc_BytesPerOutputHostBuffer );
+            }
+        }
+    }
+
+    if( past->past_NumInputChannels > 0 )
+    {
+        if( pahsc->pahsc_InputRefNum )
+        {
+            err = SPBCloseDevice(pahsc->pahsc_InputRefNum);
+            pahsc->pahsc_InputRefNum = 0;
+            if( err )
+            {
+                sPaHostError = err;
+                result = paHostError;
+            }
+        }
+        {
+            for (i = 0; i<pahsc->pahsc_InputMultiBuffer.numBuffers; i++)
+            {
+                Ptr p = (Ptr) pahsc->pahsc_InputMultiBuffer.buffers[i];
+                if( p != NULL ) PaHost_FreeFastMemory( p, pahsc->pahsc_BytesPerInputHostBuffer );
+            }
+        }
+    }
+
+    past->past_DeviceData = NULL;
+    PaHost_FreeFastMemory( pahsc, sizeof(PaHostSoundControl) );
+
+    DBUG(("PaHost_CloseStream: complete.\n", past ));
+    return result;
+}
+/*************************************************************************/
+int Pa_GetMinNumBuffers( int framesPerUserBuffer, double sampleRate )
+{
+/* We use the MAC_VIRTUAL_FRAMES_PER_BUFFER because we might be recording.
+** This routine doesn't have enough information to determine the best value
+** and is being depracated. */
+    return PaMac_GetMinNumBuffers( MAC_VIRTUAL_FRAMES_PER_BUFFER, framesPerUserBuffer, sampleRate );
+}
+/*************************************************************************/
+static int PaMac_GetMinNumBuffers( int minFramesPerHostBuffer, int framesPerUserBuffer, double sampleRate )
+{
+    int minUserPerHost = ( minFramesPerHostBuffer + framesPerUserBuffer - 1) / framesPerUserBuffer;
+    int numBufs = PA_MIN_NUM_HOST_BUFFERS * minUserPerHost;
+    if( numBufs < PA_MIN_NUM_HOST_BUFFERS ) numBufs = PA_MIN_NUM_HOST_BUFFERS;
+    (void) sampleRate;
+    return numBufs;
+}
+
+/*************************************************************************/
+void Pa_Sleep( int32 msec )
+{
+    EventRecord   event;
+    int32 sleepTime, endTime;
+    /* Convert to ticks. Round up so we sleep a MINIMUM of msec time. */
+    sleepTime = ((msec * 60) + 999) / 1000;
+    if( sleepTime < 1 ) sleepTime = 1;
+    endTime = TickCount() + sleepTime;
+    do
+    {
+        DBUGX(("Sleep for %d ticks.\n", sleepTime ));
+        /* Use WaitNextEvent() to sleep without getting events. */
+        /* PLB20010907 - Pass unused event to WaitNextEvent instead of NULL to prevent
+         * Mac OSX crash. Thanks Dominic Mazzoni. */
+        WaitNextEvent( 0, &event, sleepTime, NULL );
+        sleepTime = endTime - TickCount();
+    }
+    while( sleepTime > 0 );
+}
+/*************************************************************************/
+int32 Pa_GetHostError( void )
+{
+    int32 err = sPaHostError;
+    sPaHostError = 0;
+    return err;
+}
+
+/*************************************************************************
+ * Allocate memory that can be accessed in real-time.
+ * This may need to be held in physical memory so that it is not
+ * paged to virtual memory.
+ * This call MUST be balanced with a call to PaHost_FreeFastMemory().
+ */
+void *PaHost_AllocateFastMemory( long numBytes )
+{
+    void *addr = NewPtrClear( numBytes );
+    if( (addr == NULL) || (MemError () != 0) ) return NULL;
+
+#if (TARGET_API_MAC_CARBON == 0)
+    if( HoldMemory( addr, numBytes ) != noErr )
+    {
+        DisposePtr( (Ptr) addr );
+        return NULL;
+    }
+#endif
+    return addr;
+}
+
+/*************************************************************************
+ * Free memory that could be accessed in real-time.
+ * This call MUST be balanced with a call to PaHost_AllocateFastMemory().
+ */
+void PaHost_FreeFastMemory( void *addr, long numBytes )
+{
+    if( addr == NULL ) return;
+#if TARGET_API_MAC_CARBON
+    (void) numBytes;
+#else
+    UnholdMemory( addr, numBytes );
+#endif
+    DisposePtr( (Ptr) addr );
+}
+
+/*************************************************************************/
+PaTimestamp Pa_StreamTime( PortAudioStream *stream )
+{
+	PaTimestamp   framesDone1;
+	PaTimestamp   framesDone2;
+	UInt64        whenIncremented;
+	UnsignedWide  now;
+	UInt64        now64;
+	long          microsElapsed;
+	long          framesElapsed;
+	
+    PaHostSoundControl *pahsc;
+    internalPortAudioStream   *past = (internalPortAudioStream *) stream;
+    if( past == NULL ) return paBadStreamPtr;
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    
+/* Capture information from audio thread.
+ * We have to be careful that we don't get interrupted in the middle.
+ * So we grab the pahsc_NumFramesDone twice and make sure it didn't change.
+ */
+ 	do
+ 	{
+ 		framesDone1 = pahsc->pahsc_NumFramesDone;
+ 		whenIncremented = pahsc->pahsc_WhenFramesDoneIncremented;
+ 		framesDone2 = pahsc->pahsc_NumFramesDone;
+ 	} while( framesDone1 != framesDone2 );
+ 	
+ /* Calculate how many microseconds have elapsed and convert to frames. */
+ 	Microseconds( &now );
+ 	now64 = UnsignedWideToUInt64( now );
+ 	microsElapsed = U64Subtract( now64, whenIncremented );
+ 	framesElapsed = microsElapsed * past->past_SampleRate * 0.000001;
+ 	
+	return framesDone1 + framesElapsed;
+}
+
+/**************************************************************************
+** Callback for Input, SPBRecord()
+*/
+int gRecordCounter = 0;
+int gPlayCounter = 0;
+pascal void PaMac_InputCompletionProc(SPBPtr recParams)
+{
+    PaError                    result = paNoError;
+    int                        finished = 1;
+    internalPortAudioStream   *past;
+    PaHostSoundControl        *pahsc;
+
+    gRecordCounter += 1; /* debug hack to see if engine running */
+
+    /* Get our PA data from Mac structure. */
+    past = (internalPortAudioStream *) recParams->userLong;
+    if( past == NULL ) return;
+
+    if( past->past_Magic != PA_MAGIC )
+    {
+        AddTraceMessage("PaMac_InputCompletionProc: bad MAGIC, past", (long) past );
+        AddTraceMessage("PaMac_InputCompletionProc: bad MAGIC, magic", (long) past->past_Magic );
+        goto error;
+    }
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    past->past_NumCallbacks += 1;
+
+    /* Have we been asked to stop recording? */
+    if( (recParams->error == abortErr) || pahsc->pahsc_StopRecording ) goto error;
+
+    /* If there are no output channels, then we need to call the user callback function from here.
+     * Otherwise we will call the user code during the output completion routine.
+     */
+    if(past->past_NumOutputChannels == 0)
+    {
+		SetFramesDone( pahsc,
+			pahsc->pahsc_NumFramesDone + pahsc->pahsc_FramesPerHostBuffer );
+        result = PaMac_CallUserLoop( past, NULL );
+    }
+
+    /* Did user code ask us to stop? If not, issue another recording request. */
+    if( (result == paNoError) && (pahsc->pahsc_StopRecording == 0) )
+    {
+        result = PaMac_RecordNext( past );
+        if( result != paNoError ) pahsc->pahsc_IsRecording = 0;
+    }
+    else goto error;
+
+    return;
+
+error:
+    pahsc->pahsc_IsRecording = 0;
+    pahsc->pahsc_StopRecording = 0;
+    return;
+}
+
+/***********************************************************************
+** Called by either input or output completion proc.
+** Grabs input data if any present, and calls PA conversion code,
+** that in turn calls user code.
+*/
+static PaError PaMac_CallUserLoop( internalPortAudioStream   *past, int16 *outPtr )
+{
+    PaError             result = paNoError;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    int16              *inPtr = NULL;
+    int                 i;
+    
+
+    /* Advance read index for sound input FIFO here, independantly of record/write process. */
+    if(past->past_NumInputChannels > 0)
+    {
+        if( MultiBuffer_IsReadable( &pahsc->pahsc_InputMultiBuffer ) )
+        {
+            inPtr = (int16 *)  MultiBuffer_GetNextReadBuffer( &pahsc->pahsc_InputMultiBuffer );
+            MultiBuffer_AdvanceReadIndex( &pahsc->pahsc_InputMultiBuffer );
+        }
+    }
+
+    /* Call user code enough times to fill buffer. */
+    if( (inPtr != NULL) || (outPtr != NULL) )
+    {
+        PaMac_StartLoadCalculation( past ); /* CPU usage */
+
+#ifdef PA_MAX_USAGE_ALLOWED
+	/* If CPU usage exceeds limit, skip user callback to prevent hanging CPU. */
+		if( past->past_Usage > PA_MAX_USAGE_ALLOWED )
+	    {
+	    	past->past_FrameCount += (PaTimestamp) pahsc->pahsc_FramesPerHostBuffer;
+		}
+		else
+#endif
+		{
+		
+	        for( i=0; i<pahsc->pahsc_UserBuffersPerHostBuffer; i++ )
+	        {
+	            result = (PaError) Pa_CallConvertInt16( past, inPtr, outPtr );
+	            if( result != 0)
+	            {
+	                /* Recording might be in another process, so tell it to stop with a flag. */
+	                pahsc->pahsc_StopRecording = pahsc->pahsc_IsRecording;
+	                break;
+	            }
+	            /* Advance sample pointers. */
+	            if(inPtr != NULL) inPtr += past->past_FramesPerUserBuffer * past->past_NumInputChannels;
+	            if(outPtr != NULL) outPtr += past->past_FramesPerUserBuffer * past->past_NumOutputChannels;
+	        }
+	    }
+		
+        PaMac_EndLoadCalculation( past );
+    }
+    return result;
+}
+
+/***********************************************************************
+** Setup next recording buffer in FIFO and issue recording request to Snd Input Manager.
+*/
+static PaError PaMac_RecordNext( internalPortAudioStream   *past )
+{
+    PaError  result = paNoError;
+    OSErr     err;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    /* Get pointer to next buffer to record into. */
+    pahsc->pahsc_InputParams.bufferPtr  = MultiBuffer_GetNextWriteBuffer( &pahsc->pahsc_InputMultiBuffer );
+
+    /* Advance write index if there is room. Otherwise keep writing same buffer. */
+    if( MultiBuffer_IsWriteable( &pahsc->pahsc_InputMultiBuffer ) )
+    {
+        MultiBuffer_AdvanceWriteIndex( &pahsc->pahsc_InputMultiBuffer );
+    }
+
+    AddTraceMessage("PaMac_RecordNext: bufferPtr", (long) pahsc->pahsc_InputParams.bufferPtr );
+    AddTraceMessage("PaMac_RecordNext: nextWrite", pahsc->pahsc_InputMultiBuffer.nextWrite );
+
+    /* Setup parameters and issue an asynchronous recording request. */
+    pahsc->pahsc_InputParams.bufferLength      = pahsc->pahsc_BytesPerInputHostBuffer;
+    pahsc->pahsc_InputParams.count             = pahsc->pahsc_BytesPerInputHostBuffer;
+    err = SPBRecord(&pahsc->pahsc_InputParams, true);
+    if( err )
+    {
+        AddTraceMessage("PaMac_RecordNext: SPBRecord error ", err );
+        sPaHostError = err;
+        result = paHostError;
+    }
+    else
+    {
+        pahsc->pahsc_IsRecording = 1;
+    }
+    return result;
+}
+
+/**************************************************************************
+** Callback for Output Playback()
+** Return negative error, 0 to continue, 1 to stop.
+*/
+long    PaMac_FillNextOutputBuffer( internalPortAudioStream   *past, int index )
+{
+    PaHostSoundControl  *pahsc;
+    long                 result = 0;
+    int                  finished = 1;
+    char                *outPtr;
+
+    gPlayCounter += 1; /* debug hack */
+
+    past->past_NumCallbacks += 1;
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    if( pahsc == NULL ) return -1;
+    /* Are we nested?! */
+    if( pahsc->pahsc_IfInsideCallback ) return 0;
+    pahsc->pahsc_IfInsideCallback = 1;
+    /* Get pointer to buffer to fill. */
+    outPtr = pahsc->pahsc_SoundHeaders[index].samplePtr;
+    /* Combine with any sound input, and call user callback. */
+    result = PaMac_CallUserLoop( past, (int16 *) outPtr );
+
+    pahsc->pahsc_IfInsideCallback = 0;
+    return result;
+}
+
+/*************************************************************************************
+** Called by SoundManager when ready for another buffer.
+*/
+static pascal void PaMac_OutputCompletionProc (SndChannelPtr theChannel, SndCommand * theCallBackCmd)
+{
+    internalPortAudioStream *past;
+    PaHostSoundControl      *pahsc;
+    (void) theChannel;
+    (void) theCallBackCmd;
+
+    /* Get our data from Mac structure. */
+    past = (internalPortAudioStream *) theCallBackCmd->param2;
+    if( past == NULL ) return;
+
+    pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    pahsc->pahsc_NumOutsPlayed += 1;
+
+	SetFramesDone( pahsc,
+			pahsc->pahsc_NumFramesDone + pahsc->pahsc_FramesPerHostBuffer );
+			
+    PaMac_BackgroundManager( past, theCallBackCmd->param1 );
+}
+
+/*******************************************************************/
+static PaError PaMac_BackgroundManager( internalPortAudioStream   *past, int index )
+{
+    PaError      result = paNoError;
+    PaHostSoundControl *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+    /* Has someone asked us to abort by calling Pa_AbortStream()? */
+    if( past->past_StopNow )
+    {
+        SndCommand  command;
+        /* Clear the queue of any pending commands. */
+        command.cmd = flushCmd;
+        command.param1 = command.param2 = 0;
+        SndDoImmediate( pahsc->pahsc_Channel, &command );
+        /* Then stop currently playing buffer, if any. */
+        command.cmd = quietCmd;
+        SndDoImmediate( pahsc->pahsc_Channel, &command );
+        past->past_IsActive = 0;
+    }
+    /* Has someone asked us to stop by calling Pa_StopStream()
+     * OR has a user callback returned '1' to indicate finished.
+     */
+    else if( past->past_StopSoon )
+    {
+        if( (pahsc->pahsc_NumOutsQueued - pahsc->pahsc_NumOutsPlayed) <= 0 )
+        {
+            past->past_IsActive = 0; /* We're finally done. */
+        }
+    }
+    else
+    {
+        PaMac_PlayNext( past, index );
+    }
+    return result;
+}
+
+/*************************************************************************************
+** Fill next buffer with sound and queue it for playback.
+*/
+static void PaMac_PlayNext ( internalPortAudioStream *past, int index )
+{
+    OSErr                  error;
+    long                     result;
+    SndCommand               playCmd;
+    SndCommand           callbackCmd;
+    PaHostSoundControl      *pahsc = (PaHostSoundControl *) past->past_DeviceData;
+
+    /* If this was the last buffer, or abort requested, then just be done. */
+    if ( past->past_StopSoon ) goto done;
+    
+    /* Load buffer with sound. */
+    result = PaMac_FillNextOutputBuffer ( past, index );
+    if( result > 0 ) past->past_StopSoon = 1; /* Stop generating audio but wait until buffers play. */
+    else if( result < 0 ) goto done;
+    
+    /* Play the next buffer. */
+    playCmd.cmd = bufferCmd;
+    playCmd.param1 = 0;
+    playCmd.param2 = (long) &pahsc->pahsc_SoundHeaders[ index ];
+    error = SndDoCommand (pahsc->pahsc_Channel, &playCmd, true );
+    if( error != noErr ) goto gotError;
+    
+    /* Ask for a callback when it is done. */
+    callbackCmd.cmd = callBackCmd;
+    callbackCmd.param1 = index;
+    callbackCmd.param2 = (long)past;
+    error = SndDoCommand (pahsc->pahsc_Channel, &callbackCmd, true );
+    if( error != noErr ) goto gotError;
+    pahsc->pahsc_NumOutsQueued += 1;
+
+    return;
+
+gotError:
+    sPaHostError = error;
+done:
+    return;
+}
diff --git a/libs/portaudio/pa_unix/pa_unix_hostapis.c b/libs/portaudio/pa_unix/pa_unix_hostapis.c
new file mode 100644
index 0000000000000000000000000000000000000000..8494753c62979a3d1d71f3d03e506232bbd0cfb5
--- /dev/null
+++ b/libs/portaudio/pa_unix/pa_unix_hostapis.c
@@ -0,0 +1,63 @@
+/*
+ * $Id$
+ * 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_OSS
+        PaOSS_Initialize,
+#endif
+
+#ifdef PA_USE_ALSA
+        PaAlsa_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;
+
diff --git a/libs/portaudio/pa_unix/pa_unix_util.c b/libs/portaudio/pa_unix/pa_unix_util.c
new file mode 100644
index 0000000000000000000000000000000000000000..f8cab4021c78afc6c5de2680ca47665f354992f0
--- /dev/null
+++ b/libs/portaudio/pa_unix/pa_unix_util.c
@@ -0,0 +1,175 @@
+/*
+ * $Id$
+ * 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 );
+}
+*/
diff --git a/libs/portaudio/pa_unix/pa_unix_util.h b/libs/portaudio/pa_unix/pa_unix_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..01dda01e5f775e8ece5906ffdc29b08057c25519
--- /dev/null
+++ b/libs/portaudio/pa_unix/pa_unix_util.h
@@ -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
diff --git a/libs/portaudio/pa_unix_oss/pa_unix_oss.c b/libs/portaudio/pa_unix_oss/pa_unix_oss.c
new file mode 100644
index 0000000000000000000000000000000000000000..dce05caf6f665e010a81a96b72f8ff8e20736851
--- /dev/null
+++ b/libs/portaudio/pa_unix_oss/pa_unix_oss.c
@@ -0,0 +1,1923 @@
+/*
+ * $Id$
+ * 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 <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 __FreeBSD__
+# include <sys/soundcard.h>
+# define DEVICE_NAME_BASE            "/dev/dsp"
+#elif defined __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/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, 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 );
+    /* TODO: Handle condition where number of frames read doesn't equal number of frames requested */
+
+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 );
+    /* TODO: Handle condition where number of frames written doesn't equal number of frames requested */
+
+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, outLatency;
+
+    /* 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 );
+    PA_ENSURE( 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, 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 );
+}
+
diff --git a/libs/portaudio/pa_unix_oss/recplay.c b/libs/portaudio/pa_unix_oss/recplay.c
new file mode 100644
index 0000000000000000000000000000000000000000..9d4c78cfa3073a7367c7d3d24dcc5db63e556728
--- /dev/null
+++ b/libs/portaudio/pa_unix_oss/recplay.c
@@ -0,0 +1,114 @@
+/*
+ * recplay.c
+ * Phil Burk
+ * Minimal record and playback test.
+ * 
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+#ifndef __STDC__
+/* #include <getopt.h> */
+#endif /* __STDC__ */
+#include <fcntl.h>
+#ifdef __STDC__
+#include <string.h>
+#else /* __STDC__ */
+#include <strings.h>
+#endif /* __STDC__ */
+#include <sys/soundcard.h>
+
+#define NUM_BYTES   (64*1024)
+#define BLOCK_SIZE   (4*1024)
+
+#define AUDIO "/dev/dsp"
+
+char buffer[NUM_BYTES];
+
+int audioDev = 0;
+
+main (int argc, char *argv[])
+{
+    int   numLeft;
+    char *ptr;
+    int   num;
+    int   samplesize;
+
+    /********** RECORD ********************/
+    /* Open audio device. */
+    audioDev = open (AUDIO, O_RDONLY, 0);
+    if (audioDev == -1)
+    {
+        perror (AUDIO);
+        exit (-1);
+    }
+
+    /* Set to 16 bit samples. */
+    samplesize = 16;
+    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);
+    if (samplesize != 16)
+    {
+        perror("Unable to set the sample size.");
+        exit(-1);
+    }
+
+    /* Record in blocks */
+    printf("Begin recording.\n");
+    numLeft = NUM_BYTES;
+    ptr = buffer;
+    while( numLeft >= BLOCK_SIZE )
+    {
+        if ( (num = read (audioDev, ptr, BLOCK_SIZE)) < 0 )
+        {
+            perror (AUDIO);
+            exit (-1);
+        }
+        else
+        {
+            printf("Read %d bytes\n", num);
+            ptr += num;
+            numLeft -= num;
+        }
+    }
+
+    close( audioDev );
+
+    /********** PLAYBACK ********************/
+    /* Open audio device for writing. */
+    audioDev = open (AUDIO, O_WRONLY, 0);
+    if (audioDev == -1)
+    {
+        perror (AUDIO);
+        exit (-1);
+    }
+
+    /* Set to 16 bit samples. */
+    samplesize = 16;
+    ioctl(audioDev, SNDCTL_DSP_SAMPLESIZE, &samplesize);
+    if (samplesize != 16)
+    {
+        perror("Unable to set the sample size.");
+        exit(-1);
+    }
+
+    /* Play in blocks */
+    printf("Begin playing.\n");
+    numLeft = NUM_BYTES;
+    ptr = buffer;
+    while( numLeft >= BLOCK_SIZE )
+    {
+        if ( (num = write (audioDev, ptr, BLOCK_SIZE)) < 0 )
+        {
+            perror (AUDIO);
+            exit (-1);
+        }
+        else
+        {
+            printf("Wrote %d bytes\n", num);
+            ptr += num;
+            numLeft -= num;
+        }
+    }
+
+    close( audioDev );
+}
diff --git a/libs/portaudio/pablio/ringbuffer.c b/libs/portaudio/pablio/ringbuffer.c
new file mode 100644
index 0000000000000000000000000000000000000000..16031fef67d663137db8dcfa7085b9800e7258d0
--- /dev/null
+++ b/libs/portaudio/pablio/ringbuffer.c
@@ -0,0 +1,199 @@
+/*
+ * $Id$
+ * ringbuffer.c
+ * Ring Buffer utility..
+ *
+ * Author: Phil Burk, http://www.softsynth.com
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: 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.
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "ringbuffer.h"
+#include <string.h>
+
+/***************************************************************************
+ * 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 )
+{
+    return ( (rbuf->writeIndex - rbuf->readIndex) & rbuf->bigMask );
+}
+/***************************************************************************
+** Return number of bytes available for writing. */
+long RingBuffer_GetWriteAvailable( RingBuffer *rbuf )
+{
+    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 )
+{
+    return rbuf->writeIndex = (rbuf->writeIndex + numBytes) & rbuf->bigMask;
+}
+
+/***************************************************************************
+** 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 )
+{
+    return rbuf->readIndex = (rbuf->readIndex + numBytes) & rbuf->bigMask;
+}
+
+/***************************************************************************
+** Return bytes written. */
+long RingBuffer_Write( RingBuffer *rbuf, 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;
+}
diff --git a/libs/portaudio/pablio/ringbuffer.h b/libs/portaudio/pablio/ringbuffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..91cc7e405e8d0df425da1f4852c79fff65e539db
--- /dev/null
+++ b/libs/portaudio/pablio/ringbuffer.h
@@ -0,0 +1,100 @@
+#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
+ *
+ * This program is distributed with the PortAudio Portable Audio Library.
+ * For more information see: 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.
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.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, 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 */
diff --git a/libs/stund/Makefile.am b/libs/stund/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..56ffb3375780934416e07d3a4f4bc80ef2581360
--- /dev/null
+++ b/libs/stund/Makefile.am
@@ -0,0 +1,5 @@
+noinst_LTLIBRARIES = libstun.la
+
+libstun_la_SOURCES = \
+	stun.cxx stun.h \
+	udp.cxx udp.h
\ No newline at end of file
diff --git a/libs/stund/Stun.sln b/libs/stund/Stun.sln
new file mode 100644
index 0000000000000000000000000000000000000000..b2977f58af4ffbdf307fde74427eebf1ba3dc18d
--- /dev/null
+++ b/libs/stund/Stun.sln
@@ -0,0 +1,38 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStun", "WinStun\WinStun.vcproj", "{717021E7-DCC4-41E7-9CDA-FA7596F18C56}"
+EndProject
+Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "WinStunSetup", "WinStunSetup\WinStunSetup.vdproj", "{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{76E56991-C964-444B-82A6-AFDA5145E18A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{2011B7B6-6932-431D-83A3-E825A271F8A8}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Debug.ActiveCfg = Debug|Win32
+		{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Debug.Build.0 = Debug|Win32
+		{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Release.ActiveCfg = Release|Win32
+		{717021E7-DCC4-41E7-9CDA-FA7596F18C56}.Release.Build.0 = Release|Win32
+		{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}.Debug.ActiveCfg = Debug
+		{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}.Release.ActiveCfg = Release
+		{EB812030-9F2E-4FB7-813D-2E99AE2C5E4E}.Release.Build.0 = Release
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.ActiveCfg = Debug|Win32
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.Build.0 = Debug|Win32
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.ActiveCfg = Release|Win32
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.Build.0 = Release|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.ActiveCfg = Debug|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.Build.0 = Debug|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.ActiveCfg = Release|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/libs/stund/WinStun/WinStun.cpp b/libs/stund/WinStun/WinStun.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e5bdc3bf9d15760468ebaafd18684e3a62cd8907
--- /dev/null
+++ b/libs/stund/WinStun/WinStun.cpp
@@ -0,0 +1,67 @@
+// WinStun.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "WinStun.h"
+#include "WinStunDlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CWinStunApp
+
+BEGIN_MESSAGE_MAP(CWinStunApp, CWinApp)
+	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+
+// CWinStunApp construction
+
+CWinStunApp::CWinStunApp()
+{
+	// TODO: add construction code here,
+	// Place all significant initialization in InitInstance
+}
+
+
+// The one and only CWinStunApp object
+
+CWinStunApp theApp;
+
+
+// CWinStunApp initialization
+
+BOOL CWinStunApp::InitInstance()
+{
+	// InitCommonControls() is required on Windows XP if an application
+	// manifest specifies use of ComCtl32.dll version 6 or later to enable
+	// visual styles.  Otherwise, any window creation will fail.
+	InitCommonControls();
+
+	CWinApp::InitInstance();
+
+	if (!AfxSocketInit())
+	{
+		AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
+		return FALSE;
+	}
+
+	AfxEnableControlContainer();
+
+
+	CWinStunDlg dlg;
+	m_pMainWnd = &dlg;
+	INT_PTR nResponse = dlg.DoModal();
+
+	if (nResponse == IDCANCEL)
+	{
+		// TODO: Place code here to handle when the dialog is
+		//  dismissed with Cancel
+	}
+
+	// Since the dialog has been closed, return FALSE so that we exit the
+	//  application, rather than start the application's message pump.
+	return FALSE;
+}
diff --git a/libs/stund/WinStun/WinStun.h b/libs/stund/WinStun/WinStun.h
new file mode 100644
index 0000000000000000000000000000000000000000..34a36db1521e4dad9182fb717c0c62fdca9e0e40
--- /dev/null
+++ b/libs/stund/WinStun/WinStun.h
@@ -0,0 +1,31 @@
+// WinStun.h : main header file for the PROJECT_NAME application
+//
+
+#pragma once
+
+#ifndef __AFXWIN_H__
+	#error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "resource.h"		// main symbols
+
+
+// CWinStunApp:
+// See WinStun.cpp for the implementation of this class
+//
+
+class CWinStunApp : public CWinApp
+{
+public:
+	CWinStunApp();
+
+// Overrides
+	public:
+	virtual BOOL InitInstance();
+
+// Implementation
+
+	DECLARE_MESSAGE_MAP()
+};
+
+extern CWinStunApp theApp;
\ No newline at end of file
diff --git a/libs/stund/WinStun/WinStun.rc b/libs/stund/WinStun/WinStun.rc
new file mode 100644
index 0000000000000000000000000000000000000000..56c1757bf173ca40f2fb86f54ea71ae4cc5d3286
--- /dev/null
+++ b/libs/stund/WinStun/WinStun.rc
@@ -0,0 +1,210 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.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
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+    "#define _AFX_NO_OLE_RESOURCES\r\n"
+    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+    "\r\n"
+    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+    "LANGUAGE 9, 1\r\n"
+    "#pragma code_page(1252)\r\n"
+    "#include ""res\\WinStun.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
+    "#include ""afxres.rc""         // Standard components\r\n"
+    "#endif\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME           ICON                    "res\\WinStun.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "About WinStun"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20
+    LTEXT           "WinStun Version 0.92",IDC_STATIC,40,10,119,8,
+                    SS_NOPREFIX
+    LTEXT           "Cullen Jennings",IDC_STATIC,40,25,119,8
+    DEFPUSHBUTTON   "OK",IDOK,178,7,50,16,WS_GROUP
+END
+
+IDD_WINSTUN_DIALOG DIALOGEX 0, 0, 209, 129
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | 
+    WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "WinStun"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+    PUSHBUTTON      "Quit",IDCANCEL,116,106,50,16
+    PUSHBUTTON      "Run Test",IDC_TEST,19,108,50,14
+    LTEXT           "Stun Server",IDC_STATIC,7,7,39,8
+    EDITTEXT        IDC_SERVER,48,7,142,12,ES_AUTOHSCROLL
+    EDITTEXT        IDC_RESULT,7,24,190,77,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP,
+                    WS_EX_STATICEDGE
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,92,0,0
+ PRODUCTVERSION 0,92,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904e4"
+        BEGIN
+            VALUE "FileDescription", "STUN Client"
+            VALUE "FileVersion", "0, 92, 0, 0"
+            VALUE "InternalName", "WinStun.exe"
+            VALUE "OriginalFilename", "WinStun.exe"
+            VALUE "ProductName", "WinStun"
+            VALUE "ProductVersion", "0.92.0.0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    IDD_ABOUTBOX, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 228
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 48
+    END
+
+    IDD_WINSTUN_DIALOG, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 202
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 122
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+IDR_MANIFEST            RT_MANIFEST             "res\\WinStun.manifest"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE 
+BEGIN
+    IDS_ABOUTBOX            "&About WinStun..."
+    IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed."
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#include "res\WinStun.rc2"  // non-Microsoft Visual C++ edited resources
+#include "afxres.rc"         // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/libs/stund/WinStun/WinStun.vcproj b/libs/stund/WinStun/WinStun.vcproj
new file mode 100644
index 0000000000000000000000000000000000000000..8d0f05e0722e3edddc6c1df690cb1cd1742b7644
--- /dev/null
+++ b/libs/stund/WinStun/WinStun.vcproj
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="WinStun"
+	ProjectGUID="{717021E7-DCC4-41E7-9CDA-FA7596F18C56}"
+	Keyword="MFCProj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			UseOfMFC="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				TreatWChar_tAsBuiltInType="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="FALSE"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			UseOfMFC="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
+				StringPooling="TRUE"
+				MinimalRebuild="FALSE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				TreatWChar_tAsBuiltInType="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="FALSE"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="WinStun.cpp">
+			</File>
+			<File
+				RelativePath="WinStunDlg.cpp">
+			</File>
+			<File
+				RelativePath="stdafx.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\stun.cxx">
+			</File>
+			<File
+				RelativePath="..\udp.cxx">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+			<File
+				RelativePath="Resource.h">
+			</File>
+			<File
+				RelativePath="WinStun.h">
+			</File>
+			<File
+				RelativePath="WinStunDlg.h">
+			</File>
+			<File
+				RelativePath="stdafx.h">
+			</File>
+			<File
+				RelativePath="..\stun.h">
+			</File>
+			<File
+				RelativePath="..\udp.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;manifest">
+			<File
+				RelativePath="res\WinStun.ico">
+			</File>
+			<File
+				RelativePath="res\WinStun.manifest">
+			</File>
+			<File
+				RelativePath="WinStun.rc">
+			</File>
+			<File
+				RelativePath="res\WinStun.rc2">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libs/stund/WinStun/WinStunDlg.cpp b/libs/stund/WinStun/WinStunDlg.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..19507aa3c14421514403558719c5d46d2a13dbba
--- /dev/null
+++ b/libs/stund/WinStun/WinStunDlg.cpp
@@ -0,0 +1,246 @@
+
+#include "stdafx.h"
+#include "WinStun.h"
+#include "WinStunDlg.h"
+
+#include <cassert>
+
+#include "../stun.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CAboutDlg dialog used for App About
+
+class CAboutDlg : public CDialog
+{
+public:
+	CAboutDlg();
+
+// Dialog Data
+	enum { IDD = IDD_ABOUTBOX };
+
+	protected:
+	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+
+// Implementation
+protected:
+	DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
+{
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+	CDialog::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
+END_MESSAGE_MAP()
+
+
+// CWinStunDlg dialog
+
+
+
+CWinStunDlg::CWinStunDlg(CWnd* pParent /*=NULL*/)
+	: CDialog(CWinStunDlg::IDD, pParent)
+	, mServerName(_T(""))
+{
+	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+}
+
+void CWinStunDlg::DoDataExchange(CDataExchange* pDX)
+{
+	mServerName = _T("larry.gloo.net");
+	CDialog::DoDataExchange(pDX);
+	DDX_Text(pDX, IDC_SERVER, mServerName);
+	DDV_MaxChars(pDX, mServerName, 128);
+}
+
+BEGIN_MESSAGE_MAP(CWinStunDlg, CDialog)
+	ON_WM_SYSCOMMAND()
+	ON_WM_PAINT()
+	ON_WM_QUERYDRAGICON()
+	//}}AFX_MSG_MAP
+	ON_BN_CLICKED(IDC_TEST, OnBnClickedTest)
+END_MESSAGE_MAP()
+
+
+// CWinStunDlg message handlers
+
+BOOL CWinStunDlg::OnInitDialog()
+{
+	CDialog::OnInitDialog();
+
+	// Add "About..." menu item to system menu.
+
+	// IDM_ABOUTBOX must be in the system command range.
+	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
+	ASSERT(IDM_ABOUTBOX < 0xF000);
+
+	CMenu* pSysMenu = GetSystemMenu(FALSE);
+	if (pSysMenu != NULL)
+	{
+		CString strAboutMenu;
+		strAboutMenu.LoadString(IDS_ABOUTBOX);
+		if (!strAboutMenu.IsEmpty())
+		{
+			pSysMenu->AppendMenu(MF_SEPARATOR);
+			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
+		}
+	}
+
+	// Set the icon for this dialog.  The framework does this automatically
+	//  when the application's main window is not a dialog
+	SetIcon(m_hIcon, TRUE);			// Set big icon
+	SetIcon(m_hIcon, FALSE);		// Set small icon
+
+	// TODO: Add extra initialization here
+	
+	return TRUE;  // return TRUE  unless you set the focus to a control
+}
+
+void CWinStunDlg::OnSysCommand(UINT nID, LPARAM lParam)
+{
+	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
+	{
+		CAboutDlg dlgAbout;
+		dlgAbout.DoModal();
+	}
+	else
+	{
+		CDialog::OnSysCommand(nID, lParam);
+	}
+}
+
+// If you add a minimize button to your dialog, you will need the code below
+//  to draw the icon.  For MFC applications using the document/view model,
+//  this is automatically done for you by the framework.
+
+void CWinStunDlg::OnPaint() 
+{
+	if (IsIconic())
+	{
+		CPaintDC dc(this); // device context for painting
+
+		SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
+
+		// Center icon in client rectangle
+		int cxIcon = GetSystemMetrics(SM_CXICON);
+		int cyIcon = GetSystemMetrics(SM_CYICON);
+		CRect rect;
+		GetClientRect(&rect);
+		int x = (rect.Width() - cxIcon + 1) / 2;
+		int y = (rect.Height() - cyIcon + 1) / 2;
+
+		// Draw the icon
+		dc.DrawIcon(x, y, m_hIcon);
+	}
+	else
+	{
+		CDialog::OnPaint();
+	}
+}
+
+// The system calls this function to obtain the cursor to display while the user drags
+//  the minimized window.
+HCURSOR CWinStunDlg::OnQueryDragIcon()
+{
+	return static_cast<HCURSOR>(m_hIcon);
+}
+
+void CWinStunDlg::OnBnClickedTest()
+{
+	// TODO: Add your control notification handler code here
+	CString& server = mServerName;
+	
+	CEdit* display = (CEdit*)GetDlgItem(IDC_RESULT);
+	assert(display);
+	display->SetWindowText( CString( _T("Running...\r\n")) );
+
+	CEdit* edit = (CEdit*)GetDlgItem(IDC_SERVER);
+	assert(edit);
+	edit->GetWindowText(server);
+
+	StunAddress4 stunServerAddr;
+
+	LPCTSTR str;
+	str = server;
+	char* s;
+	s = (char*)str;
+	stunParseServerName( s, stunServerAddr);
+
+	bool verbose = false;
+	StunAddress4 sAddr;
+	sAddr.port = 0;
+	sAddr.addr = 0;
+    bool preservePort;
+	bool hairpin;
+	int port=0;
+	NatType stype = stunNatType( stunServerAddr, verbose, &preservePort, &hairpin, port, &sAddr );
+
+	CString text;
+
+	switch (stype)
+	{
+	case StunTypeOpen:
+		text = _T("No NAT detected - VoIP should work");
+		break;
+	case StunTypeConeNat:
+		text = _T("Cone Nat detect - VoIP will work with STUN");
+		break;
+	case StunTypeRestrictedNat:
+		text = _T("Address restricted NAT detected - VoIP will work with STUN");
+		break;
+	case StunTypePortRestrictedNat:
+		text = _T("Port restricted NAT detected - VoIP will work with STUN");
+		break;
+	case StunTypeSymNat:
+		text = _T("Symetric - VOIP will NOT work");
+		break;
+	case StunTypeSymFirewall:
+		text = _T("Symetric firewall - VOIP will NOT work");
+		break;
+	case StunTypeBlocked:
+		text = _T("Could not reach the stun server - check server name is correct");
+		break;
+	default:
+		text = _T("Unkown NAT type");
+		break;
+	}
+
+	text += _T("\r\n");
+
+	if (preservePort)
+	{
+		text+= _T("Preserves port number\r\n");
+	}
+	else
+	{
+		text+= _T("Does not preserve port number\r\n");
+	}
+
+	if (hairpin)
+	{
+		text+= _T("Supports hairpin of media\r\n");
+	}
+	else
+	{
+		text+= _T("Does not supports hairpin of media\r\n");
+	}
+
+
+	CString strAddr;
+	strAddr.Format(_T("Public IP address: %d.%d.%d.%d"), 
+			(sAddr.addr>>24)&0xFF,(sAddr.addr>>16)&0xFF,(sAddr.addr>>8)&0xFF,(sAddr.addr>>0)&0xFF
+			);
+
+	text += strAddr;
+
+	display->SetWindowText( text + CString( _T("\r\n")) );
+}
diff --git a/libs/stund/WinStun/WinStunDlg.h b/libs/stund/WinStun/WinStunDlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..368d26018884eef176e2a9326e1b6a19a38807d8
--- /dev/null
+++ b/libs/stund/WinStun/WinStunDlg.h
@@ -0,0 +1,35 @@
+// WinStunDlg.h : header file
+//
+
+#pragma once
+
+
+// CWinStunDlg dialog
+class CWinStunDlg : public CDialog
+{
+// Construction
+public:
+	CWinStunDlg(CWnd* pParent = NULL);	// standard constructor
+
+// Dialog Data
+	enum { IDD = IDD_WINSTUN_DIALOG };
+
+	protected:
+	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
+
+
+// Implementation
+protected:
+	HICON m_hIcon;
+
+	// Generated message map functions
+	virtual BOOL OnInitDialog();
+	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
+	afx_msg void OnPaint();
+	afx_msg HCURSOR OnQueryDragIcon();
+	DECLARE_MESSAGE_MAP()
+public:
+	afx_msg void OnBnClickedTest();
+	// the name of the stun server to use 
+	CString mServerName;
+};
diff --git a/libs/stund/WinStun/res/WinStun.ico b/libs/stund/WinStun/res/WinStun.ico
new file mode 100644
index 0000000000000000000000000000000000000000..c920902960a34a21a46c5335471a847e43dedbfe
Binary files /dev/null and b/libs/stund/WinStun/res/WinStun.ico differ
diff --git a/libs/stund/WinStun/res/WinStun.manifest b/libs/stund/WinStun/res/WinStun.manifest
new file mode 100644
index 0000000000000000000000000000000000000000..39ecae9fe14e7a8eb48d4819e39a7bdd824170c8
--- /dev/null
+++ b/libs/stund/WinStun/res/WinStun.manifest
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+<assemblyIdentity 
+    version="1.0.0.0" 
+    processorArchitecture="X86" 
+    name="Microsoft.Windows.WinStun"
+    type="win32" 
+/> 
+<description>Your app description here</description> 
+<dependency> 
+    <dependentAssembly> 
+        <assemblyIdentity 
+            type="win32" 
+            name="Microsoft.Windows.Common-Controls" 
+            version="6.0.0.0" 
+            processorArchitecture="X86" 
+            publicKeyToken="6595b64144ccf1df" 
+            language="*" 
+        /> 
+    </dependentAssembly> 
+</dependency> 
+</assembly>
diff --git a/libs/stund/WinStun/res/WinStun.rc2 b/libs/stund/WinStun/res/WinStun.rc2
new file mode 100644
index 0000000000000000000000000000000000000000..345909a79d5e75eb0611cf8a94ba33dfb2990057
--- /dev/null
+++ b/libs/stund/WinStun/res/WinStun.rc2
@@ -0,0 +1,13 @@
+//
+// WinStun.RC2 - resources Microsoft Visual C++ does not edit directly
+//
+
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Add manually edited resources here...
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/libs/stund/WinStun/resource.h b/libs/stund/WinStun/resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a333540d8d59c1c2adbe6f36a568682848fffe5
--- /dev/null
+++ b/libs/stund/WinStun/resource.h
@@ -0,0 +1,26 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WinStun.rc
+//
+#define IDR_MANIFEST                    1
+#define IDM_ABOUTBOX                    0x0010
+#define IDD_ABOUTBOX                    100
+#define IDS_ABOUTBOX                    101
+#define IDD_WINSTUN_DIALOG              102
+#define IDP_SOCKETS_INIT_FAILED         103
+#define IDR_MAINFRAME                   128
+#define IDC_TEST                        1000
+#define IDC_SERVER                      1001
+#define IDC_EDIT2                       1002
+#define IDC_RESULT                      1002
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        129
+#define _APS_NEXT_COMMAND_VALUE         32771
+#define _APS_NEXT_CONTROL_VALUE         1003
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
diff --git a/libs/stund/WinStun/stdafx.cpp b/libs/stund/WinStun/stdafx.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e20fa31c57dc4bb29151be8c207bb2411c26372a
--- /dev/null
+++ b/libs/stund/WinStun/stdafx.cpp
@@ -0,0 +1,7 @@
+// stdafx.cpp : source file that includes just the standard includes
+// WinStun.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+
diff --git a/libs/stund/WinStun/stdafx.h b/libs/stund/WinStun/stdafx.h
new file mode 100644
index 0000000000000000000000000000000000000000..69dcbe280db7867b1ae49fe6132869a79d84fc95
--- /dev/null
+++ b/libs/stund/WinStun/stdafx.h
@@ -0,0 +1,43 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers
+#endif
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER				// Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400		// Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT		// Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400		// Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif						
+
+#ifndef _WIN32_WINDOWS		// Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE			// Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400	// Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS	// some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+#include <afxdisp.h>        // MFC Automation classes
+
+#include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h>			// MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxsock.h>		// MFC socket extensions
diff --git a/libs/stund/WinStunSetup/WinStunSetup.vdproj b/libs/stund/WinStunSetup/WinStunSetup.vdproj
new file mode 100644
index 0000000000000000000000000000000000000000..71023929170c7a668fa6036c3106750d5d26e365
--- /dev/null
+++ b/libs/stund/WinStunSetup/WinStunSetup.vdproj
@@ -0,0 +1,797 @@
+"DeployProject"
+{
+"VSVersion" = "3:700"
+"ProjectType" = "8:{5443560c-dbb4-11d2-8724-00a0c9a8b90c}"
+"IsWebType" = "8:FALSE"
+"ProjectName" = "8:WinStunSetup"
+"LanguageId" = "3:1033"
+"CodePage" = "3:1252"
+"UILanguageId" = "3:1033"
+"SccProjectName" = "8:"
+"SccLocalPath" = "8:"
+"SccAuxPath" = "8:"
+"SccProvider" = "8:"
+    "Hierarchy"
+    {
+        "Entry"
+        {
+        "MsmKey" = "8:_09250952BF7CDB5CAADD71B62AF74DB4"
+        "OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
+        "MsmSig" = "8:C:\\WINDOWS\\SYSTEM32\\WSOCK32.DLL"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_18DB37B1E06F4ECDBE22138D2E3423BA"
+        "OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
+        "MsmSig" = "8:VC_User_MFC.BA9B6D6E_0DE0_11D5_A548_0090278A1BB8"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_4B317DFBE5B54D45BA632D40E0B2978C"
+        "OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
+        "MsmSig" = "8:VC_User_STL.BA9B76E9_0DE0_11D5_A548_0090278A1BB8"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_4D3B42BBD8694AA0A7E8B8681774E515"
+        "OwnerKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
+        "MsmSig" = "8:VC_User_CRT.BA9B6D09_0DE0_11D5_A548_0090278A1BB8"
+        }
+        "Entry"
+        {
+        "MsmKey" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
+        "OwnerKey" = "8:_UNDEFINED"
+        "MsmSig" = "8:C:\\VOCAL\\STUND\\WINSTUN\\DEBUG\\WINSTUN.EXE"
+        }
+    }
+    "Configurations"
+    {
+        "Debug"
+        {
+        "DisplayName" = "8:Debug"
+        "IsDebugOnly" = "11:TRUE"
+        "IsReleaseOnly" = "11:FALSE"
+        "OutputFilename" = "8:Debug\\WinStunSetup.msi"
+        "PackageFilesAs" = "3:2"
+        "PackageFileSize" = "3:-2147483648"
+        "CabType" = "3:1"
+        "Compression" = "3:2"
+        "SignOutput" = "11:FALSE"
+        "CertificateFile" = "8:"
+        "PrivateKeyFile" = "8:"
+        "TimeStampServer" = "8:"
+        "InstallerBootstrapper" = "3:2"
+        }
+        "Release"
+        {
+        "DisplayName" = "8:Release"
+        "IsDebugOnly" = "11:FALSE"
+        "IsReleaseOnly" = "11:TRUE"
+        "OutputFilename" = "8:Release\\WinStunSetup.msi"
+        "PackageFilesAs" = "3:2"
+        "PackageFileSize" = "3:-2147483648"
+        "CabType" = "3:1"
+        "Compression" = "3:3"
+        "SignOutput" = "11:FALSE"
+        "CertificateFile" = "8:"
+        "PrivateKeyFile" = "8:"
+        "TimeStampServer" = "8:"
+        "InstallerBootstrapper" = "3:2"
+        }
+    }
+    "Deployable"
+    {
+        "CustomAction"
+        {
+        }
+        "DefaultFeature"
+        {
+        "Name" = "8:DefaultFeature"
+        "Title" = "8:"
+        "Description" = "8:"
+        }
+        "Feature"
+        {
+        }
+        "File"
+        {
+            "{54DA9790-1474-11D3-8E00-00C04F6837D0}:_09250952BF7CDB5CAADD71B62AF74DB4"
+            {
+            "Signature" = "8:2000000000e0230e7df7c201409bc8ce88f8c30100e0230e7df7c20100000000005400000000000000000000770073006f0063006b00330032002e0064006c006c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+            "SourcePath" = "8:WSOCK32.dll"
+            "TargetName" = "8:WSOCK32.dll"
+            "Tag" = "8:"
+            "Folder" = "8:_1ACFCA01E86242009E7DA340371B556E"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
+            "IsolateTo" = "8:"
+            }
+        }
+        "FileType"
+        {
+        }
+        "Folder"
+        {
+            "{EE62640D-12F2-11D3-8D6C-00A0C9CFCEE6}:_1ACFCA01E86242009E7DA340371B556E"
+            {
+            "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
+            "Name" = "8:#1925"
+            "AlwaysCreate" = "11:FALSE"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Property" = "8:TARGETDIR"
+                "Folders"
+                {
+                }
+            }
+            "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_9F73FB694078487ABBE751685A98BAE5"
+            {
+            "Name" = "8:#1919"
+            "AlwaysCreate" = "11:FALSE"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Property" = "8:ProgramMenuFolder"
+                "Folders"
+                {
+                }
+            }
+            "{777C097F-0ED8-11D3-8D6C-00A0C9CFCEE6}:_CD285AFD3A9A4AF09C71F647BCB5F55F"
+            {
+            "Name" = "8:#1916"
+            "AlwaysCreate" = "11:FALSE"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Property" = "8:DesktopFolder"
+                "Folders"
+                {
+                }
+            }
+        }
+        "LaunchCondition"
+        {
+        }
+        "Locator"
+        {
+        }
+        "Shortcut"
+        {
+            "{D0C99CFE-1238-11D3-8E00-00C04F6837D0}:_9DD31FDA83A043F7A0E558517B5725D3"
+            {
+            "Name" = "8:WinSTUN"
+            "Arguments" = "8:"
+            "Description" = "8:"
+            "ShowCmd" = "3:1"
+            "IconIndex" = "3:0"
+            "Transitive" = "11:FALSE"
+            "Target" = "8:_F6B936BEEBCC457AA39994BB0B8A53A5"
+            "Folder" = "8:_9F73FB694078487ABBE751685A98BAE5"
+            "WorkingFolder" = "8:_1ACFCA01E86242009E7DA340371B556E"
+            "Icon" = "8:"
+            "Feature" = "8:"
+            }
+        }
+        "Sequences"
+        {
+        }
+        "Registry"
+        {
+            "HKLM"
+            {
+                "Keys"
+                {
+                    "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_40E4B8C97A03455C8DF5FA68455B929E"
+                    {
+                    "Name" = "8:Software"
+                    "Condition" = "8:"
+                    "AlwaysCreate" = "11:FALSE"
+                    "DeleteAtUninstall" = "11:FALSE"
+                    "Transitive" = "11:FALSE"
+                        "Keys"
+                        {
+                            "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_50DC98EDDEAB4F63A5B6A17D733642C2"
+                            {
+                            "Name" = "8:[Manufacturer]"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                }
+                                "Values"
+                                {
+                                }
+                            }
+                        }
+                        "Values"
+                        {
+                        }
+                    }
+                }
+            }
+            "HKCU"
+            {
+                "Keys"
+                {
+                    "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_D404EAC782F44270A6D873736C45FB23"
+                    {
+                    "Name" = "8:Software"
+                    "Condition" = "8:"
+                    "AlwaysCreate" = "11:FALSE"
+                    "DeleteAtUninstall" = "11:FALSE"
+                    "Transitive" = "11:FALSE"
+                        "Keys"
+                        {
+                            "{7DF0CD0A-FF27-11D2-8D6B-00A0C9CFCEE6}:_221FC41A7DD547B182BD9DE45E0E8EB2"
+                            {
+                            "Name" = "8:[Manufacturer]"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                }
+                                "Values"
+                                {
+                                }
+                            }
+                        }
+                        "Values"
+                        {
+                        }
+                    }
+                }
+            }
+            "HKCR"
+            {
+                "Keys"
+                {
+                }
+            }
+            "HKU"
+            {
+                "Keys"
+                {
+                }
+            }
+            "HKPU"
+            {
+                "Keys"
+                {
+                }
+            }
+        }
+        "ProjectOutput"
+        {
+            "{B1E2BB22-187D-11D3-8E02-00C04F6837D0}:_F6B936BEEBCC457AA39994BB0B8A53A5"
+            {
+            "SourcePath" = "8:..\\WinStun\\Release\\WinStun.exe"
+            "TargetName" = "8:"
+            "Tag" = "8:"
+            "Folder" = "8:_1ACFCA01E86242009E7DA340371B556E"
+            "Condition" = "8:"
+            "Transitive" = "11:FALSE"
+            "Vital" = "11:TRUE"
+            "ReadOnly" = "11:FALSE"
+            "Hidden" = "11:FALSE"
+            "System" = "11:FALSE"
+            "Permanent" = "11:FALSE"
+            "SharedLegacy" = "11:FALSE"
+            "PackageAs" = "3:1"
+            "Register" = "3:1"
+            "Exclude" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "IsolateTo" = "8:"
+            "ProjectOutputGroupRegister" = "3:1"
+            "OutputConfiguration" = "8:"
+            "OutputGroupCanonicalName" = "8:Built"
+            "OutputProjectCanonicalName" = "8:WinStun\\WinStun.vcproj"
+            "OutputProjectGuid" = "8:{717021E7-DCC4-41E7-9CDA-FA7596F18C56}"
+            "ShowKeyOutput" = "11:TRUE"
+                "ExcludeFilters"
+                {
+                }
+            }
+        }
+        "Product"
+        {
+        "Name" = "8:Microsoft Visual Studio"
+        "ProductName" = "8:WinStun"
+        "ProductCode" = "8:{8B7B86B7-1FB6-4907-AD02-B5C8D480A324}"
+        "PackageCode" = "8:{63782D74-DA83-46E2-BBEA-C3448AAF05DA}"
+        "UpgradeCode" = "8:{2F0F50F5-2556-4068-8E05-1BDCCFBF66D7}"
+        "RestartWWWService" = "11:FALSE"
+        "RemovePreviousVersions" = "11:TRUE"
+        "DetectNewerInstalledVersion" = "11:TRUE"
+        "ProductVersion" = "8:0.91"
+        "Manufacturer" = "8:fluffy"
+        "ARPHELPTELEPHONE" = "8:"
+        "ARPHELPLINK" = "8:www.vovida.org"
+        "Title" = "8:WinStun"
+        "Subject" = "8:"
+        "ARPCONTACT" = "8:fluffy"
+        "Keywords" = "8:Stun"
+        "ARPCOMMENTS" = "8:Stun Test Program"
+        "ARPURLINFOABOUT" = "8:"
+        "ARPPRODUCTICON" = "8:"
+        "ARPIconIndex" = "3:0"
+        "SearchPath" = "8:"
+        "UseSystemSearchPath" = "11:TRUE"
+        }
+        "MsiBootstrapper"
+        {
+        "LangId" = "3:1033"
+        }
+        "MergeModule"
+        {
+            "{AC8774A4-3E09-11D3-8E14-00C04F6837D0}:_18DB37B1E06F4ECDBE22138D2E3423BA"
+            {
+            "UseDynamicProperties" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
+            "SourcePath" = "8:vc_mfc.msm"
+            "ModuleSignature" = "8:VC_User_MFC.BA9B6D6E_0DE0_11D5_A548_0090278A1BB8"
+                "Properties"
+                {
+                    "DIR_RETARGET_TARGETDIR"
+                    {
+                    "Name" = "8:DIR_RETARGET_TARGETDIR"
+                    "DisplayName" = "8:Module Retargetable Folder"
+                    "Description" = "8:"
+                    "Type" = "3:10"
+                    "ContextData" = "8:IsolationDir"
+                    "Attributes" = "3:6"
+                    "Setting" = "3:1"
+                    "UsePlugInResources" = "11:FALSE"
+                    }
+                }
+            "LanguageId" = "3:0"
+            "Exclude" = "11:FALSE"
+            "Folder" = "8:"
+            "Feature" = "8:"
+            "IsolateTo" = "8:"
+            }
+            "{AC8774A4-3E09-11D3-8E14-00C04F6837D0}:_4B317DFBE5B54D45BA632D40E0B2978C"
+            {
+            "UseDynamicProperties" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
+            "SourcePath" = "8:vc_stl.msm"
+            "ModuleSignature" = "8:VC_User_STL.BA9B76E9_0DE0_11D5_A548_0090278A1BB8"
+                "Properties"
+                {
+                    "DIR_RETARGET_TARGETDIR"
+                    {
+                    "Name" = "8:DIR_RETARGET_TARGETDIR"
+                    "DisplayName" = "8:Module Retargetable Folder"
+                    "Description" = "8:"
+                    "Type" = "3:10"
+                    "ContextData" = "8:IsolationDir"
+                    "Attributes" = "3:6"
+                    "Setting" = "3:1"
+                    "UsePlugInResources" = "11:FALSE"
+                    }
+                }
+            "LanguageId" = "3:0"
+            "Exclude" = "11:FALSE"
+            "Folder" = "8:"
+            "Feature" = "8:"
+            "IsolateTo" = "8:"
+            }
+            "{AC8774A4-3E09-11D3-8E14-00C04F6837D0}:_4D3B42BBD8694AA0A7E8B8681774E515"
+            {
+            "UseDynamicProperties" = "11:TRUE"
+            "IsDependency" = "11:TRUE"
+            "SourcePath" = "8:vc_crt.msm"
+            "ModuleSignature" = "8:VC_User_CRT.BA9B6D09_0DE0_11D5_A548_0090278A1BB8"
+                "Properties"
+                {
+                    "DIR_RETARGET_TARGETDIR"
+                    {
+                    "Name" = "8:DIR_RETARGET_TARGETDIR"
+                    "DisplayName" = "8:Module Retargetable Folder"
+                    "Description" = "8:"
+                    "Type" = "3:10"
+                    "ContextData" = "8:IsolationDir"
+                    "Attributes" = "3:6"
+                    "Setting" = "3:1"
+                    "UsePlugInResources" = "11:FALSE"
+                    }
+                }
+            "LanguageId" = "3:0"
+            "Exclude" = "11:FALSE"
+            "Folder" = "8:"
+            "Feature" = "8:"
+            "IsolateTo" = "8:"
+            }
+        }
+        "UserInterface"
+        {
+            "{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_309D912E287A4301B573A2B8BF79CA47"
+            {
+            "UseDynamicProperties" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"
+            "ModuleSignature" = "8:VsdDialogs.CE4B864F_F1C1_4B85_98D4_2A2BF5FFB12B"
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_3AAC016866E5446D98CAA124E4E70365"
+            {
+            "Name" = "8:#1900"
+            "Sequence" = "3:2"
+            "Attributes" = "3:1"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_6453CD704CE541EDB46A6A6F40AD5B11"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Welcome"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.E35A0E2C_F131_4B57_B946_59A1A2A8F45F"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "CopyrightWarning"
+                            {
+                            "Name" = "8:CopyrightWarning"
+                            "DisplayName" = "8:#1002"
+                            "Description" = "8:#1102"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:1"
+                            "Value" = "8:#1202"
+                            "DefaultValue" = "8:#1202"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "Welcome"
+                            {
+                            "Name" = "8:Welcome"
+                            "DisplayName" = "8:#1003"
+                            "Description" = "8:#1103"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:1"
+                            "Value" = "8:#1203"
+                            "DefaultValue" = "8:#1203"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_8866EC8182F44659BA8DB0975A01235C"
+                    {
+                    "Sequence" = "3:200"
+                    "DisplayName" = "8:Installation Folder"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.2DED2424_5429_4616_A1AD_4D62837C2ADA"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_93025AA9E4EB456B92CEA130A0F3BCF4"
+                    {
+                    "Sequence" = "3:300"
+                    "DisplayName" = "8:Confirm Installation"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.FA58E60A_A1E8_4876_95FC_2AC3B5AAA5F8"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_3EA2C9B465F54D72A7DDDFCC5621F1D0"
+            {
+            "Name" = "8:#1902"
+            "Sequence" = "3:1"
+            "Attributes" = "3:3"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_16667F6AD73F471591FDCB7F4172769C"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Finished"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.1DB77F5A_BA5C_4470_89B6_0B0EC07E3A10"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_91E8D85BC8534AFE80406ED50E981274"
+            {
+            "Name" = "8:#1902"
+            "Sequence" = "3:2"
+            "Attributes" = "3:3"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_8BD23B7A446C400F965A22995B56653C"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Finished"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.83D22742_1B79_46f6_9A99_DF0F2BD4C077"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_A4071551ACF7452A8194ECACD3822A24"
+            {
+            "Name" = "8:#1901"
+            "Sequence" = "3:2"
+            "Attributes" = "3:2"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_487DF826178549ADAA991554EE93AC62"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Progress"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.EE9A1AFA_41DD_4514_B727_DF0ACA1D7389"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "ShowProgress"
+                            {
+                            "Name" = "8:ShowProgress"
+                            "DisplayName" = "8:#1009"
+                            "Description" = "8:#1109"
+                            "Type" = "3:5"
+                            "ContextData" = "8:1;True=1;False=0"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:0"
+                            "Value" = "3:1"
+                            "DefaultValue" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{E4ECAB26-4AB7-11D3-8D78-00A0C9CFCEE6}:_B77D9D04895542BC9E437226DBC206BA"
+            {
+            "UseDynamicProperties" = "11:FALSE"
+            "IsDependency" = "11:FALSE"
+            "SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"
+            "ModuleSignature" = "8:VsdUserInterface.524F4245_5254_5341_4C45_534153783400"
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_CB82D982E7E04D1BB99B02029BFF4BB4"
+            {
+            "Name" = "8:#1900"
+            "Sequence" = "3:1"
+            "Attributes" = "3:1"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_1C9C413826E7442292BDADA01492608D"
+                    {
+                    "Sequence" = "3:200"
+                    "DisplayName" = "8:Installation Folder"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.C113BC36_2532_4D45_8099_4818B1133B2F"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_9949CC0ADBD947A7B1C91226942F4FEE"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Welcome"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.68F69290_BB7C_474E_A153_6679845F3DDF"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "CopyrightWarning"
+                            {
+                            "Name" = "8:CopyrightWarning"
+                            "DisplayName" = "8:#1002"
+                            "Description" = "8:#1102"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:1"
+                            "Value" = "8:#1202"
+                            "DefaultValue" = "8:#1202"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "Welcome"
+                            {
+                            "Name" = "8:Welcome"
+                            "DisplayName" = "8:#1003"
+                            "Description" = "8:#1103"
+                            "Type" = "3:3"
+                            "ContextData" = "8:"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:1"
+                            "Value" = "8:#1203"
+                            "DefaultValue" = "8:#1203"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_C35965DAA3654FD188EB3BE51C84178E"
+                    {
+                    "Sequence" = "3:300"
+                    "DisplayName" = "8:Confirm Installation"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.6DBC9783_3677_4D68_8BF5_D749558A0AC1"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+            "{7DFFC192-4ABE-11D3-8D78-00A0C9CFCEE6}:_F18016A4BE774D76B6D7D70741C9C574"
+            {
+            "Name" = "8:#1901"
+            "Sequence" = "3:1"
+            "Attributes" = "3:2"
+                "Dialogs"
+                {
+                    "{E4ECAB24-4AB7-11D3-8D78-00A0C9CFCEE6}:_4CBDFAD72B2541849D7DFA35D5E52B1F"
+                    {
+                    "Sequence" = "3:100"
+                    "DisplayName" = "8:Progress"
+                    "UseDynamicProperties" = "11:TRUE"
+                    "IsDependency" = "11:FALSE"
+                    "SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"
+                    "ModuleSignature" = "8:VsdDialogs.4FB12620_0D15_42D0_8677_2766FFA6923F"
+                        "Properties"
+                        {
+                            "BannerBitmap"
+                            {
+                            "Name" = "8:BannerBitmap"
+                            "DisplayName" = "8:#1001"
+                            "Description" = "8:#1101"
+                            "Type" = "3:8"
+                            "ContextData" = "8:Bitmap"
+                            "Attributes" = "3:4"
+                            "Setting" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                            "ShowProgress"
+                            {
+                            "Name" = "8:ShowProgress"
+                            "DisplayName" = "8:#1009"
+                            "Description" = "8:#1109"
+                            "Type" = "3:5"
+                            "ContextData" = "8:1;True=1;False=0"
+                            "Attributes" = "3:0"
+                            "Setting" = "3:0"
+                            "Value" = "3:1"
+                            "DefaultValue" = "3:1"
+                            "UsePlugInResources" = "11:TRUE"
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/libs/stund/client.cxx b/libs/stund/client.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..87b23dfe7172c2e2d30f33aa971568126e820d33
--- /dev/null
+++ b/libs/stund/client.cxx
@@ -0,0 +1,399 @@
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <cstdlib>   
+
+#ifdef WIN32
+#include <time.h>
+#else
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <errno.h>
+#endif
+
+#include "udp.h"
+#include "stun.h"
+
+using namespace std;
+
+
+void
+usage()
+{
+   cerr << "Usage:" << endl
+	<< "    ./client stunServerHostname [testNumber] [-v] [-p srcPort] [-i nicAddr1] [-i nicAddr2] [-i nicAddr3]" << endl
+	<< "For example, if the STUN server was larry.gloo.net, you could do:" << endl
+	<< "    ./client larry.gloo.net" << endl
+	<< "The testNumber is just used for special tests." << endl
+	<< " test 1 runs test 1 from the RFC. For example:" << endl
+	<< "    ./client larry.gloo.net 0" << endl << endl
+        << "Return Values:" << endl
+        << " -1  Generic Error" << endl << endl
+        << "low order bits (mask 0x07)" << endl
+        << "  0  No NAT Present (Open)" << endl
+        << "  1  Full Cone NAT" << endl
+        << "  2  Address Restricted Cone NAT" << endl
+        << "  3  Port Restricted Cone NAT" << endl
+        << "  4  Symmetric NAT" << endl
+        << "  5  Symmetric Firewall" << endl
+        << "  6  Blocked or Network Error" << endl 
+        << "0x08 bit is set if the NAT does NOT supports hairpinning" << endl 
+        << "0x10 bit is set if the NAT tries to preserver port numbers" << endl 
+        << endl;
+}
+
+#define MAX_NIC 3
+
+int
+main(int argc, char* argv[])
+{
+   assert( sizeof(UInt8 ) == 1 );
+   assert( sizeof(UInt16) == 2 );
+   assert( sizeof(UInt32) == 4 );
+    
+   initNetwork();
+    
+   cout << "STUN client version " << STUN_VERSION << endl;
+   
+   int testNum = 0;
+   bool verbose = false;
+	
+   StunAddress4 stunServerAddr;
+   stunServerAddr.addr=0;
+
+   int srcPort=0;
+   StunAddress4 sAddr[MAX_NIC];
+   int retval[MAX_NIC];
+   int numNic=0;
+
+   for ( int i=0; i<MAX_NIC; i++ )
+   {
+      sAddr[i].addr=0; 
+      sAddr[i].port=0; 
+      retval[i]=0;
+   }
+   
+   for ( int arg = 1; arg<argc; arg++ )
+   {
+      if ( !strcmp( argv[arg] , "-v" ) )
+      {
+         verbose = true;
+      }
+      else if ( !strcmp( argv[arg] , "-i" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         if ( numNic >= MAX_NIC )
+         {  
+            cerr << "Can not have more than "<<  MAX_NIC <<" -i options" << endl;
+            usage();
+            exit(-1);
+         }
+         
+         stunParseServerName(argv[arg], sAddr[numNic++]);
+      }
+      else if ( !strcmp( argv[arg] , "-p" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         srcPort = strtol( argv[arg], NULL, 10);
+      }
+      else    
+      {
+        char* ptr;
+        int t =  strtol( argv[arg], &ptr, 10 );
+        if ( *ptr == 0 )
+        { 
+           // conversion worked
+           testNum = t;
+           cout << "running test number " << testNum  << endl; 
+        }
+        else
+        {
+           bool ret = stunParseServerName( argv[arg], stunServerAddr);
+           if ( ret != true )
+           {
+              cerr << argv[arg] << " is not a valid host name " << endl;
+              usage();
+              exit(-1);
+           }
+	}	
+      }
+   }
+   
+   if ( numNic == 0 )
+   {
+      // use default 
+      numNic = 1;
+   }
+   
+   for ( int nic=0; nic<numNic; nic++ )
+   {
+      sAddr[nic].port=srcPort;
+      if ( stunServerAddr.addr == 0 )
+      {
+         usage();
+         exit(-1);
+      }
+   
+      if (testNum==0)
+      {
+         bool presPort=false;
+         bool hairpin=false;
+		
+         NatType stype = stunNatType( stunServerAddr, verbose, &presPort, &hairpin, 
+                                      srcPort, &sAddr[nic]);
+		
+         if ( nic == 0 )
+         {
+            cout << "Primary: ";
+         }
+         else
+         {
+            cout << "Secondary: ";
+         }
+         
+         switch (stype)
+         {
+            case StunTypeFailure:
+               cout << "Some error detetecting NAT type";
+	       retval[nic] = -1;
+               exit(-1);
+               break;
+            case StunTypeUnknown:
+               cout << "Some error detetecting NAT type";
+	       retval[nic] = 0x07;
+               break;
+            case StunTypeOpen:
+               cout << "Open";
+	       retval[nic] = 0; 
+               break;
+            case StunTypeConeNat:
+               cout << "Full Cone Nat";
+               if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
+               if ( hairpin  ) cout << ", will hairpin"; else cout << ", no hairpin";
+               retval[nic] = 0x01;
+               break;
+            case StunTypeRestrictedNat:
+               cout << "Address Restricted Nat";
+               if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
+               if ( hairpin  ) cout << ", will hairpin"; else cout << ", no hairpin";
+               retval[nic] = 0x02;
+               break;
+            case StunTypePortRestrictedNat:
+               cout << "Port Restricted Nat";
+               if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
+               if ( hairpin  ) cout << ", will hairpin"; else cout << ", no hairpin";
+               retval[nic] = 0x03;
+               break;
+            case StunTypeSymNat:
+               cout << "Symmetric Nat";
+               if ( presPort ) cout << ", preserves ports"; else cout << ", random port";
+               if ( hairpin  ) cout << ", will hairpin"; else cout << ", no hairpin";
+               retval[nic] = 0x04;
+               break;
+            case StunTypeSymFirewall:
+               cout << "Symmetric Firewall";
+               if ( hairpin  ) cout << ", will hairpin"; else cout << ", no hairpin";
+               retval[nic] = 0x05;
+               break;
+            case StunTypeBlocked:
+               cout << "Blocked or could not reach STUN server";
+               retval[nic] = 0x06;
+               break;
+            default:
+               cout << stype;
+               cout << "Unkown NAT type";
+               retval[nic] = 0x07;  // Unknown NAT type
+               break;
+         }
+         cout << "\t"; cout.flush();
+         
+         if (!hairpin)
+         {
+             retval[nic] |= 0x08;
+         }       
+
+         if (presPort)
+         {
+             retval[nic] |= 0x10;
+         }
+      }
+      else if (testNum==100)
+      {
+         Socket myFd = openPort(srcPort,sAddr[nic].addr,verbose);
+      
+         StunMessage req;
+         memset(&req, 0, sizeof(StunMessage));
+      
+         StunAtrString username;
+         StunAtrString password;
+         username.sizeValue = 0;
+         password.sizeValue = 0;
+      
+         stunBuildReqSimple( &req, username, 
+                             false , false , 
+                             0x0c );
+      
+         char buf[STUN_MAX_MESSAGE_SIZE];
+         int len = STUN_MAX_MESSAGE_SIZE;
+      
+         len = stunEncodeMessage( req, buf, len, password,verbose );
+      
+         if ( verbose )
+         {
+            cout << "About to send msg of len " << len 
+                 << " to " << stunServerAddr << endl;
+         }
+      
+         while (1)
+         {
+            for ( int i=0; i<100; i++ )
+            {
+               sendMessage( myFd,
+                            buf, len, 
+                            stunServerAddr.addr, 
+                            stunServerAddr.port,verbose );
+            }
+#ifdef WIN32 // !cj! TODO - should fix this up in windows
+            clock_t now = clock();
+            assert( CLOCKS_PER_SEC == 1000 );
+            while ( clock() <= now+10 ) { };
+#else
+            usleep(10*1000);
+#endif
+         }
+      }
+      else if (testNum==-2)
+      {
+         const int numPort = 5;
+         int fd[numPort];
+         StunAddress4 mappedAddr;
+         
+         for( int i=0; i<numPort; i++ )
+         {
+            fd[i] = stunOpenSocket( stunServerAddr, &mappedAddr,
+                                    (srcPort==0)?0:(srcPort+i), &sAddr[nic],
+                                    verbose );
+            cout << "Got port at " << mappedAddr.port << endl;
+         }
+          
+         for( int i=0; i<numPort; i++ )
+         {
+            closesocket(fd[i]);
+         }
+      }
+      else if (testNum==-1)
+      {
+         int fd3,fd4;
+         StunAddress4 mappedAddr;
+         
+         bool ok = stunOpenSocketPair(stunServerAddr,
+                                      &mappedAddr,
+                                      &fd3,
+                                      &fd4,
+                                      srcPort, 
+                                      &sAddr[nic],
+                                      verbose);
+         if ( ok )
+         {
+            closesocket(fd3);
+            closesocket(fd4);
+            cout << "Got port pair at " << mappedAddr.port << endl;
+         }
+         else
+         {
+            cerr << "Opened a stun socket pair FAILED" << endl;
+         }
+      }
+      else
+      {
+         stunTest( stunServerAddr,testNum,verbose,&(sAddr[nic]) );
+      }
+   } // end of for loop 
+   cout << endl;
+   
+   UInt32 ret=0;
+   for ( int i=numNic-1; i>=0; i-- )
+   {
+      if ( retval[i] == -1 )
+      {
+         ret = 0xFFFFFFFF;
+         break;
+      }
+      ret = ret << 8;
+      ret = ret | ( retval[i] & 0xFF );
+   }
+   
+   cout << "Return value is " << hex << "0x" << ret << dec << endl;
+   
+   return ret;
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 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 names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
diff --git a/libs/stund/client.sln b/libs/stund/client.sln
new file mode 100644
index 0000000000000000000000000000000000000000..007f252883a669ad535fa4593f22e1fc559f53fa
--- /dev/null
+++ b/libs/stund/client.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcproj", "{76E56991-C964-444B-82A6-AFDA5145E18A}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.ActiveCfg = Debug|Win32
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Debug.Build.0 = Debug|Win32
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.ActiveCfg = Release|Win32
+		{76E56991-C964-444B-82A6-AFDA5145E18A}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/libs/stund/client.vcproj b/libs/stund/client.vcproj
new file mode 100644
index 0000000000000000000000000000000000000000..d9694121e69efdc4a3d033494304a0ee91d8de7d
--- /dev/null
+++ b/libs/stund/client.vcproj
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="client"
+	ProjectGUID="{76E56991-C964-444B-82A6-AFDA5145E18A}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="ClientDebug"
+			IntermediateDirectory="ClientDebug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Ws2_32.lib"
+				OutputFile="$(OutDir)/client.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/client.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="ClientRelease"
+			IntermediateDirectory="ClientRelease"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Ws2_32.lib"
+				OutputFile="$(OutDir)/client.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="client.cxx">
+			</File>
+			<File
+				RelativePath="stun.cxx">
+			</File>
+			<File
+				RelativePath="udp.cxx">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+			<File
+				RelativePath="stun.h">
+			</File>
+			<File
+				RelativePath="udp.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libs/stund/id.pem b/libs/stund/id.pem
new file mode 100644
index 0000000000000000000000000000000000000000..184c4619a4cebd5fdc9e07c84f4d44626f8e228a
--- /dev/null
+++ b/libs/stund/id.pem
@@ -0,0 +1,15 @@
+-----BEGIN CERTIFICATE-----
+MIICazCCAdQCAQMwDQYJKoZIhvcNAQEEBQAwgYAxCzAJBgNVBAYTAlVBMQswCQYD
+VQQIEwJDQTERMA8GA1UEBxMITWlscGl0YXMxDjAMBgNVBAoTBUZvb0NvMRMwEQYD
+VQQLEwp3aWRnZXQgZGl2MRIwEAYDVQQDEwlsb2NhbGhvc3QxGDAWBgkqhkiG9w0B
+CQEWCWZvb0Bmb28uYzAeFw0wMjExMDEwMzUyMjhaFw0wMjEyMDEwMzUyMjhaMHsx
+CzAJBgNVBAYTAkdCMRIwEAYDVQQIEwlCZXJrc2hpcmUxEDAOBgNVBAcTB05ld2J1
+cnkxFzAVBgNVBAoTDk15IENvbXBhbnkgTHRkMRIwEAYDVQQDEwlsb2NhbGhvc3Qx
+GTAXBgkqhkiG9w0BCQEWCnNlcnZlci5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A
+MIGJAoGBAO0DwcHArwHx2XoX3XAcjc9lc/ERveDqFO9NJChtA2R3/b7EaH4FOlv1
+QxL5aaCxiwhqHVo7F/BG2OxcIIBCp8HBLRYwmKnWwta4s4imD3ZI/AAaTPm5r/KJ
+GbAh0vpF7WIdtsEOaSYbnLVnQTXTgfswgoH502sM13fVY0qJhjrTAgMBAAEwDQYJ
+KoZIhvcNAQEEBQADgYEAUSwhHT7j9ammZBo/VHT8mZylqOzBakMuASiUQNwL40sc
+0eb3MtKEg2GLlX8GtB0g2+bieA337XSXe4kyhpQ7j9ClajI3Dpr463ZKLJ43JFH0
+Ynqkfo61d9fQYtxJTXjYIatzLNXpzsxADEQ2MGokQmEMGJcBftLdMfvtOy8Kh7I=
+-----END CERTIFICATE-----
diff --git a/libs/stund/id_key.pem b/libs/stund/id_key.pem
new file mode 100644
index 0000000000000000000000000000000000000000..d8c4973181c6d8920037a9985b068ee1551243b8
--- /dev/null
+++ b/libs/stund/id_key.pem
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDtA8HBwK8B8dl6F91wHI3PZXPxEb3g6hTvTSQobQNkd/2+xGh+
+BTpb9UMS+WmgsYsIah1aOxfwRtjsXCCAQqfBwS0WMJip1sLWuLOIpg92SPwAGkz5
+ua/yiRmwIdL6Re1iHbbBDmkmG5y1Z0E104H7MIKB+dNrDNd31WNKiYY60wIDAQAB
+AoGAJt7C2/+5s9vyCq/3RPep2iWNSi/asBQzsrs3/tlCASwclTio2mIJHCOxCF+X
+Dx+O6aZdgfrHBkTYNos1WVOVJ0S3K47HQ5gPZgIus855SEmfINzJkTPz0kahjUj9
+hMeKfmtM6uRqkVcs+H35chhXg2rW0uQRP3tlgd5wq+uRjoECQQD30oykMIbA32i6
+nHw1u1zJNZXaABoUsXlu5ylwXZp39FYxQiMmwTzI7AJAKTCf2YiHP4C9YLKnjKMo
+8D+HudAxAkEA9NXo91TuOYtxYn3NJi4FCpo+hcrHH33M+ttB8L+lO9ctgzGuvI63
+pNszIVTNnV+RwnSyR+CtO7q/PQOcrK8eQwJAVCXVBYdIqkLxv7OU5XXKKrQcPtqc
+AHzGm+a4BmRyJ9r6TV2ErAsfRaYFmZ2i2hQ2LJ5ea29jGktBt4vkNoTccQJBAL49
+dE6ybITEJ+8axwwSmBI79bbp8D0099A4DA2wLAjKUu/s69RRpLpxJFKS3U2aE90f
+5eNZ3eFaYvxa0SOQ0pcCQQDEaX+MPPNUlOk4Im7XTaiT/qQDJyIHyl7+UeHOZbvN
+X9HHnTnImOk38K3zFpEvCF9LHR3BTUzVcOEIPR/3hTor
+-----END RSA PRIVATE KEY-----
diff --git a/libs/stund/nattest b/libs/stund/nattest
new file mode 100644
index 0000000000000000000000000000000000000000..fb8e71daa8f0ee5ba898832213a032ac31241a54
--- /dev/null
+++ b/libs/stund/nattest
@@ -0,0 +1,54 @@
+#!/bin/bash
+# nattest shell script
+
+# set defaults
+# Interfaces typically begin eth on Linux, en on Macintosh, le or hme on Solaris
+# type ifconfig -a or ifconfig -l to see a list of all interfaces
+serverint=eth0
+clientint=eth1
+serverip1=1.1.1.2
+serverip2=1.1.1.3
+servermask=255.255.255.0
+clientip1=192.168.0.2
+clientip2=192.168.0.3
+clientmask=255.255.255.0
+
+# print warning, get confirmation
+cat nattestwarning.txt
+read -p "Are you sure you want to run this? [yes]" confirm
+case $confirm in
+    [nN]     ) exit;;
+    [nN][oO] ) exit;;
+esac
+
+# off we go then....
+# add second IP address to each interface
+ifconfig $serverint $serverip2 netmask 255.255.255.255 alias
+ifconfig $clientint $clientip2 netmask 255.255.255.255 alias
+# for Solaris, use these instead
+# ifconfig ${serverint}:1 $serverip2 netmask $servermask
+# ifconfig ${clientint}:1 $clientip2 netmask $clientmask
+
+./stund -h $serverip1 -a $serverip2 -b
+# verify server is running
+
+./stunner $serverip1 -i $clientip1 -i2 $clientip2
+# process results of stunner and print pass/fail
+case "$?" in
+	10 ) echo "[PASS] (Address) Restricted Cone NAT with Hairpinning";;
+	11 ) echo "[PASS] Port Restricted Cone NAT with Hairpinning";;
+	8  ) echo "[No NAT] You have open internet access";;
+	2  ) echo "[FAIL] Your (Address) Restricted Cone NAT doesn't do hairpinning";;
+	3  ) echo "[FAIL] Your Port Restricted Cone NAT doesn't do hairpinning";;
+        -1 ) echo "ERROR! the STUN test program had an error";;
+	*  ) echo "[FAIL] You have a NAT or Firewall type which is NOT RECOMMENDED.";;
+esac
+
+# cleanup
+killall -HUP stund
+ifconfig $serverint $serverip2 -alias
+ifconfig $clientint $clientip2 -alias
+# for Solaris, use these instead
+# ifconfig ${serverint}:1 unplumb
+# ifconfig ${clientint}:1 unplumb
+
diff --git a/libs/stund/nattestwarning.txt b/libs/stund/nattestwarning.txt
new file mode 100644
index 0000000000000000000000000000000000000000..48c536a4a584a717a466ab14ed9071570600566c
--- /dev/null
+++ b/libs/stund/nattestwarning.txt
@@ -0,0 +1,47 @@
+WARNING: This script runs as "root" and makes changes to your network interface 
+configuration. This script makes several assumptions about the test environment 
+you might be using. Several of these assumptions may not hold in your environment 
+and could cause you to lose all connectivity to this or other computers.  
+It is designed to be run from the console on two networks which are connected 
+only to a NAT in a configuration like the one shown below:
+
+                 Logical Configuration
+
+     +--------+
+     | STUN   |192.168.0.2    +-------+
+     | Client |---------------|       |
+     +--------+               |       |public      +--------+
+                              |       |side        | STUN   | 1.1.1.2
+                  192.168.0.1 |  NAT  |------------| Server | 1.1.1.3
+                  private side|       |1.1.1.1     +--------+
+                              |       |
+     +--------+               |       |
+     | STUN   |---------------|       |
+     | Client |192.168.0.3    +-------+
+     +--------+
+
+The test actually just requires a single computer with two interfaces which acts 
+as a STUN server and a pair of cooperating STUN clients. The physical configuration 
+is shown below.  First plug in the NAT and computer and configure the primary IP 
+interface on each interface.  There should be no other computers or networks 
+connected to the test bed.
+
+                Physical Configuration
+
+    Private                           Public
+     or "inside"                        or "outside"
+     interface      +--------------+    interface
+                    |  NAT device  |
+  192.168.0.1 +-----|  under       |-----+  1.1.1.1
+              |     |  test        |     |
+              |     |              |     |
+              |     +--------------+     |
+              |                          |
+              |                          |
+              |     +--------------+     |
+              |     |  test        |     |
+  192.168.0.2 +-----|  computer    |-----+  1.1.1.2
+  192.168.0.3   eth1|              |eth0    1.1.1.3
+                    |              |
+                    +--------------+
+
diff --git a/libs/stund/rfc3489.txt b/libs/stund/rfc3489.txt
new file mode 100644
index 0000000000000000000000000000000000000000..226b4a633c8e3a5da5de62cf5ece793bf0741723
--- /dev/null
+++ b/libs/stund/rfc3489.txt
@@ -0,0 +1,2635 @@
+
+
+
+
+
+
+Network Working Group                                       J. Rosenberg
+Request for Comments: 3489                                 J. Weinberger
+Category: Standards Track                                    dynamicsoft
+                                                              C. Huitema
+                                                               Microsoft
+                                                                 R. Mahy
+                                                                   Cisco
+                                                              March 2003
+
+
+        STUN - Simple Traversal of User Datagram Protocol (UDP)
+               Through Network Address Translators (NATs)
+
+Status of this Memo
+
+   This document specifies an Internet standards track protocol for the
+   Internet community, and requests discussion and suggestions for
+   improvements.  Please refer to the current edition of the "Internet
+   Official Protocol Standards" (STD 1) for the standardization state
+   and status of this protocol.  Distribution of this memo is unlimited.
+
+Copyright Notice
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+Abstract
+
+   Simple Traversal of User Datagram Protocol (UDP) Through Network
+   Address Translators (NATs) (STUN) is a lightweight protocol that
+   allows applications to discover the presence and types of NATs and
+   firewalls between them and the public Internet.  It also provides the
+   ability for applications to determine the public Internet Protocol
+   (IP) addresses allocated to them by the NAT.  STUN works with many
+   existing NATs, and does not require any special behavior from them.
+   As a result, it allows a wide variety of applications to work through
+   existing NAT infrastructure.
+
+Table of Contents
+
+   1.   Applicability Statement ...................................    3
+   2.   Introduction ..............................................    3
+   3.   Terminology ...............................................    4
+   4.   Definitions ...............................................    5
+   5.   NAT Variations ............................................    5
+   6.   Overview of Operation .....................................    6
+   7.   Message Overview ..........................................    8
+   8.   Server Behavior ...........................................   10
+        8.1   Binding Requests ....................................   10
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 1]
+
+RFC 3489                          STUN                        March 2003
+
+
+        8.2   Shared Secret Requests ..............................   13
+   9.   Client Behavior ...........................................   14
+        9.1   Discovery ...........................................   15
+        9.2   Obtaining a Shared Secret ...........................   15
+        9.3   Formulating the Binding Request .....................   17
+        9.4   Processing Binding Responses ........................   17
+   10.  Use Cases .................................................   19
+        10.1  Discovery Process ...................................   19
+        10.2  Binding Lifetime Discovery ..........................   21
+        10.3  Binding Acquisition .................................   23
+   11.  Protocol Details ..........................................   24
+        11.1  Message Header ......................................   25
+        11.2  Message Attributes ..................................   26
+              11.2.1  MAPPED-ADDRESS ..............................   27
+              11.2.2  RESPONSE-ADDRESS ............................   27
+              11.2.3  CHANGED-ADDRESS .............................   28
+              11.2.4  CHANGE-REQUEST ..............................   28
+              11.2.5  SOURCE-ADDRESS ..............................   28
+              11.2.6  USERNAME ....................................   28
+              11.2.7  PASSWORD ....................................   29
+              11.2.8  MESSAGE-INTEGRITY ...........................   29
+              11.2.9  ERROR-CODE ..................................   29
+              11.2.10 UNKNOWN-ATTRIBUTES ..........................   31
+              11.2.11 REFLECTED-FROM ..............................   31
+   12.  Security Considerations ...................................   31
+        12.1  Attacks on STUN .....................................   31
+              12.1.1  Attack I: DDOS Against a Target .............   32
+              12.1.2  Attack II: Silencing a Client ...............   32
+              12.1.3  Attack III: Assuming the Identity of a Client   32
+              12.1.4  Attack IV: Eavesdropping ....................   33
+        12.2  Launching the Attacks ...............................   33
+              12.2.1  Approach I: Compromise a Legitimate
+                      STUN Server .................................   33
+              12.2.2  Approach II: DNS Attacks ....................   34
+              12.2.3  Approach III: Rogue Router or NAT ...........   34
+              12.2.4  Approach IV: MITM ...........................   35
+              12.2.5  Approach V: Response Injection Plus DoS .....   35
+              12.2.6  Approach VI: Duplication ....................   35
+        12.3  Countermeasures .....................................   36
+        12.4  Residual Threats ....................................   37
+   13.  IANA Considerations .......................................   38
+   14.  IAB Considerations ........................................   38
+        14.1  Problem Definition ..................................   38
+        14.2  Exit Strategy .......................................   39
+        14.3  Brittleness Introduced by STUN ......................   40
+        14.4  Requirements for a Long Term Solution ...............   42
+        14.5  Issues with Existing NAPT Boxes .....................   43
+        14.6  In Closing ..........................................   43
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 2]
+
+RFC 3489                          STUN                        March 2003
+
+
+   15.  Acknowledgments ...........................................   44
+   16.  Normative References ......................................   44
+   17.  Informative References ....................................   44
+   18.  Authors' Addresses ........................................   46
+   19.  Full Copyright Statement...................................   47
+
+1.  Applicability Statement
+
+   This protocol is not a cure-all for the problems associated with NAT.
+   It does not enable incoming TCP connections through NAT.  It allows
+   incoming UDP packets through NAT, but only through a subset of
+   existing NAT types.  In particular, STUN does not enable incoming UDP
+   packets through symmetric NATs (defined below), which are common in
+   large enterprises.  STUN's discovery procedures are based on
+   assumptions on NAT treatment of UDP; such assumptions may prove
+   invalid down the road as new NAT devices are deployed.  STUN does not
+   work when it is used to obtain an address to communicate with a peer
+   which happens to be behind the same NAT.  STUN does not work when the
+   STUN server is not in a common shared address realm.  For a more
+   complete discussion of the limitations of STUN, see Section 14.
+
+2.  Introduction
+
+   Network Address Translators (NATs), while providing many benefits,
+   also come with many drawbacks.  The most troublesome of those
+   drawbacks is the fact that they break many existing IP applications,
+   and make it difficult to deploy new ones.  Guidelines have been
+   developed [8] that describe how to build "NAT friendly" protocols,
+   but many protocols simply cannot be constructed according to those
+   guidelines.  Examples of such protocols include almost all peer-to-
+   peer protocols, such as multimedia communications, file sharing and
+   games.
+
+   To combat this problem, Application Layer Gateways (ALGs) have been
+   embedded in NATs.  ALGs perform the application layer functions
+   required for a particular protocol to traverse a NAT.  Typically,
+   this involves rewriting application layer messages to contain
+   translated addresses, rather than the ones inserted by the sender of
+   the message.  ALGs have serious limitations, including scalability,
+   reliability, and speed of deploying new applications.  To resolve
+   these problems, the Middlebox Communications (MIDCOM) protocol is
+   being developed [9].  MIDCOM allows an application entity, such as an
+   end client or network server of some sort (like a Session Initiation
+   Protocol (SIP) proxy [10]) to control a NAT (or firewall), in order
+   to obtain NAT bindings and open or close pinholes.  In this way, NATs
+   and applications can be separated once more, eliminating the need for
+   embedding ALGs in NATs, and resolving the limitations imposed by
+   current architectures.
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 3]
+
+RFC 3489                          STUN                        March 2003
+
+
+   Unfortunately, MIDCOM requires upgrades to existing NAT and
+   firewalls, in addition to application components.  Complete upgrades
+   of these NAT and firewall products will take a long time, potentially
+   years.  This is due, in part, to the fact that the deployers of NAT
+   and firewalls are not the same people who are deploying and using
+   applications.  As a result, the incentive to upgrade these devices
+   will be low in many cases.  Consider, for example, an airport
+   Internet lounge that provides access with a NAT.  A user connecting
+   to the NATed network may wish to use a peer-to-peer service, but
+   cannot, because the NAT doesn't support it.  Since the administrators
+   of the lounge are not the ones providing the service, they are not
+   motivated to upgrade their NAT equipment to support it, using either
+   an ALG, or MIDCOM.
+
+   Another problem is that the MIDCOM protocol requires that the agent
+   controlling the middleboxes know the identity of those middleboxes,
+   and have a relationship with them which permits control.  In many
+   configurations, this will not be possible.  For example, many cable
+   access providers use NAT in front of their entire access network.
+   This NAT could be in addition to a residential NAT purchased and
+   operated by the end user.  The end user will probably not have a
+   control relationship with the NAT in the cable access network, and
+   may not even know of its existence.
+
+   Many existing proprietary protocols, such as those for online games
+   (such as the games described in RFC 3027 [11]) and Voice over IP,
+   have developed tricks that allow them to operate through NATs without
+   changing those NATs.  This document is an attempt to take some of
+   those ideas, and codify them into an interoperable protocol that can
+   meet the needs of many applications.
+
+   The protocol described here, Simple Traversal of UDP Through NAT
+   (STUN), allows entities behind a NAT to first discover the presence
+   of a NAT and the type of NAT, and then to learn the addresses
+   bindings allocated by the NAT.  STUN requires no changes to NATs, and
+   works with an arbitrary number of NATs in tandem between the
+   application entity and the public Internet.
+
+3.  Terminology
+
+   In this document, the key words "MUST", "MUST NOT", "REQUIRED",
+   "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
+   and "OPTIONAL" are to be interpreted as described in BCP 14, RFC 2119
+   [1] and indicate requirement levels for compliant STUN
+   implementations.
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 4]
+
+RFC 3489                          STUN                        March 2003
+
+
+4.  Definitions
+
+   STUN Client: A STUN client (also just referred to as a client)
+      is an entity that generates STUN requests.  A STUN client can
+      execute on an end system, such as a user's PC, or can run in a
+      network element, such as a conferencing server.
+
+   STUN Server: A STUN Server (also just referred to as a server)
+      is an entity that receives STUN requests, and sends STUN
+      responses.  STUN servers are generally attached to the public
+      Internet.
+
+5.  NAT Variations
+
+   It is assumed that the reader is familiar with NATs.  It has been
+   observed that NAT treatment of UDP varies among implementations.  The
+   four treatments observed in implementations are:
+
+   Full Cone: A full cone NAT is one where all requests from the
+      same internal IP address and port are mapped to the same external
+      IP address and port.  Furthermore, any external host can send a
+      packet to the internal host, by sending a packet to the mapped
+      external address.
+
+   Restricted Cone: A restricted cone NAT is one where all requests
+      from the same internal IP address and port are mapped to the same
+      external IP address and port.  Unlike a full cone NAT, an external
+      host (with IP address X) can send a packet to the internal host
+      only if the internal host had previously sent a packet to IP
+      address X.
+
+   Port Restricted Cone: A port restricted cone NAT is like a
+      restricted cone NAT, but the restriction includes port numbers.
+      Specifically, an external host can send a packet, with source IP
+      address X and source port P, to the internal host only if the
+      internal host had previously sent a packet to IP address X and
+      port P.
+
+   Symmetric: A symmetric NAT is one where all requests from the
+      same internal IP address and port, to a specific destination IP
+      address and port, are mapped to the same external IP address and
+      port.  If the same host sends a packet with the same source
+      address and port, but to a different destination, a different
+      mapping is used.  Furthermore, only the external host that
+      receives a packet can send a UDP packet back to the internal host.
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 5]
+
+RFC 3489                          STUN                        March 2003
+
+
+   Determining the type of NAT is important in many cases.  Depending on
+   what the application wants to do, it may need to take the particular
+   behavior into account.
+
+6.  Overview of Operation
+
+   This section is descriptive only.  Normative behavior is described in
+   Sections 8 and 9.
+
+                            /-----\
+                          // STUN  \\
+                         |   Server  |
+                          \\       //
+                            \-----/
+
+
+                       +--------------+             Public Internet
+       ................|     NAT 2    |.......................
+                       +--------------+
+
+
+                       +--------------+             Private NET 2
+       ................|     NAT 1    |.......................
+                       +--------------+
+
+                            /-----\
+                          // STUN  \\
+                         |   Client  |
+                          \\       //               Private NET 1
+                            \-----/
+
+                     Figure 1: STUN Configuration
+
+   The typical STUN configuration is shown in Figure 1.  A STUN client
+   is connected to private network 1.  This network connects to private
+   network 2 through NAT 1.  Private network 2 connects to the public
+   Internet through NAT 2.  The STUN server resides on the public
+   Internet.
+
+   STUN is a simple client-server protocol.  A client sends a request to
+   a server, and the server returns a response.  There are two types of
+   requests - Binding Requests, sent over UDP, and Shared Secret
+   Requests, sent over TLS [2] over TCP.  Shared Secret Requests ask the
+   server to return a temporary username and password.  This username
+   and password are used in a subsequent Binding Request and Binding
+   Response, for the purposes of authentication and message integrity.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 6]
+
+RFC 3489                          STUN                        March 2003
+
+
+   Binding requests are used to determine the bindings allocated by
+   NATs.  The client sends a Binding Request to the server, over UDP.
+   The server examines the source IP address and port of the request,
+   and copies them into a response that is sent back to the client.
+   There are some parameters in the request that allow the client to ask
+   that the response be sent elsewhere, or that the server send the
+   response from a different address and port.  There are attributes for
+   providing message integrity and authentication.
+
+   The trick is using STUN to discover the presence of NAT, and to learn
+   and use the bindings they allocate.
+
+   The STUN client is typically embedded in an application which needs
+   to obtain a public IP address and port that can be used to receive
+   data.  For example, it might need to obtain an IP address and port to
+   receive Real Time Transport Protocol (RTP) [12] traffic.  When the
+   application starts, the STUN client within the application sends a
+   STUN Shared Secret Request to its server, obtains a username and
+   password, and then sends it a Binding Request.  STUN servers can be
+   discovered through DNS SRV records [3], and it is generally assumed
+   that the client is configured with the domain to use to find the STUN
+   server.  Generally, this will be the domain of the provider of the
+   service the application is using (such a provider is incented to
+   deploy STUN servers in order to allow its customers to use its
+   application through NAT).  Of course, a client can determine the
+   address or domain name of a STUN server through other means.  A STUN
+   server can even be embedded within an end system.
+
+   The STUN Binding Request is used to discover the presence of a NAT,
+   and to discover the public IP address and port mappings generated by
+   the NAT.  Binding Requests are sent to the STUN server using UDP.
+   When a Binding Request arrives at the STUN server, it may have passed
+   through one or more NATs between the STUN client and the STUN server.
+   As a result, the source address of the request received by the server
+   will be the mapped address created by the NAT closest to the server.
+   The STUN server copies that source IP address and port into a STUN
+   Binding Response, and sends it back to the source IP address and port
+   of the STUN request.  For all of the NAT types above, this response
+   will arrive at the STUN client.
+
+   When the STUN client receives the STUN Binding Response, it compares
+   the IP address and port in the packet with the local IP address and
+   port it bound to when the request was sent.  If these do not match,
+   the STUN client is behind one or more NATs.  In the case of a full-
+   cone NAT, the IP address and port in the body of the STUN response
+   are public, and can be used by any host on the public Internet to
+   send packets to the application that sent the STUN request.  An
+   application need only listen on the IP address and port from which
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 7]
+
+RFC 3489                          STUN                        March 2003
+
+
+   the STUN request was sent. Any packets sent by a host on the public
+   Internet to the public address and port learned by STUN will be
+   received by the application.
+
+   Of course, the host may not be behind a full-cone NAT.  Indeed, it
+   doesn't yet know what type of NAT it is behind.  To determine that,
+   the client uses additional STUN Binding Requests.  The exact
+   procedure is flexible, but would generally work as follows.  The
+   client would send a second STUN Binding Request, this time to a
+   different IP address, but from the same source IP address and port.
+   If the IP address and port in the response are different from those
+   in the first response, the client knows it is behind a symmetric NAT.
+   To determine if it's behind a full-cone NAT, the client can send a
+   STUN Binding Request with flags that tell the STUN server to send a
+   response from a different IP address and port than the request was
+   received on.  In other words, if the client sent a Binding Request to
+   IP address/port A/B using a source IP address/port of X/Y, the STUN
+   server would send the Binding Response to X/Y using source IP
+   address/port C/D.  If the client receives this response, it knows it
+   is behind a full cone NAT.
+
+   STUN also allows the client to ask the server to send the Binding
+   Response from the same IP address the request was received on, but
+   with a different port.  This can be used to detect whether the client
+   is behind a port restricted cone NAT or just a restricted cone NAT.
+
+   It should be noted that the configuration in Figure 1 is not the only
+   permissible configuration.  The STUN server can be located anywhere,
+   including within another client.  The only requirement is that the
+   STUN server is reachable by the client, and if the client is trying
+   to obtain a publicly routable address, that the server reside on the
+   public Internet.
+
+7.  Message Overview
+
+   STUN messages are TLV (type-length-value) encoded using big endian
+   (network ordered) binary.  All STUN messages start with a STUN
+   header, followed by a STUN payload.  The payload is a series of STUN
+   attributes, the set of which depends on the message type.  The STUN
+   header contains a STUN message type, transaction ID, and length.  The
+   message type can be Binding Request, Binding Response, Binding Error
+   Response, Shared Secret Request, Shared Secret Response, or Shared
+   Secret Error Response.  The transaction ID is used to correlate
+   requests and responses.  The length indicates the total length of the
+   STUN payload, not including the header.  This allows STUN to run over
+   TCP.  Shared Secret Requests are always sent over TCP (indeed, using
+   TLS over TCP).
+
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 8]
+
+RFC 3489                          STUN                        March 2003
+
+
+   Several STUN attributes are defined.  The first is a MAPPED-ADDRESS
+   attribute, which is an IP address and port.  It is always placed in
+   the Binding Response, and it indicates the source IP address and port
+   the server saw in the Binding Request.  There is also a RESPONSE-
+   ADDRESS attribute, which contains an IP address and port.  The
+   RESPONSE-ADDRESS attribute can be present in the Binding Request, and
+   indicates where the Binding Response is to be sent.  It's optional,
+   and when not present, the Binding Response is sent to the source IP
+   address and port of the Binding Request.
+
+   The third attribute is the CHANGE-REQUEST attribute, and it contains
+   two flags to control the IP address and port used to send the
+   response.  These flags are called "change IP" and "change port"
+   flags.  The CHANGE-REQUEST attribute is allowed only in the Binding
+   Request.  The "change IP" and "change port" flags are useful for
+   determining whether the client is behind a restricted cone NAT or
+   restricted port cone NAT.  They instruct the server to send the
+   Binding Responses from a different source IP address and port.  The
+   CHANGE-REQUEST attribute is optional in the Binding Request.
+
+   The fourth attribute is the CHANGED-ADDRESS attribute.  It is present
+   in Binding Responses.  It informs the client of the source IP address
+   and port that would be used if the client requested the "change IP"
+   and "change port" behavior.
+
+   The fifth attribute is the SOURCE-ADDRESS attribute.  It is only
+   present in Binding Responses.  It indicates the source IP address and
+   port where the response was sent from.  It is useful for detecting
+   twice NAT configurations.
+
+   The sixth attribute is the USERNAME attribute.  It is present in a
+   Shared Secret Response, which provides the client with a temporary
+   username and password (encoded in the PASSWORD attribute).  The
+   USERNAME is also present in Binding Requests, serving as an index to
+   the shared secret used for the integrity protection of the Binding
+   Request.  The seventh attribute, PASSWORD, is only found in Shared
+   Secret Response messages.  The eight attribute is the MESSAGE-
+   INTEGRITY attribute, which contains a message integrity check over
+   the Binding Request or Binding Response.
+
+   The ninth attribute is the ERROR-CODE attribute.  This is present in
+   the Binding Error Response and Shared Secret Error Response.  It
+   indicates the error that has occurred.  The tenth attribute is the
+   UNKNOWN-ATTRIBUTES attribute, which is present in either the Binding
+   Error Response or Shared Secret Error Response.  It indicates the
+   mandatory attributes from the request which were unknown.  The
+   eleventh attribute is the REFLECTED-FROM attribute, which is present
+   in Binding Responses.  It indicates the IP address and port of the
+
+
+
+Rosenberg, et al.           Standards Track                     [Page 9]
+
+RFC 3489                          STUN                        March 2003
+
+
+   sender of a Binding Request, used for traceability purposes to
+   prevent certain denial-of-service attacks.
+
+8.  Server Behavior
+
+   The server behavior depends on whether the request is a Binding
+   Request or a Shared Secret Request.
+
+8.1  Binding Requests
+
+   A STUN server MUST be prepared to receive Binding Requests on four
+   address/port combinations - (A1, P1), (A2, P1), (A1, P2), and (A2,
+   P2).  (A1, P1) represent the primary address and port, and these are
+   the ones obtained through the client discovery procedures below.
+   Typically, P1 will be port 3478, the default STUN port.  A2 and P2
+   are arbitrary.  A2 and P2 are advertised by the server through the
+   CHANGED-ADDRESS attribute, as described below.
+
+   It is RECOMMENDED that the server check the Binding Request for a
+   MESSAGE-INTEGRITY attribute.  If not present, and the server requires
+   integrity checks on the request, it generates a Binding Error
+   Response with an ERROR-CODE attribute with response code 401.  If the
+   MESSAGE-INTEGRITY attribute was present, the server computes the HMAC
+   over the request as described in Section 11.2.8.  The key to use
+   depends on the shared secret mechanism.  If the STUN Shared Secret
+   Request was used, the key MUST be the one associated with the
+   USERNAME attribute present in the request.  If the USERNAME attribute
+   was not present, the server MUST generate a Binding Error Response.
+   The Binding Error Response MUST include an ERROR-CODE attribute with
+   response code 432.  If the USERNAME is present, but the server
+   doesn't remember the shared secret for that USERNAME (because it
+   timed out, for example), the server MUST generate a Binding Error
+   Response.  The Binding Error Response MUST include an ERROR-CODE
+   attribute with response code 430.  If the server does know the shared
+   secret, but the computed HMAC differs from the one in the request,
+   the server MUST generate a Binding Error Response with an ERROR-CODE
+   attribute with response code 431.  The Binding Error Response is sent
+   to the IP address and port the Binding Request came from, and sent
+   from the IP address and port the Binding Request was sent to.
+
+   Assuming the message integrity check passed, processing continues.
+   The server MUST check for any attributes in the request with values
+   less than or equal to 0x7fff which it does not understand.  If it
+   encounters any, the server MUST generate a Binding Error Response,
+   and it MUST include an ERROR-CODE attribute with a 420 response code.
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 10]
+
+RFC 3489                          STUN                        March 2003
+
+
+   That response MUST contain an UNKNOWN-ATTRIBUTES attribute listing
+   the attributes with values less than or equal to 0x7fff which were
+   not understood.  The Binding Error Response is sent to the IP address
+   and port the Binding Request came from, and sent from the IP address
+   and port the Binding Request was sent to.
+
+   Assuming the request was correctly formed, the server MUST generate a
+   single Binding Response.  The Binding Response MUST contain the same
+   transaction ID contained in the Binding Request.  The length in the
+   message header MUST contain the total length of the message in bytes,
+   excluding the header.  The Binding Response MUST have a message type
+   of "Binding Response".
+
+   The server MUST add a MAPPED-ADDRESS attribute to the Binding
+   Response.  The IP address component of this attribute MUST be set to
+   the source IP address observed in the Binding Request.  The port
+   component of this attribute MUST be set to the source port observed
+   in the Binding Request.
+
+   If the RESPONSE-ADDRESS attribute was absent from the Binding
+   Request, the destination address and port of the Binding Response
+   MUST be the same as the source address and port of the Binding
+   Request.  Otherwise, the destination address and port of the Binding
+   Response MUST be the value of the IP address and port in the
+   RESPONSE-ADDRESS attribute.
+
+   The source address and port of the Binding Response depend on the
+   value of the CHANGE-REQUEST attribute and on the address and port the
+   Binding Request was received on, and are summarized in Table 1.
+
+   Let Da represent the destination IP address of the Binding Request
+   (which will be either A1 or A2), and Dp represent the destination
+   port of the Binding Request (which will be either P1 or P2).  Let Ca
+   represent the other address, so that if Da is A1, Ca is A2.  If Da is
+   A2, Ca is A1.  Similarly, let Cp represent the other port, so that if
+   Dp is P1, Cp is P2.  If Dp is P2, Cp is P1.  If the "change port"
+   flag was set in CHANGE-REQUEST attribute of the Binding Request, and
+   the "change IP" flag was not set, the source IP address of the
+   Binding Response MUST be Da and the source port of the Binding
+   Response MUST be Cp.  If the "change IP" flag was set in the Binding
+   Request, and the "change port" flag was not set, the source IP
+   address of the Binding Response MUST be Ca and the source port of the
+   Binding Response MUST be Dp.  When both flags are set, the source IP
+   address of the Binding Response MUST be Ca and the source port of the
+   Binding Response MUST be Cp.  If neither flag is set, or if the
+   CHANGE-REQUEST attribute is absent entirely, the source IP address of
+   the Binding Response MUST be Da and the source port of the Binding
+   Response MUST be Dp.
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 11]
+
+RFC 3489                          STUN                        March 2003
+
+
+      Flags          Source Address  Source Port   CHANGED-ADDRESS
+      none           Da              Dp            Ca:Cp
+      Change IP      Ca              Dp            Ca:Cp
+      Change port    Da              Cp            Ca:Cp
+      Change IP and
+        Change port  Ca              Cp            Ca:Cp
+
+   Table 1: Impact of Flags on Packet Source and CHANGED-ADDRESS
+
+   The server MUST add a SOURCE-ADDRESS attribute to the Binding
+   Response, containing the source address and port used to send the
+   Binding Response.
+
+   The server MUST add a CHANGED-ADDRESS attribute to the Binding
+   Response.  This contains the source IP address and port that would be
+   used if the client had set the "change IP" and "change port" flags in
+   the Binding Request.  As summarized in Table 1, these are Ca and Cp,
+   respectively, regardless of the value of the CHANGE-REQUEST flags.
+
+   If the Binding Request contained both the USERNAME and MESSAGE-
+   INTEGRITY attributes, the server MUST add a MESSAGE-INTEGRITY
+   attribute to the Binding Response.  The attribute contains an HMAC
+   [13] over the response, as described in Section 11.2.8.  The key to
+   use depends on the shared secret mechanism.  If the STUN Shared
+   Secret Request was used, the key MUST be the one associated with the
+   USERNAME attribute present in the Binding Request.
+
+   If the Binding Request contained a RESPONSE-ADDRESS attribute, the
+   server MUST add a REFLECTED-FROM attribute to the response.  If the
+   Binding Request was authenticated using a username obtained from a
+   Shared Secret Request, the REFLECTED-FROM attribute MUST contain the
+   source IP address and port where that Shared Secret Request came
+   from.  If the username present in the request was not allocated using
+   a Shared Secret Request, the REFLECTED-FROM attribute MUST contain
+   the source address and port of the entity which obtained the
+   username, as best can be verified with the mechanism used to allocate
+   the username.  If the username was not present in the request, and
+   the server was willing to process the request, the REFLECTED-FROM
+   attribute SHOULD contain the source IP address and port where the
+   request came from.
+
+   The server SHOULD NOT retransmit the response.  Reliability is
+   achieved by having the client periodically resend the request, each
+   of which triggers a response from the server.
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 12]
+
+RFC 3489                          STUN                        March 2003
+
+
+8.2 Shared Secret Requests
+
+   Shared Secret Requests are always received on TLS connections.  When
+   the server receives a request from the client to establish a TLS
+   connection, it MUST proceed with TLS, and SHOULD present a site
+   certificate.  The TLS ciphersuite TLS_RSA_WITH_AES_128_CBC_SHA [4]
+   SHOULD be used.  Client TLS authentication MUST NOT be done, since
+   the server is not allocating any resources to clients, and the
+   computational burden can be a source of attacks.
+
+   If the server receives a Shared Secret Request, it MUST verify that
+   the request arrived on a TLS connection.  If it did not receive the
+   request over TLS, it MUST generate a Shared Secret Error Response,
+   and it MUST include an ERROR-CODE attribute with a 433 response code.
+   The destination for the error response depends on the transport on
+   which the request was received.  If the Shared Secret Request was
+   received over TCP, the Shared Secret Error Response is sent over the
+   same connection the request was received on.  If the Shared Secret
+   Request was receive over UDP, the Shared Secret Error Response is
+   sent to the source IP address and port that the request came from.
+
+   The server MUST check for any attributes in the request with values
+   less than or equal to 0x7fff which it does not understand.  If it
+   encounters any, the server MUST generate a Shared Secret Error
+   Response, and it MUST include an ERROR-CODE attribute with a 420
+   response code.  That response MUST contain an UNKNOWN-ATTRIBUTES
+   attribute listing the attributes with values less than or equal to
+   0x7fff which were not understood.  The Shared Secret Error Response
+   is sent over the TLS connection.
+
+   All Shared Secret Error Responses MUST contain the same transaction
+   ID contained in the Shared Secret Request. The length in the message
+   header MUST contain the total length of the message in bytes,
+   excluding the header.  The Shared Secret Error Response MUST have a
+   message type of "Shared Secret Error Response" (0x0112).
+
+   Assuming the request was properly constructed, the server creates a
+   Shared Secret Response.  The Shared Secret Response MUST contain the
+   same transaction ID contained in the Shared Secret Request.  The
+   length in the message header MUST contain the total length of the
+   message in bytes, excluding the header.  The Shared Secret Response
+   MUST have a message type of "Shared Secret Response".  The Shared
+   Secret Response MUST contain a USERNAME attribute and a PASSWORD
+   attribute.  The USERNAME attribute serves as an index to the
+   password, which is contained in the PASSWORD attribute.  The server
+   can use any mechanism it chooses to generate the username.  However,
+   the username MUST be valid for a period of at least 10 minutes.
+   Validity means that the server can compute the password for that
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 13]
+
+RFC 3489                          STUN                        March 2003
+
+
+   username.  There MUST be a single password for each username.  In
+   other words, the server cannot, 10 minutes later, assign a different
+   password to the same username.  The server MUST hand out a different
+   username for each distinct Shared Secret Request.  Distinct, in this
+   case, implies a different transaction ID.  It is RECOMMENDED that the
+   server explicitly invalidate the username after ten minutes.  It MUST
+   invalidate the username after 30 minutes.  The PASSWORD contains the
+   password bound to that username.  The password MUST have at least 128
+   bits.  The likelihood that the server assigns the same password for
+   two different usernames MUST be vanishingly small, and the passwords
+   MUST be unguessable.  In other words, they MUST be a
+   cryptographically random function of the username.
+
+   These requirements can still be met using a stateless server, by
+   intelligently computing the USERNAME and PASSWORD.  One approach is
+   to construct the USERNAME as:
+
+      USERNAME = <prefix,rounded-time,clientIP,hmac>
+
+   Where prefix is some random text string (different for each shared
+   secret request), rounded-time is the current time modulo 20 minutes,
+   clientIP is the source IP address where the Shared Secret Request
+   came from, and hmac is an HMAC [13] over the prefix, rounded-time,
+   and client IP, using a server private key.
+
+   The password is then computed as:
+
+      password = <hmac(USERNAME,anotherprivatekey)>
+
+   With this structure, the username itself, which will be present in
+   the Binding Request, contains the source IP address where the Shared
+   Secret Request came from.  That allows the server to meet the
+   requirements specified in Section 8.1 for constructing the
+   REFLECTED-FROM attribute.  The server can verify that the username
+   was not tampered with, using the hmac present in the username.
+
+   The Shared Secret Response is sent over the same TLS connection the
+   request was received on.  The server SHOULD keep the connection open,
+   and let the client close it.
+
+9.  Client Behavior
+
+   The behavior of the client is very straightforward.  Its task is to
+   discover the STUN server, obtain a shared secret, formulate the
+   Binding Request, handle request reliability, and process the Binding
+   Responses.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 14]
+
+RFC 3489                          STUN                        March 2003
+
+
+9.1  Discovery
+
+   Generally, the client will be configured with a domain name of the
+   provider of the STUN servers.  This domain name is resolved to an IP
+   address and port using the SRV procedures specified in RFC 2782 [3].
+
+   Specifically, the service name is "stun".  The protocol is "udp" for
+   sending Binding Requests, or "tcp" for sending Shared Secret
+   Requests.  The procedures of RFC 2782 are followed to determine the
+   server to contact.  RFC 2782 spells out the details of how a set of
+   SRV records are sorted and then tried.  However, it only states that
+   the client should "try to connect to the (protocol, address,
+   service)" without giving any details on what happens in the event of
+   failure.  Those details are described here for STUN.
+
+   For STUN requests, failure occurs if there is a transport failure of
+   some sort (generally, due to fatal ICMP errors in UDP or connection
+   failures in TCP).  Failure also occurs if the transaction fails due
+   to timeout.  This occurs 9.5 seconds after the first request is sent,
+   for both Shared Secret Requests and Binding Requests.  See Section
+   9.3 for details on transaction timeouts for Binding Requests.  If a
+   failure occurs, the client SHOULD create a new request, which is
+   identical to the previous, but has a different transaction ID and
+   MESSAGE INTEGRITY attribute (the HMAC will change because the
+   transaction ID has changed).  That request is sent to the next
+   element in the list as specified by RFC 2782.
+
+   The default port for STUN requests is 3478, for both TCP and UDP.
+   Administrators SHOULD use this port in their SRV records, but MAY use
+   others.
+
+   If no SRV records were found, the client performs an A record lookup
+   of the domain name.  The result will be a list of IP addresses, each
+   of which can be contacted at the default port.
+
+   This would allow a firewall admin to open the STUN port, so hosts
+   within the enterprise could access new applications. Whether they
+   will or won't do this is a good question.
+
+9.2 Obtaining a Shared Secret
+
+   As discussed in Section 12, there are several attacks possible on
+   STUN systems.  Many of these are prevented through integrity of
+   requests and responses.  To provide that integrity, STUN makes use of
+   a shared secret between client and server, used as the keying
+   material for an HMAC used in both the Binding Request and Binding
+   Response.  STUN allows for the shared secret to be obtained in any
+   way (for example, Kerberos [14]).  However, it MUST have at least 128
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 15]
+
+RFC 3489                          STUN                        March 2003
+
+
+   bits of randomness.  In order to ensure interoperability, this
+   specification describes a TLS-based mechanism.  This mechanism,
+   described in this section, MUST be implemented by clients and
+   servers.
+
+   First, the client determines the IP address and port that it will
+   open a TCP connection to.  This is done using the discovery
+   procedures in Section 9.1.  The client opens up the connection to
+   that address and port, and immediately begins TLS negotiation [2].
+   The client MUST verify the identity of the server.  To do that, it
+   follows the identification procedures defined in Section 3.1 of RFC
+   2818 [5]. Those procedures assume the client is dereferencing a URI.
+   For purposes of usage with this specification, the client treats the
+   domain name or IP address used in Section 9.1 as the host portion of
+   the URI that has been dereferenced.
+
+   Once the connection is opened, the client sends a Shared Secret
+   request.  This request has no attributes, just the header.  The
+   transaction ID in the header MUST meet the requirements outlined for
+   the transaction ID in a binding request, described in Section 9.3
+   below.  The server generates a response, which can either be a Shared
+   Secret Response or a Shared Secret Error Response.
+
+   If the response was a Shared Secret Error Response, the client checks
+   the response code in the ERROR-CODE attribute.  Interpretation of
+   those response codes is identical to the processing of Section 9.4
+   for the Binding Error Response.
+
+   If a client receives a Shared Secret Response with an attribute whose
+   type is greater than 0x7fff, the attribute MUST be ignored.  If the
+   client receives a Shared Secret Response with an attribute whose type
+   is less than or equal to 0x7fff, the response is ignored.
+
+   If the response was a Shared Secret Response, it will contain a short
+   lived username and password, encoded in the USERNAME and PASSWORD
+   attributes, respectively.
+
+   The client MAY generate multiple Shared Secret Requests on the
+   connection, and it MAY do so before receiving Shared Secret Responses
+   to previous Shared Secret Requests.  The client SHOULD close the
+   connection as soon as it has finished obtaining usernames and
+   passwords.
+
+   Section 9.3 describes how these passwords are used to provide
+   integrity protection over Binding Requests, and Section 8.1 describes
+   how it is used in Binding Responses.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 16]
+
+RFC 3489                          STUN                        March 2003
+
+
+9.3  Formulating the Binding Request
+
+   A Binding Request formulated by the client follows the syntax rules
+   defined in Section 11.  Any two requests that are not bit-wise
+   identical, and not sent to the same server from the same IP address
+   and port, MUST carry different transaction IDs. The transaction ID
+   MUST be uniformly and randomly distributed between 0 and 2**128 - 1.
+   The large range is needed because the transaction ID serves as a form
+   of randomization, helping to prevent replays of previously signed
+   responses from the server.  The message type of the request MUST be
+   "Binding Request".
+
+   The RESPONSE-ADDRESS attribute is optional in the Binding Request.
+   It is used if the client wishes the response to be sent to a
+   different IP address and port than the one the request was sent from.
+   This is useful for determining whether the client is behind a
+   firewall, and for applications that have separated control and data
+   components.  See Section 10.3 for more details.  The CHANGE-REQUEST
+   attribute is also optional.  Whether it is present depends on what
+   the application is trying to accomplish.  See Section 10 for some
+   example uses.
+
+   The client SHOULD add a MESSAGE-INTEGRITY and USERNAME attribute to
+   the Binding Request.  This MESSAGE-INTEGRITY attribute contains an
+   HMAC [13].  The value of the username, and the key to use in the
+   MESSAGE-INTEGRITY attribute depend on the shared secret mechanism.
+   If the STUN Shared Secret Request was used, the USERNAME must be a
+   valid username obtained from a Shared Secret Response within the last
+   nine minutes.  The shared secret for the HMAC is the value of the
+   PASSWORD attribute obtained from the same Shared Secret Response.
+
+   Once formulated, the client sends the Binding Request.  Reliability
+   is accomplished through client retransmissions.  Clients SHOULD
+   retransmit the request starting with an interval of 100ms, doubling
+   every retransmit until the interval reaches 1.6s.  Retransmissions
+   continue with intervals of 1.6s until a response is received, or a
+   total of 9 requests have been sent. If no response is received by 1.6
+   seconds after the last request has been sent, the client SHOULD
+   consider the transaction to have failed. In other words, requests
+   would be sent at times 0ms, 100ms, 300ms, 700ms, 1500ms, 3100ms,
+   4700ms, 6300ms, and 7900ms. At 9500ms, the client considers the
+   transaction to have failed if no response has been received.
+
+9.4  Processing Binding Responses
+
+   The response can either be a Binding Response or Binding Error
+   Response.  Binding Error Responses are always received on the source
+   address and port the request was sent from.  A Binding Response will
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 17]
+
+RFC 3489                          STUN                        March 2003
+
+
+   be received on the address and port placed in the RESPONSE-ADDRESS
+   attribute of the request.  If none was present, the Binding Responses
+   will be received on the source address and port the request was sent
+   from.
+
+   If the response is a Binding Error Response, the client checks the
+   response code from the ERROR-CODE attribute of the response.  For a
+   400 response code, the client SHOULD display the reason phrase to the
+   user.  For a 420 response code, the client SHOULD retry the request,
+   this time omitting any attributes listed in the UNKNOWN-ATTRIBUTES
+   attribute of the response.  For a 430 response code, the client
+   SHOULD obtain a new shared secret, and retry the Binding Request with
+   a new transaction.  For 401 and 432 response codes, if the client had
+   omitted the USERNAME or MESSAGE-INTEGRITY attribute as indicated by
+   the error, it SHOULD try again with those attributes.  For a 431
+   response code, the client SHOULD alert the user, and MAY try the
+   request again after obtaining a new username and password.  For a 500
+   response code, the client MAY wait several seconds and then retry the
+   request.  For a 600 response code, the client MUST NOT retry the
+   request, and SHOULD display the reason phrase to the user.  Unknown
+   attributes between 400 and 499 are treated like a 400, unknown
+   attributes between 500 and 599 are treated like a 500, and unknown
+   attributes between 600 and 699 are treated like a 600.  Any response
+   between 100 and 399 MUST result in the cessation of request
+   retransmissions, but otherwise is discarded.
+
+   If a client receives a response with an attribute whose type is
+   greater than 0x7fff, the attribute MUST be ignored.  If the client
+   receives a response with an attribute whose type is less than or
+   equal to 0x7fff, request retransmissions MUST cease, but the entire
+   response is otherwise ignored.
+
+   If the response is a Binding Response, the client SHOULD check the
+   response for a MESSAGE-INTEGRITY attribute.  If not present, and the
+   client placed a MESSAGE-INTEGRITY attribute into the request, it MUST
+   discard the response.  If present, the client computes the HMAC over
+   the response as described in Section 11.2.8.  The key to use depends
+   on the shared secret mechanism.  If the STUN Shared Secret Request
+   was used, the key MUST be same as used to compute the MESSAGE-
+   INTEGRITY attribute in the request.  If the computed HMAC differs
+   from the one in the response, the client MUST discard the response,
+   and SHOULD alert the user about a possible attack.  If the computed
+   HMAC matches the one from the response, processing continues.
+
+   Reception of a response (either Binding Error Response or Binding
+   Response) to a Binding Request will terminate retransmissions of that
+   request.  However, clients MUST continue to listen for responses to a
+   Binding Request for 10 seconds after the first response.  If it
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 18]
+
+RFC 3489                          STUN                        March 2003
+
+
+   receives any responses in this interval with different message types
+   (Binding Responses and Binding Error Responses, for example) or
+   different MAPPED-ADDRESSes, it is an indication of a possible attack.
+   The client MUST NOT use the MAPPED-ADDRESS from any of the responses
+   it received (either the first or the additional ones), and SHOULD
+   alert the user.
+
+   Furthermore, if a client receives more than twice as many Binding
+   Responses as the number of Binding Requests it sent, it MUST NOT use
+   the MAPPED-ADDRESS from any of those responses, and SHOULD alert the
+   user about a potential attack.
+
+   If the Binding Response is authenticated, and the MAPPED-ADDRESS was
+   not discarded because of a potential attack, the CLIENT MAY use the
+   MAPPED-ADDRESS and SOURCE-ADDRESS attributes.
+
+10.  Use Cases
+
+   The rules of Sections 8 and 9 describe exactly how a client and
+   server interact to send requests and get responses.  However, they do
+   not dictate how the STUN protocol is used to accomplish useful tasks.
+   That is at the discretion of the client.  Here, we provide some
+   useful scenarios for applying STUN.
+
+10.1  Discovery Process
+
+   In this scenario, a user is running a multimedia application which
+   needs to determine which of the following scenarios applies to it:
+
+   o  On the open Internet
+
+   o  Firewall that blocks UDP
+
+   o  Firewall that allows UDP out, and responses have to come back to
+      the source of the request (like a symmetric NAT, but no
+      translation.  We call this a symmetric UDP Firewall)
+
+   o  Full-cone NAT
+
+   o  Symmetric NAT
+
+   o  Restricted cone or restricted port cone NAT
+
+   Which of the six scenarios applies can be determined through the flow
+   chart described in Figure 2.  The chart refers only to the sequence
+   of Binding Requests; Shared Secret Requests will, of course, be
+   needed to authenticate each Binding Request used in the sequence.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 19]
+
+RFC 3489                          STUN                        March 2003
+
+
+   The flow makes use of three tests.  In test I, the client sends a
+   STUN Binding Request to a server, without any flags set in the
+   CHANGE-REQUEST attribute, and without the RESPONSE-ADDRESS attribute.
+   This causes the server to send the response back to the address and
+   port that the request came from.  In test II, the client sends a
+   Binding Request with both the "change IP" and "change port" flags
+   from the CHANGE-REQUEST attribute set.  In test III, the client sends
+   a Binding Request with only the "change port" flag set.
+
+   The client begins by initiating test I.  If this test yields no
+   response, the client knows right away that it is not capable of UDP
+   connectivity.  If the test produces a response, the client examines
+   the MAPPED-ADDRESS attribute.  If this address and port are the same
+   as the local IP address and port of the socket used to send the
+   request, the client knows that it is not natted.  It executes test
+   II.
+
+   If a response is received, the client knows that it has open access
+   to the Internet (or, at least, its behind a firewall that behaves
+   like a full-cone NAT, but without the translation).  If no response
+   is received, the client knows its behind a symmetric UDP firewall.
+
+   In the event that the IP address and port of the socket did not match
+   the MAPPED-ADDRESS attribute in the response to test I, the client
+   knows that it is behind a NAT.  It performs test II.  If a response
+   is received, the client knows that it is behind a full-cone NAT.  If
+   no response is received, it performs test I again, but this time,
+   does so to the address and port from the CHANGED-ADDRESS attribute
+   from the response to test I.  If the IP address and port returned in
+   the MAPPED-ADDRESS attribute are not the same as the ones from the
+   first test I, the client knows its behind a symmetric NAT.  If the
+   address and port are the same, the client is either behind a
+   restricted or port restricted NAT.  To make a determination about
+   which one it is behind, the client initiates test III.  If a response
+   is received, its behind a restricted NAT, and if no response is
+   received, its behind a port restricted NAT.
+
+   This procedure yields substantial information about the operating
+   condition of the client application.  In the event of multiple NATs
+   between the client and the Internet, the type that is discovered will
+   be the type of the most restrictive NAT between the client and the
+   Internet.  The types of NAT, in order of restrictiveness, from most
+   to least, are symmetric, port restricted cone, restricted cone, and
+   full cone.
+
+   Typically, a client will re-do this discovery process periodically to
+   detect changes, or look for inconsistent results.  It is important to
+   note that when the discovery process is redone, it should not
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 20]
+
+RFC 3489                          STUN                        March 2003
+
+
+   generally be done from the same local address and port used in the
+   previous discovery process.  If the same local address and port are
+   reused, bindings from the previous test may still be in existence,
+   and these will invalidate the results of the test.  Using a different
+   local address and port for subsequent tests resolves this problem.
+   An alternative is to wait sufficiently long to be confident that the
+   old bindings have expired (half an hour should more than suffice).
+
+10.2 Binding Lifetime Discovery
+
+   STUN can also be used to discover the lifetimes of the bindings
+   created by the NAT.  In many cases, the client will need to refresh
+   the binding, either through a new STUN request, or an application
+   packet, in order for the application to continue to use the binding.
+   By discovering the binding lifetime, the client can determine how
+   frequently it needs to refresh.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 21]
+
+RFC 3489                          STUN                        March 2003
+
+
+                        +--------+
+                        |  Test  |
+                        |   I    |
+                        +--------+
+                             |
+                             |
+                             V
+                            /\              /\
+                         N /  \ Y          /  \ Y             +--------+
+          UDP     <-------/Resp\--------->/ IP \------------->|  Test  |
+          Blocked         \ ?  /          \Same/              |   II   |
+                           \  /            \? /               +--------+
+                            \/              \/                    |
+                                             | N                  |
+                                             |                    V
+                                             V                    /\
+                                         +--------+  Sym.      N /  \
+                                         |  Test  |  UDP    <---/Resp\
+                                         |   II   |  Firewall   \ ?  /
+                                         +--------+              \  /
+                                             |                    \/
+                                             V                     |Y
+                  /\                         /\                    |
+   Symmetric  N  /  \       +--------+   N  /  \                   V
+      NAT  <--- / IP \<-----|  Test  |<--- /Resp\               Open
+                \Same/      |   I    |     \ ?  /               Internet
+                 \? /       +--------+      \  /
+                  \/                         \/
+                  |                           |Y
+                  |                           |
+                  |                           V
+                  |                           Full
+                  |                           Cone
+                  V              /\
+              +--------+        /  \ Y
+              |  Test  |------>/Resp\---->Restricted
+              |   III  |       \ ?  /
+              +--------+        \  /
+                                 \/
+                                  |N
+                                  |       Port
+                                  +------>Restricted
+
+                 Figure 2: Flow for type discovery process
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 22]
+
+RFC 3489                          STUN                        March 2003
+
+
+   To determine the binding lifetime, the client first sends a Binding
+   Request to the server from a particular socket, X.  This creates a
+   binding in the NAT.  The response from the server contains a MAPPED-
+   ADDRESS attribute, providing the public address and port on the NAT.
+   Call this Pa and Pp, respectively.  The client then starts a timer
+   with a value of T seconds.  When this timer fires, the client sends
+   another Binding Request to the server, using the same destination
+   address and port, but from a different socket, Y.  This request
+   contains a RESPONSE-ADDRESS address attribute, set to (Pa,Pp).  This
+   will create a new binding on the NAT, and cause the STUN server to
+   send a Binding Response that would match the old binding, if it still
+   exists.  If the client receives the Binding Response on socket X, it
+   knows that the binding has not expired.  If the client receives the
+   Binding Response on socket Y (which is possible if the old binding
+   expired, and the NAT allocated the same public address and port to
+   the new binding), or receives no response at all, it knows that the
+   binding has expired.
+
+   The client can find the value of the binding lifetime by doing a
+   binary search through T, arriving eventually at the value where the
+   response is not received for any timer greater than T, but is
+   received for any timer less than T.
+
+   This discovery process takes quite a bit of time, and is something
+   that will typically be run in the background on a device once it
+   boots.
+
+   It is possible that the client can get inconsistent results each time
+   this process is run.  For example, if the NAT should reboot, or be
+   reset for some reason, the process may discover a lifetime than is
+   shorter than the actual one.  For this reason, implementations are
+   encouraged to run the test numerous times, and be prepared to get
+   inconsistent results.
+
+10.3  Binding Acquisition
+
+   Consider once more the case of a VoIP phone.  It used the discovery
+   process above when it started up, to discover its environment.  Now,
+   it wants to make a call.  As part of the discovery process, it
+   determined that it was behind a full-cone NAT.
+
+   Consider further that this phone consists of two logically separated
+   components - a control component that handles signaling, and a media
+   component that handles the audio, video, and RTP [12].  Both are
+   behind the same NAT.  Because of this separation of control and
+   media, we wish to minimize the communication required between them.
+   In fact, they may not even run on the same host.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 23]
+
+RFC 3489                          STUN                        March 2003
+
+
+   In order to make a voice call, the phone needs to obtain an IP
+   address and port that it can place in the call setup message as the
+   destination for receiving audio.
+
+   To obtain an address, the control component sends a Shared Secret
+   Request to the server, obtains a shared secret, and then sends a
+   Binding Request to the server.  No CHANGE-REQUEST attribute is
+   present in the Binding Request, and neither is the RESPONSE-ADDRESS
+   attribute.  The Binding Response contains a mapped address.  The
+   control component then formulates a second Binding Request.  This
+   request contains a RESPONSE-ADDRESS, which is set to the mapped
+   address learned from the previous Binding Response.  This Binding
+   Request is passed to the media component, along with the IP address
+   and port of the STUN server.  The media component sends the Binding
+   Request.  The request goes to the STUN server, which sends the
+   Binding Response back to the control component.  The control
+   component receives this, and now has learned an IP address and port
+   that will be routed back to the media component that sent the
+   request.
+
+   The client will be able to receive media from anywhere on this mapped
+   address.
+
+   In the case of silence suppression, there may be periods where the
+   client receives no media.  In this case, the UDP bindings could
+   timeout (UDP bindings in NATs are typically short; 30 seconds is
+   common).  To deal with this, the application can periodically
+   retransmit the query in order to keep the binding fresh.
+
+   It is possible that both participants in the multimedia session are
+   behind the same NAT.  In that case, both will repeat this procedure
+   above, and both will obtain public address bindings.  When one sends
+   media to the other, the media is routed to the NAT, and then turns
+   right back around to come back into the enterprise, where it is
+   translated to the private address of the recipient.  This is not
+   particularly efficient, and unfortunately, does not work in many
+   commercial NATs.  In such cases, the clients may need to retry using
+   private addresses.
+
+11. Protocol Details
+
+   This section presents the detailed encoding of a STUN message.
+
+   STUN is a request-response protocol.  Clients send a request, and the
+   server sends a response.  There are two requests, Binding Request,
+   and Shared Secret Request.  The response to a Binding Request can
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 24]
+
+RFC 3489                          STUN                        March 2003
+
+
+   either be the Binding Response or Binding Error Response.  The
+   response to a Shared Secret Request can either be a Shared Secret
+   Response or a Shared Secret Error Response.
+
+   STUN messages are encoded using binary fields.  All integer fields
+   are carried in network byte order, that is, most significant byte
+   (octet) first.  This byte order is commonly known as big-endian.  The
+   transmission order is described in detail in Appendix B of RFC 791
+   [6].  Unless otherwise noted, numeric constants are in decimal (base
+   10).
+
+11.1  Message Header
+
+   All STUN messages consist of a 20 byte header:
+
+    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
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+   |      STUN Message Type        |         Message Length        |
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+   |
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                            Transaction ID
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                                                                   |
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   The Message Types can take on the following values:
+
+      0x0001  :  Binding Request
+      0x0101  :  Binding Response
+      0x0111  :  Binding Error Response
+      0x0002  :  Shared Secret Request
+      0x0102  :  Shared Secret Response
+      0x0112  :  Shared Secret Error Response
+
+   The message length is the count, in bytes, of the size of the
+   message, not including the 20 byte header.
+
+   The transaction ID is a 128 bit identifier.  It also serves as salt
+   to randomize the request and the response.  All responses carry the
+   same identifier as the request they correspond to.
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 25]
+
+RFC 3489                          STUN                        March 2003
+
+
+11.2  Message Attributes
+
+   After the header are 0 or more attributes.  Each attribute is TLV
+   encoded, with a 16 bit type, 16 bit length, and variable value:
+
+    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             |
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+   |                             Value                             ....
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   The following types are defined:
+
+   0x0001: MAPPED-ADDRESS
+   0x0002: RESPONSE-ADDRESS
+   0x0003: CHANGE-REQUEST
+   0x0004: SOURCE-ADDRESS
+   0x0005: CHANGED-ADDRESS
+   0x0006: USERNAME
+   0x0007: PASSWORD
+   0x0008: MESSAGE-INTEGRITY
+   0x0009: ERROR-CODE
+   0x000a: UNKNOWN-ATTRIBUTES
+   0x000b: REFLECTED-FROM
+
+   To allow future revisions of this specification to add new attributes
+   if needed, the attribute space is divided into optional and mandatory
+   ones.  Attributes with values greater than 0x7fff are optional, which
+   means that the message can be processed by the client or server even
+   though the attribute is not understood.  Attributes with values less
+   than or equal to 0x7fff are mandatory to understand, which means that
+   the client or server cannot process the message unless it understands
+   the attribute.
+
+   The MESSAGE-INTEGRITY attribute MUST be the last attribute within a
+   message.  Any attributes that are known, but are not supposed to be
+   present in a message (MAPPED-ADDRESS in a request, for example) MUST
+   be ignored.
+
+   Table 2 indicates which attributes are present in which messages.  An
+   M indicates that inclusion of the attribute in the message is
+   mandatory, O means its optional, C means it's conditional based on
+   some other aspect of the message, and N/A means that the attribute is
+   not applicable to that message type.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 26]
+
+RFC 3489                          STUN                        March 2003
+
+
+                                         Binding  Shared  Shared  Shared
+                       Binding  Binding  Error    Secret  Secret  Secret
+   Att.                Req.     Resp.    Resp.    Req.    Resp.   Error
+                                                                  Resp.
+   _____________________________________________________________________
+   MAPPED-ADDRESS      N/A      M        N/A      N/A     N/A     N/A
+   RESPONSE-ADDRESS    O        N/A      N/A      N/A     N/A     N/A
+   CHANGE-REQUEST      O        N/A      N/A      N/A     N/A     N/A
+   SOURCE-ADDRESS      N/A      M        N/A      N/A     N/A     N/A
+   CHANGED-ADDRESS     N/A      M        N/A      N/A     N/A     N/A
+   USERNAME            O        N/A      N/A      N/A     M       N/A
+   PASSWORD            N/A      N/A      N/A      N/A     M       N/A
+   MESSAGE-INTEGRITY   O        O        N/A      N/A     N/A     N/A
+   ERROR-CODE          N/A      N/A      M        N/A     N/A     M
+   UNKNOWN-ATTRIBUTES  N/A      N/A      C        N/A     N/A     C
+   REFLECTED-FROM      N/A      C        N/A      N/A     N/A     N/A
+
+   Table 2: Summary of Attributes
+
+   The length refers to the length of the value element, expressed as an
+   unsigned integral number of bytes.
+
+11.2.1 MAPPED-ADDRESS
+
+   The MAPPED-ADDRESS attribute indicates the mapped IP address and
+   port.  It consists of an eight bit address family, and a sixteen bit
+   port, followed by a fixed length value representing the IP address.
+
+    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                           |
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   The port is a network byte ordered representation of the mapped port.
+   The address family is always 0x01, corresponding to IPv4.  The first
+   8 bits of the MAPPED-ADDRESS are ignored, for the purposes of
+   aligning parameters on natural boundaries.  The IPv4 address is 32
+   bits.
+
+11.2.2 RESPONSE-ADDRESS
+
+   The RESPONSE-ADDRESS attribute indicates where the response to a
+   Binding Request should be sent.  Its syntax is identical to MAPPED-
+   ADDRESS.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 27]
+
+RFC 3489                          STUN                        March 2003
+
+
+11.2.3  CHANGED-ADDRESS
+
+   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.
+
+11.2.4 CHANGE-REQUEST
+
+   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.  The attribute is 32 bits long, although only two bits (A
+   and B) are used:
+
+    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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A B 0|
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   The meaning of the flags is:
+
+   A: This 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.
+
+   B: This 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.
+
+11.2.5 SOURCE-ADDRESS
+
+   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.
+
+11.2.6 USERNAME
+
+   The USERNAME attribute is used for message integrity.  It serves as a
+   means to identify the shared secret used in the message integrity
+   check.  The USERNAME is always present in a Shared Secret Response,
+   along with the PASSWORD.  It is optionally present in a Binding
+   Request when message integrity is used.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 28]
+
+RFC 3489                          STUN                        March 2003
+
+
+   The value of USERNAME is a variable length opaque value.  Its length
+   MUST be a multiple of 4 (measured in bytes) in order to guarantee
+   alignment of attributes on word boundaries.
+
+11.2.7 PASSWORD
+
+   The PASSWORD attribute is used in Shared Secret Responses.  It is
+   always present in a Shared Secret Response, along with the USERNAME.
+
+   The value of PASSWORD is a variable length value that is to be used
+   as a shared secret.  Its length MUST be a multiple of 4 (measured in
+   bytes) in order to guarantee alignment of attributes on word
+   boundaries.
+
+11.2.8 MESSAGE-INTEGRITY
+
+   The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [13] of the
+   STUN message.  It can be present in Binding Requests or Binding
+   Responses.  Since it uses the SHA1 hash, the HMAC will be 20 bytes.
+   The text used as input to HMAC is the STUN message, including the
+   header, up to and including the attribute preceding the MESSAGE-
+   INTEGRITY attribute. That text is then padded with zeroes so as to be
+   a multiple of 64 bytes.  As a result, the MESSAGE-INTEGRITY attribute
+   MUST be the last attribute in any STUN message.  The key used as
+   input to HMAC depends on the context.
+
+11.2.9 ERROR-CODE
+
+   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, and is
+   consistent in its code assignments and semantics with SIP [10] and
+   HTTP [15].  The reason phrase is meant for user consumption, and can
+   be anything appropriate for the response code.  The lengths of the
+   reason phrases MUST be a multiple of 4 (measured in bytes).  This can
+   be accomplished by added spaces to the end of the text, if necessary.
+   Recommended reason phrases for the defined response codes are
+   presented below.
+
+   To facilitate processing, the class of the error code (the hundreds
+   digit) is encoded separately from the rest of the code.
+
+
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 29]
+
+RFC 3489                          STUN                        March 2003
+
+
+     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)                                ..
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   The class represents the hundreds digit of the response code.  The
+   value MUST be between 1 and 6.  The number represents the response
+   code modulo 100, and its value MUST be between 0 and 99.
+
+   The following response codes, along with their recommended reason
+   phrases (in brackets) are defined at this time:
+
+   400 (Bad Request): The request was malformed.  The client should not
+        retry the request without modification from the previous
+        attempt.
+
+   401 (Unauthorized): The Binding Request did not contain a MESSAGE-
+        INTEGRITY attribute.
+
+   420 (Unknown Attribute): The server did not understand a mandatory
+        attribute in the request.
+
+   430 (Stale Credentials): The Binding Request did contain a MESSAGE-
+        INTEGRITY attribute, but it used a shared secret that has
+        expired.  The client should obtain a new shared secret and try
+        again.
+
+   431 (Integrity Check Failure): The Binding Request contained a
+        MESSAGE-INTEGRITY attribute, but the HMAC failed verification.
+        This could be a sign of a potential attack, or client
+        implementation error.
+
+   432 (Missing Username): The Binding Request contained a MESSAGE-
+        INTEGRITY attribute, but not a USERNAME attribute.  Both must be
+        present for integrity checks.
+
+   433 (Use TLS): The Shared Secret request has to be sent over TLS, but
+        was not received over TLS.
+
+   500 (Server Error): The server has suffered a temporary error. The
+        client should try again.
+
+   600 (Global Failure:) The server is refusing to fulfill the request.
+        The client should not retry.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 30]
+
+RFC 3489                          STUN                        March 2003
+
+
+11.2.10 UNKNOWN-ATTRIBUTES
+
+   The UNKNOWN-ATTRIBUTES attribute is present only in a Binding Error
+   Response or Shared Secret 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.
+
+   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
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |      Attribute 1 Type           |     Attribute 2 Type        |
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+    |      Attribute 3 Type           |     Attribute 4 Type    ...
+    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+11.2.11 REFLECTED-FROM
+
+   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.
+
+   Its syntax is identical to the MAPPED-ADDRESS attribute.
+
+12.  Security Considerations
+
+12.1 Attacks on STUN
+
+   Generally speaking, attacks on STUN can be classified into denial of
+   service attacks and eavesdropping attacks.  Denial of service attacks
+   can be launched against a STUN server itself, or against other
+   elements using the STUN protocol.
+
+   STUN servers create state through the Shared Secret Request
+   mechanism.  To prevent being swamped with traffic, a STUN server
+   SHOULD limit the number of simultaneous TLS connections it will hold
+   open by dropping an existing connection when a new connection request
+   arrives (based on an Least Recently Used (LRU) policy, for example).
+   Similarly, it SHOULD limit the number of shared secrets it will
+   store, in the event that the server is storing the shared secrets.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 31]
+
+RFC 3489                          STUN                        March 2003
+
+
+   The attacks of greater interest are those in which the STUN server
+   and client are used to launch DOS attacks against other entities,
+   including the client itself.
+
+   Many of the attacks require the attacker to generate a response to a
+   legitimate STUN request, in order to provide the client with a faked
+   MAPPED-ADDRESS.  The attacks that can be launched using such a
+   technique include:
+
+12.1.1 Attack I: DDOS Against a Target
+
+   In this case, the attacker provides a large number of clients with
+   the same faked MAPPED-ADDRESS that points to the intended target.
+   This will trick all the STUN clients into thinking that their
+   addresses are equal to that of the target.  The clients then hand out
+   that address in order to receive traffic on it (for example, in SIP
+   or H.323 messages).  However, all of that traffic becomes focused at
+   the intended target.  The attack can provide substantial
+   amplification, especially when used with clients that are using STUN
+   to enable multimedia applications.
+
+12.1.2 Attack II: Silencing a Client
+
+   In this attack, the attacker seeks to deny a client access to
+   services enabled by STUN (for example, a client using STUN to enable
+   SIP-based multimedia traffic).  To do that, the attacker provides
+   that client with a faked MAPPED-ADDRESS.  The MAPPED-ADDRESS it
+   provides is an IP address that routes to nowhere.  As a result, the
+   client won't receive any of the packets it expects to receive when it
+   hands out the MAPPED-ADDRESS.
+
+   This exploitation is not very interesting for the attacker.  It
+   impacts a single client, which is frequently not the desired target.
+   Moreover, any attacker that can mount the attack could also deny
+   service to the client by other means, such as preventing the client
+   from receiving any response from the STUN server, or even a DHCP
+   server.
+
+12.1.3 Attack III: Assuming the Identity of a Client
+
+   This attack is similar to attack II.  However, the faked MAPPED-
+   ADDRESS points to the attacker themself.  This allows the attacker to
+   receive traffic which was destined for the client.
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 32]
+
+RFC 3489                          STUN                        March 2003
+
+
+12.1.4 Attack IV: Eavesdropping
+
+   In this attack, the attacker forces the client to use a MAPPED-
+   ADDRESS that routes to itself.  It then forwards any packets it
+   receives to the client.  This attack would allow the attacker to
+   observe all packets sent to the client.  However, in order to launch
+   the attack, the attacker must have already been able to observe
+   packets from the client to the STUN server.  In most cases (such as
+   when the attack is launched from an access network), this means that
+   the attacker could already observe packets sent to the client.  This
+   attack is, as a result, only useful for observing traffic by
+   attackers on the path from the client to the STUN server, but not
+   generally on the path of packets being routed towards the client.
+
+12.2 Launching the Attacks
+
+   It is important to note that attacks of this nature (injecting
+   responses with fake MAPPED-ADDRESSes) require that the attacker be
+   capable of eavesdropping requests sent from the client to the server
+   (or to act as a MITM for such attacks).  This is because STUN
+   requests contain a transaction identifier, selected by the client,
+   which is random with 128 bits of entropy.  The server echoes this
+   value in the response, and the client ignores any responses that
+   don't have a matching transaction ID.  Therefore, in order for an
+   attacker to provide a faked response that is accepted by the client,
+   the attacker needs to know what the transaction ID in the request
+   was.  The large amount of randomness, combined with the need to know
+   when the client sends a request, precludes attacks that involve
+   guessing the transaction ID.
+
+   Since all of the above attacks rely on this one primitive - injecting
+   a response with a faked MAPPED-ADDRESS - preventing the attacks is
+   accomplished by preventing this one operation.  To prevent it, we
+   need to consider the various ways in which it can be accomplished.
+   There are several:
+
+12.2.1 Approach I: Compromise a Legitimate STUN Server
+
+   In this attack, the attacker compromises a legitimate STUN server
+   through a virus or Trojan horse.  Presumably, this would allow the
+   attacker to take over the STUN server, and control the types of
+   responses it generates.
+
+   Compromise of a STUN server can also lead to discovery of open ports.
+   Knowledge of an open port creates an opportunity for DoS attacks on
+   those ports (or DDoS attacks if the traversed NAT is a full cone
+   NAT).  Discovering open ports is already fairly trivial using port
+   probing, so this does not represent a major threat.
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 33]
+
+RFC 3489                          STUN                        March 2003
+
+
+12.2.2 Approach II: DNS Attacks
+
+   STUN servers are discovered using DNS SRV records.  If an attacker
+   can compromise the DNS, it can inject fake records which map a domain
+   name to the IP address of a STUN server run by the attacker.  This
+   will allow it to inject fake responses to launch any of the attacks
+   above.
+
+12.2.3 Approach III: Rogue Router or NAT
+
+   Rather than compromise the STUN server, an attacker can cause a STUN
+   server to generate responses with the wrong MAPPED-ADDRESS by
+   compromising a router or NAT on the path from the client to the STUN
+   server.  When the STUN request passes through the rogue router or
+   NAT, it rewrites the source address of the packet to be that of the
+   desired MAPPED-ADDRESS.  This address cannot be arbitrary.  If the
+   attacker is on the public Internet (that is, there are no NATs
+   between it and the STUN server), and the attacker doesn't modify the
+   STUN request, the address has to have the property that packets sent
+   from the STUN server to that address would route through the
+   compromised router.  This is because the STUN server will send the
+   responses back to the source address of the request.  With a modified
+   source address, the only way they can reach the client is if the
+   compromised router directs them there.  If the attacker is on the
+   public Internet, but they can modify the STUN request, they can
+   insert a RESPONSE-ADDRESS attribute into the request, containing the
+   actual source address of the STUN request.  This will cause the
+   server to send the response to the client, independent of the source
+   address the STUN server sees.  This gives the attacker the ability to
+   forge an arbitrary source address when it forwards the STUN request.
+
+   If the attacker is on a private network (that is, there are NATs
+   between it and the STUN server), the attacker will not be able to
+   force the server to generate arbitrary MAPPED-ADRESSes in responses.
+   They will only be able force the STUN server to generate MAPPED-
+   ADDRESSes which route to the private network.  This is because the
+   NAT between the attacker and the STUN server will rewrite the source
+   address of the STUN request, mapping it to a public address that
+   routes to the private network.  Because of this, the attacker can
+   only force the server to generate faked mapped addresses that route
+   to the private network.  Unfortunately, it is possible that a low
+   quality NAT would be willing to map an allocated public address to
+   another public address (as opposed to an internal private address),
+   in which case the attacker could forge the source address in a STUN
+   request to be an arbitrary public address.  This kind of behavior
+   from NATs does appear to be rare.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 34]
+
+RFC 3489                          STUN                        March 2003
+
+
+12.2.4 Approach IV: MITM
+
+   As an alternative to approach III, if the attacker can place an
+   element on the path from the client to the server, the element can
+   act as a man-in-the-middle.  In that case, it can intercept a STUN
+   request, and generate a STUN response directly with any desired value
+   of the MAPPED-ADDRESS field.  Alternatively, it can forward the STUN
+   request to the server (after potential modification), receive the
+   response, and forward it to the client.  When forwarding the request
+   and response, this attack is subject to the same limitations on the
+   MAPPED-ADDRESS described in Section 12.2.3.
+
+12.2.5 Approach V: Response Injection Plus DoS
+
+   In this approach, the attacker does not need to be a MITM (as in
+   approaches III and IV).  Rather, it only needs to be able to
+   eavesdrop onto a network segment that carries STUN requests.  This is
+   easily done in multiple access networks such as ethernet or
+   unprotected 802.11.  To inject the fake response, the attacker
+   listens on the network for a STUN request.  When it sees one, it
+   simultaneously launches a DoS attack on the STUN server, and
+   generates its own STUN response with the desired MAPPED-ADDRESS
+   value.  The STUN response generated by the attacker will reach the
+   client, and the DoS attack against the server is aimed at preventing
+   the legitimate response from the server from reaching the client.
+   Arguably, the attacker can do without the DoS attack on the server,
+   so long as the faked response beats the real response back to the
+   client, and the client uses the first response, and ignores the
+   second (even though it's different).
+
+12.2.6 Approach VI: Duplication
+
+   This approach is similar to approach V.  The attacker listens on the
+   network for a STUN request.  When it sees it, it generates its own
+   STUN request towards the server.  This STUN request is identical to
+   the one it saw, but with a spoofed source IP address.  The spoofed
+   address is equal to the one that the attacker desires to have placed
+   in the MAPPED-ADDRESS of the STUN response.  In fact, the attacker
+   generates a flood of such packets.  The STUN server will receive the
+   one original request, plus a flood of duplicate fake ones.  It
+   generates responses to all of them.  If the flood is sufficiently
+   large for the responses to congest routers or some other equipment,
+   there is a reasonable probability that the one real response is lost
+   (along with many of the faked ones), but the net result is that only
+   the faked responses are received by the STUN client.  These responses
+   are all identical and all contain the MAPPED-ADDRESS that the
+   attacker wanted the client to use.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 35]
+
+RFC 3489                          STUN                        March 2003
+
+
+   The flood of duplicate packets is not needed (that is, only one faked
+   request is sent), so long as the faked response beats the real
+   response back to the client, and the client uses the first response,
+   and ignores the second (even though it's different).
+
+   Note that, in this approach, launching a DoS attack against the STUN
+   server or the IP network, to prevent the valid response from being
+   sent or received, is problematic.  The attacker needs the STUN server
+   to be available to handle its own request.  Due to the periodic
+   retransmissions of the request from the client, this leaves a very
+   tiny window of opportunity.  The attacker must start the DoS attack
+   immediately after the actual request from the client, causing the
+   correct response to be discarded, and then cease the DoS attack in
+   order to send its own request, all before the next retransmission
+   from the client.  Due to the close spacing of the retransmits (100ms
+   to a few seconds), this is very difficult to do.
+
+   Besides DoS attacks, there may be other ways to prevent the actual
+   request from the client from reaching the server.  Layer 2
+   manipulations, for example, might be able to accomplish it.
+
+   Fortunately, Approach IV is subject to the same limitations
+   documented in Section 12.2.3, which limit the range of MAPPED-
+   ADDRESSes the attacker can cause the STUN server to generate.
+
+12.3 Countermeasures
+
+   STUN provides mechanisms to counter the approaches described above,
+   and additional, non-STUN techniques can be used as well.
+
+   First off, it is RECOMMENDED that networks with STUN clients
+   implement ingress source filtering (RFC 2827 [7]).  This is
+   particularly important for the NATs themselves.  As Section 12.2.3
+   explains, NATs which do not perform this check can be used as
+   "reflectors" in DDoS attacks.  Most NATs do perform this check as a
+   default mode of operation.  We strongly advise people that purchase
+   NATs to ensure that this capability is present and enabled.
+
+   Secondly, it is RECOMMENDED that STUN servers be run on hosts
+   dedicated to STUN, with all UDP and TCP ports disabled except for the
+   STUN ports.  This is to prevent viruses and Trojan horses from
+   infecting STUN servers, in order to prevent their compromise.  This
+   helps mitigate Approach I (Section 12.2.1).
+
+   Thirdly, to prevent the DNS attack of Section 12.2.2, Section 9.2
+   recommends that the client verify the credentials provided by the
+   server with the name used in the DNS lookup.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 36]
+
+RFC 3489                          STUN                        March 2003
+
+
+   Finally, all of the attacks above rely on the client taking the
+   mapped address it learned from STUN, and using it in application
+   layer protocols.  If encryption and message integrity are provided
+   within those protocols, the eavesdropping and identity assumption
+   attacks can be prevented.  As such, applications that make use of
+   STUN addresses in application protocols SHOULD use integrity and
+   encryption, even if a SHOULD level strength is not specified for that
+   protocol.  For example, multimedia applications using STUN addresses
+   to receive RTP traffic would use secure RTP [16].
+
+   The above three techniques are non-STUN mechanisms.  STUN itself
+   provides several countermeasures.
+
+   Approaches IV (Section 12.2.4), when generating the response locally,
+   and V (Section 12.2.5) require an attacker to generate a faked
+   response.  This attack is prevented using the message integrity
+   mechanism provided in STUN, described in Section 8.1.
+
+   Approaches III (Section 12.2.3) IV (Section 12.2.4), when using the
+   relaying technique, and VI (12.2.6), however, are not preventable
+   through server signatures.  Both approaches are most potent when the
+   attacker can modify the request, inserting a RESPONSE-ADDRESS that
+   routes to the client.  Fortunately, such modifications are
+   preventable using the message integrity techniques described in
+   Section 9.3.  However, these three approaches are still functional
+   when the attacker modifies nothing but the source address of the STUN
+   request. Sadly, this is the one thing that cannot be protected
+   through cryptographic means, as this is the change that STUN itself
+   is seeking to detect and report.  It is therefore an inherent
+   weakness in NAT, and not fixable in STUN.  To help mitigate these
+   attacks, Section 9.4 provides several heuristics for the client to
+   follow.  The client looks for inconsistent or extra responses, both
+   of which are signs of the attacks described above.  However, these
+   heuristics are just that - heuristics, and cannot be guaranteed to
+   prevent attacks.  The heuristics appear to prevent the attacks as we
+   know how to launch them today.  Implementors should stay posted for
+   information on new heuristics that might be required in the future.
+   Such information will be distributed on the IETF MIDCOM mailing list,
+   midcom@ietf.org.
+
+12.4 Residual Threats
+
+   None of the countermeasures listed above can prevent the attacks
+   described in Section 12.2.3 if the attacker is in the appropriate
+   network paths.  Specifically, consider the case in which the attacker
+   wishes to convince client C that it has address V.  The attacker
+   needs to have a network element on the path between A and the server
+   (in order to modify the request) and on the path between the server
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 37]
+
+RFC 3489                          STUN                        March 2003
+
+
+   and V so that it can forward the response to C.  Furthermore, if
+   there is a NAT between the attacker and the server, V must also be
+   behind the same NAT.  In such a situation, the attacker can either
+   gain access to all the application-layer traffic or mount the DDOS
+   attack described in Section 12.1.1.  Note that any host which exists
+   in the correct topological relationship can be DDOSed.  It need not
+   be using STUN.
+
+13.  IANA Considerations
+
+   STUN cannot be extended.  Changes to the protocol are made through a
+   standards track revision of this specification.  As a result, no IANA
+   registries are needed.  Any future extensions will establish any
+   needed registries.
+
+14.  IAB Considerations
+
+   The IAB has studied the problem of "Unilateral Self Address Fixing",
+   which is the general process by which a client attempts to determine
+   its address in another realm on the other side of a NAT through a
+   collaborative protocol reflection mechanism (RFC 3424 [17]).  STUN is
+   an example of a protocol that performs this type of function.  The
+   IAB has mandated that any protocols developed for this purpose
+   document a specific set of considerations.  This section meets those
+   requirements.
+
+14.1 Problem Definition
+
+   From RFC 3424 [17], any UNSAF proposal must provide:
+
+      Precise definition of a specific, limited-scope problem that is to
+      be solved with the UNSAF proposal.  A short term fix should not be
+      generalized to solve other problems; this is why "short term fixes
+      usually aren't".
+
+   The specific problems being solved by STUN are:
+
+   o  Provide a means for a client to detect the presence of one or more
+      NATs between it and a server run by a service provider on the
+      public Internet.  The purpose of such detection is to determine
+      additional steps that might be necessary in order to receive
+      service from that particular provider.
+
+   o  Provide a means for a client to detect the presence of one or more
+      NATs between it and another client, where the second client is
+      reachable from the first, but it is not known whether the second
+      client resides on the public Internet.
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 38]
+
+RFC 3489                          STUN                        March 2003
+
+
+   o  Provide a means for a client to obtain an address on the public
+      Internet from a non-symmetric NAT, for the express purpose of
+      receiving incoming UDP traffic from another host, targeted to that
+      address.
+
+   STUN does not address TCP, either incoming or outgoing, and does not
+   address outgoing UDP communications.
+
+14.2 Exit Strategy
+
+   From [17], any UNSAF proposal must provide:
+
+      Description of an exit strategy/transition plan.  The better short
+      term fixes are the ones that will naturally see less and less use
+      as the appropriate technology is deployed.
+
+   STUN comes with its own built in exit strategy.  This strategy is the
+   detection operation that is performed as a precursor to the actual
+   UNSAF address-fixing operation.  This discovery operation, documented
+   in Section 10.1, attempts to discover the existence of, and type of,
+   any NATS between the client and the service provider network.  Whilst
+   the detection of the specific type of NAT may be brittle, the
+   discovery of the existence of NAT is itself quite robust.  As NATs
+   are phased out through the deployment of IPv6, the discovery
+   operation will return immediately with the result that there is no
+   NAT, and no further operations are required.  Indeed, the discovery
+   operation itself can be used to help motivate deployment of IPv6; if
+   a user detects a NAT between themselves and the public Internet, they
+   can call up their access provider and complain about it.
+
+   STUN can also help facilitate the introduction of midcom.  As
+   midcom-capable NATs are deployed, applications will, instead of using
+   STUN (which also resides at the application layer), first allocate an
+   address binding using midcom.  However, it is a well-known limitation
+   of midcom that it only works when the agent knows the middleboxes
+   through which its traffic will flow.  Once bindings have been
+   allocated from those middleboxes, a STUN detection procedure can
+   validate that there are no additional middleboxes on the path from
+   the public Internet to the client.  If this is the case, the
+   application can continue operation using the address bindings
+   allocated from midcom.  If it is not the case, STUN provides a
+   mechanism for self-address fixing through the remaining midcom-
+   unaware middleboxes.  Thus, STUN provides a way to help transition to
+   full midcom-aware networks.
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 39]
+
+RFC 3489                          STUN                        March 2003
+
+
+14.3  Brittleness Introduced by STUN
+
+   From [17], any UNSAF proposal must provide:
+
+      Discussion of specific issues that may render systems more
+      "brittle".  For example, approaches that involve using data at
+      multiple network layers create more dependencies, increase
+      debugging challenges, and make it harder to transition.
+
+   STUN introduces brittleness into the system in several ways:
+
+   o  The discovery process assumes a certain classification of devices
+      based on their treatment of UDP.  There could be other types of
+      NATs that are deployed that would not fit into one of these molds.
+      Therefore, future NATs may not be properly detected by STUN.  STUN
+      clients (but not servers) would need to change to accommodate
+      that.
+
+   o  The binding acquisition usage of STUN does not work for all NAT
+      types.  It will work for any application for full cone NATs only.
+      For restricted cone and port restricted cone NAT, it will work for
+      some applications depending on the application. Application
+      specific processing will generally be needed.  For symmetric NATs,
+      the binding acquisition will not yield a usable address.  The
+      tight dependency on the specific type of NAT makes the protocol
+      brittle.
+
+   o  STUN assumes that the server exists on the public Internet.  If
+      the server is located in another private address realm, the user
+      may or may not be able to use its discovered address to
+      communicate with other users.  There is no way to detect such a
+      condition.
+
+   o  The bindings allocated from the NAT need to be continuously
+      refreshed.  Since the timeouts for these bindings is very
+      implementation specific, the refresh interval cannot easily be
+      determined.  When the binding is not being actively used to
+      receive traffic, but to wait for an incoming message, the binding
+      refresh will needlessly consume network bandwidth.
+
+   o  The use of the STUN server as an additional network element
+      introduces another point of potential security attack.  These
+      attacks are largely prevented by the security measures provided by
+      STUN, but not entirely.
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 40]
+
+RFC 3489                          STUN                        March 2003
+
+
+   o  The use of the STUN server as an additional network element
+      introduces another point of failure.  If the client cannot locate
+      a STUN server, or if the server should be unavailable due to
+      failure, the application cannot function.
+
+   o  The use of STUN to discover address bindings will result in an
+      increase in latency for applications.  For example, a Voice over
+      IP application will see an increase of call setup delays equal to
+      at least one RTT to the STUN server.
+
+   o  The discovery of binding lifetimes is prone to error.  It assumes
+      that the same lifetime will exist for all bindings. This may not
+      be true if the NAT uses dynamic binding lifetimes to handle
+      overload, or if the NAT itself reboots during the discovery
+      process.
+
+   o  STUN imposes some restrictions on the network topologies for
+      proper operation.  If client A obtains an address from STUN server
+      X, and sends it to client B, B may not be able to send to A using
+      that IP address.  The address will not work if any of the
+      following is true:
+
+      -  The STUN server is not in an address realm that is a common
+         ancestor (topologically) of both clients A and B.  For example,
+         consider client A and B, both of which have residential NAT
+         devices.  Both devices connect them to their cable operators,
+         but both clients have different providers. Each provider has a
+         NAT in front of their entire network, connecting it to the
+         public Internet.  If the STUN server used by A is in A's cable
+         operator's network, an address obtained by it will not be
+         usable by B.  The STUN server must be in the network which is a
+         common ancestor to both - in this case, the public Internet.
+
+      -  The STUN server is in an address realm that is a common
+         ancestor to both clients, but both clients are behind the same
+         NAT connecting to that address realm.  For example, if the two
+         clients in the previous example had the same cable operator,
+         that cable operator had a single NAT connecting their network
+         to the public Internet, and the STUN server was on the public
+         Internet, the address obtained by A would not be usable by B.
+         That is because some NATs will not accept an internal packet
+         sent to a public IP address which is mapped back to an internal
+         address.  To deal with this, additional protocol mechanisms or
+         configuration parameters need to be introduced which detect
+         this case.
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 41]
+
+RFC 3489                          STUN                        March 2003
+
+
+   o  Most significantly, STUN introduces potential security threats
+      which cannot be eliminated.  This specification describes
+      heuristics that can be used to mitigate the problem, but it is
+      provably unsolvable given what STUN is trying to accomplish.
+      These security problems are described fully in Section 12.
+
+14.4 Requirements for a Long Term Solution
+
+   From [17], any UNSAF proposal must provide:
+
+      Identify requirements for longer term, sound technical solutions
+      -- contribute to the process of finding the right longer term
+      solution.
+
+   Our experience with STUN has led to the following requirements for a
+   long term solution to the NAT problem:
+
+   Requests for bindings and control of other resources in a NAT
+      need to be explicit.  Much of the brittleness in STUN derives from
+      its guessing at the parameters of the NAT, rather than telling the
+      NAT what parameters to use.
+
+   Control needs to be "in-band".  There are far too many scenarios
+      in which the client will not know about the location of
+      middleboxes ahead of time.  Instead, control of such boxes needs
+      to occur in-band, traveling along the same path as the data will
+      itself travel.  This guarantees that the right set of middleboxes
+      are controlled.  This is only true for first-party controls;
+      third-party controls are best handled using the midcom framework.
+
+   Control needs to be limited.  Users will need to communicate
+      through NATs which are outside of their administrative control.
+      In order for providers to be willing to deploy NATs which can be
+      controlled by users in different domains, the scope of such
+      controls needs to be extremely limited - typically, allocating a
+      binding to reach the address where the control packets are coming
+      from.
+
+   Simplicity is Paramount.  The control protocol will need to be
+      implement in very simple clients.  The servers will need to
+      support extremely high loads.  The protocol will need to be
+      extremely robust, being the precursor to a host of application
+      protocols.  As such, simplicity is key.
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 42]
+
+RFC 3489                          STUN                        March 2003
+
+
+14.5 Issues with Existing NAPT Boxes
+
+   From [17], any UNSAF proposal must provide:
+
+      Discussion of the impact of the noted practical issues with
+      existing, deployed NA[P]Ts and experience reports.
+
+   Several of the practical issues with STUN involve future proofing -
+   breaking the protocol when new NAT types get deployed.  Fortunately,
+   this is not an issue at the current time, since most of the deployed
+   NATs are of the types assumed by STUN.  The primary usage STUN has
+   found is in the area of VoIP, to facilitate allocation of addresses
+   for receiving RTP [12] traffic.  In that application, the periodic
+   keepalives are provided by the RTP traffic itself.  However, several
+   practical problems arise for RTP.  First, RTP assumes that RTCP
+   traffic is on a port one higher than the RTP traffic.  This pairing
+   property cannot be guaranteed through NATs that are not directly
+   controllable.  As a result, RTCP traffic may not be properly
+   received.  Protocol extensions to SDP have been proposed which
+   mitigate this by allowing the client to signal a different port for
+   RTCP [18].  However, there will be interoperability problems for some
+   time.
+
+   For VoIP, silence suppression can cause a gap in the transmission of
+   RTP packets.  This could result in the loss of a binding in the
+   middle of a call, if that silence period exceeds the binding timeout.
+   This can be mitigated by sending occasional silence packets to keep
+   the binding alive.  However, the result is additional brittleness;
+   proper operation depends on the silence suppression algorithm in use,
+   the usage of a comfort noise codec, the duration of the silence
+   period, and the binding lifetime in the NAT.
+
+14.6 In Closing
+
+   The problems with STUN are not design flaws in STUN.  The problems in
+   STUN have to do with the lack of standardized behaviors and controls
+   in NATs.  The result of this lack of standardization has been a
+   proliferation of devices whose behavior is highly unpredictable,
+   extremely variable, and uncontrollable.  STUN does the best it can in
+   such a hostile environment.  Ultimately, the solution is to make the
+   environment less hostile, and to introduce controls and standardized
+   behaviors into NAT.  However, until such time as that happens, STUN
+   provides a good short term solution given the terrible conditions
+   under which it is forced to operate.
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 43]
+
+RFC 3489                          STUN                        March 2003
+
+
+15.  Acknowledgments
+
+   The authors would like to thank Cedric Aoun, Pete Cordell, Cullen
+   Jennings, Bob Penfield and Chris Sullivan for their comments, and
+   Baruch Sterman and Alan Hawrylyshen for initial implementations.
+   Thanks for Leslie Daigle, Allison Mankin, Eric Rescorla, and Henning
+   Schulzrinne for IESG and IAB input on this work.
+
+16.  Normative References
+
+   [1]  Bradner, S., "Key words for use in RFCs to indicate requirement
+        levels", BCP 14, RFC 2119, March 1997.
+
+   [2]  Dierks, T. and C. Allen, "The TLS protocol Version 1.0", RFC
+        2246, January 1999.
+
+   [3]  Gulbrandsen, A., Vixie, P. and L. Esibov, "A DNS RR for
+        specifying the location of services (DNS SRV)", RFC 2782,
+        February 2000.
+
+   [4]  Chown, P., "Advanced Encryption Standard (AES) Ciphersuites for
+        Transport Layer Security (TLS)", RFC 3268, June 2002.
+
+   [5]  Rescorla, E., "HTTP over TLS", RFC 2818, May 2000.
+
+   [6]  Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.
+
+   [7]  Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating
+        Denial of Service Attacks which employ IP Source Address
+        Spoofing", BCP 38, RFC 2827, May 2000.
+
+17.  Informative References
+
+   [8]  Senie, D., "Network Address Translator (NAT)-Friendly
+        Application Design Guidelines", RFC 3235, January 2002.
+
+   [9]  Srisuresh, P., Kuthan, J., Rosenberg, J., Molitor, A. and A.
+        Rayhan, "Middlebox Communication Architecture and Framework",
+        RFC 3303, August 2002.
+
+   [10] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
+        Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP:
+        Session Initiation Protocol", RFC 3261, June 2002.
+
+   [11] Holdrege, M. and P. Srisuresh, "Protocol Complications with the
+        IP Network Address Translator", RFC 3027, January 2001.
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 44]
+
+RFC 3489                          STUN                        March 2003
+
+
+   [12] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson,
+        "RTP:  A Transport Protocol for Real-Time Applications", RFC
+        1889, January 1996.
+
+   [13] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-Hashing
+        for Message Authentication", RFC 2104, February 1997.
+
+   [14] Kohl, J. and C. Neuman, "The kerberos Network Authentication
+        Service (V5)", RFC 1510, September 1993.
+
+   [15] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L.,
+        Leach, P. and T. Berners-Lee, "Hypertext Transfer Protocol --
+        HTTP/1.1", RFC 2616, June 1999.
+
+   [16] Baugher M., et al., "The secure real-time transport protocol",
+        Work in Progress.
+
+   [17] Daigle, L., Editor, "IAB Considerations for UNilateral Self-
+        Address Fixing (UNSAF) Across Network Address Translation", RFC
+        3424, November 2002.
+
+   [18] Huitema, C., "RTCP attribute in SDP", Work in Progress.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 45]
+
+RFC 3489                          STUN                        March 2003
+
+
+18. Authors' Addresses
+
+   Jonathan Rosenberg
+   dynamicsoft
+   72 Eagle Rock Avenue
+   First Floor
+   East Hanover, NJ 07936
+
+   EMail: jdrosen@dynamicsoft.com
+
+
+   Joel Weinberger
+   dynamicsoft
+   72 Eagle Rock Avenue
+   First Floor
+   East Hanover, NJ 07936
+
+   EMail: jweinberger@dynamicsoft.com
+
+
+   Christian Huitema
+   Microsoft Corporation
+   One Microsoft Way
+   Redmond, WA 98052-6399
+
+   EMail: huitema@microsoft.com
+
+
+   Rohan Mahy
+   Cisco Systems
+   101 Cooper St
+   Santa Cruz, CA 95060
+
+   EMail: rohan@cisco.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 46]
+
+RFC 3489                          STUN                        March 2003
+
+
+19. Full Copyright Statement
+
+   Copyright (C) The Internet Society (2003).  All Rights Reserved.
+
+   This document and translations of it may be copied and furnished to
+   others, and derivative works that comment on or otherwise explain it
+   or assist in its implementation may be prepared, copied, published
+   and distributed, in whole or in part, without restriction of any
+   kind, provided that the above copyright notice and this paragraph are
+   included on all such copies and derivative works.  However, this
+   document itself may not be modified in any way, such as by removing
+   the copyright notice or references to the Internet Society or other
+   Internet organizations, except as needed for the purpose of
+   developing Internet standards in which case the procedures for
+   copyrights defined in the Internet Standards process must be
+   followed, or as required to translate it into languages other than
+   English.
+
+   The limited permissions granted above are perpetual and will not be
+   revoked by the Internet Society or its successors or assigns.
+
+   This document and the information contained herein is provided on an
+   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+   Funding for the RFC Editor function is currently provided by the
+   Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Rosenberg, et al.           Standards Track                    [Page 47]
+
diff --git a/libs/stund/root.pem b/libs/stund/root.pem
new file mode 100644
index 0000000000000000000000000000000000000000..3495f58c7c75cc36101bf0860f8403dd28a5ec3e
--- /dev/null
+++ b/libs/stund/root.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDWTCCAsKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBgDELMAkGA1UEBhMCVUEx
+CzAJBgNVBAgTAkNBMREwDwYDVQQHEwhNaWxwaXRhczEOMAwGA1UEChMFRm9vQ28x
+EzARBgNVBAsTCndpZGdldCBkaXYxEjAQBgNVBAMTCWxvY2FsaG9zdDEYMBYGCSqG
+SIb3DQEJARYJZm9vQGZvby5jMB4XDTAyMTEwMTAzMDUwOFoXDTAyMTIwMTAzMDUw
+OFowgYAxCzAJBgNVBAYTAlVBMQswCQYDVQQIEwJDQTERMA8GA1UEBxMITWlscGl0
+YXMxDjAMBgNVBAoTBUZvb0NvMRMwEQYDVQQLEwp3aWRnZXQgZGl2MRIwEAYDVQQD
+Ewlsb2NhbGhvc3QxGDAWBgkqhkiG9w0BCQEWCWZvb0Bmb28uYzCBnzANBgkqhkiG
+9w0BAQEFAAOBjQAwgYkCgYEAwgvATkHnZzuN3poEtJ+l3p8rWlRVN4QnT4hW/pxI
+kZgs+U3/2QX2HZtGBcm+YJCfAICWdsnMDwhPlyp/YXdpyhe2wkl1LdukvMav8j+H
+shEQdcO+qPrjUZ8VLkMsMxM56b+UNT1m3CEoQ3qnIGuIb0DjvwfJRaiTo15LZv5j
+1wkCAwEAAaOB4DCB3TAdBgNVHQ4EFgQUlnqNTIdfldOWBuAsqXVxr8OB4p4wga0G
+A1UdIwSBpTCBooAUlnqNTIdfldOWBuAsqXVxr8OB4p6hgYakgYMwgYAxCzAJBgNV
+BAYTAlVBMQswCQYDVQQIEwJDQTERMA8GA1UEBxMITWlscGl0YXMxDjAMBgNVBAoT
+BUZvb0NvMRMwEQYDVQQLEwp3aWRnZXQgZGl2MRIwEAYDVQQDEwlsb2NhbGhvc3Qx
+GDAWBgkqhkiG9w0BCQEWCWZvb0Bmb28uY4IBADAMBgNVHRMEBTADAQH/MA0GCSqG
+SIb3DQEBBAUAA4GBAC0j/qC+PRfpIRwISxQALNm/HPtIFbQDNFwYBfVgxxQOm9cT
+gP1S9zRU8Z6K7E0ZYu6VvZAzuY9qOJK4M6X0gdGlx60QqR7poAnFiWtUtrWzs6YS
+M6ZGUjSXnnqMkP1vauvbmV72CdYLR9dIQ6OMQqJ6GKznOGJd0hW8nHzhvBUh
+-----END CERTIFICATE-----
diff --git a/libs/stund/server.cxx b/libs/stund/server.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2319592db515daf61cb832bea4e8ea7f0aada444
--- /dev/null
+++ b/libs/stund/server.cxx
@@ -0,0 +1,292 @@
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <cstdlib>   
+
+#ifndef WIN32
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <errno.h>
+#include <stdlib.h>
+#endif
+
+#include "udp.h"
+#include "stun.h"
+
+
+using namespace std;
+
+
+void 
+usage()
+{
+   cerr << "Usage: " << endl
+        << " ./server [-v] [-h] [-h IP_Address] [-a IP_Address] [-p port] [-o port] [-m mediaport]" << endl
+        << " " << endl
+        << " If the IP addresses of your NIC are 10.0.1.150 and 10.0.1.151, run this program with" << endl
+        << "    ./server -v  -h 10.0.1.150 -a 10.0.1.151" << endl
+        << " STUN servers need two IP addresses and two ports, these can be specified with:" << endl
+        << "  -h sets the primary IP" << endl
+        << "  -a sets the secondary IP" << endl
+        << "  -p sets the primary port and defaults to 3478" << endl
+        << "  -o sets the secondary port and defaults to 3479" << endl
+        << "  -b makes the program run in the backgroud" << endl
+        << "  -m sets up a STERN server starting at port m" << endl
+        << "  -v runs in verbose mode" << endl
+      // in makefile too
+        << endl;
+}
+
+
+int
+main(int argc, char* argv[])
+{
+   assert( sizeof(UInt8 ) == 1 );
+   assert( sizeof(UInt16) == 2 );
+   assert( sizeof(UInt32) == 4 );
+
+   initNetwork();
+
+   clog << "STUN server version "  <<  STUN_VERSION << endl;
+      
+   StunAddress4 myAddr;
+   StunAddress4 altAddr;
+   bool verbose=false;
+   bool background=false;
+   
+   myAddr.addr = 0;
+   altAddr.addr = 0;
+   myAddr.port = STUN_PORT;
+   altAddr.port = STUN_PORT+1;
+   int myPort = 0;
+   int altPort = 0;
+   int myMediaPort = 0;
+   
+   UInt32 interfaces[10];
+   int numInterfaces = stunFindLocalInterfaces(interfaces,10);
+
+   if (numInterfaces == 2)
+   {
+      myAddr.addr = interfaces[0];
+      myAddr.port = STUN_PORT;
+      altAddr.addr = interfaces[1];
+      altAddr.port = STUN_PORT+1;
+   }
+
+   for ( int arg = 1; arg<argc; arg++ )
+   {
+      if ( !strcmp( argv[arg] , "-v" ) )
+      {
+         verbose = true;
+      }
+      else if ( !strcmp( argv[arg] , "-b" ) )
+      {
+         background = true;
+      }
+      else if ( !strcmp( argv[arg] , "-h" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         stunParseServerName(argv[arg], myAddr);
+      }
+      else if ( !strcmp( argv[arg] , "-a" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         stunParseServerName(argv[arg], altAddr);
+      }
+      else if ( !strcmp( argv[arg] , "-p" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         myPort = UInt16(strtol( argv[arg], NULL, 10));
+      }
+      else if ( !strcmp( argv[arg] , "-o" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         altPort = UInt16(strtol( argv[arg], NULL, 10));
+      }
+      else if ( !strcmp( argv[arg] , "-m" ) )
+      {
+         arg++;
+         if ( argc <= arg ) 
+         {
+            usage();
+            exit(-1);
+         }
+         myMediaPort = UInt16(strtol( argv[arg], NULL, 10));
+      }
+      else
+      {
+         usage();
+         exit(-1);
+      }
+   }
+
+   if ( myPort != 0 )
+   {
+      myAddr.port = myPort;
+   }
+   if ( altPort != 0 )
+   {
+      altAddr.port = altPort;
+   }
+   
+   if (  (myAddr.addr == 0) || (altAddr.addr == 0) )
+   {
+      clog << "If your machine does not have exactly two ethernet interfaces, "
+           << "you must specify the server and alt server" << endl;
+      //usage();
+      //exit(-1);
+   }
+
+   if ( myAddr.port == altAddr.port )
+   {
+      altAddr.port = myAddr.port+1;
+   }
+
+   if ( verbose )
+   {
+      clog << "Running with on interface "
+           << myAddr << " with alternate " 
+           << altAddr << endl;
+   }
+    
+   if (
+      ( myAddr.addr  == 0 ) ||
+      ( myAddr.port  == 0 ) ||
+      //( altAddr.addr == 0 ) ||
+      ( altAddr.port == 0 ) 
+      )
+   {
+      cerr << "Bad command line" << endl;
+      exit(1);
+   }
+   
+   if ( altAddr.addr == 0 )
+   {
+      cerr << "Warning - no alternate ip address STUN will not work" << endl;
+      //exit(1);
+   }
+   
+#if defined(WIN32)
+   int pid=0;
+
+   if ( background )
+   {
+      cerr << "The -b background option does not work in windows" << endl;
+      exit(-1);
+   }
+#else
+   pid_t pid=0;
+
+   if ( background )
+   {
+      pid = fork();
+
+      if (pid < 0)
+      {
+         cerr << "fork: unable to fork" << endl;
+         exit(-1);
+      }
+   }
+#endif
+
+   if (pid == 0) //child or not using background
+   {
+      StunServerInfo info;
+      bool ok = stunInitServer(info, myAddr, altAddr, myMediaPort, verbose);
+      
+      int c=0;
+      while (ok)
+      {
+         ok = stunServerProcess(info, verbose);
+         c++;
+         if ( c%1000 == 0 ) 
+         {
+            clog << "*";
+         }
+      }
+      // Notreached
+   }
+   
+   return 0;
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 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 names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
diff --git a/libs/stund/server.sln b/libs/stund/server.sln
new file mode 100644
index 0000000000000000000000000000000000000000..d943a29e6ba437a17795830496854f394bee7b61
--- /dev/null
+++ b/libs/stund/server.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server", "server.vcproj", "{2011B7B6-6932-431D-83A3-E825A271F8A8}"
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		ConfigName.0 = Debug
+		ConfigName.1 = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.ActiveCfg = Debug|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Debug.Build.0 = Debug|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.ActiveCfg = Release|Win32
+		{2011B7B6-6932-431D-83A3-E825A271F8A8}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/libs/stund/server.vcproj b/libs/stund/server.vcproj
new file mode 100644
index 0000000000000000000000000000000000000000..8fb6e97a9bc732a5aab6ff9841b06d5984b66830
--- /dev/null
+++ b/libs/stund/server.vcproj
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.00"
+	Name="server"
+	ProjectGUID="{2011B7B6-6932-431D-83A3-E825A271F8A8}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="ServerDebug"
+			IntermediateDirectory="ServerDebug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Ws2_32.lib"
+				OutputFile="$(OutDir)/server.exe"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/server.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="ServerRelease"
+			IntermediateDirectory="ServerRelease"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				OmitFramePointers="TRUE"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="4"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Ws2_32.lib"
+				OutputFile="$(OutDir)/server.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+		</Configuration>
+	</Configurations>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+			<File
+				RelativePath="server.cxx">
+			</File>
+			<File
+				RelativePath="stun.cxx">
+			</File>
+			<File
+				RelativePath="udp.cxx">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc">
+			<File
+				RelativePath="stun.h">
+			</File>
+			<File
+				RelativePath="udp.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/libs/stund/stun.cxx b/libs/stund/stun.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3343d6214bb403a0ed91751f8d1928a026d6baf8
--- /dev/null
+++ b/libs/stund/stun.cxx
@@ -0,0 +1,2448 @@
+#include <cassert>
+#include <cstring>
+#include <iostream>
+#include <cstdlib>   
+#include <errno.h>
+
+#ifdef WIN32
+#include <winsock2.h>
+#include <stdlib.h>
+#include <io.h>
+#include <time.h>
+#else
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <sys/types.h> 
+#include <arpa/inet.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#include <net/if.h>
+
+#endif
+
+
+#if defined(__sparc__) || defined(WIN32)
+#define NOSSL
+#endif
+#define NOSSL
+
+#include "udp.h"
+#include "stun.h"
+
+
+using namespace std;
+
+
+static void
+computeHmac(char* hmac, const char* input, int length, const char* key, int keySize);
+
+static bool 
+stunParseAtrAddress( char* body, unsigned int hdrLen,  StunAtrAddress4& result )
+{
+   if ( hdrLen != 8 )
+   {
+      clog << "hdrLen wrong for Address" <<endl;
+      return false;
+   }
+   result.pad = *body++;
+   result.family = *body++;
+   if (result.family == IPv4Family)
+   {
+      UInt16 nport;
+      memcpy(&nport, body, 2); body+=2;
+      result.ipv4.port = ntohs(nport);
+		
+      UInt32 naddr;
+      memcpy(&naddr, body, 4); body+=4;
+      result.ipv4.addr = ntohl(naddr);
+      return true;
+   }
+   else if (result.family == IPv6Family)
+   {
+      clog << "ipv6 not supported" << endl;
+   }
+   else
+   {
+      clog << "bad address family: " << result.family << endl;
+   }
+	
+   return false;
+}
+
+static bool 
+stunParseAtrChangeRequest( char* body, unsigned int hdrLen,  StunAtrChangeRequest& result )
+{
+   if ( hdrLen != 4 )
+   {
+      clog << "hdr length = " << hdrLen << " expecting " << sizeof(result) << endl;
+		
+      clog << "Incorrect size for ChangeRequest" << endl;
+      return false;
+   }
+   else
+   {
+      memcpy(&result.value, body, 4);
+      result.value = ntohl(result.value);
+      return true;
+   }
+}
+
+static bool 
+stunParseAtrError( char* body, unsigned int hdrLen,  StunAtrError& result )
+{
+   if ( hdrLen >= sizeof(result) )
+   {
+      clog << "head on Error too large" << endl;
+      return false;
+   }
+   else
+   {
+      memcpy(&result.pad, body, 2); body+=2;
+      result.pad = ntohs(result.pad);
+      result.errorClass = *body++;
+      result.number = *body++;
+		
+      result.sizeReason = hdrLen - 4;
+      memcpy(&result.reason, body, result.sizeReason);
+      result.reason[result.sizeReason] = 0;
+      return true;
+   }
+}
+
+static bool 
+stunParseAtrUnknown( char* body, unsigned int hdrLen,  StunAtrUnknown& result )
+{
+   if ( hdrLen >= sizeof(result) )
+   {
+      return false;
+   }
+   else
+   {
+      if (hdrLen % 4 != 0) return false;
+      result.numAttributes = hdrLen / 4;
+      for (int i=0; i<result.numAttributes; i++)
+      {
+         memcpy(&result.attrType[i], body, 2); body+=2;
+         result.attrType[i] = ntohs(result.attrType[i]);
+      }
+      return true;
+   }
+}
+
+
+static bool 
+stunParseAtrString( char* body, unsigned int hdrLen,  StunAtrString& result )
+{
+   if ( hdrLen >= STUN_MAX_STRING )
+   {
+      clog << "String is too large" << endl;
+      return false;
+   }
+   else
+   {
+      if (hdrLen % 4 != 0)
+      {
+         clog << "Bad length string " << hdrLen << endl;
+         return false;
+      }
+		
+      result.sizeValue = hdrLen;
+      memcpy(&result.value, body, hdrLen);
+      result.value[hdrLen] = 0;
+      return true;
+   }
+}
+
+
+static bool 
+stunParseAtrIntegrity( char* body, unsigned int hdrLen,  StunAtrIntegrity& result )
+{
+   if ( hdrLen != 20)
+   {
+      clog << "MessageIntegrity must be 20 bytes" << endl;
+      return false;
+   }
+   else
+   {
+      memcpy(&result.hash, body, hdrLen);
+      return true;
+   }
+}
+
+
+bool
+stunParseMessage( char* buf, unsigned int bufLen, StunMessage& msg, bool verbose)
+{
+   if (verbose) clog << "Received stun message: " << bufLen << " bytes" << endl;
+   memset(&msg, 0, sizeof(msg));
+	
+   if (sizeof(StunMsgHdr) > bufLen)
+   {
+      clog << "Bad message" << endl;
+      return false;
+   }
+	
+   memcpy(&msg.msgHdr, buf, sizeof(StunMsgHdr));
+   msg.msgHdr.msgType = ntohs(msg.msgHdr.msgType);
+   msg.msgHdr.msgLength = ntohs(msg.msgHdr.msgLength);
+	
+   if (msg.msgHdr.msgLength + sizeof(StunMsgHdr) != bufLen)
+   {
+      clog << "Message header length doesn't match message size: " << msg.msgHdr.msgLength << " - " << bufLen << endl;
+      return false;
+   }
+	
+   char* body = buf + sizeof(StunMsgHdr);
+   unsigned int size = msg.msgHdr.msgLength;
+	
+   //clog << "bytes after header = " << size << endl;
+	
+   while ( size > 0 )
+   {
+      // !jf! should check that there are enough bytes left in the buffer
+		
+      StunAtrHdr* attr = reinterpret_cast<StunAtrHdr*>(body);
+		
+      unsigned int attrLen = ntohs(attr->length);
+      int atrType = ntohs(attr->type);
+		
+      //if (verbose) clog << "Found attribute type=" << AttrNames[atrType] << " length=" << attrLen << endl;
+      if ( attrLen+4 > size ) 
+      {
+         clog << "claims attribute is larger than size of message " <<"(attribute type="<<atrType<<")"<< endl;
+         return false;
+      }
+		
+      body += 4; // skip the length and type in attribute header
+      size -= 4;
+		
+      switch ( atrType )
+      {
+         case MappedAddress:
+            msg.hasMappedAddress = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.mappedAddress )== false )
+            {
+               clog << "problem parsing MappedAddress" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "MappedAddress = " << msg.mappedAddress.ipv4 << endl;
+            }
+					
+            break;  
+
+         case ResponseAddress:
+            msg.hasResponseAddress = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.responseAddress )== false )
+            {
+               clog << "problem parsing ResponseAddress" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "ResponseAddress = " << msg.responseAddress.ipv4 << endl;
+            }
+            break;  
+				
+         case ChangeRequest:
+            msg.hasChangeRequest = true;
+            if (stunParseAtrChangeRequest( body, attrLen, msg.changeRequest) == false)
+            {
+               clog << "problem parsing ChangeRequest" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "ChangeRequest = " << msg.changeRequest.value << endl;
+            }
+            break;
+				
+         case SourceAddress:
+            msg.hasSourceAddress = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.sourceAddress )== false )
+            {
+               clog << "problem parsing SourceAddress" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "SourceAddress = " << msg.sourceAddress.ipv4 << endl;
+            }
+            break;  
+				
+         case ChangedAddress:
+            msg.hasChangedAddress = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.changedAddress )== false )
+            {
+               clog << "problem parsing ChangedAddress" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "ChangedAddress = " << msg.changedAddress.ipv4 << endl;
+            }
+            break;  
+				
+         case Username: 
+            msg.hasUsername = true;
+            if (stunParseAtrString( body, attrLen, msg.username) == false)
+            {
+               clog << "problem parsing Username" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "Username = " << msg.username.value << endl;
+            }
+					
+            break;
+				
+         case Password: 
+            msg.hasPassword = true;
+            if (stunParseAtrString( body, attrLen, msg.password) == false)
+            {
+               clog << "problem parsing Password" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "Password = " << msg.password.value << endl;
+            }
+            break;
+				
+         case MessageIntegrity:
+            msg.hasMessageIntegrity = true;
+            if (stunParseAtrIntegrity( body, attrLen, msg.messageIntegrity) == false)
+            {
+               clog << "problem parsing MessageIntegrity" << endl;
+               return false;
+            }
+            else
+            {
+               //if (verbose) clog << "MessageIntegrity = " << msg.messageIntegrity.hash << endl;
+            }
+					
+            // read the current HMAC
+            // look up the password given the user of given the transaction id 
+            // compute the HMAC on the buffer
+            // decide if they match or not
+            break;
+				
+         case ErrorCode:
+            msg.hasErrorCode = true;
+            if (stunParseAtrError(body, attrLen, msg.errorCode) == false)
+            {
+               clog << "problem parsing ErrorCode" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "ErrorCode = " << int(msg.errorCode.errorClass) 
+                                 << " " << int(msg.errorCode.number) 
+                                 << " " << msg.errorCode.reason << endl;
+            }
+					
+            break;
+				
+         case UnknownAttribute:
+            msg.hasUnknownAttributes = true;
+            if (stunParseAtrUnknown(body, attrLen, msg.unknownAttributes) == false)
+            {
+               clog << "problem parsing UnknownAttribute" << endl;
+               return false;
+            }
+            break;
+				
+         case ReflectedFrom:
+            msg.hasReflectedFrom = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.reflectedFrom ) == false )
+            {
+               clog << "problem parsing ReflectedFrom" << endl;
+               return false;
+            }
+            break;  
+				
+         case XorMappedAddress:
+            msg.hasXorMappedAddress = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.xorMappedAddress ) == false )
+            {
+               clog << "problem parsing XorMappedAddress" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "XorMappedAddress = " << msg.mappedAddress.ipv4 << endl;
+            }
+            break;  
+
+         case XorOnly:
+            msg.xorOnly = true;
+            if (verbose) 
+            {
+               clog << "xorOnly = true" << endl;
+            }
+            break;  
+				
+         case ServerName: 
+            msg.hasServerName = true;
+            if (stunParseAtrString( body, attrLen, msg.serverName) == false)
+            {
+               clog << "problem parsing ServerName" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "ServerName = " << msg.serverName.value << endl;
+            }
+            break;
+				
+         case SecondaryAddress:
+            msg.hasSecondaryAddress = true;
+            if ( stunParseAtrAddress(  body,  attrLen,  msg.secondaryAddress ) == false )
+            {
+               clog << "problem parsing secondaryAddress" << endl;
+               return false;
+            }
+            else
+            {
+               if (verbose) clog << "SecondaryAddress = " << msg.secondaryAddress.ipv4 << endl;
+            }
+            break;  
+					
+         default:
+            if (verbose) clog << "Unknown attribute: " << atrType << endl;
+            if ( atrType <= 0x7FFF ) 
+            {
+               return false;
+            }
+      }
+		
+      body += attrLen;
+      size -= attrLen;
+   }
+    
+   return true;
+}
+
+
+static char* 
+encode16(char* buf, UInt16 data)
+{
+   UInt16 ndata = htons(data);
+   memcpy(buf, reinterpret_cast<void*>(&ndata), sizeof(UInt16));
+   return buf + sizeof(UInt16);
+}
+
+static char* 
+encode32(char* buf, UInt32 data)
+{
+   UInt32 ndata = htonl(data);
+   memcpy(buf, reinterpret_cast<void*>(&ndata), sizeof(UInt32));
+   return buf + sizeof(UInt32);
+}
+
+
+static char* 
+encode(char* buf, const char* data, unsigned int length)
+{
+   memcpy(buf, data, length);
+   return buf + length;
+}
+
+
+static char* 
+encodeAtrAddress4(char* ptr, UInt16 type, const StunAtrAddress4& atr)
+{
+   ptr = encode16(ptr, type);
+   ptr = encode16(ptr, 8);
+   *ptr++ = atr.pad;
+   *ptr++ = IPv4Family;
+   ptr = encode16(ptr, atr.ipv4.port);
+   ptr = encode32(ptr, atr.ipv4.addr);
+	
+   return ptr;
+}
+
+static char* 
+encodeAtrChangeRequest(char* ptr, const StunAtrChangeRequest& atr)
+{
+   ptr = encode16(ptr, ChangeRequest);
+   ptr = encode16(ptr, 4);
+   ptr = encode32(ptr, atr.value);
+   return ptr;
+}
+
+static char* 
+encodeAtrError(char* ptr, const StunAtrError& atr)
+{
+   ptr = encode16(ptr, ErrorCode);
+   ptr = encode16(ptr, 6 + atr.sizeReason);
+   ptr = encode16(ptr, atr.pad);
+   *ptr++ = atr.errorClass;
+   *ptr++ = atr.number;
+   ptr = encode(ptr, atr.reason, atr.sizeReason);
+   return ptr;
+}
+
+
+static char* 
+encodeAtrUnknown(char* ptr, const StunAtrUnknown& atr)
+{
+   ptr = encode16(ptr, UnknownAttribute);
+   ptr = encode16(ptr, 2+2*atr.numAttributes);
+   for (int i=0; i<atr.numAttributes; i++)
+   {
+      ptr = encode16(ptr, atr.attrType[i]);
+   }
+   return ptr;
+}
+
+
+static char* 
+encodeXorOnly(char* ptr)
+{
+   ptr = encode16(ptr, XorOnly );
+   return ptr;
+}
+
+
+static char* 
+encodeAtrString(char* ptr, UInt16 type, const StunAtrString& atr)
+{
+   assert(atr.sizeValue % 4 == 0);
+	
+   ptr = encode16(ptr, type);
+   ptr = encode16(ptr, atr.sizeValue);
+   ptr = encode(ptr, atr.value, atr.sizeValue);
+   return ptr;
+}
+
+
+static char* 
+encodeAtrIntegrity(char* ptr, const StunAtrIntegrity& atr)
+{
+   ptr = encode16(ptr, MessageIntegrity);
+   ptr = encode16(ptr, 20);
+   ptr = encode(ptr, atr.hash, sizeof(atr.hash));
+   return ptr;
+}
+
+
+unsigned int
+stunEncodeMessage( const StunMessage& msg, 
+                   char* buf, 
+                   unsigned int bufLen, 
+                   const StunAtrString& password, 
+                   bool verbose)
+{
+   assert(bufLen >= sizeof(StunMsgHdr));
+   char* ptr = buf;
+	
+   ptr = encode16(ptr, msg.msgHdr.msgType);
+   char* lengthp = ptr;
+   ptr = encode16(ptr, 0);
+   ptr = encode(ptr, reinterpret_cast<const char*>(msg.msgHdr.id.octet), sizeof(msg.msgHdr.id));
+	
+   if (verbose) clog << "Encoding stun message: " << endl;
+   if (msg.hasMappedAddress)
+   {
+      if (verbose) clog << "Encoding MappedAddress: " << msg.mappedAddress.ipv4 << endl;
+      ptr = encodeAtrAddress4 (ptr, MappedAddress, msg.mappedAddress);
+   }
+   if (msg.hasResponseAddress)
+   {
+      if (verbose) clog << "Encoding ResponseAddress: " << msg.responseAddress.ipv4 << endl;
+      ptr = encodeAtrAddress4(ptr, ResponseAddress, msg.responseAddress);
+   }
+   if (msg.hasChangeRequest)
+   {
+      if (verbose) clog << "Encoding ChangeRequest: " << msg.changeRequest.value << endl;
+      ptr = encodeAtrChangeRequest(ptr, msg.changeRequest);
+   }
+   if (msg.hasSourceAddress)
+   {
+      if (verbose) clog << "Encoding SourceAddress: " << msg.sourceAddress.ipv4 << endl;
+      ptr = encodeAtrAddress4(ptr, SourceAddress, msg.sourceAddress);
+   }
+   if (msg.hasChangedAddress)
+   {
+      if (verbose) clog << "Encoding ChangedAddress: " << msg.changedAddress.ipv4 << endl;
+      ptr = encodeAtrAddress4(ptr, ChangedAddress, msg.changedAddress);
+   }
+   if (msg.hasUsername)
+   {
+      if (verbose) clog << "Encoding Username: " << msg.username.value << endl;
+      ptr = encodeAtrString(ptr, Username, msg.username);
+   }
+   if (msg.hasPassword)
+   {
+      if (verbose) clog << "Encoding Password: " << msg.password.value << endl;
+      ptr = encodeAtrString(ptr, Password, msg.password);
+   }
+   if (msg.hasErrorCode)
+   {
+      if (verbose) clog << "Encoding ErrorCode: class=" 
+			<< int(msg.errorCode.errorClass)  
+			<< " number=" << int(msg.errorCode.number) 
+			<< " reason=" 
+			<< msg.errorCode.reason 
+			<< endl;
+		
+      ptr = encodeAtrError(ptr, msg.errorCode);
+   }
+   if (msg.hasUnknownAttributes)
+   {
+      if (verbose) clog << "Encoding UnknownAttribute: ???" << endl;
+      ptr = encodeAtrUnknown(ptr, msg.unknownAttributes);
+   }
+   if (msg.hasReflectedFrom)
+   {
+      if (verbose) clog << "Encoding ReflectedFrom: " << msg.reflectedFrom.ipv4 << endl;
+      ptr = encodeAtrAddress4(ptr, ReflectedFrom, msg.reflectedFrom);
+   }
+   if (msg.hasXorMappedAddress)
+   {
+      if (verbose) clog << "Encoding XorMappedAddress: " << msg.xorMappedAddress.ipv4 << endl;
+      ptr = encodeAtrAddress4 (ptr, XorMappedAddress, msg.xorMappedAddress);
+   }
+   if (msg.xorOnly)
+   {
+      if (verbose) clog << "Encoding xorOnly: " << endl;
+      ptr = encodeXorOnly( ptr );
+   }
+   if (msg.hasServerName)
+   {
+      if (verbose) clog << "Encoding ServerName: " << msg.serverName.value << endl;
+      ptr = encodeAtrString(ptr, ServerName, msg.serverName);
+   }
+   if (msg.hasSecondaryAddress)
+   {
+      if (verbose) clog << "Encoding SecondaryAddress: " << msg.secondaryAddress.ipv4 << endl;
+      ptr = encodeAtrAddress4 (ptr, SecondaryAddress, msg.secondaryAddress);
+   }
+
+   if (password.sizeValue > 0)
+   {
+      if (verbose) clog << "HMAC with password: " << password.value << endl;
+		
+      StunAtrIntegrity integrity;
+      computeHmac(integrity.hash, buf, int(ptr-buf) , password.value, password.sizeValue);
+      ptr = encodeAtrIntegrity(ptr, integrity);
+   }
+   if (verbose) clog << endl;
+	
+   encode16(lengthp, UInt16(ptr - buf - sizeof(StunMsgHdr)));
+   return int(ptr - buf);
+}
+
+int 
+stunRand()
+{
+   // return 32 bits of random stuff
+   assert( sizeof(int) == 4 );
+   static bool init=false;
+   if ( !init )
+   { 
+      init = true;
+		
+      UInt64 tick;
+		
+#if defined(WIN32) 
+      volatile unsigned int lowtick=0,hightick=0;
+      __asm
+         {
+            rdtsc 
+               mov lowtick, eax
+               mov hightick, edx
+               }
+      tick = hightick;
+      tick <<= 32;
+      tick |= lowtick;
+#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) || defined(__x86_64__))
+      asm("rdtsc" : "=A" (tick));
+#elif defined (__SUNPRO_CC) || defined( __sparc__ )	
+      tick = gethrtime();
+#elif defined(__MACH__) || defined(__powerpc__) 
+      int fd=open("/dev/random",O_RDONLY);
+      read(fd,&tick,sizeof(tick));
+      closesocket(fd);
+#else
+#     error Need some way to seed the random number generator 
+#endif 
+      int seed = int(tick);
+#ifdef WIN32
+      srand(seed);
+#else
+      srandom(seed);
+#endif
+   }
+	
+#ifdef WIN32
+   assert( RAND_MAX == 0x7fff );
+   int r1 = rand();
+   int r2 = rand();
+	
+   int ret = (r1<<16) + r2;
+	
+   return ret;
+#else
+   return random(); 
+#endif
+}
+
+
+/// return a random number to use as a port 
+static int
+randomPort()
+{
+   int min=0x4000;
+   int max=0x7FFF;
+	
+   int ret = stunRand();
+   ret = ret|min;
+   ret = ret&max;
+	
+   return ret;
+}
+
+
+#ifdef NOSSL
+static void
+computeHmac(char* hmac, const char* input, int length, const char* key, int sizeKey)
+{
+	(void)input;
+	(void)length;
+	(void)key;
+	(void)sizeKey;
+   strncpy(hmac,"hmac-not-implemented",20);
+}
+#else
+#include <openssl/hmac.h>
+
+static void
+computeHmac(char* hmac, const char* input, int length, const char* key, int sizeKey)
+{
+   unsigned int resultSize=0;
+   HMAC(EVP_sha1(), 
+        key, sizeKey, 
+        reinterpret_cast<const unsigned char*>(input), length, 
+        reinterpret_cast<unsigned char*>(hmac), &resultSize);
+   assert(resultSize == 20);
+}
+#endif
+
+
+static void
+toHex(const char* buffer, int bufferSize, char* output) 
+{
+   static char hexmap[] = "0123456789abcdef";
+	
+   const char* p = buffer;
+   char* r = output;
+   for (int i=0; i < bufferSize; i++)
+   {
+      unsigned char temp = *p++;
+		
+      int hi = (temp & 0xf0)>>4;
+      int low = (temp & 0xf);
+		
+      *r++ = hexmap[hi];
+      *r++ = hexmap[low];
+   }
+   *r = 0;
+}
+
+void
+stunCreateUserName(const StunAddress4& source, StunAtrString* username)
+{
+   UInt64 time = stunGetSystemTimeSecs();
+   time -= (time % 20*60);
+   //UInt64 hitime = time >> 32;
+   UInt64 lotime = time & 0xFFFFFFFF;
+	
+   char buffer[1024];
+   sprintf(buffer,
+           "%08x:%08x:%08x:", 
+           UInt32(source.addr),
+           UInt32(stunRand()),
+           UInt32(lotime));
+   assert( strlen(buffer) < 1024 );
+	
+   assert(strlen(buffer) + 41 < STUN_MAX_STRING);
+	
+   char hmac[20];
+   char key[] = "Jason";
+   computeHmac(hmac, buffer, strlen(buffer), key, strlen(key) );
+   char hmacHex[41];
+   toHex(hmac, 20, hmacHex );
+   hmacHex[40] =0;
+	
+   strcat(buffer,hmacHex);
+	
+   int l = strlen(buffer);
+   assert( l+1 < STUN_MAX_STRING );
+   assert( l%4 == 0 );
+   
+   username->sizeValue = l;
+   memcpy(username->value,buffer,l);
+   username->value[l]=0;
+	
+   //if (verbose) clog << "computed username=" << username.value << endl;
+}
+
+void
+stunCreatePassword(const StunAtrString& username, StunAtrString* password)
+{
+   char hmac[20];
+   char key[] = "Fluffy";
+   //char buffer[STUN_MAX_STRING];
+   computeHmac(hmac, username.value, strlen(username.value), key, strlen(key));
+   toHex(hmac, 20, password->value);
+   password->sizeValue = 40;
+   password->value[40]=0;
+	
+   //clog << "password=" << password->value << endl;
+}
+
+
+UInt64
+stunGetSystemTimeSecs()
+{
+   UInt64 time=0;
+#if defined(WIN32)  
+   SYSTEMTIME t;
+   // CJ TODO - this probably has bug on wrap around every 24 hours
+   GetSystemTime( &t );
+   time = (t.wHour*60+t.wMinute)*60+t.wSecond; 
+#else
+   struct timeval now;
+   gettimeofday( &now , NULL );
+   //assert( now );
+   time = now.tv_sec;
+#endif
+   return time;
+}
+
+
+ostream& operator<< ( ostream& strm, const UInt128& r )
+{
+   strm << int(r.octet[0]);
+   for ( int i=1; i<16; i++ )
+   {
+      strm << ':' << int(r.octet[i]);
+   }
+    
+   return strm;
+}
+
+ostream& 
+operator<<( ostream& strm, const StunAddress4& addr)
+{
+   UInt32 ip = addr.addr;
+   strm << ((int)(ip>>24)&0xFF) << ".";
+   strm << ((int)(ip>>16)&0xFF) << ".";
+   strm << ((int)(ip>> 8)&0xFF) << ".";
+   strm << ((int)(ip>> 0)&0xFF) ;
+	
+   strm << ":" << addr.port;
+	
+   return strm;
+}
+
+
+// returns true if it scucceeded
+bool 
+stunParseHostName( char* peerName,
+               UInt32& ip,
+               UInt16& portVal,
+               UInt16 defaultPort )
+{
+   in_addr sin_addr;
+    
+   char host[512];
+   strncpy(host,peerName,512);
+   host[512-1]='\0';
+   char* port = NULL;
+	
+   int portNum = defaultPort;
+	
+   // pull out the port part if present.
+   char* sep = strchr(host,':');
+	
+   if ( sep == NULL )
+   {
+      portNum = defaultPort;
+   }
+   else
+   {
+      *sep = '\0';
+      port = sep + 1;
+      // set port part
+		
+      char* endPtr=NULL;
+		
+      portNum = strtol(port,&endPtr,10);
+		
+      if ( endPtr != NULL )
+      {
+         if ( *endPtr != '\0' )
+         {
+            portNum = defaultPort;
+         }
+      }
+   }
+    
+   if ( portNum < 1024 ) return false;
+   if ( portNum >= 0xFFFF ) return false;
+	
+   // figure out the host part 
+   struct hostent* h;
+	
+#ifdef WIN32
+   assert( strlen(host) >= 1 );
+   if ( isdigit( host[0] ) )
+   {
+      // assume it is a ip address 
+      unsigned long a = inet_addr(host);
+      //cerr << "a=0x" << hex << a << dec << endl;
+		
+      ip = ntohl( a );
+   }
+   else
+   {
+      // assume it is a host name 
+      h = gethostbyname( host );
+		
+      if ( h == NULL )
+      {
+         int err = getErrno();
+         std::cerr << "error was " << err << std::endl;
+         assert( err != WSANOTINITIALISED );
+			
+         ip = ntohl( 0x7F000001L );
+			
+         return false;
+      }
+      else
+      {
+         sin_addr = *(struct in_addr*)h->h_addr;
+         ip = ntohl( sin_addr.s_addr );
+      }
+   }
+	
+#else
+   h = gethostbyname( host );
+   if ( h == NULL )
+   {
+      int err = getErrno();
+      std::cerr << "error was " << err << std::endl;
+      ip = ntohl( 0x7F000001L );
+      return false;
+   }
+   else
+   {
+      sin_addr = *(struct in_addr*)h->h_addr;
+      ip = ntohl( sin_addr.s_addr );
+   }
+#endif
+	
+   portVal = portNum;
+	
+   return true;
+}
+
+
+bool
+stunParseServerName( char* name, StunAddress4& addr)
+{
+   assert(name);
+	
+   // TODO - put in DNS SRV stuff.
+	
+   bool ret = stunParseHostName( name, addr.addr, addr.port, 3478); 
+   if ( ret != true ) 
+   {
+       addr.port=0xFFFF;
+   }	
+   return ret;
+}
+
+
+static void
+stunCreateErrorResponse(StunMessage& response, int cl, int number, const char* msg)
+{
+   response.msgHdr.msgType = BindErrorResponseMsg;
+   response.hasErrorCode = true;
+   response.errorCode.errorClass = cl;
+   response.errorCode.number = number;
+   strcpy(response.errorCode.reason, msg);
+}
+
+#if 0
+static void
+stunCreateSharedSecretErrorResponse(StunMessage& response, int cl, int number, const char* msg)
+{
+   response.msgHdr.msgType = SharedSecretErrorResponseMsg;
+   response.hasErrorCode = true;
+   response.errorCode.errorClass = cl;
+   response.errorCode.number = number;
+   strcpy(response.errorCode.reason, msg);
+}
+#endif
+
+static void
+stunCreateSharedSecretResponse(const StunMessage& request, const StunAddress4& source, StunMessage& response)
+{
+   response.msgHdr.msgType = SharedSecretResponseMsg;
+   response.msgHdr.id = request.msgHdr.id;
+	
+   response.hasUsername = true;
+   stunCreateUserName( source, &response.username);
+	
+   response.hasPassword = true;
+   stunCreatePassword( response.username, &response.password);
+}
+
+
+// This funtion takes a single message sent to a stun server, parses
+// and constructs an apropriate repsonse - returns true if message is
+// valid
+bool
+stunServerProcessMsg( char* buf,
+                      unsigned int bufLen,
+                      StunAddress4& from, 
+                      StunAddress4& secondary,
+                      StunAddress4& myAddr,
+                      StunAddress4& altAddr, 
+                      StunMessage* resp,
+                      StunAddress4* destination,
+                      StunAtrString* hmacPassword,
+                      bool* changePort,
+                      bool* changeIp,
+                      bool verbose)
+{
+    
+   // set up information for default response 
+	
+   memset( resp, 0 , sizeof(*resp) );
+	
+   *changeIp = false;
+   *changePort = false;
+	
+   StunMessage req;
+   bool ok = stunParseMessage( buf,bufLen, req, verbose);
+	
+   if (!ok)      // Complete garbage, drop it on the floor
+   {
+      if (verbose) clog << "Request did not parse" << endl;
+      return false;
+   }
+   if (verbose) clog << "Request parsed ok" << endl;
+	
+   StunAddress4 mapped = req.mappedAddress.ipv4;
+   StunAddress4 respondTo = req.responseAddress.ipv4;
+   UInt32 flags = req.changeRequest.value;
+	
+   switch (req.msgHdr.msgType)
+   {
+      case SharedSecretRequestMsg:
+         if(verbose) clog << "Received SharedSecretRequestMsg on udp. send error 433." << endl;
+         // !cj! - should fix so you know if this came over TLS or UDP
+         stunCreateSharedSecretResponse(req, from, *resp);
+         //stunCreateSharedSecretErrorResponse(*resp, 4, 33, "this request must be over TLS");
+         return true;
+			
+      case BindRequestMsg:
+         if (!req.hasMessageIntegrity)
+         {
+            if (verbose) clog << "BindRequest does not contain MessageIntegrity" << endl;
+				
+            if (0) // !jf! mustAuthenticate
+            {
+               if(verbose) clog << "Received BindRequest with no MessageIntegrity. Sending 401." << endl;
+               stunCreateErrorResponse(*resp, 4, 1, "Missing MessageIntegrity");
+               return true;
+            }
+         }
+         else
+         {
+            if (!req.hasUsername)
+            {
+               if (verbose) clog << "No UserName. Send 432." << endl;
+               stunCreateErrorResponse(*resp, 4, 32, "No UserName and contains MessageIntegrity");
+               return true;
+            }
+            else
+            {
+               if (verbose) clog << "Validating username: " << req.username.value << endl;
+               // !jf! could retrieve associated password from provisioning here
+               if (strcmp(req.username.value, "test") == 0)
+               {
+                  if (0)
+                  {
+                     // !jf! if the credentials are stale 
+                     stunCreateErrorResponse(*resp, 4, 30, "Stale credentials on BindRequest");
+                     return true;
+                  }
+                  else
+                  {
+                     if (verbose) clog << "Validating MessageIntegrity" << endl;
+                     // need access to shared secret
+							
+                     unsigned char hmac[20];
+#ifndef NOSSL
+                     unsigned int hmacSize=20;
+
+                     HMAC(EVP_sha1(), 
+                          "1234", 4, 
+                          reinterpret_cast<const unsigned char*>(buf), bufLen-20-4, 
+                          hmac, &hmacSize);
+                     assert(hmacSize == 20);
+#endif
+							
+                     if (memcmp(buf, hmac, 20) != 0)
+                     {
+                        if (verbose) clog << "MessageIntegrity is bad. Sending " << endl;
+                        stunCreateErrorResponse(*resp, 4, 3, "Unknown username. Try test with password 1234");
+                        return true;
+                     }
+							
+                     // need to compute this later after message is filled in
+                     resp->hasMessageIntegrity = true;
+                     assert(req.hasUsername);
+                     resp->hasUsername = true;
+                     resp->username = req.username; // copy username in
+                  }
+               }
+               else
+               {
+                  if (verbose) clog << "Invalid username: " << req.username.value << "Send 430." << endl; 
+               }
+            }
+         }
+			
+         // TODO !jf! should check for unknown attributes here and send 420 listing the
+         // unknown attributes. 
+			
+         if ( respondTo.port == 0 ) respondTo = from;
+         if ( mapped.port == 0 ) mapped = from;
+				
+         *changeIp   = ( flags & ChangeIpFlag )?true:false;
+         *changePort = ( flags & ChangePortFlag )?true:false;
+			
+         if (verbose)
+         {
+            clog << "Request is valid:" << endl;
+            clog << "\t flags=" << flags << endl;
+            clog << "\t changeIp=" << *changeIp << endl;
+            clog << "\t changePort=" << *changePort << endl;
+            clog << "\t from = " << from << endl;
+            clog << "\t respond to = " << respondTo << endl;
+            clog << "\t mapped = " << mapped << endl;
+         }
+				
+         // form the outgoing message
+         resp->msgHdr.msgType = BindResponseMsg;
+         for ( int i=0; i<16; i++ )
+         {
+            resp->msgHdr.id.octet[i] = req.msgHdr.id.octet[i];
+         }
+		
+         if ( req.xorOnly == false )
+         {
+            resp->hasMappedAddress = true;
+            resp->mappedAddress.ipv4.port = mapped.port;
+            resp->mappedAddress.ipv4.addr = mapped.addr;
+         }
+
+         if (1) // do xorMapped address or not 
+         {
+            resp->hasXorMappedAddress = true;
+            UInt16 id16 = req.msgHdr.id.octet[7]<<8 
+               | req.msgHdr.id.octet[6];
+            UInt32 id32 = req.msgHdr.id.octet[7]<<24 
+               |  req.msgHdr.id.octet[6]<<16 
+               |  req.msgHdr.id.octet[5]<<8 
+               | req.msgHdr.id.octet[4];;
+            resp->xorMappedAddress.ipv4.port = mapped.port^id16;
+            resp->xorMappedAddress.ipv4.addr = mapped.addr^id32;
+         }
+         
+         resp->hasSourceAddress = true;
+         resp->sourceAddress.ipv4.port = (*changePort) ? altAddr.port : myAddr.port;
+         resp->sourceAddress.ipv4.addr = (*changeIp)   ? altAddr.addr : myAddr.addr;
+			
+         resp->hasChangedAddress = true;
+         resp->changedAddress.ipv4.port = altAddr.port;
+         resp->changedAddress.ipv4.addr = altAddr.addr;
+	
+         if ( secondary.port != 0 )
+         {
+            resp->hasSecondaryAddress = true;
+            resp->secondaryAddress.ipv4.port = secondary.port;
+            resp->secondaryAddress.ipv4.addr = secondary.addr;
+         }
+         
+         if ( req.hasUsername && req.username.sizeValue > 0 ) 
+         {
+            // copy username in
+            resp->hasUsername = true;
+            assert( req.username.sizeValue % 4 == 0 );
+            assert( req.username.sizeValue < STUN_MAX_STRING );
+            memcpy( resp->username.value, req.username.value, req.username.sizeValue );
+            resp->username.sizeValue = req.username.sizeValue;
+         }
+		
+         if (1) // add ServerName 
+         {
+            resp->hasServerName = true;
+            const char serverName[] = "Vovida.org " STUN_VERSION; // must pad to mult of 4
+            
+            assert( sizeof(serverName) < STUN_MAX_STRING );
+            //cerr << "sizeof serverName is "  << sizeof(serverName) << endl;
+            assert( sizeof(serverName)%4 == 0 );
+            memcpy( resp->serverName.value, serverName, sizeof(serverName));
+            resp->serverName.sizeValue = sizeof(serverName);
+         }
+         
+         if ( req.hasMessageIntegrity & req.hasUsername )  
+         {
+            // this creates the password that will be used in the HMAC when then
+            // messages is sent
+            stunCreatePassword( req.username, hmacPassword );
+         }
+				
+         if (req.hasUsername && (req.username.sizeValue > 64 ) )
+         {
+            UInt32 source;
+            assert( sizeof(int) == sizeof(UInt32) );
+					
+            sscanf(req.username.value, "%x", &source);
+            resp->hasReflectedFrom = true;
+            resp->reflectedFrom.ipv4.port = 0;
+            resp->reflectedFrom.ipv4.addr = source;
+         }
+				
+         destination->port = respondTo.port;
+         destination->addr = respondTo.addr;
+			
+         return true;
+			
+      default:
+         if (verbose) clog << "Unknown or unsupported request " << endl;
+         return false;
+   }
+	
+   assert(0);
+   return false;
+}
+
+bool
+stunInitServer(StunServerInfo& info, const StunAddress4& myAddr, const StunAddress4& altAddr, int startMediaPort, bool verbose )
+{
+   assert( myAddr.port != 0 );
+   assert( altAddr.port!= 0 );
+   assert( myAddr.addr  != 0 );
+   //assert( altAddr.addr != 0 );
+	
+   info.myAddr = myAddr;
+   info.altAddr = altAddr;
+	
+   info.myFd = INVALID_SOCKET;
+   info.altPortFd = INVALID_SOCKET;
+   info.altIpFd = INVALID_SOCKET;
+   info.altIpPortFd = INVALID_SOCKET;
+
+   memset(info.relays, 0, sizeof(info.relays));
+   if (startMediaPort > 0)
+   {
+      info.relay = true;
+
+      for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
+      {
+         StunMediaRelay* relay = &info.relays[i];
+         relay->relayPort = startMediaPort+i;
+         relay->fd = 0;
+         relay->expireTime = 0;
+      }
+   }
+   else
+   {
+      info.relay = false;
+   }
+   
+   if ((info.myFd = openPort(myAddr.port, myAddr.addr,verbose)) == INVALID_SOCKET)
+   {
+      clog << "Can't open " << myAddr << endl;
+      stunStopServer(info);
+
+      return false;
+   }
+   //if (verbose) clog << "Opened " << myAddr.addr << ":" << myAddr.port << " --> " << info.myFd << endl;
+
+   if ((info.altPortFd = openPort(altAddr.port,myAddr.addr,verbose)) == INVALID_SOCKET)
+   {
+      clog << "Can't open " << myAddr << endl;
+      stunStopServer(info);
+      return false;
+   }
+   //if (verbose) clog << "Opened " << myAddr.addr << ":" << altAddr.port << " --> " << info.altPortFd << endl;
+   
+   
+   info.altIpFd = INVALID_SOCKET;
+   if (  altAddr.addr != 0 )
+   {
+      if ((info.altIpFd = openPort( myAddr.port, altAddr.addr,verbose)) == INVALID_SOCKET)
+      {
+         clog << "Can't open " << altAddr << endl;
+         stunStopServer(info);
+         return false;
+      }
+      //if (verbose) clog << "Opened " << altAddr.addr << ":" << myAddr.port << " --> " << info.altIpFd << endl;;
+   }
+   
+   info.altIpPortFd = INVALID_SOCKET;
+   if (  altAddr.addr != 0 )
+   {  if ((info.altIpPortFd = openPort(altAddr.port, altAddr.addr,verbose)) == INVALID_SOCKET)
+      {
+         clog << "Can't open " << altAddr << endl;
+         stunStopServer(info);
+         return false;
+      }
+      //if (verbose) clog << "Opened " << altAddr.addr << ":" << altAddr.port << " --> " << info.altIpPortFd << endl;;
+   }
+   
+   return true;
+}
+
+void
+stunStopServer(StunServerInfo& info)
+{
+   if (info.myFd > 0) closesocket(info.myFd);
+   if (info.altPortFd > 0) closesocket(info.altPortFd);
+   if (info.altIpFd > 0) closesocket(info.altIpFd);
+   if (info.altIpPortFd > 0) closesocket(info.altIpPortFd);
+   
+   if (info.relay)
+   {
+      for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
+      {
+         StunMediaRelay* relay = &info.relays[i];
+         if (relay->fd)
+         {
+            closesocket(relay->fd);
+            relay->fd = 0;
+         }
+      }
+   }
+}
+
+
+bool
+stunServerProcess(StunServerInfo& info, bool verbose)
+{
+   char msg[STUN_MAX_MESSAGE_SIZE];
+   int msgLen = sizeof(msg);
+   	
+   bool ok = false;
+   bool recvAltIp =false;
+   bool recvAltPort = false;
+	
+   fd_set fdSet; 
+#ifdef WIN32
+   unsigned int maxFd=0;
+#else
+   int maxFd=0;
+#endif
+   FD_ZERO(&fdSet); 
+   FD_SET(info.myFd,&fdSet); 
+   if ( info.myFd >= maxFd ) maxFd=info.myFd+1;
+   FD_SET(info.altPortFd,&fdSet); 
+   if ( info.altPortFd >= maxFd ) maxFd=info.altPortFd+1;
+
+   if ( info.altIpFd != INVALID_SOCKET )
+   {
+      FD_SET(info.altIpFd,&fdSet);
+      if (info.altIpFd>=maxFd) maxFd=info.altIpFd+1;
+   }
+   if ( info.altIpPortFd != INVALID_SOCKET )
+   {
+      FD_SET(info.altIpPortFd,&fdSet);
+      if (info.altIpPortFd>=maxFd) maxFd=info.altIpPortFd+1;
+   }
+
+   if (info.relay)
+   {
+      for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
+      {
+         StunMediaRelay* relay = &info.relays[i];
+         if (relay->fd)
+         {
+            FD_SET(relay->fd, &fdSet);
+            if (relay->fd >= maxFd) maxFd=relay->fd+1;
+         }
+      }
+   }
+   
+   if ( info.altIpFd != INVALID_SOCKET )
+   {
+      FD_SET(info.altIpFd,&fdSet);
+      if (info.altIpFd>=maxFd) maxFd=info.altIpFd+1;
+   }
+   if ( info.altIpPortFd != INVALID_SOCKET )
+   {
+      FD_SET(info.altIpPortFd,&fdSet);
+      if (info.altIpPortFd>=maxFd) maxFd=info.altIpPortFd+1;
+   }
+   
+   struct timeval tv;
+   tv.tv_sec = 0;
+   tv.tv_usec = 1000;
+	
+   int e = select( maxFd, &fdSet, NULL,NULL, &tv );
+   if (e < 0)
+   {
+      int err = getErrno();
+      clog << "Error on select: " << strerror(err) << endl;
+   }
+   else if (e >= 0)
+   {
+      StunAddress4 from;
+
+      // do the media relaying
+      if (info.relay)
+      {
+         time_t now = time(0);
+         for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
+         {
+            StunMediaRelay* relay = &info.relays[i];
+            if (relay->fd)
+            {
+               if (FD_ISSET(relay->fd, &fdSet))
+               {
+                  char msg[MAX_RTP_MSG_SIZE];
+                  int msgLen = sizeof(msg);
+                  
+                  StunAddress4 rtpFrom;
+                  ok = getMessage( relay->fd, msg, &msgLen, &rtpFrom.addr, &rtpFrom.port ,verbose);
+                  if (ok)
+                  {
+                     sendMessage(info.myFd, msg, msgLen, relay->destination.addr, relay->destination.port, verbose);
+                     relay->expireTime = now + MEDIA_RELAY_TIMEOUT;
+                     if ( verbose ) clog << "Relay packet on " 
+                                         << relay->fd 
+                                         << " from " << rtpFrom 
+                                         << " -> " << relay->destination 
+                                         << endl;
+                  }
+               }
+               else if (now > relay->expireTime)
+               {
+                  closesocket(relay->fd);
+                  relay->fd = 0;
+               }
+            }
+         }
+      }
+      
+     
+      if (FD_ISSET(info.myFd,&fdSet))
+      {
+         if (verbose) clog << "received on A1:P1" << endl;
+         recvAltIp = false;
+         recvAltPort = false;
+         ok = getMessage( info.myFd, msg, &msgLen, &from.addr, &from.port,verbose );
+      }
+      else if (FD_ISSET(info.altPortFd, &fdSet))
+      {
+         if (verbose) clog << "received on A1:P2" << endl;
+         recvAltIp = false;
+         recvAltPort = true;
+         ok = getMessage( info.altPortFd, msg, &msgLen, &from.addr, &from.port,verbose );
+      }
+      else if ( (info.altIpFd!=INVALID_SOCKET) && FD_ISSET(info.altIpFd,&fdSet))
+      {
+         if (verbose) clog << "received on A2:P1" << endl;
+         recvAltIp = true;
+         recvAltPort = false;
+         ok = getMessage( info.altIpFd, msg, &msgLen, &from.addr, &from.port ,verbose);
+      }
+      else if ( (info.altIpPortFd!=INVALID_SOCKET) && FD_ISSET(info.altIpPortFd, &fdSet))
+      {
+         if (verbose) clog << "received on A2:P2" << endl;
+         recvAltIp = true;
+         recvAltPort = true;
+         ok = getMessage( info.altIpPortFd, msg, &msgLen, &from.addr, &from.port,verbose );
+      }
+      else
+      {
+         return true;
+      }
+
+      int relayPort = 0;
+      if (info.relay)
+      {
+         for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
+         {
+            StunMediaRelay* relay = &info.relays[i];
+            if (relay->destination.addr == from.addr && 
+                relay->destination.port == from.port)
+            {
+               relayPort = relay->relayPort;
+               relay->expireTime = time(0) + MEDIA_RELAY_TIMEOUT;
+               break;
+            }
+         }
+
+         if (relayPort == 0)
+         {
+            for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
+            {
+               StunMediaRelay* relay = &info.relays[i];
+               if (relay->fd == 0)
+               {
+                  if ( verbose ) clog << "Open relay port " << relay->relayPort << endl;
+                  
+                  relay->fd = openPort(relay->relayPort, info.myAddr.addr, verbose);
+                  relay->destination.addr = from.addr;
+                  relay->destination.port = from.port;
+                  relay->expireTime = time(0) + MEDIA_RELAY_TIMEOUT;
+                  relayPort = relay->relayPort;
+                  break;
+               }
+            }
+         }
+      }
+         
+      if ( !ok ) 
+      {
+         if ( verbose ) clog << "Get message did not return a valid message" <<endl;
+         return true;
+      }
+		
+      if ( verbose ) clog << "Got a request (len=" << msgLen << ") from " << from << endl;
+		
+      if ( msgLen <= 0 )
+      {
+         return true;
+      }
+		
+      bool changePort = false;
+      bool changeIp = false;
+		
+      StunMessage resp;
+      StunAddress4 dest;
+      StunAtrString hmacPassword;  
+      hmacPassword.sizeValue = 0;
+
+      StunAddress4 secondary;
+      secondary.port = 0;
+      secondary.addr = 0;
+               
+      if (info.relay && relayPort)
+      {
+         secondary = from;
+         
+         from.addr = info.myAddr.addr;
+         from.port = relayPort;
+      }
+      
+      ok = stunServerProcessMsg( msg, msgLen, from, secondary,
+                                 recvAltIp ? info.altAddr : info.myAddr,
+                                 recvAltIp ? info.myAddr : info.altAddr, 
+                                 &resp,
+                                 &dest,
+                                 &hmacPassword,
+                                 &changePort,
+                                 &changeIp,
+                                 verbose );
+		
+      if ( !ok )
+      {
+         if ( verbose ) clog << "Failed to parse message" << endl;
+         return true;
+      }
+		
+      char buf[STUN_MAX_MESSAGE_SIZE];
+      int len = sizeof(buf);
+      		
+      len = stunEncodeMessage( resp, buf, len, hmacPassword,verbose );
+		
+      if ( dest.addr == 0 )  ok=false;
+      if ( dest.port == 0 ) ok=false;
+		
+      if ( ok )
+      {
+         assert( dest.addr != 0 );
+         assert( dest.port != 0 );
+			
+         Socket sendFd;
+			
+         bool sendAltIp   = recvAltIp;   // send on the received IP address 
+         bool sendAltPort = recvAltPort; // send on the received port
+			
+         if ( changeIp )   sendAltIp   = !sendAltIp;   // if need to change IP, then flip logic 
+         if ( changePort ) sendAltPort = !sendAltPort; // if need to change port, then flip logic 
+			
+         if ( !sendAltPort )
+         {
+            if ( !sendAltIp )
+            {
+               sendFd = info.myFd;
+            }
+            else
+            {
+               sendFd = info.altIpFd;
+            }
+         }
+         else
+         {
+            if ( !sendAltIp )
+            {
+               sendFd = info.altPortFd;
+            }
+            else
+            {
+               sendFd = info.altIpPortFd;
+            }
+         }
+	
+         if ( sendFd != INVALID_SOCKET )
+         {
+            sendMessage( sendFd, buf, len, dest.addr, dest.port, verbose );
+         }
+      }
+   }
+	
+   return true;
+}
+
+int 
+stunFindLocalInterfaces(UInt32* addresses,int maxRet)
+{
+#if defined(WIN32) || defined(__sparc__)
+   return 0;
+#else
+   struct ifconf ifc;
+	
+   int s = socket( AF_INET, SOCK_DGRAM, 0 );
+   int len = 100 * sizeof(struct ifreq);
+	
+   char buf[ len ];
+	
+   ifc.ifc_len = len;
+   ifc.ifc_buf = buf;
+	
+   int e = ioctl(s,SIOCGIFCONF,&ifc);
+   char *ptr = buf;
+   int tl = ifc.ifc_len;
+   int count=0;
+	
+   while ( (tl > 0) && ( count < maxRet) )
+   {
+      struct ifreq* ifr = (struct ifreq *)ptr;
+		
+      int si = sizeof(ifr->ifr_name) + sizeof(struct sockaddr);
+      tl -= si;
+      ptr += si;
+      //char* name = ifr->ifr_ifrn.ifrn_name;
+      //cerr << "name = " << name << endl;
+		
+      struct ifreq ifr2;
+      ifr2 = *ifr;
+		
+      e = ioctl(s,SIOCGIFADDR,&ifr2);
+      if ( e == -1 )
+      {
+         break;
+      }
+		
+      //cerr << "ioctl addr e = " << e << endl;
+		
+      struct sockaddr a = ifr2.ifr_addr;
+      struct sockaddr_in* addr = (struct sockaddr_in*) &a;
+		
+      UInt32 ai = ntohl( addr->sin_addr.s_addr );
+      if (int((ai>>24)&0xFF) != 127)
+      {
+         addresses[count++] = ai;
+      }
+		
+#if 0
+      cerr << "Detected interface "
+           << int((ai>>24)&0xFF) << "." 
+           << int((ai>>16)&0xFF) << "." 
+           << int((ai>> 8)&0xFF) << "." 
+           << int((ai    )&0xFF) << endl;
+#endif
+   }
+	
+   closesocket(s);
+	
+   return count;
+#endif
+}
+
+
+void
+stunBuildReqSimple( StunMessage* msg,
+                    const StunAtrString& username,
+                    bool changePort, bool changeIp, unsigned int id )
+{
+   assert( msg );
+   memset( msg , 0 , sizeof(*msg) );
+	
+   msg->msgHdr.msgType = BindRequestMsg;
+	
+   for ( int i=0; i<16; i=i+4 )
+   {
+      assert(i+3<16);
+      int r = stunRand();
+      msg->msgHdr.id.octet[i+0]= r>>0;
+      msg->msgHdr.id.octet[i+1]= r>>8;
+      msg->msgHdr.id.octet[i+2]= r>>16;
+      msg->msgHdr.id.octet[i+3]= r>>24;
+   }
+	
+   if ( id != 0 )
+   {
+      msg->msgHdr.id.octet[0] = id; 
+   }
+	
+   msg->hasChangeRequest = true;
+   msg->changeRequest.value =(changeIp?ChangeIpFlag:0) | 
+      (changePort?ChangePortFlag:0);
+	
+   if ( username.sizeValue > 0 )
+   {
+      msg->hasUsername = true;
+      msg->username = username;
+   }
+}
+
+
+static void 
+stunSendTest( Socket myFd, StunAddress4& dest, 
+              const StunAtrString& username, const StunAtrString& password, 
+              int testNum, bool verbose )
+{ 
+   assert( dest.addr != 0 );
+   assert( dest.port != 0 );
+	
+   bool changePort=false;
+   bool changeIP=false;
+   bool discard=false;
+	
+   switch (testNum)
+   {
+      case 1:
+      case 10:
+      case 11:
+         break;
+      case 2:
+         //changePort=true;
+         changeIP=true;
+         break;
+      case 3:
+         changePort=true;
+         break;
+      case 4:
+         changeIP=true;
+         break;
+      case 5:
+         discard=true;
+         break;
+      default:
+         cerr << "Test " << testNum <<" is unkown\n";
+         assert(0);
+   }
+	
+   StunMessage req;
+   memset(&req, 0, sizeof(StunMessage));
+	
+   stunBuildReqSimple( &req, username, 
+                       changePort , changeIP , 
+                       testNum );
+	
+   char buf[STUN_MAX_MESSAGE_SIZE];
+   int len = STUN_MAX_MESSAGE_SIZE;
+	
+   len = stunEncodeMessage( req, buf, len, password,verbose );
+	
+   if ( verbose )
+   {
+      clog << "About to send msg of len " << len << " to " << dest << endl;
+   }
+	
+   sendMessage( myFd, buf, len, dest.addr, dest.port, verbose );
+	
+   // add some delay so the packets don't get sent too quickly 
+#ifdef WIN32 // !cj! TODO - should fix this up in windows
+		 clock_t now = clock();
+		 assert( CLOCKS_PER_SEC == 1000 );
+		 while ( clock() <= now+10 ) { };
+#else
+		 usleep(10*1000);
+#endif
+
+}
+
+
+void 
+stunGetUserNameAndPassword(  const StunAddress4& dest, 
+                             StunAtrString* username,
+                             StunAtrString* password)
+{ 
+   // !cj! This is totally bogus - need to make TLS connection to dest and get a
+   // username and password to use 
+   stunCreateUserName(dest, username);
+   stunCreatePassword(*username, password);
+}
+
+
+void 
+stunTest( StunAddress4& dest, int testNum, bool verbose, StunAddress4* sAddr )
+{ 
+   assert( dest.addr != 0 );
+   assert( dest.port != 0 );
+	
+   int port = randomPort();
+   UInt32 interfaceIp=0;
+   if (sAddr)
+   {
+      interfaceIp = sAddr->addr;
+      if ( sAddr->port != 0 )
+      {
+        port = sAddr->port;
+      }
+   }
+   Socket myFd = openPort(port,interfaceIp,verbose);
+	
+   StunAtrString username;
+   StunAtrString password;
+	
+   username.sizeValue = 0;
+   password.sizeValue = 0;
+	
+#ifdef USE_TLS
+   stunGetUserNameAndPassword( dest, username, password );
+#endif
+	
+   stunSendTest( myFd, dest, username, password, testNum, verbose );
+    
+   char msg[STUN_MAX_MESSAGE_SIZE];
+   int msgLen = STUN_MAX_MESSAGE_SIZE;
+	
+   StunAddress4 from;
+   getMessage( myFd,
+               msg,
+               &msgLen,
+               &from.addr,
+               &from.port,verbose );
+	
+   StunMessage resp;
+   memset(&resp, 0, sizeof(StunMessage));
+	
+   if ( verbose ) clog << "Got a response" << endl;
+   bool ok = stunParseMessage( msg,msgLen, resp,verbose );
+	
+   if ( verbose )
+   {
+      clog << "\t ok=" << ok << endl;
+      clog << "\t id=" << resp.msgHdr.id << endl;
+      clog << "\t mappedAddr=" << resp.mappedAddress.ipv4 << endl;
+      clog << "\t changedAddr=" << resp.changedAddress.ipv4 << endl;
+      clog << endl;
+   }
+	
+   if (sAddr)
+   {
+      sAddr->port = resp.mappedAddress.ipv4.port;
+      sAddr->addr = resp.mappedAddress.ipv4.addr;
+   }
+}
+
+
+NatType
+stunNatType( StunAddress4& dest, 
+             bool verbose,
+             bool* preservePort, // if set, is return for if NAT preservers ports or not
+             bool* hairpin,  // if set, is the return for if NAT will hairpin packets
+             int port, // port to use for the test, 0 to choose random port
+             StunAddress4* sAddr // NIC to use 
+   )
+{ 
+   assert( dest.addr != 0 );
+   assert( dest.port != 0 );
+	
+   if ( hairpin ) 
+   {
+      *hairpin = false;
+   }
+	
+   if ( port == 0 )
+   {
+      port = randomPort();
+   }
+   UInt32 interfaceIp=0;
+   if (sAddr)
+   {
+      interfaceIp = sAddr->addr;
+   }
+   Socket myFd1 = openPort(port,interfaceIp,verbose);
+   Socket myFd2 = openPort(port+1,interfaceIp,verbose);
+
+   if ( ( myFd1 == INVALID_SOCKET) || ( myFd2 == INVALID_SOCKET) )
+   {
+        cerr << "Some problem opening port/interface to send on" << endl;
+       return StunTypeFailure; 
+   }
+
+   assert( myFd1 != INVALID_SOCKET );
+   assert( myFd2 != INVALID_SOCKET );
+    
+   bool respTestI=false;
+   bool isNat=true;
+   StunAddress4 testIchangedAddr;
+   StunAddress4 testImappedAddr;
+   bool respTestI2=false; 
+   bool mappedIpSame = true;
+   StunAddress4 testI2mappedAddr;
+   StunAddress4 testI2dest=dest;
+   bool respTestII=false;
+   bool respTestIII=false;
+
+   bool respTestHairpin=false;
+	
+   memset(&testImappedAddr,0,sizeof(testImappedAddr));
+	
+   StunAtrString username;
+   StunAtrString password;
+	
+   username.sizeValue = 0;
+   password.sizeValue = 0;
+	
+#ifdef USE_TLS 
+   stunGetUserNameAndPassword( dest, username, password );
+#endif
+	
+   //stunSendTest( myFd1, dest, username, password, 1, verbose );
+   int count=0;
+   while ( count < 7 )
+   {
+      struct timeval tv;
+      fd_set fdSet; 
+#ifdef WIN32
+      unsigned int fdSetSize;
+#else
+      int fdSetSize;
+#endif
+      FD_ZERO(&fdSet); fdSetSize=0;
+      FD_SET(myFd1,&fdSet); fdSetSize = (myFd1+1>fdSetSize) ? myFd1+1 : fdSetSize;
+      FD_SET(myFd2,&fdSet); fdSetSize = (myFd2+1>fdSetSize) ? myFd2+1 : fdSetSize;
+      tv.tv_sec=0;
+      tv.tv_usec=150*1000; // 150 ms 
+      if ( count == 0 ) tv.tv_usec=0;
+		
+      int  err = select(fdSetSize, &fdSet, NULL, NULL, &tv);
+      int e = getErrno();
+      if ( err == SOCKET_ERROR )
+      {
+         // error occured
+         cerr << "Error " << e << " " << strerror(e) << " in select" << endl;
+        return StunTypeFailure; 
+     }
+      else if ( err == 0 )
+      {
+         // timeout occured 
+         count++;
+			
+         if ( !respTestI ) 
+         {
+            stunSendTest( myFd1, dest, username, password, 1 ,verbose );
+         }         
+			
+         if ( (!respTestI2) && respTestI ) 
+         {
+            // check the address to send to if valid 
+            if (  ( testI2dest.addr != 0 ) &&
+                  ( testI2dest.port != 0 ) )
+            {
+               stunSendTest( myFd1, testI2dest, username, password, 10  ,verbose);
+            }
+         }
+			
+         if ( !respTestII )
+         {
+            stunSendTest( myFd2, dest, username, password, 2 ,verbose );
+         }
+			
+         if ( !respTestIII )
+         {
+            stunSendTest( myFd2, dest, username, password, 3 ,verbose );
+         }
+			
+         if ( respTestI && (!respTestHairpin) )
+         {
+            if (  ( testImappedAddr.addr != 0 ) &&
+                  ( testImappedAddr.port != 0 ) )
+            {
+               stunSendTest( myFd1, testImappedAddr, username, password, 11 ,verbose );
+            }
+         }
+      }
+      else
+      {
+         //if (verbose) clog << "-----------------------------------------" << endl;
+         assert( err>0 );
+         // data is avialbe on some fd 
+			
+         for ( int i=0; i<2; i++)
+         {
+            Socket myFd;
+            if ( i==0 ) 
+            {
+               myFd=myFd1;
+            }
+            else
+            {
+               myFd=myFd2;
+            }
+				
+            if ( myFd!=INVALID_SOCKET ) 
+            {					
+               if ( FD_ISSET(myFd,&fdSet) )
+               {
+                  char msg[STUN_MAX_MESSAGE_SIZE];
+                  int msgLen = sizeof(msg);
+                  						
+                  StunAddress4 from;
+						
+                  getMessage( myFd,
+                              msg,
+                              &msgLen,
+                              &from.addr,
+                              &from.port,verbose );
+						
+                  StunMessage resp;
+                  memset(&resp, 0, sizeof(StunMessage));
+						
+                  stunParseMessage( msg,msgLen, resp,verbose );
+						
+                  if ( verbose )
+                  {
+                     clog << "Received message of type " << resp.msgHdr.msgType 
+                          << "  id=" << (int)(resp.msgHdr.id.octet[0]) << endl;
+                  }
+						
+                  switch( resp.msgHdr.id.octet[0] )
+                  {
+                     case 1:
+                     {
+                        if ( !respTestI )
+                        {
+									
+                           testIchangedAddr.addr = resp.changedAddress.ipv4.addr;
+                           testIchangedAddr.port = resp.changedAddress.ipv4.port;
+                           testImappedAddr.addr = resp.mappedAddress.ipv4.addr;
+                           testImappedAddr.port = resp.mappedAddress.ipv4.port;
+									
+                           if ( preservePort )
+                           {
+                              *preservePort = ( testImappedAddr.port == port );
+                           }								
+									
+                           testI2dest.addr = resp.changedAddress.ipv4.addr;
+									
+                           if (sAddr)
+                           {
+                              sAddr->port = testImappedAddr.port;
+                              sAddr->addr = testImappedAddr.addr;
+                           }
+									
+                           count = 0;
+                        }		
+                        respTestI=true;
+                     }
+                     break;
+                     case 2:
+                     {  
+                        respTestII=true;
+                     }
+                     break;
+                     case 3:
+                     {
+                        respTestIII=true;
+                     }
+                     break;
+                     case 10:
+                     {
+                        if ( !respTestI2 )
+                        {
+                           testI2mappedAddr.addr = resp.mappedAddress.ipv4.addr;
+                           testI2mappedAddr.port = resp.mappedAddress.ipv4.port;
+								
+                           mappedIpSame = false;
+                           if ( (testI2mappedAddr.addr  == testImappedAddr.addr ) &&
+                                (testI2mappedAddr.port == testImappedAddr.port ))
+                           { 
+                              mappedIpSame = true;
+                           }
+								
+							
+                        }
+                        respTestI2=true;
+                     }
+                     break;
+                     case 11:
+                     {
+							
+                        if ( hairpin ) 
+                        {
+                           *hairpin = true;
+                        }
+                        respTestHairpin = true;
+                     }
+                     break;
+                  }
+               }
+            }
+         }
+      }
+   }
+	
+   // see if we can bind to this address 
+   //cerr << "try binding to " << testImappedAddr << endl;
+   Socket s = openPort( 0/*use ephemeral*/, testImappedAddr.addr, false );
+   if ( s != INVALID_SOCKET )
+   {
+      closesocket(s);
+      isNat = false;
+      //cerr << "binding worked" << endl;
+   }
+   else
+   {
+      isNat = true;
+      //cerr << "binding failed" << endl;
+   }
+	
+   if (verbose)
+   {
+      clog << "test I = " << respTestI << endl;
+      clog << "test II = " << respTestII << endl;
+      clog << "test III = " << respTestIII << endl;
+      clog << "test I(2) = " << respTestI2 << endl;
+      clog << "is nat  = " << isNat <<endl;
+      clog << "mapped IP same = " << mappedIpSame << endl;
+   }
+	
+   // implement logic flow chart from draft RFC
+   if ( respTestI )
+   {
+      if ( isNat )
+      {
+         if (respTestII)
+         {
+            return StunTypeConeNat;
+         }
+         else
+         {
+            if ( mappedIpSame )
+            {
+               if ( respTestIII )
+               {
+                  return StunTypeRestrictedNat;
+               }
+               else
+               {
+                  return StunTypePortRestrictedNat;
+               }
+            }
+            else
+            {
+               return StunTypeSymNat;
+            }
+         }
+      }
+      else
+      {
+         if (respTestII)
+         {
+            return StunTypeOpen;
+         }
+         else
+         {
+            return StunTypeSymFirewall;
+         }
+      }
+   }
+   else
+   {
+      return StunTypeBlocked;
+   }
+	
+   return StunTypeUnknown;
+}
+
+
+int
+stunOpenSocket( StunAddress4& dest, StunAddress4* mapAddr, 
+                int port, StunAddress4* srcAddr, 
+                bool verbose )
+{
+   assert( dest.addr != 0 );
+   assert( dest.port != 0 );
+   assert( mapAddr );
+   
+   if ( port == 0 )
+   {
+      port = randomPort();
+   }
+   unsigned int interfaceIp = 0;
+   if ( srcAddr )
+   {
+      interfaceIp = srcAddr->addr;
+   }
+   
+   Socket myFd = openPort(port,interfaceIp,verbose);
+   if (myFd == INVALID_SOCKET)
+   {
+      return myFd;
+   }
+   
+   char msg[STUN_MAX_MESSAGE_SIZE];
+   int msgLen = sizeof(msg);
+	
+   StunAtrString username;
+   StunAtrString password;
+	
+   username.sizeValue = 0;
+   password.sizeValue = 0;
+	
+#ifdef USE_TLS
+   stunGetUserNameAndPassword( dest, username, password );
+#endif
+	
+   stunSendTest(myFd, dest, username, password, 1, 0/*false*/ );
+	
+   StunAddress4 from;
+	
+   getMessage( myFd, msg, &msgLen, &from.addr, &from.port,verbose );
+	
+   StunMessage resp;
+   memset(&resp, 0, sizeof(StunMessage));
+	
+   bool ok = stunParseMessage( msg, msgLen, resp,verbose );
+   if (!ok)
+   {
+      return -1;
+   }
+	
+   StunAddress4 mappedAddr = resp.mappedAddress.ipv4;
+   StunAddress4 changedAddr = resp.changedAddress.ipv4;
+	
+   //clog << "--- stunOpenSocket --- " << endl;
+   //clog << "\treq  id=" << req.id << endl;
+   //clog << "\tresp id=" << id << endl;
+   //clog << "\tmappedAddr=" << mappedAddr << endl;
+	
+   *mapAddr = mappedAddr;
+	
+   return myFd;
+}
+
+
+bool
+stunOpenSocketPair( StunAddress4& dest, StunAddress4* mapAddr, 
+                    int* fd1, int* fd2, 
+                    int port, StunAddress4* srcAddr, 
+                    bool verbose )
+{
+   assert( dest.addr!= 0 );
+   assert( dest.port != 0 );
+   assert( mapAddr );
+   
+   const int NUM=3;
+	
+   if ( port == 0 )
+   {
+      port = randomPort();
+   }
+	
+   *fd1=-1;
+   *fd2=-1;
+	
+   char msg[STUN_MAX_MESSAGE_SIZE];
+   int msgLen =sizeof(msg);
+	
+   StunAddress4 from;
+   int fd[NUM];
+   int i;
+	
+   unsigned int interfaceIp = 0;
+   if ( srcAddr )
+   {
+      interfaceIp = srcAddr->addr;
+   }
+
+   for( i=0; i<NUM; i++)
+   {
+      fd[i] = openPort( (port == 0) ? 0 : (port + i), 
+                        interfaceIp, verbose);
+      if (fd[i] < 0) 
+      {
+         while (i > 0)
+         {
+            closesocket(fd[--i]);
+         }
+         return false;
+      }
+   }
+	
+   StunAtrString username;
+   StunAtrString password;
+	
+   username.sizeValue = 0;
+   password.sizeValue = 0;
+	
+#ifdef USE_TLS
+   stunGetUserNameAndPassword( dest, username, password );
+#endif
+	
+   for( i=0; i<NUM; i++)
+   {
+      stunSendTest(fd[i], dest, username, password, 1/*testNum*/, verbose );
+   }
+	
+   StunAddress4 mappedAddr[NUM];
+   for( i=0; i<NUM; i++)
+   {
+      msgLen = sizeof(msg)/sizeof(*msg);
+      getMessage( fd[i],
+                  msg,
+                  &msgLen,
+                  &from.addr,
+                  &from.port ,verbose);
+		
+      StunMessage resp;
+      memset(&resp, 0, sizeof(StunMessage));
+		
+      bool ok = stunParseMessage( msg, msgLen, resp, verbose );
+      if (!ok) 
+      {
+         return false;
+      }
+		
+      mappedAddr[i] = resp.mappedAddress.ipv4;
+      StunAddress4 changedAddr = resp.changedAddress.ipv4;
+   }
+	
+   if (verbose)
+   {               
+      clog << "--- stunOpenSocketPair --- " << endl;
+      for( i=0; i<NUM; i++)
+      {
+         clog << "\t mappedAddr=" << mappedAddr[i] << endl;
+      }
+   }
+	
+   if ( mappedAddr[0].port %2 == 0 )
+   {
+      if (  mappedAddr[0].port+1 ==  mappedAddr[1].port )
+      {
+         *mapAddr = mappedAddr[0];
+         *fd1 = fd[0];
+         *fd2 = fd[1];
+         closesocket( fd[2] );
+         return true;
+      }
+   }
+   else
+   {
+      if (( mappedAddr[1].port %2 == 0 )
+          && (  mappedAddr[1].port+1 ==  mappedAddr[2].port ))
+      {
+         *mapAddr = mappedAddr[1];
+         *fd1 = fd[1];
+         *fd2 = fd[2];
+         closesocket( fd[0] );
+         return true;
+      }
+   }
+
+   // something failed, close all and return error
+   for( i=0; i<NUM; i++)
+   {
+      closesocket( fd[i] );
+   }
+	
+   return false;
+}
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 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 names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
+
+
diff --git a/libs/stund/stun.h b/libs/stund/stun.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd4882f0c0f3549332d28f56de1cbe240c001cf5
--- /dev/null
+++ b/libs/stund/stun.h
@@ -0,0 +1,344 @@
+#ifndef STUN_H
+#define STUN_H
+
+#include <iostream>
+#include <time.h>
+#include "udp.h"
+// if you change this version, change in makefile too 
+#define STUN_VERSION "0.94"
+
+#define STUN_MAX_STRING 256
+#define STUN_MAX_UNKNOWN_ATTRIBUTES 8
+#define STUN_MAX_MESSAGE_SIZE 2048
+
+#define STUN_PORT 3478
+
+// define some basic types
+typedef unsigned char  UInt8;
+typedef unsigned short UInt16;
+typedef unsigned int   UInt32;
+#if defined( WIN32 )
+typedef unsigned __int64 UInt64;
+#else
+typedef unsigned long long UInt64;
+#endif
+typedef struct { unsigned char octet[16]; }  UInt128;
+
+/// define a structure to hold a stun address 
+const UInt8  IPv4Family = 0x01;
+const UInt8  IPv6Family = 0x02;
+
+// define  flags  
+const UInt32 ChangeIpFlag   = 0x04;
+const UInt32 ChangePortFlag = 0x02;
+
+// define  stun attribute
+const UInt16 MappedAddress    = 0x0001;
+const UInt16 ResponseAddress  = 0x0002;
+const UInt16 ChangeRequest    = 0x0003;
+const UInt16 SourceAddress    = 0x0004;
+const UInt16 ChangedAddress   = 0x0005;
+const UInt16 Username         = 0x0006;
+const UInt16 Password         = 0x0007;
+const UInt16 MessageIntegrity = 0x0008;
+const UInt16 ErrorCode        = 0x0009;
+const UInt16 UnknownAttribute = 0x000A;
+const UInt16 ReflectedFrom    = 0x000B;
+const UInt16 XorMappedAddress = 0x0020;
+const UInt16 XorOnly          = 0x0021;
+const UInt16 ServerName       = 0x0022;
+const UInt16 SecondaryAddress = 0x0050; // Non standard extention
+
+// define types for a stun message 
+const UInt16 BindRequestMsg               = 0x0001;
+const UInt16 BindResponseMsg              = 0x0101;
+const UInt16 BindErrorResponseMsg         = 0x0111;
+const UInt16 SharedSecretRequestMsg       = 0x0002;
+const UInt16 SharedSecretResponseMsg      = 0x0102;
+const UInt16 SharedSecretErrorResponseMsg = 0x0112;
+
+typedef struct 
+{
+      UInt16 msgType;
+      UInt16 msgLength;
+      UInt128 id;
+} StunMsgHdr;
+
+
+typedef struct
+{
+      UInt16 type;
+      UInt16 length;
+} StunAtrHdr;
+
+typedef struct
+{
+      UInt16 port;
+      UInt32 addr;
+} StunAddress4;
+
+typedef struct
+{
+      UInt8 pad;
+      UInt8 family;
+      StunAddress4 ipv4;
+} StunAtrAddress4;
+
+typedef struct
+{
+      UInt32 value;
+} StunAtrChangeRequest;
+
+typedef struct
+{
+      UInt16 pad; // all 0
+      UInt8 errorClass;
+      UInt8 number;
+      char reason[STUN_MAX_STRING];
+      UInt16 sizeReason;
+} StunAtrError;
+
+typedef struct
+{
+      UInt16 attrType[STUN_MAX_UNKNOWN_ATTRIBUTES];
+      UInt16 numAttributes;
+} StunAtrUnknown;
+
+typedef struct
+{
+      char value[STUN_MAX_STRING];      
+      UInt16 sizeValue;
+} StunAtrString;
+
+typedef struct
+{
+      char hash[20];
+} StunAtrIntegrity;
+
+typedef enum 
+{
+   HmacUnkown=0,
+   HmacOK,
+   HmacBadUserName,
+   HmacUnkownUserName,
+   HmacFailed,
+} StunHmacStatus;
+
+typedef struct
+{
+      StunMsgHdr msgHdr;
+	
+      bool hasMappedAddress;
+      StunAtrAddress4  mappedAddress;
+	
+      bool hasResponseAddress;
+      StunAtrAddress4  responseAddress;
+	
+      bool hasChangeRequest;
+      StunAtrChangeRequest changeRequest;
+	
+      bool hasSourceAddress;
+      StunAtrAddress4 sourceAddress;
+	
+      bool hasChangedAddress;
+      StunAtrAddress4 changedAddress;
+	
+      bool hasUsername;
+      StunAtrString username;
+	
+      bool hasPassword;
+      StunAtrString password;
+	
+      bool hasMessageIntegrity;
+      StunAtrIntegrity messageIntegrity;
+	
+      bool hasErrorCode;
+      StunAtrError errorCode;
+	
+      bool hasUnknownAttributes;
+      StunAtrUnknown unknownAttributes;
+	
+      bool hasReflectedFrom;
+      StunAtrAddress4 reflectedFrom;
+
+      bool hasXorMappedAddress;
+      StunAtrAddress4  xorMappedAddress;
+	
+      bool xorOnly;
+
+      bool hasServerName;
+      StunAtrString serverName;
+      
+      bool hasSecondaryAddress;
+      StunAtrAddress4 secondaryAddress;
+} StunMessage; 
+
+
+// Define enum with different types of NAT 
+typedef enum 
+{
+   StunTypeUnknown=0,
+   StunTypeOpen,
+   StunTypeConeNat,
+   StunTypeRestrictedNat,
+   StunTypePortRestrictedNat,
+   StunTypeSymNat,
+   StunTypeSymFirewall,
+   StunTypeBlocked,
+   StunTypeFailure
+} NatType;
+
+#ifdef WIN32
+typedef SOCKET Socket;
+#else
+#endif
+
+#define MAX_MEDIA_RELAYS 500
+#define MAX_RTP_MSG_SIZE 1500
+#define MEDIA_RELAY_TIMEOUT 3*60
+
+typedef struct 
+{
+      int relayPort;       // media relay port
+      int fd;              // media relay file descriptor
+      StunAddress4 destination; // NAT IP:port
+      time_t expireTime;      // if no activity after time, close the socket 
+} StunMediaRelay;
+
+typedef struct
+{
+      StunAddress4 myAddr;
+      StunAddress4 altAddr;
+      Socket myFd;
+      Socket altPortFd;
+      Socket altIpFd;
+      Socket altIpPortFd;
+      bool relay; // true if media relaying is to be done
+      StunMediaRelay relays[MAX_MEDIA_RELAYS];
+} StunServerInfo;
+
+bool
+stunParseMessage( char* buf, 
+                  unsigned int bufLen, 
+                  StunMessage& message, 
+                  bool verbose );
+
+void
+stunBuildReqSimple( StunMessage* msg,
+                    const StunAtrString& username,
+                    bool changePort, bool changeIp, unsigned int id=0 );
+
+unsigned int
+stunEncodeMessage( const StunMessage& message, 
+                   char* buf, 
+                   unsigned int bufLen, 
+                   const StunAtrString& password,
+                   bool verbose);
+
+void
+stunCreateUserName(const StunAddress4& addr, StunAtrString* username);
+
+void 
+stunGetUserNameAndPassword(  const StunAddress4& dest, 
+                             StunAtrString* username,
+                             StunAtrString* password);
+
+void
+stunCreatePassword(const StunAtrString& username, StunAtrString* password);
+
+int 
+stunRand();
+
+UInt64
+stunGetSystemTimeSecs();
+
+/// find the IP address of a the specified stun server - return false is fails parse 
+bool  
+stunParseServerName( char* serverName, StunAddress4& stunServerAddr);
+
+bool 
+stunParseHostName( char* peerName,
+                   UInt32& ip,
+                   UInt16& portVal,
+                   UInt16 defaultPort );
+
+/// return true if all is OK
+/// Create a media relay and do the STERN thing if startMediaPort is non-zero
+bool
+stunInitServer(StunServerInfo& info, 
+               const StunAddress4& myAddr, 
+               const StunAddress4& altAddr,
+               int startMediaPort,
+               bool verbose);
+
+void
+stunStopServer(StunServerInfo& info);
+
+/// return true if all is OK 
+bool
+stunServerProcess(StunServerInfo& info, bool verbose);
+
+/// returns number of address found - take array or addres 
+int 
+stunFindLocalInterfaces(UInt32* addresses, int maxSize );
+
+void 
+stunTest( StunAddress4& dest, int testNum, bool verbose, StunAddress4* srcAddr=0 );
+
+NatType
+stunNatType( StunAddress4& dest, bool verbose, 
+             bool* preservePort=0, // if set, is return for if NAT preservers ports or not
+             bool* hairpin=0 ,  // if set, is the return for if NAT will hairpin packets
+             int port=0, // port to use for the test, 0 to choose random port
+             StunAddress4* sAddr=0 // NIC to use 
+   );
+
+/// prints a StunAddress
+std::ostream& 
+operator<<( std::ostream& strm, const StunAddress4& addr);
+
+std::ostream& 
+operator<< ( std::ostream& strm, const UInt128& );
+
+
+bool
+stunServerProcessMsg( char* buf,
+                      unsigned int bufLen,
+                      StunAddress4& from, 
+                      StunAddress4& myAddr,
+                      StunAddress4& altAddr, 
+                      StunMessage* resp,
+                      StunAddress4* destination,
+                      StunAtrString* hmacPassword,
+                      bool* changePort,
+                      bool* changeIp,
+                      bool verbose);
+
+int
+stunOpenSocket( StunAddress4& dest, 
+                StunAddress4* mappedAddr, 
+                int port=0, 
+                StunAddress4* srcAddr=0, 
+                bool verbose=false );
+
+bool
+stunOpenSocketPair( StunAddress4& dest, StunAddress4* mappedAddr, 
+                    int* fd1, int* fd2, 
+                    int srcPort=0,  StunAddress4* srcAddr=0,
+                    bool verbose=false);
+
+#endif
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
 * 
 * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 
 * 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 names "VOCAL", "Vovida Open Communication Application Library",
 *    and "Vovida Open Communication Application Library (VOCAL)" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact vocal@vovida.org.
 *
 * 4. Products derived from this software may not be called "VOCAL", nor
 *    may "VOCAL" appear in their name, without prior written
 *    permission of Vovida Networks, Inc.
 * 
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
 * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
 * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
 * Networks, Inc. and many individuals on behalf of Vovida Networks,
 * Inc.  For more information on Vovida Networks, Inc., please see
 * <http://www.vovida.org/>.
+ *
+ */
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
+
diff --git a/libs/stund/tlsServer.cxx b/libs/stund/tlsServer.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c1b819b9c0fc1f546dcbd35abafa6c893cb8ec35
--- /dev/null
+++ b/libs/stund/tlsServer.cxx
@@ -0,0 +1,502 @@
+
+/* 
+   This program takes no arguments. It opens the STUN tcp port and rus a tls server
+   on it. 
+*/
+
+#include <sys/types.h>
+#include <string.h>
+#include <openssl/e_os2.h>
+#include <openssl/evp.h>
+#include <openssl/crypto.h>
+#include <openssl/err.h>
+#include <openssl/pem.h>
+#include <openssl/pkcs7.h>
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+#include <openssl/ssl.h>
+#ifdef WIN32
+#include <errno.h>
+#include <winsock2.h>
+#include <io.h>
+#endif
+ 
+#ifndef WIN32
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <sys/select.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif
+
+#ifdef WIN32
+# include <windows.h>
+# include <winbase.h>
+# include <errno.h>
+# include <winsock2.h>
+# include <io.h>
+typedef unsigned int u_int32_t;
+#endif
+
+#include <cassert>
+#include <fcntl.h>
+
+#include <iostream>
+#include <cstdlib>
+#include <stdio.h>
+
+#ifdef __MACH__
+typedef int socklen_t;
+#endif
+
+#include "stun.h"
+
+using namespace std;
+
+
+
+#define MAX_CONNECTIONS 64
+
+
+#ifdef WIN32
+typedef int socklen_t;
+//#define errno WSAGetLastError()
+typedef SOCKET Socket;
+#else
+typedef int Socket;
+static const Socket INVALID_SOCKET = -1;
+static const int SOCKET_ERROR = -1;
+#endif
+
+
+
+// TODO - !cj! - need to deal with closing connections 
+
+
+void 
+makeSocketNonBlocking(Socket fd)
+{
+#if WIN32
+   unsigned long noBlock = 1;
+   int errNoBlock = ioctlsocket( fd, FIONBIO , &noBlock );
+   if ( errNoBlock != 0 )
+   {
+      assert(0);
+   }
+#else
+   int flags  = fcntl( fd, F_GETFL, 0);
+   int errNoBlock = fcntl(fd, F_SETFL, flags | O_NONBLOCK );
+   if ( errNoBlock != 0 ) // !cj! I may have messed up this line 
+   {
+      assert(0);
+   }
+#endif
+}
+
+
+int 
+main()
+{
+#ifdef WIN32 
+   WORD wVersionRequested = MAKEWORD( 2, 2 );
+   WSADATA wsaData;
+   int err;
+
+   err = WSAStartup( wVersionRequested, &wsaData );
+   if ( err != 0 ) 
+   {
+      // could not find a usable WinSock DLL
+      //cerr << "Could not load winsock" << endl;
+      assert(0); // is this is failing, try a different version that 2.2, 1.0 or later will likely work 
+      exit(1);
+   }
+#endif
+
+   // contexts for each connection 
+   SSL* ssl[MAX_CONNECTIONS];
+
+   // buffers for each connection
+   BIO* bio[MAX_CONNECTIONS];
+
+   // file descriptors for each connection
+   Socket fd[MAX_CONNECTIONS];
+
+   // ip address of other side of connection 
+   int  peerip[MAX_CONNECTIONS];
+
+   // root cert list 
+   X509_STORE* certAuthorities;
+   // my public cert
+   X509* publicCert;
+   // my private key 
+   EVP_PKEY* privateKey;
+   // SSL Context 
+   SSL_CTX* ctx;
+   
+   Socket mFd;
+   
+   char* password = "password";
+   
+
+   for ( int i=0; i<MAX_CONNECTIONS; i++ )
+   {
+      fd[i]=-1;
+      bio[i]=0;
+      ssl[i]=0;
+   }
+   
+
+   // load public cert 
+   FILE* fp = fopen("id.pem","rb");
+   if ( !fp )
+   {
+      cerr << "Could not read public cert" <<endl; exit(1);
+   }
+   publicCert = PEM_read_X509(fp,NULL,NULL,NULL);
+   if (!publicCert)
+   {
+      cerr << "Error reading contents of public cert"<<endl; exit(1);
+   }
+   cerr << "Loaded public cert"<<endl;
+
+
+   // load private key 
+   fp = fopen("id_key.pem","rb");
+   if ( !fp )
+   {
+      cerr << "Could not read private key"<<endl; exit(1);
+   }
+   privateKey = PEM_read_PrivateKey(fp,NULL,NULL,password);
+   if (!privateKey)
+   {
+      cerr << "Error reading contents of private key file "<<endl;exit(1);
+   }
+   cerr << "Loaded private key "<<endl;
+   
+   // load root certs 
+   certAuthorities = X509_STORE_new();
+   assert( certAuthorities );
+   if ( X509_STORE_load_locations(certAuthorities,"root.pem",NULL) != 1 )
+   {  
+      cerr << "Error reading contents of root cert file "<<endl;
+   }
+   cerr << "Loaded public CAs"<<endl;
+
+   
+   // set up main security context    
+   SSL_library_init();
+   
+   SSL_load_error_strings();
+   
+   OpenSSL_add_all_ciphers();
+   OpenSSL_add_all_digests();
+   
+   ERR_load_crypto_strings();
+   
+   ctx=SSL_CTX_new( TLSv1_method() );
+   assert( ctx );
+   
+   int ok;
+   ok = SSL_CTX_use_certificate(ctx, publicCert);
+   assert( ok == 1);
+   
+   ok = SSL_CTX_use_PrivateKey(ctx,privateKey);
+   assert( ok == 1);
+   
+   assert( certAuthorities );
+   SSL_CTX_set_cert_store(ctx, certAuthorities);
+   
+   
+   // open a socket to listen for requests on 
+   mFd = socket(PF_INET, SOCK_STREAM, 0);
+
+   sockaddr_in addr;
+   addr.sin_family = AF_INET;
+   addr.sin_addr.s_addr = htonl(INADDR_ANY); 
+   addr.sin_port = htons(STUN_PORT);
+   
+   if ( bind( mFd, (struct sockaddr*) &addr, sizeof(addr)) == SOCKET_ERROR )
+   {
+      int err = errno;
+      if ( err == EADDRINUSE )
+      {
+         cerr << "Port already in use"<<endl;
+      }
+      else
+      {
+         cerr << "Could not bind to port"<<endl;
+      }
+      
+      exit(0);
+   }
+
+   makeSocketNonBlocking(mFd);
+
+   int e = listen(mFd,64 );
+   if (e != 0 )
+   {
+      assert(0);
+   }
+
+
+   cerr << "Ready for requests" << endl;
+   
+   while ( true ) 
+   {
+      // set up the read fd set for select 
+      fd_set read;
+      FD_ZERO(&read);
+      int size=0;
+
+      FD_SET(mFd, &read);
+      size = mFd+1;
+
+      for ( int i=0; i<MAX_CONNECTIONS; i++ )
+      {
+         if ( fd[i] > 0 )
+         {
+            FD_SET(fd[i], &read); 
+            size = ( int(fd[i]+1) > size) ? int(fd[i]+1) : size;
+         }
+         
+      }
+
+
+      // do a select 
+      unsigned long ms = 500;
+      struct timeval tv;
+      tv.tv_sec = (ms/1000);
+      tv.tv_usec = (ms%1000)*1000;
+      int e = select(size, &read, NULL, NULL, &tv);
+      
+      cerr << "." ;
+      
+      // process any new connections 
+      if ( FD_ISSET(mFd, &read))
+      {
+         cerr << "Got a new connection" << endl;
+         
+         // find an unused connection 
+         int i=0;
+         for ( ; i<MAX_CONNECTIONS; i++ )
+         {
+            if ( fd[i] == -1 ) 
+            {
+               break;
+            }
+         }
+         
+         if ( i >= MAX_CONNECTIONS )
+         {
+            cerr << "Ran out of connections to use "<<endl;
+            break;
+         }
+         
+         struct sockaddr_in peer;
+         int peerLen=sizeof(peer);
+         fd[i] = accept( mFd, (struct sockaddr*)&peer,(socklen_t*)&peerLen);
+         if ( fd[i] == -1 )
+         {
+            int err = errno;
+            cerr << "Error on accept: " << strerror(err)<<endl;
+            break;
+         }
+         
+         int* ptr =  (int*)( &peer.sin_addr );
+         peerip[i] = *ptr;
+         
+         ssl[i] = NULL;
+         
+         ssl[i] = SSL_new(ctx);
+         assert(ssl[i]);
+         
+         bio[i] = BIO_new_socket(fd[i],0/*close flag*/);
+         assert( bio[i] );
+         
+         SSL_set_bio( ssl[i], bio[i], bio[i] );
+         
+         int ok=0;
+         ok = SSL_accept(ssl[i]);
+         
+         if ( ok != 1 )
+         {
+            int err = SSL_get_error(ssl[i],ok);
+            char buf[256];
+            ERR_error_string_n(err,buf,sizeof(buf));
+            
+            cerr << "ssl connection failed "<<endl;
+            
+            bio[i] = NULL;
+         }
+         
+         makeSocketNonBlocking(fd[i]);
+      }
+      
+
+      // process reads and writes 
+      for (int i=0; i<MAX_CONNECTIONS; i++) 
+      {
+         if ( ssl[i] )
+            if (  FD_ISSET( fd[i], &read) ||  SSL_pending(ssl[i])  )
+            {
+               cerr << "got a message on connection " << i << endl;
+            
+               char buf[STUN_MAX_MESSAGE_SIZE];
+                   
+               int ret = SSL_read(ssl[i],buf,sizeof(buf));
+               if (ret < 0 )
+               {
+                  int err = SSL_get_error(ssl[i],ret);
+                  switch (err)
+                  {
+                     case SSL_ERROR_WANT_READ:
+                     case SSL_ERROR_WANT_WRITE:
+                     case SSL_ERROR_NONE:
+                     {
+                        cerr << "Got TLS read got condition of " << err  <<endl;
+                     }
+                     break;
+                     default:
+                     {
+                        char buf[256];
+                        ERR_error_string_n(err,buf,sizeof(buf));
+                        cerr << "Got TLS read error " << err  << " " << buf  <<endl;
+                     }
+                     break;
+                  }
+                  // !cj! - big mem leak here - need to close and cleanup 
+                  closesocket( fd[i] );
+                  fd[i] = -1;
+                  ssl[i]=0;
+               }
+            
+               cerr << "Received message with " << ret << " bytes"<<endl;
+            
+               StunAddress4 from;
+               StunAddress4 myAddr;
+               StunAddress4 altAddr;
+               StunMessage resp;
+               StunAddress4 destination;
+               StunAtrString hmacPassword;
+               bool changePort;
+               bool changeIp;
+            
+               from.addr = peerip[i];
+            
+               bool ok = stunServerProcessMsg( buf,ret, 
+                                               from, 
+                                               myAddr,
+                                               altAddr, 
+                                               &resp,
+                                               &destination,
+                                               &hmacPassword,
+                                               &changePort,
+                                               &changeIp,
+                                               true /*verbose*/ );
+
+               if (!ok )
+               { 
+                  cerr << "Message did not parse - closeing conneciton " << i  <<endl;
+                  closesocket( fd[i] );
+                  fd[i] = -1;
+                  ssl[i]=0;
+               }
+            
+               if (ok)
+               {
+                  int len = stunEncodeMessage( resp, buf, sizeof(buf), hmacPassword );
+           
+                  ret = SSL_write(ssl[i],(const char*)buf,len);
+
+                  if (ret < 0 )
+                  {
+                     int err = SSL_get_error(ssl[i],ret);
+                     switch (err)
+                     {
+                        case SSL_ERROR_WANT_READ:
+                        case SSL_ERROR_WANT_WRITE:
+                        case SSL_ERROR_NONE:
+                        {
+                           cerr << "Got TLS write got codition of " << err  <<endl;
+                        }
+                        break;
+                        default:
+                        {
+                           cerr << "Got TLS write error " << err  <<endl;
+                        }
+                        break;
+                     }
+                     // !cj! big mem leak - need to cleanup 
+                     closesocket( fd[i] );
+                     fd[i] = -1;
+                     ssl[i]=0;
+                  }
+               }
+            }
+      }
+   }
+   
+   return 0;
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 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 names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
+
+
diff --git a/libs/stund/udp.cxx b/libs/stund/udp.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..fc58f26bf83d1b016f4d25bb2d976d8ea8b0dffd
--- /dev/null
+++ b/libs/stund/udp.cxx
@@ -0,0 +1,349 @@
+#include <cassert>
+#include <cstdio>
+#include <cstring>
+#include <errno.h>
+#include <iostream>
+#include <cstdlib>
+#include <time.h>
+
+#ifdef WIN32
+
+#include <winsock2.h>
+#include <stdlib.h>
+#include <io.h>
+
+#else
+
+#include <arpa/inet.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netdb.h>
+#include <string.h>
+#include <unistd.h>
+
+#endif
+
+#include <string.h>
+
+#include "udp.h"
+
+using namespace std;
+
+
+Socket
+openPort( unsigned short port, unsigned int interfaceIp, bool verbose )
+{
+   Socket fd;
+    
+   fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+   if ( fd == INVALID_SOCKET )
+   {
+      int err = getErrno();
+      cerr << "Could not create a UDP socket:" << err << endl;
+      return INVALID_SOCKET;
+   }
+    
+   struct sockaddr_in addr;
+   memset((char*) &(addr),0, sizeof((addr)));
+   addr.sin_family = AF_INET;
+   addr.sin_addr.s_addr = htonl(INADDR_ANY);
+   addr.sin_port = htons(port);
+    
+   if ( (interfaceIp != 0) && 
+        ( interfaceIp != 0x100007f ) )
+   {
+      addr.sin_addr.s_addr = htonl(interfaceIp);
+      if (verbose )
+      {
+         clog << "Binding to interface " 
+              << hex << "0x" << htonl(interfaceIp) << dec << endl;
+      }
+   }
+	
+   if ( bind( fd,(struct sockaddr*)&addr, sizeof(addr)) != 0 )
+   {
+      int e = getErrno();
+        
+      switch (e)
+      {
+         case 0:
+         {
+            cerr << "Could not bind socket" << endl;
+            return INVALID_SOCKET;
+         }
+         case EADDRINUSE:
+         {
+            cerr << "Port " << port << " for receiving UDP is in use" << endl;
+            return INVALID_SOCKET;
+         }
+         break;
+         case EADDRNOTAVAIL:
+         {
+            if ( verbose ) 
+            {
+               cerr << "Cannot assign requested address" << endl;
+            }
+            return INVALID_SOCKET;
+         }
+         break;
+         default:
+         {
+            cerr << "Could not bind UDP receive port"
+                 << "Error=" << e << " " << strerror(e) << endl;
+            return INVALID_SOCKET;
+         }
+         break;
+      }
+   }
+   if ( verbose )
+   {
+      clog << "Opened port " << port << " with fd " << fd << endl;
+   }
+   
+   assert( fd != INVALID_SOCKET  );
+	
+   return fd;
+}
+
+
+bool 
+getMessage( Socket fd, char* buf, int* len,
+            unsigned int* srcIp, unsigned short* srcPort,
+            bool verbose)
+{
+   assert( fd != INVALID_SOCKET );
+	
+   int originalSize = *len;
+   assert( originalSize > 0 );
+   
+   struct sockaddr_in from;
+   int fromLen = sizeof(from);
+	
+   *len = recvfrom(fd,
+                   buf,
+                   originalSize,
+                   0,
+                   (struct sockaddr *)&from,
+                   (socklen_t*)&fromLen);
+	
+   if ( *len == SOCKET_ERROR )
+   {
+      int err = getErrno();
+		
+      switch (err)
+      {
+         case ENOTSOCK:
+            cerr << "Error fd not a socket" <<   endl;
+            break;
+         case ECONNRESET:
+            cerr << "Error connection reset - host not reachable" <<   endl;
+            break;
+				
+         default:
+            cerr << "Socket Error=" << err << endl;
+      }
+		
+      return false;
+   }
+	
+   if ( *len < 0 )
+   {
+      clog << "socket closed? negative len" << endl;
+      return false;
+   }
+    
+   if ( *len == 0 )
+   {
+      clog << "socket closed? zero len" << endl;
+      return false;
+   }
+    
+   *srcPort = ntohs(from.sin_port);
+   *srcIp = ntohl(from.sin_addr.s_addr);
+	
+   if ( (*len)+1 >= originalSize )
+   {
+      if (verbose)
+      {
+         clog << "Received a message that was too large" << endl;
+      }
+      return false;
+   }
+   buf[*len]=0;
+    
+   return true;
+}
+
+
+bool 
+sendMessage( Socket fd, char* buf, int l, 
+             unsigned int dstIp, unsigned short dstPort,
+             bool verbose)
+{
+   assert( fd != INVALID_SOCKET );
+    
+   int s;
+   if ( dstPort == 0 )
+   {
+      // sending on a connected port 
+      assert( dstIp == 0 );
+		
+      s = send(fd,buf,l,0);
+   }
+   else
+   {
+      assert( dstIp != 0 );
+      assert( dstPort != 0 );
+        
+      struct sockaddr_in to;
+      int toLen = sizeof(to);
+      memset(&to,0,toLen);
+        
+      to.sin_family = AF_INET;
+      to.sin_port = htons(dstPort);
+      to.sin_addr.s_addr = htonl(dstIp);
+        
+      s = sendto(fd, buf, l, 0,(sockaddr*)&to, toLen);
+   }
+    
+   if ( s == SOCKET_ERROR )
+   {
+      int e = getErrno();
+      switch (e)
+      {
+         case ECONNREFUSED:
+         case EHOSTDOWN:
+         case EHOSTUNREACH:
+         {
+            // quietly ignore this 
+         }
+         break;
+         case EAFNOSUPPORT:
+         {
+            cerr << "err EAFNOSUPPORT in send" << endl;
+         }
+         break;
+         default:
+         {
+            cerr << "err " << e << " "  << strerror(e) << " in send" << endl;
+         }
+      }
+      return false;
+   }
+    
+   if ( s == 0 )
+   {
+      cerr << "no data sent in send" << endl;
+      return false;
+   }
+    
+   if ( s != l )
+   {
+      if (verbose)
+      {
+         cerr << "only " << s << " out of " << l << " bytes sent" << endl;
+      }
+      return false;
+   }
+    
+   return true;
+}
+
+
+void
+initNetwork()
+{
+#ifdef WIN32 
+   WORD wVersionRequested = MAKEWORD( 2, 2 );
+   WSADATA wsaData;
+   int err;
+	
+   err = WSAStartup( wVersionRequested, &wsaData );
+   if ( err != 0 ) 
+   {
+      // could not find a usable WinSock DLL
+      cerr << "Could not load winsock" << endl;
+      assert(0); // is this is failing, try a different version that 2.2, 1.0 or later will likely work 
+      exit(1);
+   }
+    
+   /* Confirm that the WinSock DLL supports 2.2.*/
+   /* Note that if the DLL supports versions greater    */
+   /* than 2.2 in addition to 2.2, it will still return */
+   /* 2.2 in wVersion since that is the version we      */
+   /* requested.                                        */
+    
+   if ( LOBYTE( wsaData.wVersion ) != 2 ||
+        HIBYTE( wsaData.wVersion ) != 2 ) 
+   {
+      /* Tell the user that we could not find a usable */
+      /* WinSock DLL.                                  */
+      WSACleanup( );
+      cerr << "Bad winsock verion" << endl;
+      assert(0); // is this is failing, try a different version that 2.2, 1.0 or later will likely work 
+      exit(1);
+   }    
+#endif
+}
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 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 names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
diff --git a/libs/stund/udp.h b/libs/stund/udp.h
new file mode 100644
index 0000000000000000000000000000000000000000..28af798d180c0ac2c7441d6ade2c03008c04dfc8
--- /dev/null
+++ b/libs/stund/udp.h
@@ -0,0 +1,157 @@
+#ifndef udp_h
+#define udp_h
+
+
+#ifdef __MACH__
+typedef int socklen_t;
+#endif
+
+#include <errno.h>
+
+#ifdef WIN32
+
+#include <winsock2.h>
+#include <io.h>
+
+typedef int socklen_t;
+typedef SOCKET Socket;
+
+#define EWOULDBLOCK             WSAEWOULDBLOCK
+#define EINPROGRESS             WSAEINPROGRESS
+#define EALREADY                WSAEALREADY
+#define ENOTSOCK                WSAENOTSOCK
+#define EDESTADDRREQ            WSAEDESTADDRREQ
+#define EMSGSIZE                WSAEMSGSIZE
+#define EPROTOTYPE              WSAEPROTOTYPE
+#define ENOPROTOOPT             WSAENOPROTOOPT
+#define EPROTONOSUPPORT         WSAEPROTONOSUPPORT
+#define ESOCKTNOSUPPORT         WSAESOCKTNOSUPPORT
+#define EOPNOTSUPP              WSAEOPNOTSUPP
+#define EPFNOSUPPORT            WSAEPFNOSUPPORT
+#define EAFNOSUPPORT            WSAEAFNOSUPPORT
+#define EADDRINUSE              WSAEADDRINUSE
+#define EADDRNOTAVAIL           WSAEADDRNOTAVAIL
+#define ENETDOWN                WSAENETDOWN
+#define ENETUNREACH             WSAENETUNREACH
+#define ENETRESET               WSAENETRESET
+#define ECONNABORTED            WSAECONNABORTED
+#define ECONNRESET              WSAECONNRESET
+#define ENOBUFS                 WSAENOBUFS
+#define EISCONN                 WSAEISCONN
+#define ENOTCONN                WSAENOTCONN
+#define ESHUTDOWN               WSAESHUTDOWN
+#define ETOOMANYREFS            WSAETOOMANYREFS
+#define ETIMEDOUT               WSAETIMEDOUT
+#define ECONNREFUSED            WSAECONNREFUSED
+#define ELOOP                   WSAELOOP
+#define EHOSTDOWN               WSAEHOSTDOWN
+#define EHOSTUNREACH            WSAEHOSTUNREACH
+#define EPROCLIM                WSAEPROCLIM
+#define EUSERS                  WSAEUSERS
+#define EDQUOT                  WSAEDQUOT
+#define ESTALE                  WSAESTALE
+#define EREMOTE                 WSAEREMOTE
+
+typedef LONGLONG Int64; 
+inline int getErrno() { return WSAGetLastError(); }
+
+#else
+
+//typedef int Socket;
+#define Socket			int
+#define INVALID_SOCKET	-1
+#define SOCKET_ERROR	-1
+
+inline int closesocket( int fd ) { return close(fd); };
+
+inline int getErrno() { return errno; }
+
+#define WSANOTINITIALISED  EPROTONOSUPPORT
+
+#endif
+
+/// Open a UDP socket to receive on the given port - if port is 0, pick a a
+/// port, if interfaceIp!=0 then use ONLY the interface specified instead of
+/// all of them  
+int
+openPort( unsigned short port, unsigned int interfaceIp,
+          bool verbose);
+
+
+/// recive a UDP message 
+bool 
+getMessage( int fd, char* buf, int* len,
+            unsigned int* srcIp, unsigned short* srcPort,
+            bool verbose);
+
+
+/// send a UDP message 
+bool 
+sendMessage( int fd, char* msg, int len, 
+             unsigned int dstIp, unsigned short dstPort,
+             bool verbose);
+
+
+/// set up network - does nothing in unix but needed for windows
+void
+initNetwork();
+
+
+/* ====================================================================
+ * The Vovida Software License, Version 1.0 
+ * 
+ * Copyright (c) 2000 Vovida Networks, Inc.  All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 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 names "VOCAL", "Vovida Open Communication Application Library",
+ *    and "Vovida Open Communication Application Library (VOCAL)" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact vocal@vovida.org.
+ *
+ * 4. Products derived from this software may not be called "VOCAL", nor
+ *    may "VOCAL" appear in their name, without prior written
+ *    permission of Vovida Networks, Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL VOVIDA
+ * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
+ * IN EXCESS OF $1,000, NOR FOR ANY 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 software consists of voluntary contributions made by Vovida
+ * Networks, Inc. and many individuals on behalf of Vovida Networks,
+ * Inc.  For more information on Vovida Networks, Inc., please see
+ * <http://www.vovida.org/>.
+ *
+ */
+
+// Local Variables:
+// mode:c++
+// c-file-style:"ellemtel"
+// c-file-offsets:((case-label . +))
+// indent-tabs-mode:nil
+// End:
+
+#endif
diff --git a/libs/stund/wnattest.bat b/libs/stund/wnattest.bat
new file mode 100644
index 0000000000000000000000000000000000000000..edd9fdef34cf6c668f54236e1d1acc8a8c24d436
--- /dev/null
+++ b/libs/stund/wnattest.bat
@@ -0,0 +1,40 @@
+@echo off
+rem wnattest.bat
+if defined %4 (
+	goto usage
+) else if defined %3 (
+	goto start
+) else (
+	goto usage
+)
+:start
+stunner %1 -i %2 -i2 %3
+if %errorlevel% == -1 (
+	echo "ERROR! the STUN test program had an error" (
+) else if %errorlevel% == 10 (
+	echo "[PASS] (Address) Restricted Cone NAT with Hairpinning"
+) else if %errorlevel% == 21 (
+	echo "[PASS] Port Restricted Cone NAT with Hairpinning"
+) else if %errorlevel% == 8 (
+	echo "[No NAT] You have open internet access"
+) else if %errorlevel% == 2 (
+	echo "[FAIL] Your (Address) Restricted Cone NAT doesn't do hairpinning"
+) else if %errorlevel% == 3 (
+	echo "[FAIL] Your Port Restricted Cone NAT doesn't do hairpinning"
+) else (
+	echo "[FAIL] You have a NAT or Firewall type which is NOT RECOMMENDED.  "
+	if %errorlevel% LSS 8 (
+		echo "It also does not support hairpinning"
+	) else (
+		each "it does at least support hairpinning"
+	)	  
+) 
+goto end
+:usage
+echo Usage:
+echo         wnattest <server-ip> <client-primary-ip> <client-secondary-ip>
+echo.
+echo Example: wnattest 1.1.1.2 192.168.0.2 192.168.0.3
+echo.
+:end
+
diff --git a/libs/utilspp/EmptyType.hpp b/libs/utilspp/EmptyType.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..42a64f9a782518d1d1de9988d35342f30ae09222
--- /dev/null
+++ b/libs/utilspp/EmptyType.hpp
@@ -0,0 +1,32 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_EMPTYTYPE_HPP
+#define UTILSPP_EMPTYTYPE_HPP
+
+namespace utilspp
+{
+  struct EmptyType {};
+};
+
+#endif
diff --git a/libs/utilspp/Functors.hpp b/libs/utilspp/Functors.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..1751185d962b83c77ee05aa1de71080586b358b5
--- /dev/null
+++ b/libs/utilspp/Functors.hpp
@@ -0,0 +1,29 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_FUNCTORS_HPP
+#define UTILSPP_FUNCTORS_HPP
+
+#include "functor/Functor.hpp"
+
+#endif
diff --git a/libs/utilspp/Makefile.am b/libs/utilspp/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..01bff558414d75132d9819f1628c8574730913b2
--- /dev/null
+++ b/libs/utilspp/Makefile.am
@@ -0,0 +1,16 @@
+SUBDIRS = functor singleton
+
+noinst_LTLIBRARIES = libutilspp.la
+
+libutilspp_la_SOURCES = \
+	EmptyType.hpp \
+	Functors.hpp \
+	NonCopyable.hpp \
+	NullType.hpp \
+	Singleton.hpp \
+	SmartPtr.hpp \
+	ThreadingFactoryMutex.hpp ThreadingFactoryMutex.inl \
+	ThreadingSingle.hpp ThreadingSingle.inl \
+	TypeList.hpp
+
+libutilspp_la_LIBADD = ./singleton/libsingleton.la
diff --git a/libs/utilspp/NonCopyable.hpp b/libs/utilspp/NonCopyable.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..eb5443129393b24f22cc0f223401d65bee763602
--- /dev/null
+++ b/libs/utilspp/NonCopyable.hpp
@@ -0,0 +1,41 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_NONCOPYABLE_HPP
+#define UTILSPP_NONCOPYABLE_HPP
+
+namespace utilspp
+{
+   class NonCopyable
+   {
+      public:
+         NonCopyable()
+         {}
+
+      private:
+         NonCopyable(const NonCopyable& r)
+         {}
+   };
+};
+
+#endif
diff --git a/libs/utilspp/NullType.hpp b/libs/utilspp/NullType.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..819026474bef06b73aad5a6a5fccc192c952a8fd
--- /dev/null
+++ b/libs/utilspp/NullType.hpp
@@ -0,0 +1,32 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_NULLTYPE_HPP
+#define UTILSPP_NULLTYPE_HPP
+
+namespace utilspp
+{
+	struct NullType;
+};
+
+#endif
diff --git a/libs/utilspp/Singleton.hpp b/libs/utilspp/Singleton.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..487cbebb5dcebcc2a1dbd7a2c7478e82e6737c78
--- /dev/null
+++ b/libs/utilspp/Singleton.hpp
@@ -0,0 +1,2 @@
+#include "ThreadingSingle.hpp"
+#include "singleton/SingletonHolder.hpp"
diff --git a/libs/utilspp/SmartPtr.hpp b/libs/utilspp/SmartPtr.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..43c400be97b389b20e213fa11055ec873cd874a2
--- /dev/null
+++ b/libs/utilspp/SmartPtr.hpp
@@ -0,0 +1,186 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_SMARTPTR_HPP
+#define UTILSPP_SMARTPTR_HPP
+
+#include <stdexcept>
+#include "NonCopyable.hpp"
+
+#define NULL_BODY_ERROR "the smart pointer contain a NULL pointer"
+
+namespace utilspp
+{
+
+  template < typename Type = unsigned int >
+  class FastCount
+  {
+  public:
+    FastCount(Type count = 1) : mCount(count)
+    {}
+
+    FastCount &operator++()
+    {
+      mCount++;
+      return *this;
+    }
+
+    FastCount &operator--()
+    {
+      mCount--;
+      return *this;
+    }
+
+    operator Type()
+    {
+      return mCount;
+    }
+
+    Type useCount()
+    {
+      return mCount;
+    }
+
+  private:
+    Type mCount;
+  };
+
+  
+  template < typename ContentType, typename CountPolicy = FastCount >
+  class CountingBody : public utilspp::NonCopyable
+  {
+  public:
+    CountingBody(ContentType *body) : mBody(body)
+    {}
+
+    void inc()
+    {
+      ++mCount;
+    }
+
+    void dec()
+    {
+      --mCount;
+      if (mCount <= 0) {
+	delete this;
+      }
+    }
+
+    ContentType *get()
+    {
+      return mBody;
+    }
+
+  protected:
+    ~CountingBody()
+    {
+      if (mBody != NULL) {
+	delete mBody;
+	mBody = NULL;
+      }
+    }
+
+  private:
+    CountPolicy mCount;
+    ContentType *mBody;
+  };
+
+
+  template < typename ContentType, typename CountingBodyPolicy = CountingBody>
+  class SharedPtr
+  {
+  public:
+    SharedPtr() : mContent(new CountingPolicy< ContentType >(NULL))
+    {}
+
+    explicit SharedPtr(ContentType *content) : mContent(new CountingBodyPolicy< ContentType >(content))
+    {}
+
+    ~SharedPtr()
+    {
+      mContent->dec();
+    }
+
+    SharedPtr(const SharedPtr &other) : mContent(other.mContent)
+    {
+      mContent->inc();
+    }
+
+    SharedPtr& operator=(const SharedPtr &other)
+    {
+      if(mContent->get() != other.mContent->get()) {
+	mContent->dec();
+	mContent = other.mContent;
+	mContent->inc();
+      }
+      return ( *this );
+    }
+
+    SharedPtr& operator=(ContentType *content)
+    {
+      mContent--;
+      mContent = new CountingBodyPolicy< ContentType >(content);
+    }
+
+    bool operator==(const SharedPtr &other) const
+    {
+      return (mContent->get() == other.mContent->get());
+    }
+
+    bool operator!=(const SharedPtr &other) const
+    {
+      return (mContent->get() != other.mContent->get());
+    }
+
+    bool operator<(const SharedPtr &other) const
+    {
+      return (mContent->get() < other.mContent->get());
+    }
+
+    operator ContentType*()
+    {
+      return mContent->get();
+    }
+
+    ContentType& operator*()
+    {
+      if(mContent->get() == NULL) {
+	throw std::runtime_error(NULL_BODY_ERROR);
+      }
+      return *mContent->get();
+    }
+
+    ContentType* operator->()
+    { 
+      if(mContent->get() == NULL) {
+	throw std::runtime_error(NULL_BODY_ERROR);
+      }
+      return mContent->get();
+    }
+
+  private:
+    CountingBodyPolicy * mContent;
+  };
+};
+
+#endif
diff --git a/libs/utilspp/ThreadingFactoryMutex.hpp b/libs/utilspp/ThreadingFactoryMutex.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5bd6225f29f58342919ec2489d09cd2079ff478f
--- /dev/null
+++ b/libs/utilspp/ThreadingFactoryMutex.hpp
@@ -0,0 +1,44 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef THREADING_FACTORY_MUTEX_HPP
+#define THREADING_FACTORY_MUTEX_HPP
+
+namespace utilspp
+{
+   template < typename T >
+      struct ThreadingFactoryMutex
+      {
+         struct lock
+         {
+            lock();
+            lock( const T & );
+         };
+
+         typedef T VolatileType;
+      };
+};
+
+#include "ThreadingFactoryMutex.inl"
+
+#endif
diff --git a/libs/utilspp/ThreadingFactoryMutex.inl b/libs/utilspp/ThreadingFactoryMutex.inl
new file mode 100644
index 0000000000000000000000000000000000000000..c9a9f62fbdb9ab4b40e6f5fab2c91e25f60db302
--- /dev/null
+++ b/libs/utilspp/ThreadingFactoryMutex.inl
@@ -0,0 +1,37 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef THREADING_FACTORY_MUTEX_INL
+#define THREADING_FACTORY_MUTEX_INL
+
+template< typename T >
+inline
+utilspp::ThreadingSingle< T >::lock::lock()
+{};
+
+template< typename T >
+inline
+utilspp::ThreadingSingle< T >::lock::lock( const T & )
+{};
+
+#endif
\ No newline at end of file
diff --git a/libs/utilspp/ThreadingSingle.hpp b/libs/utilspp/ThreadingSingle.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..bbab15b5c46ad8651c31be092d351338c33dd110
--- /dev/null
+++ b/libs/utilspp/ThreadingSingle.hpp
@@ -0,0 +1,52 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef SINGLE_THREADED_HPP
+#define SINGLE_THREADED_HPP
+
+#include "NullType.hpp"
+
+namespace utilspp
+{
+   template < typename T = utilspp::NullType >
+      struct ThreadingSingle
+      {
+         struct mutex
+         {
+            void lock();
+            void unlock();
+         };
+         
+         struct lock
+         {
+            lock();
+            lock( mutex &m );
+         };
+
+         typedef T VolatileType;
+      };
+};
+
+#include "ThreadingSingle.inl"
+
+#endif
diff --git a/libs/utilspp/ThreadingSingle.inl b/libs/utilspp/ThreadingSingle.inl
new file mode 100644
index 0000000000000000000000000000000000000000..fcb395ba2081b99d361fca85deb46cbbc07d5580
--- /dev/null
+++ b/libs/utilspp/ThreadingSingle.inl
@@ -0,0 +1,50 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef SINGLE_THREADED_INL
+#define SINGLE_THREADED_INL
+
+template< typename T >
+inline
+utilspp::ThreadingSingle< T >::lock::lock()
+{};
+
+template< typename T >
+inline
+utilspp::ThreadingSingle< T >::lock::lock( 
+      utilspp::ThreadingSingle< T >::mutex & )
+{}
+
+template< typename T >
+inline
+void
+utilspp::ThreadingSingle< T >::mutex::lock()
+{};
+
+template< typename T >
+inline
+void
+utilspp::ThreadingSingle< T >::mutex::unlock()
+{};
+
+#endif
diff --git a/libs/utilspp/TypeList.hpp b/libs/utilspp/TypeList.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..98cdee69f8e7d3268107c87e8ff49a002ccbf770
--- /dev/null
+++ b/libs/utilspp/TypeList.hpp
@@ -0,0 +1,216 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef TYPE_LIST_HPP
+#define TYPE_LIST_HPP
+
+#include "NullType.hpp"
+
+
+
+#define TYPE_LIST_1( T1 ) utilspp::tl::TypeList< T1, utilspp::NullType >
+#define TYPE_LIST_2( T1, T2 ) ::utilspp::tl::TypeList< T1, TYPE_LIST_1( T2 ) >
+#define TYPE_LIST_3( T1, T2, T3 ) ::utilspp::tl::TypeList< T1, TYPE_LIST_2( T2, T3 ) >
+#define TYPE_LIST_4( T1, T2, T3, T4 ) ::utilspp::tl::TypeList< T1, TYPE_LIST_3( T2, T3, T4 ) >
+#define TYPE_LIST_5( T1, T2, T3, T4, T5 )			\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_4( T2, T3, T4, T5 ) >
+#define TYPE_LIST_6( T1, T2, T3, T4, T5, T6 )			\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_5( T2, T3, T4, T5, T6 ) >
+#define TYPE_LIST_7( T1, T2, T3, T4, T5, T6, T7 )			\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_6( T2, T3, T4, T5, T6, T7 ) >
+#define TYPE_LIST_8( T1, T2, T3, T4, T5, T6, T7, T8 )			\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_7( T2, T3, T4, T5, T6, T7, T8 ) >
+#define TYPE_LIST_9( T1, T2, T3, T4, T5, T6, T7, T8, T9 )		\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_8( T2, T3, T4, T5, T6, T7, T8, T9 ) >
+#define TYPE_LIST_10( T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 )		\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_9( T2, T3, T4, T5, T6, T7, T8, T9, T10 ) >
+#define TYPE_LIST_11( T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 )	\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_10( T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 ) >
+#define TYPE_LIST_12( T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 )	\
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_11( T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ) >
+#define TYPE_LIST_13( T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ) \
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_12( T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 ) >
+#define TYPE_LIST_14( T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ) \
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_13( T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 ) >
+#define TYPE_LIST_15( T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ) \
+  ::utilspp::tl::TypeList< T1, TYPE_LIST_14( T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 ) >
+
+
+namespace utilspp
+{
+  namespace tl
+  {
+    template< class T, class U >
+    struct TypeList
+    {
+      typedef T head;
+      typedef U tail;
+    };
+
+    //Calculating length of TypeLists
+    template< class TList > 
+    struct length;
+
+    template<> 
+    struct length< NullType >
+    {
+      enum { value = 0 };
+    };
+
+    template< class T, class U >
+    struct length< TypeList< T, U > >
+    {
+      enum { value = 1 + length< U >::value };
+    };
+
+    /**
+     * Returns the type at a given position (zero-based)
+     * in TList. If the index is greather than or equal to 
+     * the length of TList, a compile-time error occurs.
+     */
+    template< class TList, unsigned int index >
+    struct TypeAt;
+
+    template< class THead, class TTail >
+    struct TypeAt< TypeList< THead, TTail >, 0 >
+    {
+      typedef THead Result;
+    };
+     
+    template< class THead, class TTail, unsigned int i >
+    struct TypeAt< TypeList< THead, TTail >, i >
+    {
+      typedef typename TypeAt< TTail, i - 1 >::Result Result;
+    };
+     
+    /**
+     * Returns the type at a given position (zero-based)
+     * in TList. If the index is greather than or equal to 
+     * the length of TList, OutOfBound template class is 
+     * returned.
+     */
+    template< class TList, unsigned int index, class OutOfBound = utilspp::NullType >
+    struct TypeAtNonStrict;
+
+    template< class THead, class TTail, class OutOfBound >
+    struct TypeAtNonStrict< TypeList< THead, TTail >, 0, OutOfBound >
+    {
+      typedef THead Result;
+    };
+     
+    template< class THead, class TTail, unsigned int i, class OutOfBound >
+    struct TypeAtNonStrict< TypeList< THead, TTail >, i, OutOfBound >
+    {
+      typedef typename TypeAtNonStrict< TTail, i - 1 >::Result Result;
+    };
+
+    template< unsigned int i, class OutOfBound >
+    struct TypeAtNonStrict< utilspp::NullType, i , OutOfBound>
+    {
+      typedef OutOfBound Result;
+    };
+
+
+    //Searching TypeLists
+    template< class TList, class T >
+    struct IndexOf;
+
+    template< class T >
+    struct IndexOf< NullType, T >
+    {
+      enum { value = -1 };
+    };
+
+    template< class TTail, class T >
+    struct IndexOf< TypeList< T, TTail >, T >
+    {
+      enum { value = 0 };
+    };
+
+    template< class THead, class TTail, class T >
+    struct IndexOf< TypeList< THead, TTail >, T >
+    {
+    private:
+      enum { temp = IndexOf< TTail, T >::value };
+
+    public:
+      enum { value = temp == -1 ? -1 : 1 + temp };
+    };
+
+    //Appending to TypeLists
+    template< class TList, class T > 
+    struct append;
+
+    template <> 
+    struct append< NullType, NullType >
+    {
+      typedef NullType Result;
+    };
+
+    template< class T > 
+    struct append< NullType, T >
+    {
+      typedef TYPE_LIST_1( T ) Result;
+    };
+
+    template< class THead, class TTail >
+    struct append< NullType, TypeList< THead, TTail > >
+    {
+      typedef TypeList< THead, TTail > Result;
+    };
+
+    template < class THead, class TTail, class T >
+    struct append< TypeList< THead, TTail >, T >
+    {
+      typedef TypeList< THead, typename append< TTail, T >::Result >
+      Result;
+    };
+
+    //Erasing a type from a TypeList
+    template< class TList, class T > 
+    struct erase;
+        
+    template< class T >
+    struct erase< NullType, T >
+    {
+      typedef NullType Result;
+    };
+        
+    template< class T, class TTail >
+    struct erase< TypeList< T, TTail >, T >
+    {
+      typedef TTail Result;
+    };
+        
+    template< class THead, class TTail, class T >
+    struct erase< TypeList< THead, TTail >, T >
+    {
+      typedef TypeList< THead, typename erase< TTail, T >::Result >
+      Result;
+    };
+  };
+};      
+
+
+#endif
+
diff --git a/libs/utilspp/TypeTrait.hpp b/libs/utilspp/TypeTrait.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..7046f6ee013fd8ac240afd04a2152e49ac350180
--- /dev/null
+++ b/libs/utilspp/TypeTrait.hpp
@@ -0,0 +1,916 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_TYPETRAIT_HPP
+#define UTILSPP_TYPETRAIT_HPP
+
+#include "NullType.hpp"
+
+namespace utilspp
+{
+  template< typename T >
+  class TypeTrait
+  {
+  private:
+    template< typename U >
+    struct unreference
+    {
+      typedef U type;
+    };
+
+    template< typename U >
+    struct unreference< U & >
+    {
+      typedef U type;
+    };
+
+    template< typename U >
+    struct unconst
+    {
+      typedef U type;
+    };
+
+    template< typename U >
+    struct unconst< const U >
+    {
+      typedef U type;
+    };
+
+  public:
+    typedef typename unreference< T >::type NonReference;
+    typedef typename unconst< T >::type NonConst;
+    typedef typename unconst< unreference< T >::type >::type NonParam;
+  };
+
+  template< class T >
+  struct PointerOnMemberFunction
+  {
+    typedef utilspp::NullType ClassType;
+    typedef utilspp::NullType ReturnType;
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef utilspp::NullType ParamList;
+  };
+
+  template< typename V, typename W >
+  struct PointerOnMemberFunction< W(V::*)() >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef utilspp::NullType ParamList;
+  };
+
+  template< typename V, typename W, typename X >
+  struct PointerOnMemberFunction< W(V::*)(X) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_1(X) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y >
+  struct PointerOnMemberFunction< W(V::*)(X, Y) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_2(X, Y) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_3(X, Y, Z) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_3(X, Y, Z) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_3(X, Y, Z) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_4(X, Y, Z, A) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_5(X, Y, Z, A, B) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_6(X, Y, Z, A, B, C) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_7(X, Y, Z, A, B, C, D) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_8(X, Y, Z, A, B, C, D, E) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_9(X, Y, Z, A, B, C, D, E, F) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F, G) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_10(X, Y, Z, A, B, C, D, E, F, G) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_11(X, Y, Z, A, B, C, D, E, F, G, H) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_12(X, Y, Z, A, B, C, D, E, F, G, H, I) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I, J) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef J Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_13(X, Y, Z, A, B, C, D, E, F, G, H, I, J) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef J Param13Type;
+    typedef K Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_14(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K, typename L >
+  struct PointerOnMemberFunction< W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L) >
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef J Param13Type;
+    typedef K Param14Type;
+    typedef L Param15Type;
+
+    typedef TYPE_LIST_15(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L) ParamList;
+  };
+
+  template< typename T >
+  struct PointerOnFunction
+  {
+    typedef utilspp::NullType ReturnType;
+
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef utilspp::NullType ParamList;
+  };
+
+  template< typename V >
+  struct PointerOnFunction< V(*)() >
+  {
+    typedef V ReturnType;
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+ 
+    typedef utilspp::NullType ParamList;
+ };
+
+  template< typename V, typename W >
+  struct PointerOnFunction< V(*)(W) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_1(W) ParamList;
+  };
+
+  template< typename V, typename W, typename X >
+  struct PointerOnFunction< V(*)(W, X) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_2(W, X) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y >
+  struct PointerOnFunction< V(*)(W, X, Y) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_3(W, X, Y) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z >
+  struct PointerOnFunction< V(*)(W, X, Y, Z) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+    
+    typedef TYPE_LIST_4(W, X, Y, Z) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_5(W, X, Y, Z, A) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_6(W, X, Y, Z, A, B) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_7(W, X, Y, Z, A, B, C) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_8(W, X, Y, Z, A, B, C, D) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_9(W, X, Y, Z, A, B, C, D, E) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E, F) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_10(W, X, Y, Z, A, B, C, D, E, F) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E, F, G) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_11(W, X, Y, Z, A, B, C, D, E, F, G) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_12(W, X, Y, Z, A, B, C, D, E, F, G, H) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H, I) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef I Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_13(W, X, Y, Z, A, B, C, D, E, F, G, H, I ) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef I Param13Type;
+    typedef J Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_14(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J ) ParamList;
+  };
+
+  template< typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K >
+  struct PointerOnFunction< V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K) >
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef I Param13Type;
+    typedef J Param14Type;
+    typedef K Param15Type;
+
+    typedef TYPE_LIST_15(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K) ParamList;
+  };
+
+};
+
+#endif
diff --git a/libs/utilspp/functor/Binder.hpp b/libs/utilspp/functor/Binder.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..6bd34cfe36e0f91fb42a38b2f4cd1f6d19c3f4d7
--- /dev/null
+++ b/libs/utilspp/functor/Binder.hpp
@@ -0,0 +1,102 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef CURLPP_BINDER_HPP
+#define CURLPP_BINDER_HPP
+
+namespace utilspp
+{
+  template< typename Incoming >
+  class BinderFirst : FunctorImpl< typename Incoming::ResultType,
+				   typename Incoming::ParamList::Tail >
+  {
+    typedef utilspp::Functor< typename Incoming::ResultType, typename Incoming::ParamList::Tail > Outgoing;
+    typedef typename Incoming::Parm1 Bound;
+    typedef typename Incoming::ResultType ResultType;
+    
+  public:
+    BinderFirst(const Incoming& fun, Bound bound)
+      : mFun(fun), mBound(bound)
+    {}
+
+    BinderFirst* clone() const
+    {return new BinderFirst(*this);}
+
+    ResultType operator()()
+    {return mFun(mBound)();}
+
+    ResultType operator()(typename Outgoing::Parm1 p1)
+    {return mFun(mBound, p1);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2)
+    {return mFun(mBound, p1, p2);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3)
+    {return mFun(mBound, p1, p2, p3);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4)
+    {return mFun(mBound, p1, p2, p3, p4);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5)
+    {return mFun(mBound, p1, p2, p3, p4, p5);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8, typename Outgoing::Parm9 p9)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8, p9);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8, typename Outgoing::Parm9 p9, typename Outgoing::Parm10 p10)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8, typename Outgoing::Parm9 p9, typename Outgoing::Parm10 p10, typename Outgoing::Parm11 p11)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8, typename Outgoing::Parm9 p9, typename Outgoing::Parm10 p10, typename Outgoing::Parm11 p11, typename Outgoing::Parm12 p12)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8, typename Outgoing::Parm9 p9, typename Outgoing::Parm10 p10, typename Outgoing::Parm11 p11, typename Outgoing::Parm12 p12, typename Outgoing::Parm13 p13)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);}
+
+    ResultType operator()(typename Outgoing::Parm1 p1, typename Outgoing::Parm2 p2, typename Outgoing::Parm3 p3, typename Outgoing::Parm4 p4, typename Outgoing::Parm5 p5, typename Outgoing::Parm6 p6, typename Outgoing::Parm7 p7, typename Outgoing::Parm8 p8, typename Outgoing::Parm9 p9, typename Outgoing::Parm10 p10, typename Outgoing::Parm11 p11, typename Outgoing::Parm12 p12, typename Outgoing::Parm13 p13, typename Outgoing::Parm14 p14)
+    {return mFun(mBound, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);}
+
+  private:
+    Incoming mFun;
+    Bound mBound;
+  };
+
+  template< typename R, class TList >
+  Functor<R, typename TList::Tail> BindFirst(const Functor<R, TList>& fun,
+					     typename TList::THead bound);
+};
+
+#include "Binder.inl"
+
+#endif
diff --git a/libs/utilspp/functor/Binder.inl b/libs/utilspp/functor/Binder.inl
new file mode 100644
index 0000000000000000000000000000000000000000..a2167a9aaf426a2ab4bc4cd011a1eff34f215631
--- /dev/null
+++ b/libs/utilspp/functor/Binder.inl
@@ -0,0 +1,39 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef CURLPP_BINDER_HPP
+#define CURLPP_BINDER_HPP
+
+template< R, class TList >
+utilspp::Functor<R, typename TList::Tail> BindFirst(const Functor<R, TList>& fun,
+                                                    TList::Head bound)
+{
+  typedef Functor< R, TList > Incoming;
+  typedef Functor< R, typename TList::Tail > Outgoing;
+
+  return Outgoing(std::auto_ptr< 
+    typename Outgoing::Impl >(new BinderFirst< Incoming >(fun, bound)));
+}
+
+#endif
+
diff --git a/libs/utilspp/functor/Functor.hpp b/libs/utilspp/functor/Functor.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..e6255fadd281834f7eaa220197c7e4efe0da19e1
--- /dev/null
+++ b/libs/utilspp/functor/Functor.hpp
@@ -0,0 +1,129 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_FUNCTOR_HPP
+#define UTILSPP_FUNCTOR_HPP
+
+#include <memory>
+
+#include "../NullType.hpp"
+#include "../EmptyType.hpp"
+#include "../TypeList.hpp"
+
+#include "FunctorImpl.hpp"
+#include "FunctorHandler.hpp"
+#include "MemFunHandler.hpp"
+
+namespace utilspp
+{
+  template< typename R, class TList >
+  class Functor
+  {
+  public:
+    typedef R ResultType;
+    typedef TList ParmList;
+
+    Functor(const Functor &functor);
+    Functor& operator=(const Functor &functor);
+    //explicit Functor(std::auto_ptr< Impl > impl);
+    template< class Fun >
+    Functor(Fun fun);
+    template< class PointerToObj, class MemFun >
+    Functor(const PointerToObj &obj, MemFun fun);
+
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 0, utilspp::EmptyType >::Result Parm1;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 1, utilspp::EmptyType >::Result Parm2;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 2, utilspp::EmptyType >::Result Parm3;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 3, utilspp::EmptyType >::Result Parm4;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 4, utilspp::EmptyType >::Result Parm5;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 5, utilspp::EmptyType >::Result Parm6;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 6, utilspp::EmptyType >::Result Parm7;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 7, utilspp::EmptyType >::Result Parm8;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 8, utilspp::EmptyType >::Result Parm9;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 9, utilspp::EmptyType >::Result Parm10;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 10, utilspp::EmptyType >::Result Parm11;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 11, utilspp::EmptyType >::Result Parm12;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 12, utilspp::EmptyType >::Result Parm13;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 13, utilspp::EmptyType >::Result Parm14;
+    typedef typename utilspp::tl::TypeAtNonStrict< TList, 14, utilspp::EmptyType >::Result Parm15;
+
+    R operator()()
+    {return (*mImpl)();}
+
+    R operator()(Parm1 p1)
+    {return (*mImpl)(p1);}
+
+    R operator()(Parm1 p1, Parm2 p2)
+    {return (*mImpl)(p1, p2);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3)
+    {return (*mImpl)(p1, p2, p3);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4)
+    {return (*mImpl)(p1, p2, p3, p4);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5)
+    {return (*mImpl)(p1, p2, p3, p4, p5);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12, Parm13 p13)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12, Parm13 p13, Parm14 p14)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);}
+
+    R operator()(Parm1 p1, Parm2 p2, Parm3 p3, Parm4 p4, Parm5 p5, Parm6 p6, Parm7 p7, Parm8 p8, Parm9 p9, Parm10 p10, Parm11 p11, Parm12 p12, Parm13 p13, Parm14 p14, Parm15 p15)
+    {return (*mImpl)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15);}
+
+  private:
+    typedef FunctorImpl< R, TList > Impl;
+    std::auto_ptr<Impl> mImpl;
+  };
+
+
+};
+
+#include "Functor.inl"
+#include "Binder.hpp"
+
+#endif
diff --git a/libs/utilspp/functor/Functor.inl b/libs/utilspp/functor/Functor.inl
new file mode 100644
index 0000000000000000000000000000000000000000..f996ce814e5d9d23905a59ea62a1505bb092acee
--- /dev/null
+++ b/libs/utilspp/functor/Functor.inl
@@ -0,0 +1,53 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_FUNCTOR_INL
+#define UTILSPP_FUNCTOR_INL
+
+template <typename R, class TList>
+template <typename Fun>
+utilspp::Functor<R, TList>::Functor(Fun fun)
+: mImpl(new FunctorHandler< Functor, Fun >(fun))
+{}
+
+template <typename R, class TList>
+template <typename PointerToObj, typename MemFun>
+utilspp::Functor<R, TList>::Functor(const PointerToObj &obj, MemFun fun)
+: mImpl(new MemFunHandler< Functor, PointerToObj, MemFun >(obj, fun))
+{}
+
+template <typename R, class TList>
+utilspp::Functor<R, TList>::Functor(const Functor &functor)
+: mImpl(functor.mImpl->clone())
+{}
+
+template <typename R, class TList>
+utilspp::Functor<R, TList> &
+utilspp::Functor<R, TList>::operator=(const Functor &functor)
+{
+  mImpl = std::auto_ptr< Impl >(functor.mImpl->clone());
+  return (*this);
+}
+
+#endif
+
diff --git a/libs/utilspp/functor/FunctorHandler.hpp b/libs/utilspp/functor/FunctorHandler.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5556e8d56c6c604e469fa28ef0dc6bdc0bf1c69e
--- /dev/null
+++ b/libs/utilspp/functor/FunctorHandler.hpp
@@ -0,0 +1,95 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_FUNCTORHANDLER_HPP
+#define UTILSPP_FUNCTORHANDLER_HPP
+
+namespace utilspp
+{
+  template <class ParentFunctor, typename Fun>
+  class FunctorHandler : public FunctorImpl< typename ParentFunctor::ResultType,
+					     typename ParentFunctor::ParmList >
+  {
+  public:
+    typedef typename ParentFunctor::ResultType ResultType;
+    
+    FunctorHandler(Fun fun) : mFun(fun) {}
+    FunctorHandler* clone() const
+    {return new FunctorHandler(*this);}
+
+    ResultType operator()()
+    {return mFun();}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1)
+    {return (mFun)(p1);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2)
+    {return (mFun)(p1, p2);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3)
+    {return (mFun)(p1, p2, p3);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4)
+    {return (mFun)(p1, p2, p3, p4);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5)
+    {return (mFun)(p1, p2, p3, p4, p5);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6)
+    {return (mFun)(p1, p2, p3, p4, p5, p6);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12, typename ParentFunctor::Parm13 p13)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12, typename ParentFunctor::Parm13 p13, typename ParentFunctor::Parm14 p14)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12, typename ParentFunctor::Parm13 p13, typename ParentFunctor::Parm14 p14, typename ParentFunctor::Parm15 p15)
+    {return (mFun)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15);}
+
+  private:
+    Fun mFun;
+  };
+};
+
+#endif
+
+
diff --git a/libs/utilspp/functor/FunctorImpl.hpp b/libs/utilspp/functor/FunctorImpl.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..93f59716fddb77bbb48d8013f6c4805edb59bbb3
--- /dev/null
+++ b/libs/utilspp/functor/FunctorImpl.hpp
@@ -0,0 +1,206 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_FUNCTORIMPL_HPP
+#define UTILSPP_FUNCTORIMPL_HPP
+
+namespace utilspp
+{
+  template< typename R, class TList >
+  struct FunctorImpl;
+  
+  template< typename R >
+  struct FunctorImpl<R, utilspp::NullType >
+  {
+    R operator()() = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+  
+  template< typename R, typename P1 >
+  struct FunctorImpl<R, TYPE_LIST_1(P1) >
+  {
+    virtual R operator()(P1) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+  
+  template< typename R, typename P1, typename P2 >
+  struct FunctorImpl<R, TYPE_LIST_2(P1, P2) >
+  {
+    virtual R operator()(P1, P2) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+  
+  template< typename R, typename P1, typename P2, typename P3 >
+  struct FunctorImpl<R, TYPE_LIST_3(P1, P2, P3) >
+  {
+    virtual R operator()(P1, P2, P3) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4 >
+  struct FunctorImpl<R, TYPE_LIST_4(P1, P2, P3, P4) >
+  {
+    virtual R operator()(P1, P2, P3, P4) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4, typename P5 >
+  struct FunctorImpl<R, TYPE_LIST_5(P1, P2, P3, P4, P5) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< 
+    typename R, 
+    typename P1, 
+    typename P2, 
+    typename P3, 
+    typename P4, 
+    typename P5, 
+    typename P6 >
+  struct FunctorImpl<R, TYPE_LIST_6(P1, P2, P3, P4, P5, P6) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< 
+    typename R, 
+    typename P1, 
+    typename P2, 
+    typename P3, 
+    typename P4, 
+    typename P5, 
+    typename P6, 
+    typename P7 >
+  struct FunctorImpl<R, TYPE_LIST_7(P1, P2, P3, P4, P5, P6, P7) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< 
+    typename R, 
+    typename P1, 
+    typename P2, 
+    typename P3, 
+    typename P4, 
+    typename P5, 
+    typename P6, 
+    typename P7, 
+    typename P8 >
+  struct FunctorImpl<R, TYPE_LIST_8(P1, P2, P3, P4, P5, P6, P7, P8) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< 
+    typename R, 
+    typename P1, 
+    typename P2, 
+    typename P3, 
+    typename P4, 
+    typename P5, 
+    typename P6, 
+    typename P7, 
+    typename P8, 
+    typename P9 >
+  struct FunctorImpl<R, TYPE_LIST_9(P1, P2, P3, P4, P5, P6, P7, P8, P9) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< 
+    typename R, 
+    typename P1, 
+    typename P2, 
+    typename P3, 
+    typename P4, 
+    typename P5, 
+    typename P6, 
+    typename P7, 
+    typename P8, 
+    typename P9, 
+    typename P10 >
+  struct FunctorImpl<R, TYPE_LIST_10(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11 >
+  struct FunctorImpl<R, TYPE_LIST_11(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12 >
+  struct FunctorImpl<R, TYPE_LIST_12(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13 >
+  struct FunctorImpl<R, TYPE_LIST_13(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14 >
+  struct FunctorImpl<R, TYPE_LIST_14(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+
+  template< typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15 >
+  struct FunctorImpl<R, TYPE_LIST_15(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) >
+  {
+    virtual R operator()(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) = 0;
+    virtual FunctorImpl *clone() const = 0;
+    virtual ~FunctorImpl(){};
+  };
+};
+
+#endif
diff --git a/libs/utilspp/functor/Makefile.am b/libs/utilspp/functor/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..0ca9eff77d01187ddd28ab87c57383c4a5e7921b
--- /dev/null
+++ b/libs/utilspp/functor/Makefile.am
@@ -0,0 +1,9 @@
+#pkginclude_HEADERS = \
+#	Binder.hpp Binder.inl \
+#	FunctorHandler.hpp \
+#	Functor.hpp \
+#	FunctorImpl.hpp \
+#	Functor.inl \
+#	MemFunHandler.hpp
+
+#pkgincludedir=$(includedir)/utilspp/functor
diff --git a/libs/utilspp/functor/MemFunHandler.hpp b/libs/utilspp/functor/MemFunHandler.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..2e92cee85b86850266bf46f043526f352adae6b1
--- /dev/null
+++ b/libs/utilspp/functor/MemFunHandler.hpp
@@ -0,0 +1,100 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef UTILSPP_MEMFUNHANDLER_HPP
+#define UTILSPP_MEMFUNHANDLER_HPP
+
+namespace utilspp
+{
+  template <class ParentFunctor, typename PointerToObj, typename PointerToMemFn>
+  class MemFunHandler : public FunctorImpl< typename ParentFunctor::ResultType,
+					    typename ParentFunctor::ParmList >
+  {
+  public:
+    typedef typename ParentFunctor::ResultType ResultType;
+    MemFunHandler(PointerToObj obj, PointerToMemFn memFn) 
+      : mObj(obj)
+      , mMemFn(memFn)
+    {}
+
+    MemFunHandler* clone() const
+    {return new MemFunHandler(*this);}
+    
+    ResultType operator()()
+    {return ((*mObj).*mMemFn)();}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1)
+    {return ((*mObj).*mMemFn)(p1);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2)
+    {return ((*mObj).*mMemFn)(p1, p2);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, 
+			  typename ParentFunctor::Parm2 p2, 
+			  typename ParentFunctor::Parm3 p3)
+    {return ((*mObj).*mMemFn)(p1, p2, p3);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12, typename ParentFunctor::Parm13 p13)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12, typename ParentFunctor::Parm13 p13, typename ParentFunctor::Parm14 p14)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14);}
+
+    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4, typename ParentFunctor::Parm5 p5, typename ParentFunctor::Parm6 p6, typename ParentFunctor::Parm7 p7, typename ParentFunctor::Parm8 p8, typename ParentFunctor::Parm9 p9, typename ParentFunctor::Parm10 p10, typename ParentFunctor::Parm11 p11, typename ParentFunctor::Parm12 p12, typename ParentFunctor::Parm13 p13, typename ParentFunctor::Parm14 p14, typename ParentFunctor::Parm15 p15)
+    {return ((*mObj).*mMemFn)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15);}
+
+  private:
+    PointerToObj mObj;
+    PointerToMemFn mMemFn;
+  };
+};
+
+#endif
+
diff --git a/libs/utilspp/singleton/CreationStatic.hpp b/libs/utilspp/singleton/CreationStatic.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..27570f5308802c89614944ae3ab97b7fafdf7c8f
--- /dev/null
+++ b/libs/utilspp/singleton/CreationStatic.hpp
@@ -0,0 +1,49 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef CREATION_STATIC_HPP
+#define CREATION_STATIC_HPP
+
+/**
+ * This class is a creation policy for the utilspp::singleton_holder. The
+ * policy is creating the singleton by a static memory. The constructor is
+ * called the first time we call the utilspp::creation_static::create()
+ * function.
+ *
+ * Note don't use this class because it's not complete, and at this time it's
+ * not REALY complyant with the lifetime policy.
+ */
+namespace utilspp
+{
+   template< typename T >
+   class CreationStatic
+   {
+      public:
+         static T* create();
+         static void destroy( T* obj );
+   };
+};
+
+#include "CreationStatic.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/CreationStatic.inl b/libs/utilspp/singleton/CreationStatic.inl
new file mode 100644
index 0000000000000000000000000000000000000000..9572e5eca75f2d2e054cb7ea12d68a2cb33677b4
--- /dev/null
+++ b/libs/utilspp/singleton/CreationStatic.inl
@@ -0,0 +1,43 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef CREATION_STATIC_INL
+#define CREATION_STATIC_INL
+
+template< typename T >
+T*
+utilspp::CreationStatic::create()
+{
+   static T mObj;
+   return new(&mObj) T;
+};
+
+template< typename T >
+void
+utilspp::CreationStatic::destroy( T* obj )
+{
+  obj->~T();
+}
+
+
+#endif
\ No newline at end of file
diff --git a/libs/utilspp/singleton/CreationUsingNew.hpp b/libs/utilspp/singleton/CreationUsingNew.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..5055db5b8ff0866159e9ad488312cee6e9a900c5
--- /dev/null
+++ b/libs/utilspp/singleton/CreationUsingNew.hpp
@@ -0,0 +1,43 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef CREATION_USING_NEW_HPP
+#define CREATION_USING_NEW_HPP
+
+/**
+ * This class is a creation policy for the utilspp::singleton_holder. The
+ * policy is creating the singleton by a "new" call. 
+ */
+namespace utilspp
+{
+   template< typename T >
+   struct CreationUsingNew
+   {
+         static T *create();
+         static void destroy( T *obj );
+   };
+};
+
+#include "CreationUsingNew.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/CreationUsingNew.inl b/libs/utilspp/singleton/CreationUsingNew.inl
new file mode 100644
index 0000000000000000000000000000000000000000..adb66ede9ee12036dbcc41f9469475378190a8b3
--- /dev/null
+++ b/libs/utilspp/singleton/CreationUsingNew.inl
@@ -0,0 +1,42 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef CREATION_USING_NEW_INL
+#define CREATION_USING_NEW_INL
+
+template< typename T >
+T *
+utilspp::CreationUsingNew< T >::create()
+{
+   return new T;
+}
+
+template< typename T >
+void
+utilspp::CreationUsingNew< T >::destroy( T *obj )
+{
+   delete obj;
+}
+
+
+#endif
diff --git a/libs/utilspp/singleton/LifetimeDefault.hpp b/libs/utilspp/singleton/LifetimeDefault.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..9c77138109a0385d267c52626e381fe0f3e5f36e
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeDefault.hpp
@@ -0,0 +1,43 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef LIFETIME_DEFAULT_HPP
+#define LIFETIME_DEFAULT_HPP
+
+#include <stdexcept>
+#include <cstdlib>
+
+namespace utilspp
+{
+   template< typename T >
+   class LifetimeDefault
+   {
+      public:
+         static void scheduleDestruction( T *obj, void (*func)() );
+         static void onDeadReference();
+   };
+};
+
+#include "LifetimeDefault.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/LifetimeDefault.inl b/libs/utilspp/singleton/LifetimeDefault.inl
new file mode 100644
index 0000000000000000000000000000000000000000..a8e63f9fc43ede97e653513d336327ca93e242a7
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeDefault.inl
@@ -0,0 +1,42 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef LIFETIME_DEFAULT_INL
+#define LIFETIME_DEFAULT_INL
+
+template< typename T >
+void 
+utilspp::LifetimeDefault< T >::scheduleDestruction( T *, void (*func)() )
+{
+   std::atexit(func);
+}
+
+template< typename T >
+void
+utilspp::LifetimeDefault< T >::onDeadReference()
+{
+   throw std::logic_error( "Dead reference detected" );
+}
+
+
+#endif
diff --git a/libs/utilspp/singleton/LifetimeLibrary.cpp b/libs/utilspp/singleton/LifetimeLibrary.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e58932ebde4692b55b67fdce9b569bea80b5b5bc
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeLibrary.cpp
@@ -0,0 +1,72 @@
+#include "SingletonHolder.hpp"
+#include "LifetimeLibrary.hpp"
+
+utilspp::LifetimeLibraryImpl::LifetimeLibraryImpl()
+   :
+   mTrackerArray( NULL ),
+   mNbElements( 0 )
+{}
+
+utilspp::LifetimeLibraryImpl::~LifetimeLibraryImpl()
+{
+   terminate();
+}
+
+void
+utilspp::LifetimeLibraryImpl::add( utilspp::PrivateMembers::LifetimeTracker *tracker )
+{
+   utilspp::PrivateMembers::TrackerArray newArray = static_cast<
+      utilspp::PrivateMembers::TrackerArray >(std::realloc(mTrackerArray, 
+							    mNbElements + 1));
+   if( newArray == NULL )
+   {
+      throw std::bad_alloc();
+   }
+
+   mTrackerArray = newArray;
+
+   utilspp::PrivateMembers::TrackerArray pos = 
+     std::upper_bound(mTrackerArray, 
+		      mTrackerArray + mNbElements,
+		      tracker,
+		      &utilspp::PrivateMembers::LifetimeTracker::compare);
+   std::copy_backward(pos, 
+		      mTrackerArray + mNbElements, 
+		      mTrackerArray + mNbElements + 1);
+   
+   *pos = tracker;
+   mNbElements++;
+};
+
+void
+utilspp::LifetimeLibraryImpl::terminate()
+{
+   //The number of elements MUST always be equal or over zero.
+   assert( mNbElements >= 0 );
+
+   while( mNbElements > 0 )
+   {
+      //At this point the mTrackerArray MUST not be NULL.
+      assert( mTrackerArray != NULL );
+      
+      //Pick the element at the top of the stack.
+      utilspp::PrivateMembers::LifetimeTracker* top =  
+	mTrackerArray[mNbElements - 1];
+
+      //Remove that object off the stack.
+      //Don't check errors-realloc with less memory, cause that can't fail.
+      mTrackerArray = 
+	static_cast< utilspp::PrivateMembers::TrackerArray >
+	(std::realloc(mTrackerArray, --mNbElements));
+      
+      //Destroy the element.
+      delete top;
+   }
+}
+
+unsigned int 
+utilspp::getLongevity( utilspp::LifetimeLibraryImpl * )
+{
+   return 0;
+}
+
diff --git a/libs/utilspp/singleton/LifetimeLibrary.hpp b/libs/utilspp/singleton/LifetimeLibrary.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..80fba716ab70484e4cd5525be39e9e08cf40a276
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeLibrary.hpp
@@ -0,0 +1,104 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef LIFETIME_LIBRARY_HPP
+#define LIFETIME_LIBRARY_HPP
+
+#include <cassert>
+
+#include "PrivateMembers.hpp"
+#include "CreationUsingNew.hpp"
+
+namespace utilspp
+{
+   
+   template< typename T >
+   unsigned int getLongevity( T *p );
+
+   /**
+    * Assigns an object a longevity. Ensures ordered destructions of objects
+    * registered thusly during the exit sequence of the application.
+    */
+   template< typename T, typename TDestroyer >
+      void setLibraryLongevity( 
+            T *obj, 
+            unsigned int longevity, 
+            TDestroyer d = utilspp::PrivateMembers::Deleter< T >::deleteObject
+            );
+
+  /**
+   * This class is a lifetime policy for the singleton. This
+   * class allow you to terminate the singleton explicitly. 
+   * You can terminate by calling:
+   *
+   * LifetimeLibrarySingleton::instance().terminate()
+   *
+   * This singleton use the utilspp::LifetimeWithLongevity policy.
+   */
+  template< typename T >
+  struct LifetimeLibrary
+  {
+    static void scheduleDestruction( T *obj, void (*func)() );
+    static void onDeadReference();
+  };
+  
+  class LifetimeLibraryImpl
+  {
+  public:
+    LifetimeLibraryImpl();
+    ~LifetimeLibraryImpl();
+    
+    void add( utilspp::PrivateMembers::LifetimeTracker *tracker );
+    void terminate();
+    
+  private:
+    utilspp::PrivateMembers::TrackerArray mTrackerArray;
+    int mNbElements;
+  };
+  
+  unsigned int getLongevity( utilspp::LifetimeLibraryImpl *p );
+
+  typedef utilspp::SingletonHolder< 
+    utilspp::LifetimeLibraryImpl,
+    utilspp::CreationUsingNew,  
+    utilspp::LifetimeWithLongevity
+    > LifetimeLibrarySingleton;
+
+  /**
+   * This class will ensure that 
+   *
+   * LifetimeLibraryImpl::terminate() 
+   *
+   * is called.
+   */
+  template< typename T = utilspp::LifetimeLibrarySingleton >
+  class LifetimeLibraryGuard
+  {
+  public:
+    ~LifetimeLibraryGuard();
+  };
+};
+
+#include "LifetimeLibrary.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/LifetimeLibrary.inl b/libs/utilspp/singleton/LifetimeLibrary.inl
new file mode 100644
index 0000000000000000000000000000000000000000..b7ab8e6d66d2bb38719e8b0b6d163636f33bcdbd
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeLibrary.inl
@@ -0,0 +1,33 @@
+template< typename T, typename TDestroyer >
+void
+utilspp::setLibraryLongevity( T *obj, unsigned int longevity, TDestroyer d )
+{
+   using namespace utilspp::PrivateMembers;
+   
+   LifetimeTracker *p = new ConcreteLifetimeTracker< T, TDestroyer >( 
+         obj, longevity, d);
+
+   utilspp::LifetimeLibrarySingleton::instance().add( p );
+};
+
+template< typename T >
+void 
+utilspp::LifetimeLibrary< T >::scheduleDestruction( T *obj, void (*func)() )
+{
+   utilspp::PrivateMembers::adapter<T> adapter = { func };
+   utilspp::setLibraryLongevity( obj, getLongevity( obj ), adapter );
+}
+
+template< typename T >
+void 
+utilspp::LifetimeLibrary< T >::onDeadReference()
+{
+   throw std::logic_error("Dead reference detected");
+}
+
+template< typename T >
+utilspp::LifetimeLibraryGuard< T >::~LifetimeLibraryGuard()
+{
+  T::instance().terminate();
+}
+
diff --git a/libs/utilspp/singleton/LifetimeWithLongevity.hpp b/libs/utilspp/singleton/LifetimeWithLongevity.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..888475126411719da68a0d7043ef358eac7b79da
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeWithLongevity.hpp
@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef LIFETIME_WITH_LONGEVITY_HPP
+#define LIFETIME_WITH_LONGEVITY_HPP
+
+#include <cassert>
+
+#include "PrivateMembers.hpp"
+
+namespace utilspp
+{
+   
+   template< typename T >
+   unsigned int getLongevity( T *p );
+
+   /**
+    * Assigns an object a longevity. Ensures ordered destructions of objects
+    * registered thusly during the exit sequence of the application.
+    */
+  template< typename T, typename TDestroyer >
+  void setLongevity(T *obj, 
+		    unsigned int longevity, 
+		    TDestroyer d = utilspp::PrivateMembers::Deleter< T >::deleteObject);
+  
+  template< typename T >
+  struct LifetimeWithLongevity
+  {
+    static void scheduleDestruction( T *obj, void (*func)() );
+    static void onDeadReference();
+  };
+};
+
+#include "LifetimeWithLongevity.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/LifetimeWithLongevity.inl b/libs/utilspp/singleton/LifetimeWithLongevity.inl
new file mode 100644
index 0000000000000000000000000000000000000000..aaaf0ebfb5befbf0b528e247ccc0b2157576f499
--- /dev/null
+++ b/libs/utilspp/singleton/LifetimeWithLongevity.inl
@@ -0,0 +1,56 @@
+template< typename T, typename TDestroyer >
+void
+utilspp::setLongevity( T *obj, unsigned int longevity, TDestroyer d )
+{
+   using namespace utilspp::PrivateMembers;
+
+   TrackerArray newArray = static_cast< TrackerArray >( 
+         std::realloc(mTrackerArray, mNbElements + 1));
+   if( newArray == NULL )
+   {
+      throw std::bad_alloc();
+   }
+
+   LifetimeTracker *p = 
+	new ConcreteLifetimeTracker< T, TDestroyer >(obj, longevity, d);
+
+   mTrackerArray = newArray;
+
+   TrackerArray pos = std::upper_bound( 
+         mTrackerArray, 
+         mTrackerArray + mNbElements,
+         p,
+         &LifetimeTracker::compare);
+   std::copy_backward( 
+         pos, 
+         mTrackerArray + mNbElements, 
+         mTrackerArray + mNbElements + 1);
+
+   *pos = p;
+   mNbElements++;
+   std::atexit( &atExitFunc );
+};
+
+template< typename T >
+void 
+utilspp::LifetimeWithLongevity< T >::scheduleDestruction( T *obj, void (*func)() )
+{
+   utilspp::PrivateMembers::adapter<T> adapter = { func };
+   utilspp::setLongevity( obj, getLongevity( obj ), adapter );
+}
+
+template< typename T >
+void 
+utilspp::LifetimeWithLongevity< T >::onDeadReference()
+{
+   throw std::logic_error("Dead reference detected");
+}
+
+template< typename T >
+unsigned int 
+utilspp::getLongevity( T * )
+{
+   return 1000;
+}
+
+
diff --git a/libs/utilspp/singleton/Makefile.am b/libs/utilspp/singleton/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..0488bfec1b67429864f4fac8f0f6bb12fa91a521
--- /dev/null
+++ b/libs/utilspp/singleton/Makefile.am
@@ -0,0 +1,23 @@
+noinst_LTLIBRARIES = libsingleton.la
+
+libsingleton_la_SOURCES = \
+	CreationStatic.hpp CreationStatic.inl \
+	CreationUsingNew.hpp CreationUsingNew.inl \
+	LifetimeDefault.hpp LifetimeDefault.inl \
+	LifetimeLibrary.cpp LifetimeLibrary.hpp LifetimeLibrary.inl \
+	LifetimeWithLongevity.hpp LifetimeWithLongevity.inl \
+	PrivateMembers.cpp PrivateMembers.hpp PrivateMembers.inl \
+	SingletonHolder.hpp SingletonHolder.inl 
+
+
+#pkginclude_HEADERS = \
+#	CreationStatic.hpp CreationStatic.inl \
+#	CreationUsingNew.hpp CreationUsingNew.inl \
+#	LifetimeDefault.hpp LifetimeDefault.inl \
+#	LifetimeLibrary.hpp LifetimeLibrary.inl \
+#	LifetimeWithLongevity.hpp LifetimeWithLongevity.inl \
+#	PrivateMembers.hpp PrivateMembers.inl \
+#	SingletonHolder.hpp SingletonHolder.inl 
+
+#pkgincludedir=$(includedir)/utilspp/singleton
+
diff --git a/libs/utilspp/singleton/PrivateMembers.cpp b/libs/utilspp/singleton/PrivateMembers.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..901c9bcc1de5cca25b5d5d2d7b3c2ee93df7c04b
--- /dev/null
+++ b/libs/utilspp/singleton/PrivateMembers.cpp
@@ -0,0 +1,46 @@
+#include <cstdlib>
+
+#include "PrivateMembers.hpp"
+
+utilspp::PrivateMembers::TrackerArray
+   utilspp::PrivateMembers::mTrackerArray = NULL;
+
+int utilspp::PrivateMembers::mNbElements = 0;
+
+utilspp::PrivateMembers::LifetimeTracker::LifetimeTracker( unsigned int
+      longevity ) 
+: 
+mLongevity( longevity )
+{}
+
+utilspp::PrivateMembers::LifetimeTracker::~LifetimeTracker()
+{}
+
+bool
+utilspp::PrivateMembers::LifetimeTracker::compare( 
+      const LifetimeTracker *l, 
+      const LifetimeTracker *r 
+      )
+{
+   return l->mLongevity < r->mLongevity;
+}
+
+void
+utilspp::PrivateMembers::atExitFunc()
+{
+   assert((mTrackerArray != NULL) && 
+	  (mNbElements > 0));
+
+   //Pick the element at the top of the stack.
+   LifetimeTracker* top =  mTrackerArray[mNbElements - 1];
+
+   //Remove that object off the stack.
+   //Don't check errors-realloc with less memory, cause that can't fail.
+   mTrackerArray = static_cast< 
+     utilspp::PrivateMembers::TrackerArray >(std::realloc(mTrackerArray, 
+							    --mNbElements));
+
+   //Destroy the element.
+   delete top;
+}
+
diff --git a/libs/utilspp/singleton/PrivateMembers.hpp b/libs/utilspp/singleton/PrivateMembers.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..b1fb8cd22e7b9d7356a9e57fa735c1e4f0ff91e8
--- /dev/null
+++ b/libs/utilspp/singleton/PrivateMembers.hpp
@@ -0,0 +1,93 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef PRIVATE_MEMBERS_HPP
+#define PRIVATE_MEMBERS_HPP
+
+#include <cassert>
+
+namespace utilspp
+{
+  namespace PrivateMembers
+  {
+    /**
+     * Helper class for utils::setLongevity
+     */
+    class LifetimeTracker
+    {
+    public:
+      LifetimeTracker( unsigned int longevity );
+      virtual ~LifetimeTracker();
+      static bool compare( 
+			  const LifetimeTracker *l, 
+			  const LifetimeTracker *r
+			  );
+
+    private:
+      unsigned int mLongevity;
+    };
+
+    typedef LifetimeTracker** TrackerArray;
+
+    extern TrackerArray mTrackerArray;
+    extern int mNbElements;
+
+    /**
+     * Helper class for Destroyer
+     */
+    template< typename T >
+    struct Deleter
+    {
+      void deleteObject( T *obj );
+    };
+
+    /**
+     * Concrete lifetime tracker for objects of type T
+     */
+    template< typename T, typename TDestroyer >
+    class ConcreteLifetimeTracker : public LifetimeTracker
+    {
+    public:
+      ConcreteLifetimeTracker(T *obj, unsigned int longevity, TDestroyer d);
+       
+      ~ConcreteLifetimeTracker();
+      
+    private:
+      T* mTracked;
+      TDestroyer mDestroyer;
+    };
+    
+    void atExitFunc();
+    
+    template <class T>
+    struct adapter
+    {
+      void operator()(T*);
+      void (*mFunc)();
+    };
+  };
+};
+
+#include "PrivateMembers.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/PrivateMembers.inl b/libs/utilspp/singleton/PrivateMembers.inl
new file mode 100644
index 0000000000000000000000000000000000000000..8f3609416cd2e78a4995ab0594b62c0a73729237
--- /dev/null
+++ b/libs/utilspp/singleton/PrivateMembers.inl
@@ -0,0 +1,30 @@
+
+template< typename T >
+void
+utilspp::PrivateMembers::Deleter< T >::deleteObject( T *obj )
+{
+   delete obj;
+}
+
+template< typename T, typename TDestroyer >
+utilspp::PrivateMembers::ConcreteLifetimeTracker< T, TDestroyer >::ConcreteLifetimeTracker( 
+      T *obj, unsigned int longevity, TDestroyer d) 
+: LifetimeTracker( longevity )
+, mTracked( obj )
+, mDestroyer( d )
+{}
+
+template< typename T, typename TDestroyer >
+utilspp::PrivateMembers::ConcreteLifetimeTracker< T, TDestroyer >::~ConcreteLifetimeTracker()
+{
+   mDestroyer( mTracked );
+}
+
+
+template < typename T >
+void
+utilspp::PrivateMembers::adapter< T >::operator()(T*) 
+{ 
+   return (*mFunc)(); 
+}
+
diff --git a/libs/utilspp/singleton/SingletonHolder.hpp b/libs/utilspp/singleton/SingletonHolder.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..8a8590a7b2e31666547357ccef12678244a42e40
--- /dev/null
+++ b/libs/utilspp/singleton/SingletonHolder.hpp
@@ -0,0 +1,66 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef SINGLETON_HOLDER_HPP
+#define SINGLETON_HOLDER_HPP
+
+#include <cassert>
+
+#include "CreationUsingNew.hpp"
+#include "LifetimeDefault.hpp"
+#include "LifetimeWithLongevity.hpp"
+#include "../ThreadingSingle.hpp"
+
+namespace utilspp
+{
+  template
+  < class T,
+    template < class > class CreationPolicy = utilspp::CreationUsingNew,
+    template < class > class LifetimePolicy = utilspp::LifetimeDefault,
+    template < class > class ThreadingModel = utilspp::ThreadingSingle >
+  class SingletonHolder
+  {
+  public:
+    //the accessor method.
+    static T& instance();
+    static void makeInstance();
+    static void terminate();
+         
+  protected:
+    //protected to be sure that nobody may create one by himself.
+    SingletonHolder();
+         
+  private:
+    static void destroySingleton();
+         
+  private:
+    typedef typename ThreadingModel< T * >::VolatileType InstanceType;
+    static InstanceType mInstance;
+    static bool mDestroyed;
+  };
+
+};
+
+#include "SingletonHolder.inl"
+
+#endif
diff --git a/libs/utilspp/singleton/SingletonHolder.inl b/libs/utilspp/singleton/SingletonHolder.inl
new file mode 100644
index 0000000000000000000000000000000000000000..84f27bea9feb7ea73475d31fd5903df56b5c72a8
--- /dev/null
+++ b/libs/utilspp/singleton/SingletonHolder.inl
@@ -0,0 +1,126 @@
+/*
+ *    Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (cURLpp), 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.
+ */
+
+#ifndef SINGLETON_HOLDER_INL
+#define SINGLETON_HOLDER_INL
+
+template
+<
+class T,
+template < class > class CreationPolicy,
+template < class > class LifetimePolicy,
+template < class > class ThreadingModel
+>
+T&
+utilspp::SingletonHolder
+<
+T,
+CreationPolicy,
+LifetimePolicy,
+ThreadingModel
+>
+::instance()
+{
+    if ( mInstance == NULL )
+    {
+        makeInstance();
+    }
+
+    return ( *mInstance );
+};
+
+template
+<
+class T,
+template < class > class CreationPolicy,
+template < class > class LifetimePolicy,
+template < class > class ThreadingModel
+>
+void
+utilspp::SingletonHolder
+<
+T,
+CreationPolicy,
+LifetimePolicy,
+ThreadingModel
+>::makeInstance()
+{
+    if ( mInstance == NULL )
+    {
+	typename ThreadingModel< T >::lock guard;
+        (void)guard;
+
+	if ( mInstance == NULL ) {
+            if ( mDestroyed )
+            {
+                LifetimePolicy< T >::onDeadReference();
+                mDestroyed = false;
+            }
+            
+            mInstance = CreationPolicy< T >::create();
+            LifetimePolicy< T >::scheduleDestruction( mInstance, &destroySingleton );
+        }
+    }
+}
+
+template
+<
+class T,
+template < class > class CreationPolicy,
+template < class > class LifetimePolicy,
+template < class > class ThreadingModel
+>
+void
+utilspp::SingletonHolder
+<
+T,
+CreationPolicy,
+LifetimePolicy,
+ThreadingModel
+>
+::destroySingleton()
+{
+    assert( !mDestroyed );
+    CreationPolicy< T >::destroy( mInstance );
+    mInstance = NULL;
+    mDestroyed = true;
+}
+
+template < class T,
+template < class > class C,
+template < class > class L,
+template < class > class M
+>
+typename utilspp::SingletonHolder< T, C, L, M>::InstanceType
+utilspp::SingletonHolder< T, C, L, M >::mInstance;
+
+template
+<
+class T,
+template < class > class C,
+template < class > class L,
+template < class > class M
+>
+bool utilspp::SingletonHolder< T, C, L, M >::mDestroyed;
+
+#endif
diff --git a/m4/Makefile.am b/m4/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..278ccdd862c0b84634df8f203620f6c643606a16
--- /dev/null
+++ b/m4/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST=speex.m4 osip.m4 exosip.m4 ilbc.m4
diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4
new file mode 100644
index 0000000000000000000000000000000000000000..ffc4ef417d37b8737b3c24293b5d4112847384d9
--- /dev/null
+++ b/m4/acx_pthread.m4
@@ -0,0 +1,224 @@
+dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+dnl
+dnl This macro figures out how to build C programs using POSIX
+dnl threads.  It sets the PTHREAD_LIBS output variable to the threads
+dnl library and linker flags, and the PTHREAD_CFLAGS output variable
+dnl to any special C compiler flags that are needed.  (The user can also
+dnl force certain compiler flags/libs to be tested by setting these
+dnl environment variables.)
+dnl
+dnl Also sets PTHREAD_CC to any special C compiler that is needed for
+dnl multi-threaded programs (defaults to the value of CC otherwise).
+dnl (This is necessary on AIX to use the special cc_r compiler alias.)
+dnl
+dnl If you are only building threads programs, you may wish to
+dnl use these variables in your default LIBS, CFLAGS, and CC:
+dnl
+dnl        LIBS="$PTHREAD_LIBS $LIBS"
+dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+dnl        CC="$PTHREAD_CC"
+dnl
+dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
+dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+dnl
+dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
+dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
+dnl to run it if it is not found.  If ACTION-IF-FOUND is not specified,
+dnl the default action will define HAVE_PTHREAD.
+dnl
+dnl Please let the authors know if this macro fails on any platform,
+dnl or if you have any other suggestions or comments.  This macro was
+dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
+dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
+dnl macros posted by AFC to the autoconf macro repository.  We are also
+dnl grateful for the helpful feedback of numerous users.
+dnl
+dnl @version $Id$
+dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+                    [acx_pthread_ok=yes])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        AC_TRY_LINK([#include <pthread.h>],
+                    [int attr=PTHREAD_CREATE_JOINABLE;],
+                    ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
+        if test x"$ok" = xunknown; then
+                AC_TRY_LINK([#include <pthread.h>],
+                            [int attr=PTHREAD_CREATE_UNDETACHED;],
+                            ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+                AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
+                          [Define to the necessary symbol if this constant
+                           uses a non-standard name on your system.])
+        fi
+        AC_MSG_RESULT(${ok})
+        if test x"$ok" = xunknown; then
+                AC_MSG_WARN([we do not know how to create joinable pthreads])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
+                *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+
+])dnl ACX_PTHREAD
diff --git a/m4/exosip.m4 b/m4/exosip.m4
new file mode 100644
index 0000000000000000000000000000000000000000..c074386b0bcf27558e5ccf826d659330ce0c8c97
--- /dev/null
+++ b/m4/exosip.m4
@@ -0,0 +1,70 @@
+AC_DEFUN([LP_SETUP_EXOSIP],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([LP_CHECK_OSIP2])
+
+dnl support for linux-thread or posix thread (pthread.h)
+AC_ARG_ENABLE(pthread,
+[  --enable-pthread        enable support for POSIX threads. (autodetect)],
+enable_pthread=$enableval,enable_pthread="no")
+
+dnl compile with mt support
+if test "x$enable_pthread" = "xyes"; then
+  EXOSIP_CFLAGS="-DHAVE_PTHREAD"
+  EXOSIP_LIBS="-lpthread"
+else
+  ACX_PTHREAD()
+fi
+
+dnl eXosip embeded stuff
+EXOSIP_CFLAGS="$OSIP_CFLAGS -DOSIP_MT -DENABLE_TRACE -DNEW_TIMER -DSM -DMSN_SUPPORT -DUSE_TMP_BUFFER"
+EXOSIP_LIBS="$OSIP_LIBS"
+AC_CHECK_HEADERS(semaphore.h)
+AC_CHECK_HEADERS(sys/sem.h)
+case $target in
+  linux*)
+     EXOSIP_CFLAGS="$EXOSIP_CFLAGS -pedantic"
+     ;;
+  irix*)
+     ;;
+  hpux* | hp-ux*)
+     ;;
+  aix*)
+     ;;
+  osf*)
+     AC_CHECK_LIB(rt,sem_open,[EXOSIP_LIBS="$EXOSIP_LIBS -lrt"])
+     ;;
+  sunos*)
+     ;;
+  darwin*)
+     EXOSIP_CFLAGS="$EXOSIP_CFLAGS -pedantic"
+     ;;
+  *)
+     ;;
+esac
+
+AC_CHECK_LIB(posix4,sem_open,[EXOSIP_LIBS="$EXOSIP_LIBS -lposix4 -mt"])
+AC_CHECK_LIB(nsl,nis_add,[EXOSIP_LIBS="$EXOSIP_LIBS -lnsl"])
+AC_CHECK_LIB(socket,sendto,[EXOSIP_LIBS="$EXOSIP_LIBS -lsocket"])
+AC_CHECK_LIB(rt,clock_gettime,[EXOSIP_LIBS="$EXOSIP_LIBS -lrt"])
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS(ctype.h)
+AC_CHECK_HEADERS(string.h)
+AC_CHECK_HEADERS(strings.h)
+AC_CHECK_HEADERS(stdio.h)
+AC_CHECK_HEADERS(stdlib.h)
+AC_CHECK_HEADERS(unistd.h)
+AC_CHECK_HEADERS(stdarg.h)
+AC_CHECK_HEADERS(varargs.h)
+AC_CHECK_HEADERS(sys/time.h)
+AC_CHECK_HEADERS(assert.h)
+AC_CHECK_HEADERS(signal.h)
+AC_CHECK_HEADERS(sys/signal.h)
+AC_CHECK_HEADERS(malloc.h)
+AC_CHECK_HEADERS(sys/select.h)
+AC_CHECK_HEADERS(sys/types.h)
+AC_CHECK_HEADERS(fcntl.h)
+
+AC_SUBST(EXOSIP_CFLAGS)
+AC_SUBST(EXOSIP_LIBS)
+])
diff --git a/m4/ilbc.m4 b/m4/ilbc.m4
new file mode 100644
index 0000000000000000000000000000000000000000..465f8506d7d740af4b5cbe40ac5b6b47bcea8067
--- /dev/null
+++ b/m4/ilbc.m4
@@ -0,0 +1,33 @@
+AC_DEFUN([LP_CHECK_ILBC],[
+
+AC_ARG_WITH( ilbc,
+      [  --with-ilbc      Set prefix where ilbc headers and libs can be found (ex:/usr, /usr/local, none to disable ilbc support) [default=/usr] ],
+      [ ilbc_prefix=${withval}],[ ilbc_prefix="/usr" ])
+
+if test "$ilbc_prefix" = "none" ; then
+	AC_MSG_NOTICE([iLBC codec support disabled. ])
+else
+	ILBC_CFLAGS=" -I${ilbc_prefix}/include/ilbc"
+	ILBC_LIBS="-L${ilbc_prefix}/lib -lilbc -lm"
+	CPPFLAGS_save=$CPPFLAGS
+	CPPFLAGS=$ILBC_CFLAGS
+	LDFLAGS_save=$LDFLAGS
+	LDFLAGS=$ILBC_LIBS
+	AC_CHECK_HEADERS(iLBC_decode.h,[AC_CHECK_LIB(ilbc,iLBC_decode,ilbc_found=yes,ilbc_found=no)
+	],ilbc_found=no)
+	
+	CPPFLAGS=$CPPFLAGS_save
+	LDFLAGS=$LDFLAGS_save
+	
+	if test "$ilbc_found" = "no" ; then
+		AC_MSG_WARN([Could not find ilbc headers or libs. Please install ilbc package from http://www.linphone.org if you want iLBC codec support in linphone.])
+		ILBC_CFLAGS=
+		ILBC_LIBS=
+	else
+		AC_DEFINE(HAVE_ILBC,1,[Defined when we have ilbc codec lib])
+		AC_SUBST(ILBC_CFLAGS)
+		AC_SUBST(ILBC_LIBS)
+	fi	
+fi
+
+])
diff --git a/m4/osip.m4 b/m4/osip.m4
new file mode 100644
index 0000000000000000000000000000000000000000..6812524d872fcc088906e2c7d1de172902704db6
--- /dev/null
+++ b/m4/osip.m4
@@ -0,0 +1,32 @@
+AC_DEFUN([LP_CHECK_OSIP2],[
+
+AC_ARG_WITH( osip,
+      [  --with-osip      Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr/local] ],
+      [ osip_prefix=${withval}],[ osip_prefix=/usr ])
+AC_SUBST(osip_prefix)
+
+
+OSIP_CFLAGS="-I$osip_prefix/include"
+OSIP_LIBS="-L$osip_prefix/lib"
+
+dnl check osip2 headers
+CPPFLAGS_save=$CPPFLAGS
+CPPFLAGS=$OSIP_CFLAGS
+AC_CHECK_HEADER([osip2/osip.h], ,AC_MSG_ERROR([Could not find osip2 headers !]))
+CPPFLAGS=$CPPFLAGS_save
+
+dnl check for osip2 libs
+LDFLAGS_save=$LDFLAGS
+LDFLAGS=$OSIP_LIBS
+dnl AC_CHECK_LIB adds osipparser2 to LIBS, I don't want that !
+LIBS_save=$LIBS
+AC_CHECK_LIB(osipparser2,osip_message_init, , AC_MSG_ERROR([Could not find osip2 libraries !]))
+LDFLAGS=$LDFLAGS_save
+LIBS=$LIBS_save
+
+OSIP_LIBS="$OSIP_LIBS -losipparser2 -losip2"
+
+AC_SUBST(OSIP_CFLAGS)
+AC_SUBST(OSIP_LIBS)
+
+])
diff --git a/m4/portaudio.m4 b/m4/portaudio.m4
new file mode 100644
index 0000000000000000000000000000000000000000..4aece7a844708571094cf5ba91c65da77b9e0bb8
--- /dev/null
+++ b/m4/portaudio.m4
@@ -0,0 +1,145 @@
+AC_DEFUN([LP_SETUP_PORTAUDIO],[
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+CFLAGS_save=$CFLAGS
+LIBS_save=$LIBS
+CXXFLAGS_save=$CXXFLAGS
+
+AC_ARG_WITH(alsa, 
+            [  --with-alsa (default=yes)],
+            with_alsa=$withval, with_alsa="yes")
+
+AC_ARG_WITH(jack, 
+            [  --with-jack (default=no)],
+            with_jack=$withval, with_jack="no")
+
+AC_ARG_WITH(oss, 
+            [  --with-oss (default=yes)],
+            with_oss=$withval, with_oss="yes")
+
+AC_ARG_WITH(host_os, 
+            [  --with-host_os (no default)],
+            host_os=$withval)
+
+AC_ARG_WITH(winapi,
+            [  --with-winapi ((wmme/directx/asio) default=wmme)],
+            with_winapi=$withval, with_winapi="wmme")
+
+dnl Mac API added for ASIO, can have other api's listed
+AC_ARG_WITH(macapi,
+            [  --with-macapi ((asio/core/sm) default=core)],
+            with_macapi=$withval, with_macapi="core")
+
+AC_ARG_WITH(asiodir,
+            [  --with-asiodir (default=/usr/local/asiosdk2)],
+            with_asiodir=$withval, with_asiodir="/usr/local/asiosdk2")
+
+AC_ARG_WITH(dxdir,
+            [  --with-dxdir (default=/usr/local/dx7sdk)],
+            with_dxdir=$withval, with_dxdir="/usr/local/dx7sdk")
+               
+dnl This must be one of the first tests we do or it will fail...
+AC_C_BIGENDIAN
+
+dnl checks for various host APIs and arguments to configure that
+dnl turn them on or off
+AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
+
+if test x$with_jack = xyes; then
+PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
+fi
+
+dnl sizeof checks: we will need a 16-bit and a 32-bit type
+
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+dnl extra variables
+AC_SUBST(PADLL)
+AC_SUBST(SHARED_FLAGS)
+AC_SUBST(DLL_LIBS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(NASM)
+AC_SUBST(NASMOPT)
+
+
+CFLAGS="$CFLAGS -Wall -pedantic -pipe -fPIC"
+
+if test x$ac_cv_c_bigendian = xyes  ; then
+   CFLAGS="$CFLAGS -DPA_BIG_ENDIAN"
+else
+   CFLAGS="$CFLAGS -DPA_LITTLE_ENDIAN"
+fi
+
+
+case $host in
+  *darwin*)
+	dnl Mac OS X configuration
+
+	CFLAGS="$CFLAGS -DPA_USE_COREAUDIO"
+	compile_with_darwin=yes;
+	LIBS="-framework CoreAudio -framework AudioToolbox";
+        if test x$with_macapi = x"asio"; then
+	    compile_with_asio=yes
+            if test x$with_asiodir = xyes; then
+              ASIODIR="$with_asiodir";
+            else
+              ASIODIR="/usr/local/asiosdk2";
+            fi
+            CFLAGS="$CFLAGS -Ipa_asio -I$ASIDIR/host/mac -I$ASIODIR/common";
+        fi
+	;;
+
+   *)	
+	dnl Unix configuration
+	AC_CHECK_LIB(pthread, pthread_create,,AC_MSG_ERROR([libpthread not found!]))
+
+	if test x$have_alsa = xyes  -a  x$with_alsa != xno  ; then
+		compile_with_alsa=yes
+		LIBS="$LIBS -lasound"
+		DLL_LIBS="$DLL_LIBS -lasound"
+		CFLAGS="$CFLAGS -DPA_USE_ALSA"
+	fi
+	
+	
+	if test x$have_jack = xyes -a x$with_jack != xno ; then
+		compile_with_jack=yes
+		LIBS="$LIBS $JACK_LIBS"
+		DLL_LIBS="$DLL_LIBS $JACK_LIBS"
+		CFLAGS="$CFLAGS $JACK_CFLAGS"
+		CFLAGS="$CFLAGS -DPA_USE_JACK"
+	fi
+
+	if test x$with_oss != xno  ; then
+		compile_with_oss=yes
+		CFLAGS="$CFLAGS -DPA_USE_OSS"
+	fi
+
+	LIBS="$LIBS -lm -lpthread";
+	compile_with_unix=yes
+	CFLAGS="$CFLAGS -DPA_USE_UNIX"
+esac
+
+AM_CONDITIONAL(ENABLE_ASIO, test x$compile_with_asio = xyes)
+AM_CONDITIONAL(ENABLE_UNIX, test x$compile_with_unix = xyes)
+AM_CONDITIONAL(ENABLE_DARWIN, test x$compile_with_darwin = xyes)
+AM_CONDITIONAL(ENABLE_OSS, test x$compile_with_oss = xyes)
+AM_CONDITIONAL(ENABLE_JACK, test x$compile_with_jack = xyes)
+AM_CONDITIONAL(ENABLE_ALSA, test x$compile_with_alsa = xyes)
+	
+PORTAUDIO_CFLAGS=$CFLAGS
+PORTAUDIO_LIBS=$LIBS
+PORTAUDIO_CXXFLAGS=$CXXFLAGS
+	
+CFLAGS=$CFLAGS_save
+LIBS=$LIBS_save
+CXXFLAGS=$CXXFLAGS_save
+
+AC_SUBST(PORTAUDIO_CFLAGS)
+AC_SUBST(PORTAUDIO_CXXFLAGS)
+AC_SUBST(PORTAUDIO_LIBS)
+AC_SUBST(ASIODIR)
+
+])
+
diff --git a/m4/speex.m4 b/m4/speex.m4
new file mode 100644
index 0000000000000000000000000000000000000000..884d5684b2e84dad3ff90fc76a8909586e7d4802
--- /dev/null
+++ b/m4/speex.m4
@@ -0,0 +1,24 @@
+AC_DEFUN([LP_CHECK_SPEEX],[
+dnl only accept speex>=1.1.6 or 1.0.5 (the versions that have speex_encode_int )
+AC_ARG_WITH( speex,
+      [  --with-speex      Set prefix where speex lib can be found (ex:/usr, /usr/local) [default=/usr] ],
+      [ speex_prefix=${withval}],[ speex_prefix="/usr" ])
+
+SPEEX_CFLAGS=" -I${speex_prefix}/include -I${speex_prefix}/include/speex"
+SPEEX_LIBS="-L${speex_prefix}/lib -lspeex -lm"
+CPPFLAGS_save=$CPPFLAGS
+CPPFLAGS=$SPEEX_CFLAGS
+LDFLAGS_save=$LDFLAGS
+LDFLAGS=$SPEEX_LIBS
+AC_CHECK_HEADERS(speex.h,[AC_CHECK_LIB(speex,speex_encode_int,speex_found=yes,speex_found=no)
+],speex_found=no)
+
+if test "$speex_found" = "no" ; then
+AC_MSG_ERROR([Could not find a libspeex version that have the speex_encode_int() function. Please install libspeex=1.0.5 or libspeex>=1.1.6])
+fi
+
+AC_SUBST(SPEEX_CFLAGS)
+AC_SUBST(SPEEX_LIBS)
+CPPFLAGS=$CPPFLAGS_save
+LDFLAGS=$LDFLAGS_save
+])
diff --git a/m4/video.m4 b/m4/video.m4
new file mode 100644
index 0000000000000000000000000000000000000000..534277de1aa080ed1e396ea9280e0f30190e6326
--- /dev/null
+++ b/m4/video.m4
@@ -0,0 +1,85 @@
+AC_DEFUN([LP_CHECK_DEP],[
+	dnl $1=dependency description
+	dnl $2=dependency short name, will be suffixed with _CFLAGS and _LIBS
+	dnl $3=headers's place
+	dnl $4=lib's place
+	dnl $5=header to check
+	dnl $6=lib to check
+	dnl $7=function to check in library
+	
+	NAME=$2
+	dep_headersdir=$3
+	dep_libsdir=$4
+	dep_header=$5
+	dep_lib=$6
+	dep_funclib=$7
+	
+	eval ${NAME}_CFLAGS=\"-I $dep_headersdir \"
+	eval ${NAME}_LIBS=\"-L $dep_libsdir -l$dep_lib\"
+	
+	CPPFLAGS_save=$CPPFLAGS
+	LDFLAGS_save=$LDFLAGS
+	CPPFLAGS="-I $dep_headersdir "
+	LDFLAGS="-L $dep_libsdir "
+	
+	AC_CHECK_HEADERS([$dep_header],[AC_CHECK_LIB([$dep_lib],[$dep_funclib],found=yes,found=no)
+	],found=no)
+	
+	if test "$found" = "yes" ; then
+		eval ${NAME}_found=yes
+		AC_DEFINE([HAVE_${NAME}],1,[Defined when we have found $1])
+		AC_SUBST(${NAME}_CFLAGS)
+		AC_SUBST(${NAME}_LIBS)
+	else
+		eval ${NAME}_found=no
+		eval ${NAME}_CFLAGS=
+		eval ${NAME}_LIBS=
+	fi
+	CPPFLAGS=$CPPFLAGS_save
+	LDFLAGS=$LDFLAGS_save
+	
+])
+
+
+AC_DEFUN([LP_CHECK_VIDEO],[
+
+	dnl conditionnal build of video support
+	AC_ARG_ENABLE(video,
+		  [  --enable-video    Turn on video support compiling: not functionnal for the moment],
+		  [case "${enableval}" in
+			yes) video=true ;;
+			no)  video=false ;;
+			*) AC_MSG_ERROR(bad value ${enableval} for --enable-video) ;;
+		  esac],[video=false])
+		  
+	AC_ARG_WITH( ffmpeg,
+		  [  --with-ffmpeg		Sets the installation prefix of ffmpeg, needed for video support. [default=/usr] ],
+		  [ ffmpegdir=${withval}],[ ffmpegdir=/usr ])
+	
+	AC_ARG_WITH( sdl,
+		  [  --with-sdl		Sets the installation prefix of libSDL, needed for video support. [default=/usr] ],
+		  [ libsdldir=${withval}],[ libsdldir=/usr ])
+	
+	if test "$video" = "true"; then
+		
+		dnl test for ffmpeg presence
+		LP_CHECK_DEP([ffmpeg],[FFMPEG],[${ffmpegdir}/include/ffmpeg],[${ffmpegdir}/lib],[avcodec.h],[avcodec],[avcodec_init])
+		if test "$FFMPEG_found" = "no" ; then
+			AC_MSG_ERROR([Could not find ffmpeg headers and library. This is mandatory for video support])
+		fi
+		
+		LP_CHECK_DEP([SDL],[SDL],[${libsdldir}/include],[${libsdldir}/lib],[SDL/SDL.h],[SDL],[SDL_Init])
+		if test "$SDL_found" = "no" ; then
+			AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support])
+		fi
+	
+		VIDEO_CFLAGS=" $FFMPEG_CFLAGS $SDL_CFLAGS"
+		VIDEO_LIBS=" $FFMPEG_LIBS $SDL_LIBS"
+		
+		AC_DEFINE(VIDEO_ENABLED,1,[Set when video support is enabled])
+		
+	fi
+	
+	AC_SUBST(VIDEO_CFLAGS)
+	AC_SUBST(VIDEO_LIBS)
+])
diff --git a/platform/fedora/sflphoned.spec.in b/platform/fedora/sflphoned.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..4066ea8694887cf837104f19ca5814ba85036dd7
--- /dev/null
+++ b/platform/fedora/sflphoned.spec.in
@@ -0,0 +1,48 @@
+%define name sflphoned
+%define version @RPM_VERSION@
+%define alphatag @RPM_RELEASE@
+Autoreq: 0
+
+Name:		%name
+Summary:	A VoIP daemon with SIP protocol
+Version:	%version
+Release:        1
+#Release:	0.1.%{alphatag}
+License:	GPL
+Group:		System Environment/Daemons
+URL:		http://www.sflphone.org/
+Packager:	Cyrille Béraud <cyrille.beraud@savoirfairelinux.com>
+#Source0:	http://www.sflphone.org/releases/%{name}-%{version}-%{alphatag}.tar.gz
+Source0:	http://www.sflphone.org/releases/%{name}-%{version}.tar.gz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
+Requires: 	commoncpp2 ccrtp libosip2
+BuildRequires:  autoconf
+BuildRequires:  automake
+
+%description
+SFLPhoned is a VoIP daeamon with SIP protocol.
+%prep
+%setup -q
+
+%build
+%configure --disable-zeroconf --prefix=%{_prefix}
+make
+
+%install
+rm -fr %{buildroot}
+
+%makeinstall
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root)
+%{_bindir}/sflphone
+%{_libexecdir}/sflphoned
+%{_datadir}/sflphone/ringtones/*
+
+%changelog
+* Mon Nov 21 2005 Yan Morin <yan.morin@savoirfairelinux.com>
+- Final 0.6.0 version (Release / Source without alphatag)
+
diff --git a/ringtones/Makefile.am b/ringtones/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..8c986445bb9bc653b5216cc56a791f46600de37e
--- /dev/null
+++ b/ringtones/Makefile.am
@@ -0,0 +1,5 @@
+sflphoneringsdir = $(datadir)/sflphone/ringtones
+dist_sflphonerings_DATA = \
+	konga.ul\
+	phone.au\
+	phone2.au
diff --git a/ringtones/konga.ul b/ringtones/konga.ul
new file mode 100644
index 0000000000000000000000000000000000000000..2191150e71526b6cbd1f19a76b0ee0ce955463d5
--- /dev/null
+++ b/ringtones/konga.ul
@@ -0,0 +1,11 @@
+�������������������������������������������������������������������������������������~����������~�������������������~������������������������~~�������������������������������~���}~{|~u}�w~z~z����iu�������k���i�z���r�j��޽�������������������������������
+I�/$�����������������������% $5Ȭ�"��A/hnѡ������������PD? ;�������MH�ů�����������;1!"#.����cLG��Z<%.=ϾO0,,%'/Cཱུ���\7.$"$))+,//58<Xʺ��������������������������������������������qA84446>AA<2//4;>>=6/*'""$*,.+&"!#(++--+++*-.3>QS���nd������������������������������������������f���\D91//.)'*.26BA84.0/5;<41;>BEAOp˼�������qѾ���������Ȼ�����������������������e����XL>B]����OD;36//153/00,)).<GOU:18>N]SNNTVTID<??ELOD:;18=?Z~������J?Lu�����[EW�_Q��Ǿ��NMWx�ֻ�����\EROe���hF<:BD��YOOT_OPOJL��������\2/,087>@GKOF�bFD??=<<B]u��˼�jSj�����û���Ⱦ���������YS��^UGO�ý����ONLMEI�������xLL6/17COYfY���ECh���Ƿ��������T@CL`v�j^�����������Ƹ�����]�Z����RDCKt�kc��������|I>>FO`����nJCCENLGbmWJ>EIWWX[`���L=>:9<=Mr�����¿����̻������LK\���_SGE@GF_��ü����rW`��������Z<77AM����o�`REOkcb�����f@?FJOMKRPN^`e}����YXg�p�������NF:7>FGGDTu���ɾ������e\����������������������vh__\RSE?:9=::=U������{^gi\m]ZjVM]��������������������dNLSloYJGIUR]���������������������unk�ʼ����MJA<;=EMY\JG?<?EC?>@GFMa�������Ľ���NKFIPV^���z������������ne]t��l^dkbUKD>?IR[ZY`ov}�tv�iXU^m�����ÿ��������d\iprX]\XPK??>>===??CJSgho���u^s����y[W_����gVWY[\n��������˾�����YOq���jXUZ����^QHDHIKNdniv�b\a~��YZWX~�������_YW_dfWScz�������������rk\dq�v`]_geo{bVQOLKO_��������j����������������^WSNDCJKMJMSs���TMGHl���������������q]Xl������\WZTKGGJJKLNMPRLNVVOJJORU\���������ſ�����������p�����m]SXXZWNMOX\_e`ZXajcZSOQ_�������kWQKMQOPR_da^Z_m_XOMMRZYZk{���������in���������������xj]ds}yrjd]cdaTTKE>ACGKS[UOO[m���zc\Z_����������������������������z`YMLU[k���sVMFHGHIMPYi|�������o��������������������������jUOLNQOJKLKLR]c]VUSVTW[et�����xhi�������qy������������������؜���407=>LS5J��������U������( ')1�������;$& 03˟�L!#,������.6����-$N�����M.*8ì���0!����:&$'G��������D))7��������K9ϫ����L(&*+8Ӿ����H>6-3H��K:)#%0����r0$#$1��q?&$.=M﫠���?-,+->ƫ�������Ȫ���H/.:Ͷ�������v.-:l�����I-.78I�ƹ���PE7469==61/358Ga���~?/$$+5Xϻ������������YC<=T޼�������ORTu�������Ͽ�����������������]@?J_Ƽ����C:55;99IohdK@FFLYlO9568;;FZ̾���QGDEI߿��þ��f�¾���������������jUM\ʽ�����YOQTR�½���wMIN����Z91..28Q�����U<-.07Q���QB9<>Eh����UJ?9=bµ����<89=�ø�����eOJD\f����h`Uj�ļ���NHJKX�¼���KC87:M����jKBFBLRT����L>?D]���vDB>>BO�Ž���J;78<I�ȿ���tnb��Ⱥ���G>;I忲���������������K<<DL�������NIMbͺ���L40/4Fa�����mD=<<J^t������yRFEN��qKDDO��������UE?F��ú���������������fJA@GV`q�SPY������mYL@61/1>CN\hg���a]_O_��[KIM^�����gIMKK\��Ƚ�������`^lml����ɽ������_HHNl����gOMDE\ndvfn���xWH?=7103EU������cMCDJWZf_bapk|f������gK?=DL�����_=4:=FOYOSQq����ټ�������˼���������ƿ�������X5--5<w�����UG<84873.,'$&(/8@BGA73-*.2?_ķ����SBGU����nH>AL�����������������������ǽ�����������������k������_D1+('(,6?KILG?;;;99:<=><;?ADPa�y^XID>=Lc�½��������ĺ������ey~����������ž����o]PQ[}������tC<78<AQc�p_^u������]J?>:<?CRYZYSOJFGKY]������jbZ]|��������������������������iYRVn�����������iWQLLQSgdz������VLIHM]^SKFFIIOOVV_b\TY^_n���ml`_UOQWp�����������~�����������������{l��������zTQXj������{{`^UMR^YONMLLS_{}kVJJJJN]j����j]NFHIOPSXUTaf~������eSRYc��������gho�����������������������������{VNZc��������pbjhZOPQPTV[[i���dYOOSY_ibh����qm\XX^]^lwx|�}y�����������������mico|��������������m`[^jonq���hYOMOUhwt|ne\^hjn�����kWV_n��ha]\Z^^\^o�������y`bn���������������nnnw���������bYZg�����u\Y^Zcl�����rs���zxmm_[Y[YNLS[^_f]NLQTg���������������p]SPRW]b|�����������������������sg_jj���������px}��ۼ������l�n�n�/0223FA34;?=;<;�÷���ƹ��������������\NNV`}XLA8679;>=<?Ol�����ȿ�������f^Od�Ⱦ��������|ROKE=?Nz����PG=;=?@AIV�����������aRPHHOd�þ������������r^RQ[m����}cYSLMMJJQ_{����ƿ�����zZMPs����������jWNHFFEJLNOMNVXTRNKFFJOZinit�����������}ssz�������������ia]_gmgeho�����������������������e][]l|�vfaYXchyr�mib^__`mehjhin��������tomnu���������oqpz�������w}nnojnwmb``is��������������{njewpp������������|gZY`hbj�����iWWURY[[cfgnwz���{svpivlp������{h`_cfp������ndmjim������yjrn^]bd���lv��������ui^^ft��������ccdgd_a]ce|��z�tu}xx{fxr�~���nyibgrqq������|��������~kilv���|r����{�����susx~�w����}niq����zdnjhcmw�������kd[\_nu��{��le^a`_^\]\^h���������{yqnro��y{����������}mnig������][aeg~~�����vu|�}�v�uqj��xj_]diq_h�����yx�zqd\\^kx�����}v|���vje_\Y[\i��������ln~�������h`j}�������|~o���ysolbicchjnqnhhmpumjw���ym_a\`^a^\fv|xy���������nkbls���������vy���oiuzy�������mi^b{�������tmkq~�������ytv���|mjhjca`dkbfcifcefix�����yxq�|qtw���zxww�������zffnn{�����������������zmorz�����������rhd^`fhijpojlqhed_^[\]\]_``br�������zk_^_f�������������{ypichz�������������{}v�������������}ufgfjkorssyswo`[[]_]]^^cfgt�������uha`agt{���������~uuonp����������������viifhflwxpwqxuwuv�������������������{wv~��yukgeeefed^a__cegu�����{��vnlo{�������xvqr������������vrrww}~wx����������}wwt�~{|���������|oihh{�����unlnty|yrvqqompz���x|oojhegmv���~yyz~�����~~tvp{������������������z}{��������zqnor������{tpphc`bckooqt�������{|yv����������{v|����zrpsrtzvnniiiimpu~������������������������~xpommntqqqkgedhly��|}vkgijpw������������������������}wumlkltv�}��~�}|~����������������������������}uvw{���|�}vnmlklkihjjkkkmv|�����}~�����~~��������������}|���������~xsw}|�~yvuvwx}�����������������}�{���zwnmpifmjlinkn��lrul���swk�l{ll�����mmp��j���������omxvoxtY�_k��jPf�����������_c>S'#
+8�N�	$�����R�������������������E50m&/-F�T�U(&#Ҧ�����������������������P3<�)$*\Z08:C()/+ />*,%$A�鷲��S�i�۬�������������������za/*3<=,!(318Z����������������������������U]UK@/..23))$ !&# %# "%=ͽ��nY]imϴ��������������������·����l9=H<D81-# !#+2.,-)))&"%+1BW�WE_ǯ����������������������������u?:0187?.+)+/24(*((,-,-,.FeZwf>?=Yо���������¹�������������j��LA<==IY�nIo<A9<J<Yd\YHG@AJ����[_S����z�ƻ���\��������OH߾�����_^CE6��{�IbC>UA>@>?�����[LOUU�����r��g������dOK?K����M�lKS>=D����[F;?;?c���\������ZǺ��ٿ������p��ƿ��I�OCS��wN91-@_osGX@:7;=<o���^Sk���������ܷ�����������ÿ��s�����S_�`MCV����WH?7<8.3;EKOOC@CSe���eMUv��ķ������׾�Ŀ��ҽ��|[NMX��Yt\@FB>:;:PFKERg]J<BcVw�����cmlOvo����aMk����LG>>���ʹ��~LM�b\\X^W|XbW`�����TNY��������iWU�`k�����LJ<?^]yKF^[�|^mTUgxf��WTBLPѼ���\��k��r�ͽ����d��������kMWXT`_u���Y_P?J?GN]REB=A?Dl�TJDLGS������������ɾ��������������������SeNFC>?768<BBIJTNOOI<<?EOg������p��������������������lWMHFgWdiYK=<=KTYg�lNLB<?Vv���iPk�Ļ����l�kZ_�ʾ������hZ��^G@EBKe�oWNNwsk�\__[�XYck���������������bUp��������������^OMLBCGORTUMMWNIGDGI[tfNFMx��û������������������miJ??ALH]aI??EMN���iMHX�����i]O]]�u�����_VKMd���PNPg�����ib�����������hO����iTIIJX]aTS\Z\e^Zbino�t`_������i]}���������nd^[f��UIORYa]x�jXSWW[UXhfp������������������x����SRKJPYaeielhd]][NSv���l��������k����`������vhx�z�vd^e^ZVf���bno\_`}db}��������������������njk����dZ_ja^beVUY[OMNOUn����������������������������cvY[Z[d_[YOICFKXyoZQS\Zt��������������������������������zUTSNNONPUSMQX]VPU^OIKMKWs����~��������������������������mz[X^UMIJHHISSLLJKKMOOQZr��������������������������{d[\f�ePKNIHLOOMOMJLOY[]d����~bs��������������������o������ma]ZXX[X\ejZUMMUPTOKMO]inmshbs}�������������������������|���f_WOOIOPOMOP~�ÿ����������������������ƻ����"#&$&&E�6%'%-7Ȫ�����������������ļ��O5'***&+&,0=?5<b�1!4:B13*%$.4;A3*%*6¹�bc����ͽ����������A,,/=�������I;49=D�ǻ���������A2+-5/*)('*'/;<;70.29M[]I?HQL<>O�;����MDB5,*$!"'0>@Ki������μ�������������������������������ŷ��������������Y>:64<CKF5/../42/,(&(*'#"$'/53.(%%',./00/.-.126C�徹��¿�������������������������������������OI=91/.,*)'%#!$%$%&'+-0357877::55=BIKSg��������������������������������������������`[MA@?CA=<<<=EJC>;:7779:==><;@@AAFo����\z������������������xfYQLKISOU_{{ddZUh�vdZNK?Nqol������dMLY\Z������zRNLHLN_ZOHFMO�fONINRVLFIMSy�h`nl_[F?ALYusenxgRik_Zlvkl�������û��Ǿ���������[\[h�������cJKTQMRRy����ucZUURKKP��q_cu_Wk\LJTn�������xUa����ƾ����������������������{�|mqo����zOMR[Rcn�[KFBFMOMLSY`^]][SJIM]op~�����~��ȿ�����_Zd����������s{[c�����������lONMWk�����WTWf�w_^YZTUT[Z|������q]\��������gZIIP^����W^]ZQNNULPY]p�p]VZi���������������������z������������{��zhypy�ma__WUNP[mrz��n^[neSKQW_�b\VNMIGIRTPPJHKPNJJO���������������������������������������_SPS[XUPQU[Z`ik�nm`VYYellf]_`eZZ]Zj��������RNMKLNTVagf^c_n���x_Za_p��������������vjdkkz������tnx�����|��b_m�|e_jeb^VKIIKLMLMU][k�����mjjd��������������zbftrb[]\XYTOORRRONMMPT\g�������������eiq}����������������m�������\S]ir{^WX]tolj`ZVWWVPQ[_\[agai|�����������������}������������{y��������tecXVQPSSV[_YW[_][]jp������w�����zomhss�����veYZTMOTWYY^k{����zj���������������������������fca\VXVSVVVWWYXRZ_YXTWZ[Z\_h���������������������������klsnkc]_binsxjnp��nh``eo�����vjb]XX\bihgoe_c`iqkhdco��������������ux�~�������}z�����{oeklm`]Z[[^bb_b^VTXZX[eb_^u��������uv���������������ykl���������yk^YTX\ky���jc^WXXWZ]]`kyxx�����r�����������������j�y��smm�x���œ���2/L���V:;�������$ 60�����)������
+	
+#ɶ���!
+#�����3ї���f&8�������F<+&6ʷ����0*:���/]���������$"'*:J�Ϭ���TFɬ��?E-'<�������8R�����Q4.&-�������79Ǭ���@+#"/E챞�����������B.=���B8Ȝ�����/9�����7%)<Ȫ����U/*(,=VSH><Vٷ������9>��������^���U:37/-,0���5-,-/,.8O�����>@˲���O������N:B����OEN�ú����X?6/,+3X����Ͻ��[PF޾���GBc�������e.+=W𿭧��D;436=X{SLFC85<JhgN>2((/:�ȱ���X<--;Fmy�������Ŵ��i9/..9Oī����{+*+2F����ϼ��o����LB@58Aį����5)!$3Mȸ���U:.-..03@�����_����hF:-.6N̽����JE?89=\�ļ�n_����������>>N�÷��kLC?GR�������d=>HQsŹ���������ν��k<47Alɹ�����MFEV�����^86=DS������C4<<iİ���O71/<W�������S:>CUƸ������]JCNڷ��J84=n������Y9..9Z�����o<9?EJ_�p���MA;<M���[F88O�º����[I41.2Do����������XL���YOKM������]MQHH^������W[���~iWJFDDHE�������W>5:Qϼ���I?<9Ht�����������jB:/.9W�Ƽ����VG=;AL������ngPc��ȼ�zC>;E�������jSLILKI`�����KHNv���bE=9;F�������A55Fb������M5,*0>�˹����OI[k��lR>;>JvϺ�����^A38=BԼ�����J:<G^�����C?EFGR����rL:>L㾾��VB426;R۽�����ND>Eo����������ſ���O=98=L]�ż����ZXS\oVQRIEFMt�¾���ZB>K^�����L768C_t������GD==??Mt����������\E>?@@D\���������PF>?FLYl^X���������Y@87?L�ž���TLFHR\�����eSMS`�����������wuqJ?:?I��ƾ����O>65?N���l��������x`D=>Bj�¼�����D@CN����TJGMe�����[XPc�������^KJIKO_�������VNMSRP\p��eVMN[{���~_^_SMSi�ļ���tIFM[��������}zml����bUURb�����mYOLOc������m^SOMZZm��zeYf������ZGBFMOZn������f\POKP[����������YSJMf���������OJHN_���������lsaQMUp���������kVPSVgo�������vZSQRVWh������jXTMKOMWo�������|oYTOQX`����������lh^[_k�x�hn����^OMVi�����{�����������SWh���������[VU_�����|VNJLTk��ona\\]i�����{_\]i��������eZZd�����re��������dYSQ\hk}���vigc[NN`�����h[Zc����������������kTOKVic�����lkcNN[cl����es�����zePV_h������oi\`kjo�i�����cP^\WYU]Xodޮ����������+/"2	>6�
	k�����NO����������������������'*'
0$'2<o0(Ī���˶��������8h�������?,|�.l���,-,"(/-'  -̼¼���������������������������y<K^'"%( '(-:J^P������������������������������b:;?1(($! ((#++7G��^�����������������������������Y<6(#"##"$%#&+/0J�Z��������������������������������BJB=.(,+)'% #&&% (/77;A8D�ɾ�������������������e�����]mYG;32GJUJ?:F;U�����������ҿ�������Ű̸�̻���\I<BK���QG7*(32.9EE>E</..?8LX_U=HcNZVHN̻��������������ǻ�����EK@=O;_���JH99?>:8i˽�eO7C�g�Ƽ�l��¾��󹹬�Ž��������QOgf7.=<>[�KE0(*+?�V??GC@N��|�Ŀ��z��ú�����μ����׿��ڿ�����e_XbW�����?@F\YmpQh��wnA;?@C551//<Lp[@H<?Xig��ȶ���Ŀ����Ż�µ���������ɽ�Ͻ���KOQH\N{��I89@@>:CLINBK=C@;BEYh;Hf���x>98G�������ZU�Ľ�ƽ���u�e�o���II?J�whYNN�������������gcQ`���T[������������hICIMzo�[GF=HIIYiSHR^TH227O`����[\]Ou�����������v������YJEON�����YT[ozoOYQ]^��]�����ɺ��ĺ�������������f�WOLA@78473765<;>@B<?<CK<@?>B?[K�ƿ���¸���������ɻ��������������WZKBJ>EKMGCB69<FLFIB;?Dc������~��������RT^Zz�Ⱦ��RKTL\ZkUGCEVOYRVWOVVCGMW����������ü���������������������flTHF@=<;8=@<7988>ENQKCBRa�n�����¼��¾������������]YP]e�[G?@JLGj�I?:AO����y`hw�my]n����]`mݿ���`���Ż�������������Z[NB>ORaNF>78;DED?@HDIKNy�����t���»�����ľ�����þ�������p[INSNLAGDCHNZh[XaTURgwYV[k�����|b����������lYO^g{s\SS[^^XRONPac^YNVMT\dy�q[f��������������ǿ���������y�hubZ^_l_f^cpZMGLKNPWXJGNZY����ve����ykr�����r]������������_��������od����_�ho�����fr�_a[_k`�d\[NMVo��idn�����������zlj�����yw�����l_TQU[jpq_W\TYWYYW[OPX_vsp���pvqj�������������������������kp�����`bcjf`YMONKMT]TLIHSV]YUWez�������������������������~^Z^j��YY_ZY\[_YT[WYXYd\g�����b�������������������fgWg�yndmshh^^]tqm�t`ZZOTT[]PPKVXZclrkj��������������ͥ���ICL����I,&$$&$ܭ�����ZF~��ô�4$ "$'�������-&$)6=ũ�]-))2浤����L('*5������4)06ֽ�����L/ (/N괶��.#%%5è��N*+/A�������C,)):O������j<3G����E. $'7K����bGLHC㻵���JB;00<Ȭ�����YKO�����>58=Qjuí���:,()),:u�̹���EE\ɾ�X1-1;���������>/1Iί����H6<>=qؿ���TF>89BOTM@<>FMb¼����F/%&5O���������������wH;=Rپ�����a?0./9c��]PC>BJ����`��ZFG\���½�f@>K绯����d<867:DȺ������biUA;@UQIBGl�����W?619P��Ǿ���KJNX`�������bMRTz��nKFJV�ž��vJLD?ESs�������]XW��WE=>?Ga��Ǹ���M@>:<ES}������r[m��r\\JFO�Ž���Z?66?W��ƽ��cNB><>Gd����������pXMAFLX�ʿ���]`OF>CMc�������h\NIV|��LHLU�����WTU]n��������VV\WWr��������������L=8<Mg�������]JFHKMS}�]ROXmr�uXblr[Pl�Ǻ���yM;<AL�ľ�����WGAARc�������~O@AOVSHEGRcɽ�����d?<<?Z�ȿ��������j]f����_OMQ\���bSO[��������_C>:<LS_r�������kRQi��WOSy������\WTLMXi�������`XHDDBBJWlw������p\G?BIm�����pgRLZn����������q\J?;?Lz�������dNFELNVW`w����������tPLHMz�¿����ZRORY^������aT[flwwhULHFJ}������XC?HR�������\?:<?O�Ϳ��������iaXHADLa�ƾ�����`@<?BO������XJCGZ`����VOU\[[�����jLHS_�����eLDAHMn�������[[UYWXcmzt���������PD<<>Hl�������`THFKSb������������\QLLh������^IDDKTd������]OJFELW����������~ZLIIFLV��������mKGGJYl������������x[MLMVk�����|eSMO\m������of^[[\d�����������_NFIL[u�������VEAAGQVem�������jURNLOT_��������\QPTm������zmlj�����o��������mcVOIHN[�������gROKIMV������������aVVYVj�������^OHISg��������o]V[lkccfkm������ZTNOYj�������r[TQVZo���������vvf]PMQWk������i[POQUZg�������xlmmgfadt���������[TOT^o��������c`_[Zj����������kZTUV_h�������mXRPS^c�������|ohc``_i���������}ia[Z_l�������whj__^_djw��������ga[_v����������}no�����������oh^\]]]_x�����wcUOMOUan������|�utsnfj����������g^[[e���������kdbejt|������qlfb^_dmnhn������d[Z^y������������wz{jd^^m������i^_^TWcr������{s~viihf�����������tnfp��������m^da�Ƶ������������������������f�m���



!T�n.*'.�����������������������/*"+,%')/B��<&P���- *8;P������������C50)""I��������ļ�������������B2*%)F������g���6)(7iU>-'+-( &-/I�����N>+% $&)%&&)+.:ر��������������������������������������������[<-()*)-47*!#&/63*%!$!!! #'4Enǿ���ʹ�����������������������������������������_�sK=,% #""!!(-9HU_NKXWVKMZǰ�����������������������������������������ʿ�����cI::40///+(&""(/250***+-../3364303/.39743.1:=Wt~�����~HS��������������������������������������eGB@ER��QY^V^NQLWSkw_O\REFF:1102029:<=FUUID@=<>>CYXw����\MT�����Ȼ���������������Ƚ�����¹������������Ļ�Ǿ��|S:658>CDHEGMG==KPONMTx������hA95467<>Ar����������Ż��������Ǽ���TL`����Ž�������WKLQX~����nKFJKMGCKMHJACUnb\TY^�VE<;98AAPf����������ǽ������cIIi����~TNMMW��ǿ��������������h[M>=>Nx����lpVQFKYVZ����m]JGECA?DBACPYk�����\OQg}�������ZKC>CMPUYedw��ƽ������u_r��Ͻ������d^u��������aUNPKEC@>>><99?\���w_f_PSSXYbr�b_���������������������cYRWowdPNSj|���������������������r��~������XOKECAFEOSQLE>=CBDDBCLNbj������������YNKKTZbr�u�������������s``����|��f\MEDJMWd`^oyo�����q]VZci����ƿ������^XQ^kn^RRPPNLFFJIA??@??HL\a�����v�����m[_n����e]��������������������go|��sWOR^j����ngZVOSYXTRVTMMTZ\YOOMU\lw����t_TV^uf_ip�����������������oyt��v�zt��dUTONWb��������v�����������������lWXOJJNNONPYccfWJGGKp������������xuwcYY[p����wc[`VOSSU[]\acee[^_\VXXW]_ik���������������������jj����dX]efi]SPQR\e`\ZZ_^YUPS[u������r^SROQVVXX]][[\nzkf[Z\]b`r����������������������������^XZ^bkolhn{�|eYWNEDEFJQ_Z[\p}���vh``_���������������}whq���������zg^USZh�����xn_RURQUW[jv��������ln����������������������yrn]VTUSROKLMNU]hpwg\\^ZZkv�t��o~ku�uz���ϯ���U4),O@��*
���������ȱ����Z6�������+���$5������%!�����
7�����m.'2��������f!D��������"@��������8-�����O$$Qâ���^:1,(9���K)9����8  `��R( *CB�����]!*E��������˪����0!(M���������/"*=�����V&%(+E��8,$")+'"  %)3L����W!
2��������¼��x��N+%*;��������K.+4O�������Ȳ����������Ⱦ�����R-,<ʩ����o(4���[@;-+,&(*))5^�����:'# 'Wǹ�����HO�ʺ��������ý�������ű�������YE8:Zǽ�����]>:8?>1%! %*7A|���5&%,38>?NYD=<Q��QAH35Uƨ�����<42B���������O>98Jժ���������VJ8/:?SŶ����:=1,&(9J�ɿ���K?80,2GWZ8/5C��^g:.244>��Ž���n?JFCMZɼ������������?3-?嶫�������x[YaU����ODLS^UK>GZVA=L]�����?%+@�ӻ���M.+),=H[\�ν���D::EKH88?Kȯ�������922=λ����������bVt˽���@=@G���D=>a�Ϳ���eN<.&$&-:?Uo�̾��zSFFUzL:8>kȿ���vB=?9=cܼ��������[MYLIO^��ҹ������?/0:I̽���WC97>x��������bOE>4,)*8BT�n�»�E,&#).4CXZIHFGK��M������λ�������������������KBBM�����H825K������7,())*7;BB:-$"6������T;;=<760+%$)*8Z�������CF�մ���������ɽ��������������������̼����I/,*+.3CM��[>/+**/57>>92.035:>A</'!"-6dȽ���qgLCJZw̿�ʿ������������¯��������Ź��������I;:78=]�����nr��T>0,('$'+18DIR|G3'"!#'-:>KI=<If������VE=;?R��ÿ����ʾ���������������������������]JNX��ĺ����`<70069:<<APUKGA<6/.+*++/2:Cr��mA4//4<SYRI?>AADOo�þ����������������ķ�������������������������zG?<958DU���`D4.,-279::;??;941/1;943568>Vt��L><;>Nzʽ���������������������������ǿ���������^NLSTo�����{YMMRSH?;6788?HHDFB<7/-04<EYZ`m[WKEKKDDLVV]y���������������������������������������������������x[IC@AGS^t�]WZPNMFE@=;;<;??DKNHC>;8:=FKMXZj����xo��������������������ǻ������������������������gUUW[cz����iWB=98=DECBC<;@EACEEDDFFMMYmt}xufZXZ\TOZy������k���¿���������������XR_����������ys������zZ]acZPOHDA?DHQ]�Ŵ�L�OsX���x�.))'')3,(*23///Qʰ���Ϸ���������������TU�}����@62211666=N��º���������U@?>B�Ƶ��������d=<;80.7E_���V>81/339:BLf^Vl���������o_f�˻�������Ǿ������jXVb�������]M>=96;>EJUk�˿�������L?@XԾ�����m_^RD><AHLJEB?>BDA@=<<<AHU^��������ʿ���������������������^SNNU]lbef�zjp����lKEHOXl������v[GCFJZ����}_SMNWSUPNIHHMU^_USRTY���������eUQh��Ŀ������s[ju������xn}���}ie_NLLOSUdbgi_gv�������}]\t�������k\_^gh`RMFJKKOXw����YJJFGKJQR\b��������������������������������lPMNPY|�����o_VNEDIJes�cgo���lUSWZUONMWjq���fTQNNPOPOY[}����m�~���������������������������ZRTp�������^TNNMJLMl��������]KKJMYgv����pibYb�~r�����doz����yzys�gUOWa�����k]TWcjkj���������������������v�t�y}s�����]QMKKOv���n\W\ab�s�����ls��ffo���o��{_UMMXaZg�����ierg_VW_g���������iiimuuuoe][Zl��������_`fl����e^NMT]ecfk�tj[XR_{�d`don����|he^[\aejr�������\WOSMU]i������ukkccpup^ZVfs���������|����tdfjh�������}gZ_l������e^_d��������p]YXZjlx���}e[XY\XY^r����ww���ylijfppq����������������g][bu�������}����������l_[Zduz������lc^YTRORY_go�m_bi_dc\[VUY`~�ohfo���������nfgv�����������������kbdmc^f��������}kfdh������������odY\aj|������h[QNQX__``^cc]`m������f\XZ^n}�����uwx�z{}���������������������ld^^as��������mafx{���������������ullhghhge\ZTPOPOOOOPT\_j������komkfi����������}~���������zvzx}����������x�������}z~y�yxqymmop|��}vc_\`fikkc^YWWZbiln����nbcjlxx��|{zvhim�����������������������������������������������~oibabr������wf`YWUTY\ejcbceifcbbgmqsmt�����|{�{�������xpmo{��������������������������������wrsyrvowz}tomhf`]YXY\binjgc^[XY^bu������pjeekw��������~�|{tzurq}��������zvm{����������������������������lfijprqorulf\[YZ[]_cmrnmdeadeghnjpw��������������������������������ynnuz����snmnty��������������������yvqmhfdaa_bghllkiljefinw�{xtztoy{����������������������|�����������yzou�y������n�Y[Tgfy���՜�����	�����
���-*���
+	
+o�����!5�����������������ȿ�?!0!+A!"'$(7"#Ϣ�������������A,_Ϋ���������NR��3!6U�(  #7Z6@�������ſ����������������������/*1>)"$*&$&%-::gϺ��������������������������I4%$&(#$%& (.?CE::�����������������������������VCA0,2451,-#%  "&%)1*-=F��T=/3߲�������������������������d��eIJBA<//$" $"))-0+)!!.>;LBFWHV�������������������������zy�i=:/3+)7:<:?1313:49FUR=9:49G�ŷ�̼�����������kw��ɭ���W;.4I?GK��MND:3EA9]5G=7ceZUXH����g�ij�����������������W^WPCoI@4(3/.342/SQL\;807BV����B׾������������������������Ke_EHB�?8*!#,2/$-&(*,,+6<A52/7eź�����������������������������_VZ<1,,/023.,,-/,+'('&$#"%.>�ǹ������˯���������������������sP�X7CH:;>7-+&,'*,2<?;/0??DANx}������ƻ����λ�������D���]oa==AH�����];7//-1:Fb�}RGS������ɿ��������Ƽ���n����e^�\_O@A=>CIDE>1.,11C�`\OBDO]���������yj���������Ƽ�������WLXNK^OOIM?60,--4=KLNEIJLSNU]Qz���ɾ�����ÿþ������������oeO_NW]SRE;533266<IZ��MFDEJ?KORVQjLkú�������������nV�jx����dOHfPTXZC@;8JLNVZWHK@:Ie���eKLN�Ϳ��������ǿ���I<JQ��Ÿ��UDLEKO[B>=@TW`����}cHGFZ~���������������������Tb��_q�����b]MA@CEFBBEJKFKVQ|����YEPU�������Ⱥ������ghX�������VKHHDE?;24=BK��_>:>E���������������dXSf�ɴ���UJKR�ÿ��VQ��������SXSEE[l�l[KCEFOT_MNYY�}_�������{������������������}ok^����LGJHIBHTROan������[SVi\Xc������������\m������UOOKLRQLVZ[]c|ex�e[KGIG]m��������i]���o��k�������r�cMNdnabdvfg����u|n�c`^g^an��kbo}j�����x�����aXUZSX|�������uq����i]n�������eUo���h��������c^XKILU^afiPLDCN[�_RYj����������������������������``gh���t^aZXNTLGE>?EHV\f��~VROO]�lhu|�����������������������wm�`nq_g_\KKKDEHJEBDEQ_jmc^yt�������Ͽ������������������ceo�_MMKIGMMLIKKIMOSNLQZ_m��f�������������������޿ʹ�����������������������������"+��-*.+Jʦ���������������������/%+,*$#*4���( ('$ (9i���-($*=ENΧ�����������EBK9,  &>������|nlѿ������������e�?<J˿��cO?:7;2/*($(7I��E3+(# '<�и����V;3)" ,/38I[`[\Y�Ƿ�����������������ò��������������������������;.*+-9O���T8,+,-0/-)##!#+1.&""')(*+*,+++,/>Kݻ�����������������������������������������n?9473553*#!&*+**,-.45504:>=>Guɽ������������������������������������������ebJNTWUMA846=FKLF=3-)'$$'),*,+)''*4?FI?HSi���������������������ſ����������Ƚ�����k_OJ>8>M]�dO@@C??FRVW^B:9:?IS_�_K;69=M\_�����OUMRY��������I=9<GMRY�v[Qn��t�cYOFIS��Ⱦ����������������������o]��bY\[SKI??GPOLGD?A?:5225876:??;;8317?NX\n�����˺�������������������������������������PC?>AAJKK?=968>>?@HM[dcgYH:97:@CW�����tj_^l^������������������������»���������;�����fH@@FMLKIDB??>AEXg{fp_QGCCKPSWSW^UI=99<Lb������eNMNck������_^bhf`_�vee^g��ɾ���������������mgl�����������������[MGIOOYqbb^^dWI?ACJNMMONMME@?<:6558>??H_���������������������������������������k]fmjZMIGGDDKNOYYb[Y[VVZOIHHKLGC@@FMPk�����NJGBCDJL]nfdb]W^WLLRZ���������¾�������ln�����nw~�c~������|gWOOR__YVXQLLE?BEJNYWTPLIJMN^akemo{������Ƽ�������hjwvk}|��jRNNONKKJKOQv��������������|o�����eVQOQ_t��������������_RNSSVTNJKMOQRUVSSORQUZfaWSOLMR_}�����������������������������������������fNJHHIKLLJFFFA@BHPX����aUUcf������������������j`ooihi~�����o_Yk�����������������p�������~icaWUX^ZZ^^ZYSNLMLHDFIKRU]^s����v�������������������k`[[q�������f]\Y[f��������������ye_ZZbiimifd^_]]a^YX[_mtg_]_q��������~sm{��������������lbimgd^]\]kmc[WSKILNOYbowqv�����������������������������������{qc\WQNOW[k}�~^TMIGGIKOSX^bffrv���m��������������������������z_^ZY\YVY^\bginj_YWZYYa^ji�oin\]XP�ngd[j����������������ƒ���7..rJ�{:ŗ������A:L:=��F*�������#
+%���(2�����[
+[�����=,�������"������	쐑��
̔����R(
#������N(1����F$6ī���,'-:L������-&*&,Ǩ����:A�������, (8J�>J�����/+- ,Xߪ����ƻ���R,!.�������5+������%!/E������<%&-I[?2/>W{�������$	�����������WU��9"&>������1"ޯ��P5+:m�������r:8O�ĸ���;+,?������m$)8������S74HL/#%=庿��������6))D��������S@FY����M?N]>../3EUrB60>_����J8?DBG\��̶����KIJN���J953<Fgҭ����>>/'(3E������i��Ź�dD-,1]������=#%8���b,##-��������a�\H:$%(-C֫����b;,&&<{�������MTI>Uľ�A5=Q�����Q5/5<ϳ�����t7268<D{�;��ȹ�����;)!#,=Ư�����A;58>AI{��~B>Iz���IMm��Y�mŲ���X5'*5V��������?376@Ln�ĺ����N4,;?KAD_�θ�������2+&)>W������nv[H?@@̷��J4/4A˵��s;4>H��ɺ���`3+(1=IYʿ������SHReJ3-/Eɯ����P84//:Iں�����EA:773/6L��ʵ����dE=+)8ؾ�����U>77?Lb�˿������];/$#->n������R=0.68@Ib��������a_�VH@9<Nɲ����J:;<Brf������K?BU����TG:7:Kĵ����R/,2>q�������.'%(5K϶�����MSJ>=?40/3E߷������N,&).=b������>48O|ž��E<Geoc�����T7/6?������V5/02?rǼ����w_IE>;I`n�t�ÿ�����O1)(-6cų�����T>505Bs��{Z^e������iQ<:Gw�����m;804;Eʽ����G<7558D|������ɿ��P>85/2<�˸�����=527?I����_AAS]ɻ����F?9<?Ea������nOW������qRKMOZk������������V@457:Fh������M6/.0:?am��������aSMBC@?FN׷����fF;<Hd�����_IKJb�����dcj������{VD96<U�������J;977BZƿ����zc_~�lYFA@>L�ƻ����Q?79?X��������dWJQx�m_U[Yo�����G?==JS�Ĺ�����E<9?E_�������i`e���TKQWjp������ZNJKW^l����iVMO`�����TQLFRm�����rH>>FP��������\Y[SMZ�����������_KKMOUdm�˿���]GBCQ[����������hTKDBFZ��������tZFCDIf��������oOLHHNVu�������x[MEFPn��������l\TX�����������n]XW_]b_m�������M@??CJb������dituj\ON^���������SMDBLg������_^UY\bw����zlj_Z]ahnw���]Wi�����sNR_����������������rXHDIRl�����q^SCCKVf����nw���tf\ZUYiy��������ePTUVay�����q�q\SZQMRYo������md^]SNs�������nT[_N^n��ܟ�����	�����짶�>[!�
+m�����&������������������ܬ��?:)K�! 'BE/7F+*�׺��ղ������^43CXױ�������S*'G�F+8BAʼ�^!'' 2иж�������������������������������~=��<3&( #,(%),2>պ�������������������������JMU����pJ>;><50+-)%+&1C}ƻ��|��Ȳ���������������������p�N�L=30401.(& #5>8?A98>ݫ�����������������������������m�QOaRn60('""%().+(#'3CFK=6:48H亭���ȿ������������g�L79=9?62'%""-76.3*/-0A;Naȿ���������������������������������lBET;;:<3-.-'!&#$.(+)'+(++++=OMQI?>JX]���������ź����]Z[IK��bK3LIDMG;8��ɺooF�\��Ŀ�ɮ���������������������Ľ�}=?@5AQC//()&##)+,6;?F;4=K�϶�������������������������ſ�SVlC85=G<:1./2/53//08:20,/;o�Ĺ�����ϼ���������������ȸ��dhOA:I?/41(,,-+,,61;9>FD:4:�fis��ź��������������������Xʽ����X?::HFQNG799083=:JLPG:69@LLOJ>AOWGF[Lr�����~fQG}Կ����������������cR�ھ������������ο��XMAf���¿���OqSOWYc�dbSMH<A7:AD9:2.02C]��RGFAJTZ��q��������������̼�������������W�g����ID><<@FO�����ZLGCMSk���_cHM��Ŀ������Zi�m�hUq`\�xO@=;:KFNGH>845<CMPO><<8:DVm���g��Ļ�����������»�������Ž��o]�z���hQECWM[QVPKMJ@D?BW~���f_ORaTunVUPOb����X]i�rbh����v~ZKORLLGIMOWMMWb�����oS��Ǿ�����ü���������������R@=<>E^L?:8>CDa�I=8>J����oMKOf|�ih��\PNZfڿ���Zam�Ƽ���g\�����������TJcm�rVUMHLVVVMNgs��t����������������������������jal�{dI>@CIELXQEEGBKIKJGGKY���n|������������ͽ�����o������������������eSZSdg���_TXYhVPY^V[ql]^�����YQWPKITYQX\�rff��^Y\cye^ee_o���yhv�������g�������}���������������������������^S����nrk`hh�fUKLNJNOV[Z\UHHC@JZ�XOY\u�������tir������������������������j`lYXNHHJNJObd|�����b[X^�����������������~����������od__TTNOPROFHJGHOWNKKFMY[\Y]����������������������������v]^n��]XSNQUZ\SQPMMLMNNSlvz�iQYTg����������������h^Y^{����ggnf_`�d����B9>[Q�S<(!#%���������������i&%%&/�������)  $2:ϭ�6"*4ǭ����2'/�����}-#-2ί������9&&+:[�����@%%'>����E().9�������?$!%,A˭�����90O����M3#%-.Dϴ�������]ٳ����I95)*4������I:8<վ��\9,/7>hQȲ���P,+,,3P˺�����zeָ���<./:V��������.&(4v����Y:.066L�����]J=9;Dh��[GMV{߹�����C0$&6M�����������bT_vV9/0>V¹����M=/,.5aƼ��VBK�ñ������w|���ø���C@Wθ�����Q:.,,-9V������WJOB529IMF@G񴬩���F;7<��Ŀ����OMNXg����p�~_LHJMNSULDEW�����]HIFCJf��ɾ���������vLB?BKY��ĺ���K<:68>DLXg\m�aOFNVkWGI<:B^½���[B9:Jy��������SIA?FVƾ��������^LE<AIU������OVKA;;IZ��������mWNY���fV`������UWbn�������oUADGAACP_f�h��������eD:6>Hl̾������]TT_c����������������g��Ǿ����?866C]�������H>;<HJZ^������K@@IUXHDMZ�ƺ�����xC>=Dl����������oWSU����nLHIR���s^Wl���������SC>>HY^���¼����OQ_�kNJKe�����xVMJA@KT��þ��~XO@???BIc���������|XBAN]�����lYMGNYat��������ZK?:68Kd��������TLGOQ]h������������zXJEKV������WMIGIMN\�����VOV^inpaRNKIT�������iLEOp�������[>::=Nn�»���xrh[ONI?::ANz������jN;9=BO�������LGKV�����kbw��t�����}NJUe������MDBDJU�������aVNRON[cjll��������YC<;<I^�ƿ����[MDCEKT_f^��������b\LHHT������XGDEMXi������o\VNKNa�����������_MHFDIU���Ŀ���XJBCGL_����{��������YLKIPh������kUONWs�������]ZTUY`v����������\NFGKQl�������ZK@?FXh����������^WNJNO_{�������]KGIWl���u_]XWU[]ajhfq������{xi_QLLOo�������zXUMKS^������������[TSRO\�������XHBDM^��������~gYZtxgm���������YSMNZi�������lTNJKOXo��������lneYLKO\}�������i]XUZ\s��������olked^]jt~������nXJGIM[p������hVWROQ_����������m_VV[av��������]ROR\f�������lc_\\][cq��������wd]XZ`l��������qnbddgou���������o[UXf���������k_Y[hk��{������o^iachw�������pmhfghmx�������ukihimnv��������oifglp~�������~ukhilw���������~xtont}������
\ No newline at end of file
diff --git a/ringtones/phone.au b/ringtones/phone.au
new file mode 100644
index 0000000000000000000000000000000000000000..22be69bf25fc15d196c5e72ce1d6633d76580e98
Binary files /dev/null and b/ringtones/phone.au differ
diff --git a/ringtones/phone2.au b/ringtones/phone2.au
new file mode 100644
index 0000000000000000000000000000000000000000..42cb62bb8553af8a9a7b61335b4fea7865a6b344
Binary files /dev/null and b/ringtones/phone2.au differ
diff --git a/sflphone.spec.in b/sflphone.spec.in
new file mode 100644
index 0000000000000000000000000000000000000000..acd9ce12bea2b7bea87dc17d529f577d02dd8142
--- /dev/null
+++ b/sflphone.spec.in
@@ -0,0 +1,38 @@
+%define name sflphoned
+%define version 0.6
+%define release 1
+%define prefix /usr
+Autoreq: 0
+
+Name:		%name
+Summary:	A VoIP daemon with SIP protocol
+Version:	%version
+Release:	%release
+License:	GPL
+Group:		Networking/Utilities
+URL:		http://www.sflphone.org/
+Packager:	Cyrille Béraud <cyrille.beraud@savoirfairelinux.com>
+Source:		http://www.sflphone.org/releases/sflphone-0.5.tar.gz
+BuildRoot:	/tmp/sflphone-%{version}-%{release}
+
+%description
+SFLPhoned is a VoIP daemon with SIP protocol.
+%prep
+%setup
+CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix %{prefix}
+
+%build
+make
+
+%install
+make DESTDIR=$RPM_BUILD_ROOT install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-, root, root)
+%{prefix}/bin/sflphoned
+%dir %{prefix}/share/sflphone/ringtones
+%{prefix}/share/sflphone/ringtones/*
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..73dd84a812871ffe005392c59c87bd2149fac5ec
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,41 @@
+libexec_PROGRAMS = sflphoned
+bin_SCRIPTS = sflphone
+
+if USE_ZEROCONF
+ZEROCONFDIR = zeroconf
+ZEROCONFLIB = zeroconf/libzeroconf.la
+ZEROCONFFLAGS = -DUSE_ZEROCONF
+else
+ZEROCONFDIR =
+ZEROCONFLIB =
+ZEROCONFFLAGS =  
+endif
+
+SUBDIRS = audio config gui $(ZEROCONFDIR)
+
+sflphoned_SOURCES = call.cpp 	eventthread.cpp 	main.cpp 	sipvoiplink.cpp 	voIPLink.cpp \
+		sipcall.cpp 	managerimpl.cpp	\
+		observer.cpp
+
+sflphoned_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\" $(ZEROCONFFLAGS)
+
+#sflphoned_LDFLAGS = -static
+sflphoned_LDADD =  ./libsflphone.la $(SFLPHONE_LIBS) $(ZEROCONFLIB) $(LIB_DNSSD)
+#KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs -I$(srcdir)/audio/pacpp/include  $(libccext2_CFLAGS) $(libccgnu2_CFLAGS) $(portaudio_CFLAGS) -I$(top_srcdir)/libs/portaudio/pa_common
+
+#libsflphone_la_LDFLAGS= -version-info 0:1:0
+libsflphone_la_LIBADD = \
+	$(top_builddir)/libs/eXosip2/libeXosip2.la \
+	$(top_builddir)/libs/portaudio/libportaudio.la \
+	$(top_builddir)/libs/stund/libstun.la \
+	$(top_builddir)/libs/utilspp/libutilspp.la \
+	./audio/libaudio.la \
+	./gui/libguiframework.la \
+	./config/libconfig.la 
+
+libsflphone_la_SOURCES =
+
+noinst_LTLIBRARIES = libsflphone.la
+noinst_HEADERS = managerimpl.h manager.h global.h observer.h eventthread.h sipvoiplink.h user_cfg.h \
+                 call.h voIPLink.h sipcall.h
diff --git a/src/audio/CodecSpeex.cpp b/src/audio/CodecSpeex.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c6f6547ae46aecc2d6811b0a506d731b3b24723d
--- /dev/null
+++ b/src/audio/CodecSpeex.cpp
@@ -0,0 +1,126 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Jerome Oufella <jerome.oufella@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "CodecSpeex.h"
+
+CodecSpeex::CodecSpeex(int payload)
+ : AudioCodec(payload, "speex")
+{
+  _clockRate = 8000;
+  _channel = 1;
+  initSpeex();
+}
+
+void
+CodecSpeex::initSpeex() {
+  if (_clockRate < 16000 ) {
+    _speexModePtr = &speex_nb_mode;
+  } else if (_clockRate < 32000) {
+    _speexModePtr = &speex_wb_mode;
+  } else {
+    _speexModePtr = &speex_uwb_mode;
+  }
+
+  speex_bits_init(&_speex_dec_bits);
+  _speex_dec_state = speex_decoder_init(_speexModePtr);
+
+  speex_bits_init(&_speex_enc_bits);
+  _speex_enc_state = speex_encoder_init(_speexModePtr);
+
+  speex_decoder_ctl(_speex_dec_state, SPEEX_GET_FRAME_SIZE, &_speex_frame_size); 
+}
+
+CodecSpeex::~CodecSpeex() 
+{
+  terminateSpeex();
+}
+
+void
+CodecSpeex::terminateSpeex() {
+  speex_bits_destroy(&_speex_dec_bits);
+  speex_decoder_destroy(_speex_dec_state);
+  _speex_dec_state = 0;
+
+  speex_bits_destroy(&_speex_enc_bits);
+  speex_encoder_destroy(_speex_enc_state);
+  _speex_enc_state = 0;
+}
+
+int
+CodecSpeex::codecDecode (short *dst, unsigned char *src, unsigned int size) 
+{
+  // void *enh; speex_decoder_ctl(dec_state, SPEEX_SET_ENH, &enh); 
+  // decoding
+  speex_bits_read_from(&_speex_dec_bits, (char*)src, size);
+  int return_status = speex_decode_int(_speex_dec_state, &_speex_dec_bits, dst); 
+  //  0 = no error
+  // -1 = end of stream
+  // -2 = other
+
+  return _speex_frame_size; 
+}
+
+int
+CodecSpeex::codecEncode (unsigned char *dst, short *src, unsigned int size) 
+{
+  speex_bits_reset(&_speex_enc_bits);
+  speex_encoder_ctl(_speex_enc_state,SPEEX_SET_SAMPLING_RATE,&_clockRate);
+
+  speex_encode_int(_speex_enc_state, src, &_speex_enc_bits);
+  int nbBytes = speex_bits_write(&_speex_enc_bits, (char*)dst, size); 
+  return nbBytes;
+}
+
+
+/*
+ * Speex example
+ * Test INT16 encoding to speex
+ * Copyrigth (C) 2005 Yan Morin <yan.morin@savoirfairelinux.com>
+ * Start: 2005-11-24
+ */
+
+/*
+Test (without AudioCodec):
+g++ -o CodecSpeex CodecSpeex.cpp -lspeex -lstdc++
+#include <cstdio>
+int main(void) {
+  CodecSpeex c(110);
+  int size = c.getFrameSize();
+
+  short* in = new short[size];
+  unsigned char* out = new unsigned char[size];
+
+  for (int i=0; i<size; i++) {in[i] = 0;}
+  for (int i=0; i<100; i++) { in[i] = 5000; }
+
+  int compSize = c.codecEncode(out, in, size);
+  for (int i=0; i<compSize; i++) { printf("%5d ", out[i]); }
+  printf("\nSize: %d\n", compSize);
+
+  for (int i=162; i<size; i++) { in[i] = 1000; }
+  compSize = c.codecDecode(in, out, compSize);
+  for (int i=0; i<size; i++) { printf("%5d ", in[i]); }
+
+  delete [] in;
+  delete [] out;
+
+  return 0;
+}
+*/
diff --git a/src/audio/CodecSpeex.h b/src/audio/CodecSpeex.h
new file mode 100644
index 0000000000000000000000000000000000000000..4033a692cd5c9da9deefd1ae24c48052cfdd5954
--- /dev/null
+++ b/src/audio/CodecSpeex.h
@@ -0,0 +1,51 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CODEC_SPEEX_H_
+#define __CODEC_SPEEX_H_
+
+#include "audiocodec.h"
+#include <speex/speex.h>
+
+class CodecSpeex : public AudioCodec
+{
+public:
+  CodecSpeex(int payload);
+  ~CodecSpeex();
+  int codecDecode(short *, unsigned char *, unsigned int);
+  int codecEncode(unsigned char *, short *, unsigned int);
+
+  // only for speex
+  int getFrameSize() { return _speex_frame_size; }
+
+private:
+  unsigned int _clockRate;
+  unsigned int _channel;
+
+  void initSpeex();
+  void terminateSpeex();
+  SpeexMode* _speexModePtr;
+  SpeexBits  _speex_dec_bits;
+  SpeexBits  _speex_enc_bits;
+  void *_speex_dec_state;
+  void *_speex_enc_state;
+  int _speex_frame_size;
+};
+
+#endif // __CODEC_SPEEX_H_
+
diff --git a/src/audio/Makefile.am b/src/audio/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..2f1b897b57652988bb27fc5f49ec42f38c913920
--- /dev/null
+++ b/src/audio/Makefile.am
@@ -0,0 +1,37 @@
+SUBDIRS = gsm pacpp
+
+noinst_LTLIBRARIES = libaudio.la
+
+if USE_SPEEX
+SPEEX_SOURCES=CodecSpeex.cpp
+SPEEX_FLAG=-DHAVE_SPEEX
+SPEEX_LIB=-lspeex
+else
+SPEEX_SOURCES=
+SPEEX_FLAG=
+SPEEX_LIB=
+endif
+
+if USE_SAMPLERATE
+SAMPLERATE_FLAG=-DUSE_SAMPLERATE
+SAMPLERATE_LIB =-lsamplerate
+else
+SAMPLERATE_FLAG=
+SAMPLERATE_LIB=
+endif
+
+libaudio_la_SOURCES = alaw.cpp        audiofile.cpp	g711.cpp tonelist.cpp     \
+audiortp.cpp         dtmf.cpp   tone.cpp audiocodec.cpp  audiolayer.cpp  dtmfgenerator.cpp  gsmcodec.cpp \
+tonegenerator.cpp  ulaw.cpp codecDescriptor.cpp \
+audioloop.cpp ringbuffer.cpp $(SPEEX_SOURCES)
+
+AM_CXXFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libs -I$(srcdir)/pacpp/include/ $(libccext2_CFLAGS) $(libccrtp1_CFLAGS) $(portaudio_CFLAGS) -I$(top_srcdir)/libs/portaudio/pa_common
+libaudio_la_LIBADD = gsm/libgsm.la pacpp/source/portaudiocpp/libportaudiocpp.la $(SPEEX_LIB) $(SAMPLERATE_LIB)
+libaudio_la_CPPFLAGS = $(SPEEX_FLAG) $(SAMPLERATE_FLAG)
+ 
+
+noinst_HEADERS = audioloop.h       common.h ringbuffer.h alaw.h          audiofile.h g711.h \
+ tonelist.h         audiortp.h audiocodec.h    audiolayer.h \
+ dtmfgenerator.h    gsmcodec.h      tonegenerator.h    ulaw.h \
+ audiodevice.h codecDescriptor.h    dtmf.h tone.h \
+ CodecSpeex.h
diff --git a/src/audio/alaw.cpp b/src/audio/alaw.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1680a8cdee8480be842b3d66a5665e27fd425205
--- /dev/null
+++ b/src/audio/alaw.cpp
@@ -0,0 +1,48 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author:  Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "g711.h"
+#include "alaw.h"
+
+// 8 PCMA A 8000 1 [RFC3551]
+Alaw::Alaw(int payload)
+ : AudioCodec(payload, "PCMA")
+{
+  _officialName = "G711a";
+  _clockRate = 8000;
+  _channel   = 1;
+}
+
+Alaw::~Alaw (void)
+{
+}
+
+int
+Alaw::codecDecode (short *dst, unsigned char *src, unsigned int size) 
+{
+	return G711::ALawDecode (dst, src, size);
+}
+
+int
+Alaw::codecEncode (unsigned char *dst, short *src, unsigned int size) 
+{	
+	return G711::ALawEncode (dst, src, size);
+}
+
diff --git a/src/audio/alaw.h b/src/audio/alaw.h
new file mode 100644
index 0000000000000000000000000000000000000000..c418a887724b784bb159debe30956a4c5c75a7ee
--- /dev/null
+++ b/src/audio/alaw.h
@@ -0,0 +1,36 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author:  Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ALAW_H__
+#define __ALAW_H__
+
+#include "audiocodec.h"
+
+class Alaw : public AudioCodec {
+public:
+  // payload should be 8
+	Alaw (int payload=8);
+	~Alaw (void);
+	
+	int	codecDecode	(short *, unsigned char *, unsigned int);
+	int	codecEncode	(unsigned char *, short *, unsigned int);
+};
+
+#endif // __ULAW_H__
diff --git a/src/audio/audiocodec.cpp b/src/audio/audiocodec.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a334eb75e5c445ba1d81b622984a1e1821c2e6a1
--- /dev/null
+++ b/src/audio/audiocodec.cpp
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ * Author:  Yan Morin <yan.morin@savoirfairelinux.com>
+ * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with dpkg; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <iostream>
+#include <string>
+
+#include "audiocodec.h"
+
+AudioCodec::AudioCodec (int payload, const std::string &codecName)
+ : _codecName(codecName), _officialName(codecName) 
+{
+  _payload = payload;
+  _clockRate = 8000; // default
+  _channel   = 1; // default
+  _active = false;
+
+  _hasDynamicPayload = (_payload >= 96 && _payload <= 127) ? true : false;
+}
+
+AudioCodec::~AudioCodec (void) 
+{
+}
diff --git a/src/audio/audiocodec.h b/src/audio/audiocodec.h
new file mode 100644
index 0000000000000000000000000000000000000000..6928e54212a257b41849d373971e7d1fcaf68516
--- /dev/null
+++ b/src/audio/audiocodec.h
@@ -0,0 +1,68 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author:  Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CODEC_AUDIO_H__
+#define __CODEC_AUDIO_H__
+
+#include <string>
+
+/**
+ * Abstract audio codec class.
+ * A codec can be decode, encode
+ * Each codec have a payload, clock rate and a codec name
+ */
+class AudioCodec {
+public:
+  AudioCodec(int payload, const std::string &codecName);
+  virtual ~AudioCodec(void);	
+
+  virtual int codecDecode(short *, unsigned char *, unsigned int) = 0;
+  virtual int codecEncode(unsigned char *, short *, unsigned int) = 0;
+
+  std::string getOfficialName() { return _officialName; }
+  std::string getCodecName() { return _codecName; }
+  int getPayload() { return _payload; }
+  bool hasDynamicPayload() { return _hasDynamicPayload; }
+  unsigned int getClockRate() { return _clockRate; }
+  unsigned int getChannel() { return _channel; }
+  bool isActive() { return _active; }
+  void setActive(bool active) { _active = active; }
+
+protected:
+  std::string _codecName; // what we put inside sdp
+  std::string _officialName; // what we display to the user
+
+  /**
+   * Clock rate or sample rate of the codec, in Hz
+   */
+  unsigned int _clockRate;
+
+  /**
+   * Number of channel 1 = mono, 2 = stereo
+   */
+  unsigned int _channel;
+
+private:
+  bool _active;
+  int _payload;
+  bool _hasDynamicPayload;
+};
+
+#endif // __CODEC_AUDIO_H__
diff --git a/src/audio/audiodevice.h b/src/audio/audiodevice.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b040a45f749a3bf52c552fba81130ba56f5775d
--- /dev/null
+++ b/src/audio/audiodevice.h
@@ -0,0 +1,31 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author:  Jean-Philippe Barrette-LaPierre 
+ *              <jean-philippe.barrette-lapierre@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _AUDIO_DEVICE_H
+#define _AUDIO_DEVICE_H
+
+struct AudioDevice 
+{
+  const char *hostApiName;
+  const char *deviceName;
+};
+
+
+#endif
diff --git a/src/audio/audiofile.cpp b/src/audio/audiofile.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a0fffbc0afac6dcbd7cc5a845615687a5547295e
--- /dev/null
+++ b/src/audio/audiofile.cpp
@@ -0,0 +1,108 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ *  Inspired by ringbuffer of Audacity Project
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#include "audiofile.h"
+#include "codecDescriptor.h"
+#include <fstream>
+
+AudioFile::AudioFile()
+ : AudioLoop()
+{
+  // could vary later...
+  _ulaw = new Ulaw(PAYLOAD_CODEC_ULAW);
+  _start = false;
+}
+
+
+AudioFile::~AudioFile()
+{
+  delete _ulaw;
+}
+
+bool
+AudioFile::loadFile(const std::string& filename, unsigned int nbChannel=2) 
+{
+  _nbChannel = (nbChannel==2) ? 2 : 1;
+
+  if (_filename == filename) {
+    return true;
+  } else {
+    // reset to 0
+    delete [] _buffer; _buffer = 0;
+    _size = 0;
+    _pos = 0;
+  }
+
+  // no filename to load
+  if (filename.empty()) {
+    return false;
+  }
+
+  std::fstream file;
+  file.open(filename.c_str(), std::fstream::in);
+  if (!file.is_open()) {
+    // unable to load the file
+    return false;
+  }
+
+  // get length of file:
+  file.seekg (0, std::ios::end);
+  int length = file.tellg();
+  file.seekg (0, std::ios::beg);
+
+  // allocate memory:
+  char fileBuffer[length];
+  // read data as a block:
+  file.read (fileBuffer,length);
+  file.close();
+
+  // Decode file.ul
+  // expandedsize is the number of bytes, not the number of int
+  // expandedsize should be exactly two time more, else failed
+  int16 monoBuffer[length];
+  unsigned int expandedsize = _ulaw->codecDecode (monoBuffer, (unsigned char *) fileBuffer, length);
+
+  if (expandedsize != length*sizeof(int16)) {
+    _debug("Audio file error on loading audio file!");
+    return false;
+  }
+
+  unsigned int int16size = expandedsize/sizeof(int16);
+
+  if (_nbChannel == 2) {
+    _size = int16size<<1; // multiply by two
+    _buffer = new int16[_size];
+
+    for(unsigned int i=0, k=0; i<int16size; i++) {
+      _buffer[k] = _buffer[k+1] = monoBuffer[i];
+      k+=2;
+    }
+  } else {
+    // copy the mono buffer to a mono buffer
+    _size = int16size;
+    _buffer = new int16[_size];
+    // src to dest
+    bcopy(monoBuffer, _buffer, expandedsize);
+  }
+  return true;
+}
+
diff --git a/src/audio/audiofile.h b/src/audio/audiofile.h
new file mode 100644
index 0000000000000000000000000000000000000000..b041aa7bbc3be90899de08f5f182a39455fa7bf9
--- /dev/null
+++ b/src/audio/audiofile.h
@@ -0,0 +1,49 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ *  Inspired by ringbuffer of Audacity Project
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#ifndef __AUDIOFILE_H__
+#define __AUDIOFILE_H__
+
+#include "audioloop.h"
+#include "ulaw.h"
+
+/**
+	@author Yan Morin <yan.morin@savoirfairelinux.com>
+*/
+class AudioFile : public AudioLoop
+{
+public:
+  AudioFile();
+  ~AudioFile();
+
+  bool loadFile(const std::string& filename, unsigned int nbChannel/*=2*/);
+  void start() { _start = true; }
+  void stop()  { _start = false; }
+  bool isStarted() { return _start; }
+
+private:
+  std::string _filename;
+  Ulaw* _ulaw;
+  bool _start;
+};
+
+#endif // __AUDIOFILE_H__
diff --git a/src/audio/audiolayer.cpp b/src/audio/audiolayer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ff72e4cafc92b6cf3d46433636cbd5ceb8621594
--- /dev/null
+++ b/src/audio/audiolayer.cpp
@@ -0,0 +1,318 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Jerome Oufella <jerome.oufella@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "audiolayer.h"
+#include "../global.h"
+#include "../manager.h"
+
+AudioLayer::AudioLayer()
+  : _urgentRingBuffer(SIZEBUF)
+  , _mainSndRingBuffer(SIZEBUF)
+  , _micRingBuffer(SIZEBUF)
+  , _stream(NULL)
+  , _errorMessage("")
+{
+#ifdef USE_SAMPLERATE
+  _sampleRate = 44100;
+#else
+  _sampleRate = 8000;
+#endif
+  _inChannel  = 1;
+  _outChannel = 1;
+  portaudio::System::initialize();
+}
+
+// Destructor
+AudioLayer::~AudioLayer (void) 
+{
+  try {
+    portaudio::System::terminate();
+  } catch (const portaudio::PaException &e) {
+    _debug("Catch an exception when portaudio tried to terminate\n");
+  }
+  closeStream();
+}
+
+void
+AudioLayer::closeStream (void) 
+{
+  ost::MutexLock guard(_mutex);
+  if(_stream) {
+    _stream->close();
+    delete _stream; _stream = NULL;
+  }
+}
+
+bool
+AudioLayer::hasStream(void) {
+  ost::MutexLock guard(_mutex);
+  return (_stream!=0 ? true : false); 
+}
+
+
+void
+AudioLayer::openDevice (int indexIn, int indexOut) 
+{
+  closeStream();
+
+  try {
+  // Set up the parameters required to open a (Callback)Stream:
+  portaudio::DirectionSpecificStreamParameters 
+    outParams(portaudio::System::instance().deviceByIndex(indexOut), 
+	      _outChannel, portaudio::INT16, true, 
+	      portaudio::System::instance().deviceByIndex(indexOut).defaultLowOutputLatency(), 
+	      NULL);
+	
+  portaudio::DirectionSpecificStreamParameters 
+    inParams(portaudio::System::instance().deviceByIndex(indexIn), 
+	     _inChannel, portaudio::INT16, true, 
+	     portaudio::System::instance().deviceByIndex(indexIn).defaultLowInputLatency(), 
+	     NULL);
+	
+  // we could put paFramesPerBufferUnspecified instead of FRAME_PER_BUFFER to be variable
+  portaudio::StreamParameters const params(inParams, outParams, 
+					   _sampleRate, FRAME_PER_BUFFER /*paFramesPerBufferUnspecified*/, paNoFlag /*paPrimeOutputBuffersUsingStreamCallback | paNeverDropInput*/);
+		  
+  // Create (and open) a new Stream, using the AudioLayer::audioCallback
+  ost::MutexLock guard(_mutex);
+  _stream = new portaudio::MemFunCallbackStream<AudioLayer>(params, 
+							    *this, 
+							    &AudioLayer::audioCallback);
+  } catch(...) {
+    throw;
+  }
+}
+
+void
+AudioLayer::startStream(void) 
+{
+  try {
+    ost::MutexLock guard(_mutex);
+    if (_stream && !_stream->isActive()) {
+      //_debug("Starting sound stream\n");
+        _stream->start();
+    }
+  } catch (const portaudio::PaException &e) {
+    _debugException("Portaudio error: error on starting audiolayer stream");
+    throw;
+  } catch(...) {
+    _debugException("stream start error");
+    throw;
+  }
+}
+	
+void
+AudioLayer::stopStream(void) 
+{
+  try {
+    ost::MutexLock guard(_mutex);
+    if (_stream && !_stream->isStopped()) {
+      _stream->stop();
+      _mainSndRingBuffer.flush();
+      _urgentRingBuffer.flush();
+      _micRingBuffer.flush();
+    }
+  } catch (const portaudio::PaException &e) {
+    _debugException("Portaudio error: error on stoping audiolayer stream");
+    throw;
+  } catch(...) {
+    _debugException("stream stop error");
+    throw;
+  }
+}
+
+void
+AudioLayer::sleep(int msec) 
+{
+  if (_stream) {
+    portaudio::System::instance().sleep(msec);
+  }
+}
+
+bool
+AudioLayer::isStreamActive (void) 
+{
+  ost::MutexLock guard(_mutex);
+  if(_stream && _stream->isActive()) {
+    return true;
+  }
+  else {
+    return false;
+  }
+}
+
+int 
+AudioLayer::putMain(void* buffer, int toCopy)
+{
+  ost::MutexLock guard(_mutex);
+  if (_stream) {
+    int a = _mainSndRingBuffer.AvailForPut();
+    if ( a >= toCopy ) {
+      return _mainSndRingBuffer.Put(buffer, toCopy);
+    } else {
+      return _mainSndRingBuffer.Put(buffer, a);
+    }
+  }
+  return 0;
+}
+
+void
+AudioLayer::flushMain()
+{
+  ost::MutexLock guard(_mutex);
+  _mainSndRingBuffer.flush();
+}
+
+int
+AudioLayer::putUrgent(void* buffer, int toCopy)
+{
+  if (_stream) {
+    int a = _urgentRingBuffer.AvailForPut();
+    if ( a >= toCopy ) {
+      return _urgentRingBuffer.Put(buffer, toCopy);
+    } else {
+      return _urgentRingBuffer.Put(buffer, a);
+    }
+  }
+  return 0;
+}
+
+int
+AudioLayer::canGetMic()
+{
+  if (_stream) {
+    return _micRingBuffer.AvailForGet();
+  } else {
+    return 0;
+  }
+}
+
+int 
+AudioLayer::getMic(void *buffer, int toCopy)
+{
+  if(_stream) {
+    return _micRingBuffer.Get(buffer, toCopy, 100);
+  } else {
+    return 0;
+  }
+}
+
+void
+AudioLayer::flushMic()
+{
+  _micRingBuffer.flush();
+}
+
+bool
+AudioLayer::isStreamStopped (void) 
+{
+  ost::MutexLock guard(_mutex);
+  if(_stream && _stream->isStopped()) {
+    return true;
+  }
+  else {
+    return false;
+  }
+}
+
+int 
+AudioLayer::audioCallback (const void *inputBuffer, void *outputBuffer, 
+			   unsigned long framesPerBuffer, 
+			   const PaStreamCallbackTimeInfo *timeInfo, 
+			   PaStreamCallbackFlags statusFlags) {
+
+  (void) timeInfo;
+  (void) statusFlags;
+	
+	int16 *in  = (int16 *) inputBuffer;
+	int16 *out = (int16 *) outputBuffer;
+	int toGet, toPut;
+  int urgentAvail, // number of int16 right and int16 left
+      normalAvail, // number of int16 right and int16 left
+      micAvailPut;
+  unsigned short spkrVolume = Manager::instance().getSpkrVolume();
+  unsigned short micVolume  = Manager::instance().getMicVolume();
+
+  // AvailForGet tell the number of chars inside the buffer
+  // framePerBuffer are the number of int16 for one channel (left)
+  urgentAvail = _urgentRingBuffer.AvailForGet();
+  if (urgentAvail > 0) {
+  // Urgent data (dtmf, incoming call signal) come first.		
+    toGet = (urgentAvail < (int)framesPerBuffer * sizeof(int16) * _outChannel) ? urgentAvail : framesPerBuffer * sizeof(int16) * _outChannel;
+    _urgentRingBuffer.Get(out, toGet, spkrVolume);
+    
+    // Consume the regular one as well (same amount of bytes)
+    _mainSndRingBuffer.Discard(toGet);
+  }	else {
+    AudioLoop* tone = Manager::instance().getTelephoneTone();
+    if ( tone != 0) {
+      tone->getNext(out, framesPerBuffer*_outChannel, spkrVolume);
+    } else if ( (tone=Manager::instance().getTelephoneFile()) != 0 ) {
+      tone->getNext(out, framesPerBuffer*_outChannel, spkrVolume);
+    } else {
+      // If nothing urgent, play the regular sound samples
+      normalAvail = _mainSndRingBuffer.AvailForGet();
+      toGet = (normalAvail < (int)framesPerBuffer * sizeof(int16) * _outChannel) ? normalAvail : framesPerBuffer * sizeof(int16) * _outChannel;
+
+      if (toGet) {
+        _mainSndRingBuffer.Get(out, toGet, spkrVolume);
+      } else {
+        bzero(out, framesPerBuffer * sizeof(int16) * _outChannel);
+      }
+    }
+	}
+
+	// Additionally handle the mic's audio stream 
+  micAvailPut = _micRingBuffer.AvailForPut();
+  toPut = (micAvailPut <= (int)framesPerBuffer * sizeof(int16) * _inChannel) ? micAvailPut : framesPerBuffer * sizeof(int16) * _inChannel;
+  _micRingBuffer.Put(in, toPut, micVolume );
+
+  return paContinue;
+}
+
+unsigned int
+AudioLayer::convert(int16* fromBuffer, int fromChannel, unsigned int fromSize, int16** toBuffer, int toChannel) {
+  if (fromChannel == toChannel ) { // 1=>1 or 2=>2
+    // src, dest, size in bytes
+    *toBuffer = fromBuffer;
+    //bcopy(fromBuffer, *toBuffer, fromSize*sizeof(int16));
+    return fromSize;
+  } else if (fromChannel > toChannel ) { // 2 => 1
+    unsigned int toSize = fromSize>>1; // divise by 2
+    for(int m=0, s=0; m<toSize; m++) {
+      s = m<<1;
+      (*toBuffer)[m] = (int16)(0.5f*(fromBuffer[s] + fromBuffer[s+1]));
+    }
+    return toSize;
+  } else { // (fromChannel > toChannel ) { // 1 => 2
+    for(int m=0, s=0; m<fromSize; m++) {
+      s = m<<1;
+      (*toBuffer)[s] = (*toBuffer)[s+1] = fromBuffer[m];
+    }
+    return fromSize<<1; // multiply by 2
+  }
+  return fromSize;
+}
+
+
+
diff --git a/src/audio/audiolayer.h b/src/audio/audiolayer.h
new file mode 100644
index 0000000000000000000000000000000000000000..5df4ae07ed34b6714f42b63317f7039a4e9abaf2
--- /dev/null
+++ b/src/audio/audiolayer.h
@@ -0,0 +1,107 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Jerome Oufella <jerome.oufella@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _AUDIO_LAYER_H
+#define _AUDIO_LAYER_H
+
+#include <cc++/thread.h> // for ost::Mutex
+
+#include "portaudiocpp/PortAudioCpp.hxx"
+
+#include "../global.h"
+#include "ringbuffer.h"
+
+#define FRAME_PER_BUFFER	160
+
+class RingBuffer;
+
+class AudioLayer {
+public:
+  AudioLayer();
+  ~AudioLayer(void);
+
+  void openDevice(int, int);
+  void startStream(void);
+  void stopStream(void);
+  void sleep(int);
+  bool hasStream(void);
+  bool isStreamActive(void);
+  bool isStreamStopped(void);
+
+  void flushMain();
+  int putMain(void* buffer, int toCopy);
+  int putUrgent(void* buffer, int toCopy);
+  int canGetMic();
+  int getMic(void *, int);
+  void flushMic();
+
+/**
+ * Try to convert a int16 fromBuffer into a int16 to Buffer
+ * If the channel are the same, it only pass the address and the size of the from Buffer
+ * Else, it double or reduce by 2 the fromBuffer with a 0.5 conversion
+ */
+  unsigned int convert(int16* fromBuffer, int fromChannel, unsigned int fromSize, int16** toBuffer, int toChannel);
+
+  int audioCallback (const void *, void *, unsigned long,
+        const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags);
+
+  void setErrorMessage(const std::string& error) { _errorMessage = error; }
+  std::string getErrorMessage() { return _errorMessage; }
+
+  /**
+   * Get the sample rate of audiolayer
+   * accessor only
+   */
+  unsigned int getSampleRate() { return _sampleRate; }
+  unsigned int getInChannel()  { return _inChannel; }
+  unsigned int getOutChannel() { return _outChannel; }
+
+  enum IODEVICE {InputDevice=0x01, OutputDevice=0x02 };
+
+private:
+  void closeStream (void);
+  RingBuffer _urgentRingBuffer;
+  RingBuffer _mainSndRingBuffer;
+  RingBuffer _micRingBuffer;
+
+  portaudio::MemFunCallbackStream<AudioLayer> *_stream;
+  /**
+   * Sample Rate of SFLphone : should be 8000 for 8khz
+   * Added because we could change it in the futur
+   */
+  unsigned int _sampleRate;
+
+  /**
+   * Input channel (mic) should be 2 stereo or 1 mono
+   */
+  unsigned int _inChannel; // mic
+
+  /**
+   * Output channel (stereo) should be 2 stereo or 1 mono
+   */
+  unsigned int _outChannel; // speaker
+
+  std::string _errorMessage;
+//	portaudio::AutoSystem autoSys;
+  ost::Mutex _mutex;
+};
+
+#endif // _AUDIO_LAYER_H_
+
diff --git a/src/audio/audioloop.cpp b/src/audio/audioloop.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..49612ee6d9f66dc11acc0eaf6621c7876f818d70
--- /dev/null
+++ b/src/audio/audioloop.cpp
@@ -0,0 +1,68 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ *  Inspired by ringbuffer of Audacity Project
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#include "audioloop.h"
+#include <math.h>
+
+AudioLoop::AudioLoop() 
+{
+  _buffer = 0;
+  _pos    = 0;
+  _size   = 0;
+  _nbChannel = 1;
+}
+
+AudioLoop::~AudioLoop()
+{
+  delete _buffer; _buffer = 0;
+}
+
+int
+AudioLoop::getNext(int16* output, int nb, short volume)
+{
+  int copied = 0;
+  int block;
+  int pos = _pos;
+  while(nb) {
+    block = nb;
+    if ( block > (_size-pos) ) {
+      block = _size-pos;
+    }
+    // src, dest, len
+    bcopy(_buffer+pos, output, block<<1); // short>char conversion
+    if (volume!=100) {
+      for (int i=0;i<block;i++) {
+        *output = (*output * volume)/100;
+        output++;
+      }
+    } else {
+      output += block; // this is the destination...
+    }
+    // should adjust sound here, in output???
+    pos = (pos + block ) % _size;
+    nb -= block;
+    copied += block;
+  }
+  _pos = pos;
+  return copied;
+}
+
diff --git a/src/audio/audioloop.h b/src/audio/audioloop.h
new file mode 100644
index 0000000000000000000000000000000000000000..5bd5babc90d63b8728b35216e227bc31a54ce057
--- /dev/null
+++ b/src/audio/audioloop.h
@@ -0,0 +1,55 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#ifndef __AUDIOLOOP_H__
+#define __AUDIOLOOP_H__
+
+#include <string>
+#include "../global.h" // for int16 declaration
+
+/**
+ * @author Yan Morin <yan.morin@savoirfairelinux.com>
+ */
+class AudioLoop {
+public:
+  AudioLoop();
+  virtual ~AudioLoop();
+
+  /**
+   * get the next fragment of the tone
+   * the function change the intern position, and will loop
+   * @param nb of int16 to send
+   * @return the number of int16 sent (nb*2)
+   */
+  int getNext(int16* output, int nb, short volume=100);
+  void reset() { _pos = 0; }
+  unsigned int getMonoSize() { return _size*_nbChannel; }
+  unsigned int getSize() { return _size; }
+
+protected:
+  int16* _buffer;
+  int _size; // number of int16 inside the buffer, not the delay
+  int _pos; // current position, set to 0, when initialize
+  int _nbChannel;
+};
+
+#endif // __AUDIOLOOP_H__
+
diff --git a/src/audio/audiortp.cpp b/src/audio/audiortp.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d666f14760a6aa91f9eff35978f723915a7b5f1f
--- /dev/null
+++ b/src/audio/audiortp.cpp
@@ -0,0 +1,486 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <cstdio>
+#include <cstdlib>
+#include <ccrtp/rtp.h>
+#include <assert.h>
+#include <string>
+
+#include "../global.h"
+#include "../manager.h"
+#include "codecDescriptor.h"
+#include "audiortp.h"
+#include "audiolayer.h"
+#include "ringbuffer.h"
+#include "../user_cfg.h"
+#include "../sipcall.h"
+#ifdef USE_SAMPLERATE
+ #include <samplerate.h>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////
+// AudioRtp                                                          
+////////////////////////////////////////////////////////////////////////////////
+AudioRtp::AudioRtp ()
+{
+  _RTXThread = 0;
+}
+
+AudioRtp::~AudioRtp (void) {
+  delete _RTXThread; _RTXThread = 0;
+}
+
+int 
+AudioRtp::createNewSession (SipCall *ca) {
+  ost::MutexLock m(_threadMutex);
+
+  // something should stop the thread before...
+  if ( _RTXThread != 0 ) { 
+    _debug("Try to create a new audio rtp thread...\n");
+    return -1; 
+  }
+
+  // Start RTP Send/Receive threads
+  _symmetric = Manager::instance().getConfigInt(SIGNALISATION,SYMMETRIC) ? true : false;
+  _RTXThread = new AudioRtpRTX (ca, Manager::instance().getAudioDriver(), _symmetric);
+
+  try {
+    if (_RTXThread->start() != 0) {
+      return -1;
+    }
+  } catch(...) {
+    _debugException("AudioRTP try to start a thread");
+    throw;
+  }
+  return 0;
+}
+
+	
+void
+AudioRtp::closeRtpSession () {
+  ost::MutexLock m(_threadMutex);
+  // This will make RTP threads finish.
+  // _debug("Stopping AudioRTP\n");
+  try {
+    delete _RTXThread; _RTXThread = 0;
+  } catch(...) {
+    _debugException("Exception when stopping audiortp\n");
+    throw;
+  }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// AudioRtpRTX Class                                                          //
+////////////////////////////////////////////////////////////////////////////////
+AudioRtpRTX::AudioRtpRTX (SipCall *sipcall, AudioLayer* driver, bool sym) {
+  setCancel(cancelDeferred);
+  time = new ost::Time();
+  _ca = sipcall;
+  _sym = sym;
+  _audioDevice = driver;
+  if (_audioDevice!=0) {
+    _nbFrames = 20 * _audioDevice->getSampleRate()/1000; // 20 ms
+  } else {
+    _nbFrames = RTP_FRAMES2SEND;
+  }
+#ifdef USE_SAMPLERATE
+  _floatBufferIn  = new float[_nbFrames*2];
+  _floatBufferOut = new float[_nbFrames*2];
+#endif
+
+  // TODO: Change bind address according to user settings.
+  std::string localipConfig = _ca->getLocalIp();
+  ost::InetHostAddress local_ip(localipConfig.c_str());
+
+  //_debug("AudioRtpRTX ctor : Local IP:port %s:%d\tsymmetric:%d\n", local_ip.getHostname(), _ca->getLocalAudioPort(), _sym);
+
+  if (!_sym) {
+    _sessionRecv = new ost::RTPSession(local_ip, _ca->getLocalAudioPort());
+    _sessionSend = new ost::RTPSession(local_ip, _ca->getLocalAudioPort());
+    _session = NULL;
+  } else {
+    _session = new ost::SymmetricRTPSession (local_ip, _ca->getLocalAudioPort());
+    _sessionRecv = NULL;
+    _sessionSend = NULL;
+  }
+}
+
+AudioRtpRTX::~AudioRtpRTX () {
+  _start.wait();
+
+  try {
+    this->terminate();
+  } catch(...) {
+    _debugException("AudioRTP Thread destructor didn't terminate correctly");
+    throw;
+  }
+  //_debug("terminate audiortprtx ended...\n");
+  _ca = NULL;
+
+  if (!_sym) {
+    delete _sessionRecv; _sessionRecv = NULL;
+    delete _sessionSend; _sessionSend = NULL;
+  } else {
+    delete _session;     _session = NULL;
+  }
+
+  delete time; time = NULL;
+
+
+#ifdef USE_SAMPLERATE
+  delete [] _floatBufferIn;  _floatBufferIn = 0;
+  delete [] _floatBufferOut; _floatBufferOut = 0;
+#endif
+}
+
+void
+AudioRtpRTX::initAudioRtpSession (void) 
+{
+  try {
+    if (_ca == 0) { return; }
+
+    //_debug("Init audio RTP session\n");
+    ost::InetHostAddress remote_ip(_ca->getRemoteSdpAudioIp());
+    if (!remote_ip) {
+      _debug("AudioRTP Thread Error: Target IP address [%s] is not correct!\n", _ca->getRemoteSdpAudioIp());
+      return;
+    }
+
+    // Initialization
+    if (!_sym) {
+      _sessionRecv->setSchedulingTimeout (10000);
+      _sessionRecv->setExpireTimeout(1000000);
+
+      _sessionSend->setSchedulingTimeout(10000);
+      _sessionSend->setExpireTimeout(1000000);
+    } else {
+      _session->setSchedulingTimeout(10000);
+      _session->setExpireTimeout(1000000);
+    }
+
+    if (!_sym) {
+      if ( !_sessionRecv->addDestination(remote_ip, (unsigned short) _ca->getRemoteSdpAudioPort()) ) {
+        _debug("AudioRTP Thread Error: could not connect to port %d\n",  _ca->getLocalAudioPort());
+        return;
+      }
+      if (!_sessionSend->addDestination (remote_ip, (unsigned short) _ca->getRemoteSdpAudioPort())) {
+        _debug("AudioRTP Thread Error: could not connect to port %d\n",  _ca->getRemoteSdpAudioPort());
+        return;
+      }
+
+      AudioCodec* audiocodec = _ca->getAudioCodec();
+      bool payloadIsSet = false;
+      if (audiocodec) {
+        if (audiocodec->hasDynamicPayload()) {
+          payloadIsSet = _sessionRecv->setPayloadFormat(ost::DynamicPayloadFormat((ost::PayloadType) audiocodec->getPayload(), audiocodec->getClockRate()));
+        } else {
+          payloadIsSet= _sessionRecv->setPayloadFormat(ost::StaticPayloadFormat((ost::StaticPayloadType) audiocodec->getPayload()));
+          payloadIsSet = _sessionSend->setPayloadFormat(ost::StaticPayloadFormat((ost::StaticPayloadType) audiocodec->getPayload()));
+        }
+      }
+      _sessionSend->setMark(true);
+    } else {
+
+      //_debug("AudioRTP Thread: Added session destination %s:%d\n", remote_ip.getHostname(), (unsigned short) _ca->getRemoteSdpAudioPort());
+
+      if (!_session->addDestination (remote_ip, (unsigned short) _ca->getRemoteSdpAudioPort())) {
+        return;
+      }
+
+      AudioCodec* audiocodec = _ca->getAudioCodec();
+      bool payloadIsSet = false;
+      if (audiocodec) {
+        if (audiocodec->hasDynamicPayload()) {
+          payloadIsSet = _session->setPayloadFormat(ost::DynamicPayloadFormat((ost::PayloadType) audiocodec->getPayload(), audiocodec->getClockRate()));
+        } else {
+          payloadIsSet = _session->setPayloadFormat(ost::StaticPayloadFormat((ost::StaticPayloadType) audiocodec->getPayload()));
+        }
+      }
+    }
+  } catch(...) {
+    _debugException("AudioRTP initialisation failed");
+    throw;
+  }
+}
+
+void
+AudioRtpRTX::sendSessionFromMic (unsigned char* data_to_send, int16* data_from_mic, int16* data_from_mic_to_codec, int timestamp)
+{
+  try {
+    if (_ca==0) { return; } // no call, so we do nothing
+    short sizeOfData = sizeof(int16);
+    AudioLayer* audiolayer = Manager::instance().getAudioDriver();
+
+    int availBytesFromMic = audiolayer->canGetMic();
+    int fromChannel = audiolayer->getInChannel();
+    int toChannel   = fromChannel;
+
+    AudioCodec* audiocodec = _ca->getAudioCodec();
+    if (audiocodec!=0) {
+      toChannel = audiocodec->getChannel();
+    }
+
+    int maxBytesToGet = _nbFrames * fromChannel * sizeOfData; // * channels * int16/byte
+
+    // take the lower
+    int bytesAvail;
+    if (availBytesFromMic < maxBytesToGet) {
+      bytesAvail = availBytesFromMic;
+    } else {
+      bytesAvail = maxBytesToGet;
+    }
+
+    // Get bytes from micRingBuffer to data_from_mic
+    audiolayer->getMic(data_from_mic, bytesAvail);
+
+    int nbInt16 = bytesAvail/sizeof(int16);
+
+#ifdef USE_SAMPLERATE
+    // sample rate conversion here
+    if (audiocodec && audiolayer->getSampleRate() != audiocodec->getClockRate()) {
+      double         factord = (double)audiocodec->getClockRate()/audiolayer->getSampleRate();
+
+      SRC_DATA src_data;
+      src_data.data_in = _floatBufferIn;
+      src_data.data_out = _floatBufferOut;
+      src_data.input_frames = nbInt16/fromChannel;
+      src_data.output_frames = _nbFrames;
+      src_data.src_ratio = factord;
+      src_short_to_float_array(data_from_mic, _floatBufferIn, nbInt16);
+      src_simple (&src_data, SRC_SINC_MEDIUM_QUALITY, fromChannel);
+      src_float_to_short_array (_floatBufferOut, data_from_mic, src_data.output_frames_gen*fromChannel);
+
+      nbInt16 = src_data.output_frames_gen * fromChannel;
+    }
+#endif
+
+    unsigned int toSize = audiolayer->convert(data_from_mic, fromChannel, nbInt16, &data_from_mic_to_codec, toChannel);
+
+    if ( toSize != (RTP_FRAMES2SEND * toChannel) ) {
+      // fill end with 0...
+      bzero(data_from_mic_to_codec + toSize*sizeOfData, (RTP_FRAMES2SEND*toChannel-toSize)*sizeOfData);
+      toSize = RTP_FRAMES2SEND * toChannel;
+    }
+
+    // Encode acquired audio sample
+    if ( audiocodec != NULL ) {
+      // for the mono: range = 0 to RTP_FRAME2SEND * sizeof(int16)
+      // codecEncode(char *dest, int16* src, size in bytes of the src)
+      int compSize = audiocodec->codecEncode(data_to_send, data_from_mic_to_codec, toSize*sizeOfData);
+      // encode divise by two
+      // Send encoded audio sample over the network
+      if (compSize > RTP_FRAMES2SEND) { _debug("%d should be %d\n", compSize, _nbFrames);}
+      if (!_sym) {
+        _sessionSend->putData(timestamp, data_to_send, compSize);
+      } else {
+        _session->putData(timestamp, data_to_send, compSize);
+      }
+    }
+  } catch(...) {
+    _debugException("AudioRTP sending failed");
+    throw;
+  }
+}
+
+void
+AudioRtpRTX::receiveSessionForSpkr (int16* data_for_speakers_stereo, int16* data_for_speakers_recv, int& countTime)
+{
+  if (_ca == 0) { return; }
+  try {
+    AudioLayer* audiolayer = Manager::instance().getAudioDriver();
+    const ost::AppDataUnit* adu = NULL;
+    // Get audio data stream
+
+    if (!_sym) {
+      adu = _sessionRecv->getData(_sessionRecv->getFirstTimestamp());
+    } else {
+      adu = _session->getData(_session->getFirstTimestamp());
+    }
+    if (adu == NULL) {
+      return;
+    }
+
+    int payload = adu->getType();
+    unsigned char* data  = (unsigned char*)adu->getData();
+    unsigned int size    = adu->getSize();
+
+    // Decode data with relevant codec
+    int toPut = 0;
+    AudioCodec* audiocodec = _ca->getCodecMap().getCodec((CodecType)payload);
+    if (audiocodec != 0) {
+      // codecDecode(int16 *dest, char* src, size in bytes of the src)
+      // decode multiply by two
+      // size shall be RTP_FRAME2SEND or lower
+      int expandedSize = audiocodec->codecDecode(data_for_speakers_recv, data, size);
+      int nbInt16      = expandedSize/sizeof(int16);
+
+      int toChannel = audiolayer->getOutChannel();
+      int fromChannel = audiocodec->getChannel();
+
+#ifdef USE_SAMPLERATE
+      if ( audiolayer->getSampleRate() != audiocodec->getClockRate() ) {
+        // convert here
+        double         factord = (double)audiolayer->getSampleRate()/ audiocodec->getClockRate();
+
+        SRC_DATA src_data;
+        src_data.data_in = _floatBufferIn;
+        src_data.data_out = _floatBufferOut;
+        src_data.input_frames = nbInt16/fromChannel;
+        src_data.output_frames = _nbFrames;
+        src_data.src_ratio = factord;
+        src_short_to_float_array(data_for_speakers_recv, _floatBufferIn, nbInt16);
+#if 0
+        for(int i=0; i<20; i++) {
+          printf("%3d ", data_for_speakers_recv[i]);
+        }
+        printf("\n");
+        for(int i=0; i<20; i++) {
+          printf("%7.6f ", _floatBufferIn[i]);
+        }
+        printf("\n");
+#endif
+        src_simple (&src_data, SRC_SINC_MEDIUM_QUALITY, fromChannel);
+        src_float_to_short_array(_floatBufferOut, data_for_speakers_recv, src_data.output_frames_gen*fromChannel);
+
+#if 0
+        for(int i=0; i<100; i++) {
+          printf("%7.6f ", _floatBufferOut[i]);
+        }
+        printf("\n");
+        for(int i=0; i<100; i++) {
+          printf("%3d ", data_for_speakers_recv[i]);
+        }
+        printf("\n");
+
+        printf("receive get %d and convert to %d\n", nbInt16, src_data.output_frames_gen);
+#endif
+
+        nbInt16 = src_data.output_frames_gen*fromChannel;
+      }
+#endif
+
+      toPut = audiolayer->convert(data_for_speakers_recv, fromChannel, nbInt16, &data_for_speakers_stereo, toChannel);
+
+      // If the current call is the call which is answered
+      // Set decoded data to sound device
+      // expandedSize is in mono/bytes, since we double in stereo, we send two time more
+      audiolayer->putMain(data_for_speakers_stereo, toPut * sizeof(int16));
+      //Manager::instance().getAudioDriver()->startStream();
+  
+      // Notify (with a beep) an incoming call when there is already a call 
+      countTime += time->getSecond();
+      if (Manager::instance().incomingCallWaiting() > 0) {
+        countTime = countTime % 500; // more often...
+        if (countTime == 0) {
+          Manager::instance().notificationIncomingCall();
+        }
+      }
+
+    } else {
+      countTime += time->getSecond();
+    }
+
+    delete adu; adu = NULL;
+  } catch(...) {
+    _debugException("AudioRTP receiving failed");
+    throw;
+  }
+}
+
+void
+AudioRtpRTX::run () {
+  //mic, we receive from soundcard in stereo, and we send encoded
+  //encoding before sending
+  AudioLayer *audiolayer = Manager::instance().getAudioDriver();
+
+  int16 *data_from_mic = new int16[_nbFrames*audiolayer->getInChannel()];
+  int16 *data_from_mic_to_codec = new int16[_nbFrames*2]; // 2 = max channel
+  unsigned char *char_to_send = new unsigned char[_nbFrames]; // two time more for codec
+
+  //spkr, we receive from rtp in mono and we send in stereo
+  //decoding after receiving
+  // we could receive in stereo too...
+  int16 *data_for_speakers_recv = new int16[_nbFrames*2];
+  int16 *data_for_speakers_stereo = new int16[_nbFrames*2];
+
+  try {
+    //_debug("AudioRTP Thread is running\n");
+
+    // Init the session
+    initAudioRtpSession();
+
+    // flush stream:
+
+    // start running the packet queue scheduler.
+    //_debug("AudioRTP Thread started\n");
+    if (!_sym) {
+      _sessionRecv->startRunning();
+      _sessionSend->startRunning();
+    } else {
+      _session->startRunning();
+      //_debug("Session is now: %d active\n", _session->isActive());
+    }
+
+    int timestamp = 0; // for mic
+    int countTime = 0; // for receive
+    // TODO: get frameSize from user config 
+    int frameSize = 20; // 20ms frames
+    TimerPort::setTimer(frameSize);
+
+    audiolayer->flushMic();
+    audiolayer->startStream();
+    _start.post();
+    while (!testCancel()) {
+      ////////////////////////////
+      // Send session
+      ////////////////////////////
+      sendSessionFromMic(char_to_send, data_from_mic, data_from_mic_to_codec, timestamp);
+      timestamp += RTP_FRAMES2SEND;
+
+      ////////////////////////////
+      // Recv session
+      ////////////////////////////
+      receiveSessionForSpkr(data_for_speakers_stereo, data_for_speakers_recv, countTime);
+
+      // Let's wait for the next transmit cycle
+      Thread::sleep(TimerPort::getTimer());
+      TimerPort::incTimer(frameSize); // 'frameSize' ms
+    }
+    //_debug("stop stream for audiortp loop\n");
+    audiolayer->stopStream();
+  } catch(std::exception &e) {
+    _start.post();
+    _debug("AudioRTP Thread, run: %s\n", e.what());
+    throw;
+  } catch(...) {
+    _start.post();
+    _debugException("AudioRTP Thread, run()");
+    throw;
+  }
+  delete [] data_for_speakers_stereo; data_for_speakers_stereo = 0;
+  delete [] data_for_speakers_recv;   data_for_speakers_recv   = 0;
+  delete [] char_to_send;          char_to_send          = 0;
+  delete [] data_from_mic_to_codec;   data_from_mic_to_codec   = 0;
+  delete [] data_from_mic;  data_from_mic = 0;
+}
+
+
+// EOF
diff --git a/src/audio/audiortp.h b/src/audio/audiortp.h
new file mode 100644
index 0000000000000000000000000000000000000000..aab5eaa425cd3b4247c085bca519ee82394eaf75
--- /dev/null
+++ b/src/audio/audiortp.h
@@ -0,0 +1,84 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __AUDIO_RTP_H__
+#define __AUDIO_RTP_H__
+
+#include <cstdio>
+#include <cstdlib>
+
+#include <ccrtp/rtp.h>
+#include <cc++/numbers.h>
+
+#define RTP_FRAMES2SEND 160
+
+class AudioLayer;
+class SipCall;
+
+///////////////////////////////////////////////////////////////////////////////
+// Two pair of sockets
+///////////////////////////////////////////////////////////////////////////////
+class AudioRtpRTX : public ost::Thread, public ost::TimerPort {
+public:
+	AudioRtpRTX (SipCall *, AudioLayer*, bool);
+	~AudioRtpRTX();
+
+	ost::Time *time; 	// For incoming call notification 
+	virtual void run ();
+
+private:
+	SipCall* _ca;
+	AudioLayer* _audioDevice;
+	ost::RTPSession *_sessionSend;
+	ost::RTPSession *_sessionRecv;
+	ost::SymmetricRTPSession *_session;
+  ost::Semaphore _start;
+	bool _sym;
+
+  int _nbFrames;
+#ifdef USE_SAMPLERATE
+  float *_floatBufferIn;
+  float *_floatBufferOut;
+#endif
+
+	void initAudioRtpSession (void);
+//  void sendSessionFromMic (unsigned char*, int16*, int16*, int, int);
+  void sendSessionFromMic (unsigned char*, int16*, int16*, int);
+//	void receiveSessionForSpkr (int16*, int16*, int, int&);
+  void receiveSessionForSpkr (int16*, int16*, int&);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// Main class rtp
+///////////////////////////////////////////////////////////////////////////////
+class AudioRtp {
+public:
+  AudioRtp();
+  ~AudioRtp();
+
+  int 			createNewSession (SipCall *);
+  void			closeRtpSession	 ();
+
+private:
+  AudioRtpRTX*	_RTXThread;
+  bool			_symmetric;
+  ost::Mutex _threadMutex;
+};
+
+#endif // __AUDIO_RTP_H__
diff --git a/src/audio/codecDescriptor.cpp b/src/audio/codecDescriptor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fbcba2a6006976bfcf0537a77194a7d87e94980b
--- /dev/null
+++ b/src/audio/codecDescriptor.cpp
@@ -0,0 +1,68 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <iostream>
+
+#include "audiocodec.h"
+#include "gsmcodec.h"
+#include "alaw.h"
+#include "ulaw.h"
+#include "codecDescriptor.h"
+#ifdef HAVE_SPEEX
+ #include "CodecSpeex.h"
+#endif
+
+CodecDescriptorMap::CodecDescriptorMap() 
+{
+  _codecMap[PAYLOAD_CODEC_ALAW] = new Alaw();
+  _codecMap[PAYLOAD_CODEC_ULAW] = new Ulaw();
+  _codecMap[PAYLOAD_CODEC_GSM] = new Gsm();
+#ifdef HAVE_SPEEX
+  _codecMap[PAYLOAD_CODEC_SPEEX] = new CodecSpeex(PAYLOAD_CODEC_SPEEX); // TODO: this is a variable payload!
+#endif
+// theses one are not implemented yet..
+//  _codecMap[PAYLOAD_CODEC_ILBC] = Ilbc();
+//  _codecMap[PAYLOAD_CODEC_SPEEX] = Speex();
+}
+
+AudioCodec*
+CodecDescriptorMap::getCodec(CodecType payload)
+{
+  CodecMap::iterator iter = _codecMap.find(payload);
+  if (iter!=_codecMap.end()) {
+    return (iter->second);
+  }
+  return 0;
+}
+
+void 
+CodecDescriptorMap::setActive(const std::string& officialName) 
+{
+  CodecMap::iterator iter = _codecMap.begin();
+  while(iter!=_codecMap.end()) {
+    if (iter->second!=0) {
+      if (iter->second->getOfficialName() == officialName) {
+        iter->second->setActive(true);
+        break;
+      }
+    }
+    iter++;
+  }
+}
diff --git a/src/audio/codecDescriptor.h b/src/audio/codecDescriptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..95c525566c44acbc52d23534d203d2f3d07479d2
--- /dev/null
+++ b/src/audio/codecDescriptor.h
@@ -0,0 +1,78 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef __CODEC_DESCRIPTOR_H__
+#define __CODEC_DESCRIPTOR_H__
+
+#include <string>
+#include <map>
+
+typedef enum {
+// http://www.iana.org/assignments/rtp-parameters
+// http://www.gnu.org/software/ccrtp/doc/refman/html/formats_8h.html#a0
+// 0 PCMU A 8000 1 [RFC3551]
+  PAYLOAD_CODEC_ULAW = 0, 
+// 3 GSM  A 8000 1 [RFC3551]
+  PAYLOAD_CODEC_GSM = 3,
+// 8 PCMA A 8000 1 [RFC3551]
+  PAYLOAD_CODEC_ALAW = 8,
+// http://www.ietf.org/rfc/rfc3952.txt
+// 97 iLBC/8000
+  PAYLOAD_CODEC_ILBC = 97,
+// http://www.speex.org/drafts/draft-herlein-speex-rtp-profile-00.txt
+//  97 speex/8000
+// http://support.xten.com/viewtopic.php?p=8684&sid=3367a83d01fdcad16c7459a79859b08e
+// 100 speex/16000
+  PAYLOAD_CODEC_SPEEX = 110
+} CodecType;
+
+#include "audiocodec.h"
+typedef std::map<CodecType, AudioCodec*> CodecMap;
+
+class CodecDescriptorMap {
+public:
+  /**
+   * Initialize all codec 
+   */
+  CodecDescriptorMap();
+  ~CodecDescriptorMap() {};
+  CodecMap getMap() { return _codecMap; }
+
+  /**
+   * Get codec with is associated payload
+   * @param payload the payload associated with the payload
+   *                same as getPayload()
+   * @return the address of the codec or 0
+   */
+  AudioCodec* getCodec(CodecType payload);
+
+  /**
+   * Get codec with is associated payload
+   * Put a codec active, with is codecName
+   * O(n) if not found where n is the number of element
+   * @param codecName the same that getCodec(number)->getCodecName()
+   */
+  void setActive(const std::string& officialName);
+private:
+  CodecMap _codecMap;
+};
+
+#endif // __CODEC_DESCRIPTOR_H__
diff --git a/src/audio/common.h b/src/audio/common.h
new file mode 100644
index 0000000000000000000000000000000000000000..5594a1a00bd626508088b4c2efcbea41dcdae8dd
--- /dev/null
+++ b/src/audio/common.h
@@ -0,0 +1,75 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+	Type definitions and helper macros which aren't part of Standard C++
+	This will need to be edited on systems where 'char', 'short' and 'int'
+   	have sizes different from 8, 16 and 32 bits.
+*/
+
+#ifndef __COMMON_H__
+#define __COMMON_H__
+
+
+// #define DEBUG	/**< Defined when compiling code for debugging */
+
+/*
+Basic integer types.
+Note 'int' is assumed to be in 2s complement format and at least 32 bits in size
+*/
+typedef unsigned char  uint8;	/**< An 8 bit unsigned integer */
+typedef unsigned short uint16;	/**< An 16 bit unsigned integer */
+typedef unsigned int   uint32;	/**< An 32 bit unsigned integer */
+typedef signed char    int8;	/**< An 8 bit signed integer (2s complement) */
+typedef signed short   int16;	/**< An 16 bit signed integer (2s complement) */
+typedef signed int     int32;	/**< An 32 bit signed integer (2s complement) */
+typedef unsigned int   uint;	/**< An unsigned integer or at least 32 bits */
+
+
+#ifndef NULL
+#define NULL 0		/**< Used to represent a null pointer type */
+#endif
+
+
+#ifdef _MSC_VER		// Compiling for Microsoft Visual C++
+
+#define DEBUGGER	{ _asm int 3 }			/**< Invoke debugger */
+#define IMPORT		__declspec(dllexport)	/**< Mark a function which is to be imported from a DLL */
+#define EXPORT		__declspec(dllexport)	/**< Mark a function to be exported from a DLL */
+#define ASSERT(c)	{ if(!(c)) DEBUGGER; }	/**< Assert that expression 'c' is true */
+
+#else				// Not compiling for Microsoft Visual C++ ...
+
+#define DEBUGGER							/**< Invoke debugger */
+#define IMPORT								/**< Mark a function which is to be imported from a DLL */
+#define EXPORT								/**< Mark a function to be exported from a DLL */
+//#define ASSERT(c)							/**< Assert that expression 'c' is true */
+
+#endif
+
+
+#ifdef DEBUG
+#define ASSERT_DEBUG(c) ASSERT(c)	/**< Assert that expression 'c' is true (when compiled for debugging)*/
+#else
+#define ASSERT_DEBUG(c)
+#endif
+
+
+#endif
+
diff --git a/src/audio/dtmf.cpp b/src/audio/dtmf.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9cdf2d8c5b4d5dfcf47ae5ae06407fe72cb4597a
--- /dev/null
+++ b/src/audio/dtmf.cpp
@@ -0,0 +1,74 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author : Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * 	Portions Copyright (c) 2000 Billy Biggs <bbiggs@div8.net>
+ *  Portions Copyright (c) 2004 Wirlab <kphone@wirlab.net>
+ *                                                                              
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *                                                                              
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *                                                                              
+ *  You 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.
+ */
+
+#include "dtmf.h"
+
+DTMF::DTMF (unsigned int sampleRate, unsigned int nbChannel) : dtmf(sampleRate, nbChannel) {
+  currentTone = 0;
+  newTone = 0;
+}
+
+DTMF::~DTMF (void) {
+}
+
+void 
+DTMF::startTone (char code) {
+  newTone = code;
+}
+
+bool 
+DTMF::generateDTMF (int16* buffer, size_t n) {
+	if (!buffer) return false;
+
+  try {
+    if (currentTone != 0) {
+      // Currently generating a DTMF tone
+      if (currentTone == newTone) {
+        // Continue generating the same tone
+        dtmf.getNextSamples(buffer, n);
+        return true;
+      } else if (newTone != 0) {
+        // New tone requested
+        dtmf.getSamples(buffer, n, newTone);
+        currentTone = newTone;
+        return true;
+      } else {
+        // Stop requested
+        currentTone = newTone;
+        return false;
+      }
+    } else {
+      // Not generating any DTMF tone
+      if (newTone) {
+        // Requested to generate a DTMF tone
+        dtmf.getSamples(buffer, n, newTone);
+        currentTone = newTone;
+        return true;
+      }
+      return false;
+    }
+  } catch(DTMFException e) {
+    // invalid key
+    return false;
+  }
+}
diff --git a/src/audio/dtmf.h b/src/audio/dtmf.h
new file mode 100644
index 0000000000000000000000000000000000000000..183d2fe14c9251b3984bd39b501f87627033f085
--- /dev/null
+++ b/src/audio/dtmf.h
@@ -0,0 +1,47 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * 	Portions Copyright (c) 2000 Billy Biggs <bbiggs@div8.net>
+ *  Portions Copyright (c) 2004 Wirlab <kphone@wirlab.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+
+#ifndef __DTMF_H_
+#define __DTMF_H_
+
+#include "../global.h"
+#include "dtmfgenerator.h"
+
+class DTMF {
+public:
+  /**
+   * Create a new DTMF.
+   * @param samplingRate frequency of the sample (ex: 8000 hz)
+   */
+	DTMF (unsigned int sampleRate, unsigned int nbChannel);
+	~DTMF (void);
+	
+	void startTone		(char);
+	bool generateDTMF	(int16*, size_t);
+
+	char currentTone;
+	char newTone;
+
+	DTMFGenerator dtmf;
+};
+
+#endif // __KEY_DTMF_H_
diff --git a/src/audio/dtmfgenerator.cpp b/src/audio/dtmfgenerator.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..1b4e33c9cdab432c33479414dcd7192a961d63c1
--- /dev/null
+++ b/src/audio/dtmfgenerator.cpp
@@ -0,0 +1,184 @@
+/**
+ * Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ * Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * Portions (c) 2003 iptel.org
+ *
+ * This program 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.
+ * 
+ * This program is distributed in the hope that 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 this 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.
+ *
+ */
+
+#include <math.h>
+
+#include "dtmfgenerator.h"
+#include "../global.h"
+
+
+/*
+ * Tone frequencies
+ */
+const DTMFGenerator::DTMFTone DTMFGenerator::tones[NUM_TONES] = {
+	{'0', 941, 1336},
+	{'1', 697, 1209},
+	{'2', 697, 1336},
+	{'3', 697, 1477},
+	{'4', 770, 1209},
+	{'5', 770, 1336},
+	{'6', 770, 1477},
+	{'7', 852, 1209},
+	{'8', 852, 1336},
+	{'9', 852, 1477},
+	{'A', 697, 1633},
+	{'B', 770, 1633},
+	{'C', 852, 1633},
+	{'D', 941, 1633},
+	{'*', 941, 1209},
+	{'#', 941, 1477}
+};
+
+
+DTMFException::DTMFException(const char* _reason) throw()
+{
+	reason = _reason;
+}
+
+
+DTMFException::~DTMFException() throw()
+{
+}
+
+
+const char* DTMFException::what() const throw()
+{
+	return reason;
+}
+
+
+
+/*
+ * Initialize the generator
+ */
+DTMFGenerator::DTMFGenerator(unsigned int sampleRate, unsigned int nbChannel) : tone("", sampleRate, nbChannel) 
+{
+  _nbChannel  = nbChannel;
+  _sampleRate = sampleRate;
+  state.offset = 0;
+  state.sample = 0;
+
+  for(int i = 0; i < NUM_TONES; i++) {
+    samples[i] = generateSample(i);
+  }
+}
+	
+
+DTMFGenerator::~DTMFGenerator() {
+  for(int i = 0; i < NUM_TONES; i++) {
+    delete[] samples[i]; samples[i] = NULL;
+  }
+}
+
+
+/*
+ * Get n samples of the signal of code code
+ */
+void DTMFGenerator::getSamples(int16* buffer, size_t n, unsigned char code) throw(DTMFException) {
+	size_t i;
+	if (!buffer) {
+	  throw DTMFException("Invalid parameter value");
+	}
+
+	switch(code) {
+	case '0': state.sample = samples[0];  break;
+	case '1': state.sample = samples[1];  break;
+	case '2': state.sample = samples[2];  break;
+	case '3': state.sample = samples[3];  break;
+	case '4': state.sample = samples[4];  break;
+	case '5': state.sample = samples[5];  break;
+	case '6': state.sample = samples[6];  break;
+	case '7': state.sample = samples[7];  break;
+	case '8': state.sample = samples[8];  break;
+	case '9': state.sample = samples[9];  break;
+	case 'A':
+	case 'a': state.sample = samples[10]; break;
+	case 'B':
+	case 'b': state.sample = samples[11]; break;
+	case 'C':
+	case 'c': state.sample = samples[12]; break;
+	case 'D':
+	case 'd': state.sample = samples[13]; break;
+	case '*': state.sample = samples[14]; break;
+	case '#': state.sample = samples[15]; break;
+	default:
+			throw DTMFException("Invalid code");
+		return;
+		break;
+	}
+
+	for(i = 0; i < n; i++) {
+		buffer[i] = state.sample[i % _sampleRate];
+	}
+
+	state.offset = i % _sampleRate;
+}
+
+
+/*
+ * Get next n samples (continues where previous call to
+ * genSample or genNextSamples stopped
+ */
+void DTMFGenerator::getNextSamples(int16* buffer, size_t n) throw(DTMFException)
+{
+	size_t i;
+
+	if (!buffer) {
+	  throw DTMFException("Invalid parameter");
+	}
+
+	if (state.sample == 0) {
+	  throw DTMFException("DTMF generator not initialized");
+	}
+
+	for(i = 0; i < n; i++) {
+	  buffer[i] = state.sample[(state.offset + i) % _sampleRate];
+	}
+	
+	state.offset = (state.offset + i) % _sampleRate;
+}
+
+
+/*
+ * Generate a tone sample
+ */
+int16* DTMFGenerator::generateSample(unsigned char code) throw (DTMFException) {
+	int16* ptr;
+
+	try {
+		ptr = new int16[_sampleRate*_nbChannel]; 
+		if (!ptr) {
+			  throw new DTMFException("No memory left");
+			return 0;
+		}
+		  
+		tone.genSin(ptr, tones[code].higher, tones[code].lower,  _sampleRate);
+		
+		return ptr;
+	} catch(...) {
+			throw new DTMFException("No memory left");
+			return 0;
+	}
+
+}
diff --git a/src/audio/dtmfgenerator.h b/src/audio/dtmfgenerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..894e7dd53cb1aa6405b49b7ac1db1b598799f35a
--- /dev/null
+++ b/src/audio/dtmfgenerator.h
@@ -0,0 +1,108 @@
+/**
+ * Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ * Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * Portions (c) 2003 iptel.org
+ *
+ * This program 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.
+ * 
+ * This program is distributed in the hope that 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 this 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 DTMFGENERATOR_H
+#define DTMFGENERATOR_H
+
+#include <exception>
+#include <string.h>
+
+//#include "tonegenerator.h"
+#include "tone.h"
+
+#define NUM_TONES 16
+
+/*
+ * DMTF Generator Exception
+ */
+class DTMFException : public std::exception
+{
+private:
+	const char* reason;
+public:
+	DTMFException(const char* _reason) throw();
+	virtual ~DTMFException() throw();
+	virtual const char* what() const throw();
+};
+
+
+/*
+ * DTMF Tone Generator
+ */
+class DTMFGenerator 
+{
+private:
+	struct DTMFTone {
+		unsigned char code; // Code of the tone
+		int lower;          // Lower frequency
+		int higher;         // Higher frequency
+	};
+
+/*
+ * State of the DTMF generator
+ */
+	struct DTMFState {
+		unsigned int offset;   // Offset in the sample currently being played
+		int16* sample;         // Currently generated code
+	};
+
+	DTMFState state;
+	static const DTMFTone tones[NUM_TONES];
+
+	int16* samples[NUM_TONES];        // Generated samples
+
+  /**
+   * Sampling rate of generated dtmf
+   */
+  int _sampleRate;
+  int _nbChannel;
+  Tone tone;
+
+public:
+  /**
+   * DTMF Generator contains frequency of each keys
+   * and can build one DTMF.
+   * @param sampleRate frequency of the sample (ex: 8000 hz)
+   */
+	DTMFGenerator(unsigned int sampleRate, unsigned int nbChannel);
+	~DTMFGenerator();
+
+/*
+ * Get n samples of the signal of code code
+ */
+	void getSamples(int16* buffer, size_t n, unsigned char code) throw (DTMFException);
+
+/*
+ * Get next n samples (continues where previous call to
+ * genSample or genNextSamples stopped
+ */
+	void getNextSamples(int16* buffer, size_t n) throw (DTMFException);
+
+private:
+	int16* generateSample(unsigned char code) throw (DTMFException);
+
+};
+
+
+#endif // DTMFGENERATOR_H
diff --git a/src/audio/g711.cpp b/src/audio/g711.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ace00df9d7c73943e3339546ee68fd5f71a02c4f
--- /dev/null
+++ b/src/audio/g711.cpp
@@ -0,0 +1,279 @@
+/**
+ * Copyright (C) 2005 Savoir-Faire Linux inc.
+ * Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+    Implementation of ITU-T (formerly CCITT) Recomendation G711
+
+    Copyright (C) 2004  J.D.Medhurst (a.k.a. Tixy)
+
+ * This program 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.
+ * 
+ * This program is distributed in the hope that 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 this 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.
+ *
+ */
+#include "common.h"
+#include "g711.h"
+
+
+/*
+Members of class G711
+*/
+
+
+uint8 G711::ALawEncode(int16 pcm16)
+	{
+	int p = pcm16;
+	uint a;  // A-law value we are forming
+	if(p<0)
+		{
+		// -ve value
+		// Note, ones compliment is here used here as this keeps encoding symetrical
+
+		// and equal spaced around zero cross-over, (it also matches the standard).
+		p = ~p;
+		a = 0x00; // sign = 0
+		}
+	else
+		{
+		// +ve value
+		a = 0x80; // sign = 1
+		}
+
+	// Calculate segment and interval numbers
+	p >>= 4;
+	if(p>=0x20)
+		{
+		if(p>=0x100)
+			{
+			p >>= 4;
+			a += 0x40;
+			}
+		if(p>=0x40)
+			{
+			p >>= 2;
+			a += 0x20;
+			}
+		if(p>=0x20)
+			{
+			p >>= 1;
+			a += 0x10;
+			}
+		}
+	// a&0x70 now holds segment value and 'p' the interval number
+
+	a += p;  // a now equal to encoded A-law value
+
+	return a^0x55;  // A-law has alternate bits inverted for transmission
+	}
+
+
+int G711::ALawDecode(uint8 alaw)
+	{
+	alaw ^= 0x55;  // A-law has alternate bits inverted for transmission
+
+	uint sign = alaw&0x80;
+
+	int linear = alaw&0x1f;
+	linear <<= 4;
+	linear += 8;  // Add a 'half' bit (0x08) to place PCM value in middle of range
+
+	alaw &= 0x7f;
+	if(alaw>=0x20)
+		{
+		linear |= 0x100;  // Put in MSB
+		uint shift = (alaw>>4)-1;
+		linear <<= shift;
+		}
+
+	if(!sign)
+		return -linear;
+	else
+		return linear;
+	}
+
+
+uint8 G711::ULawEncode(int16 pcm16)
+	{
+	int p = pcm16;
+	uint u;  // u-law value we are forming
+
+	if(p<0)
+		{
+		// -ve value
+		// Note, ones compliment is here used here as this keeps encoding symetrical
+		// and equal spaced around zero cross-over, (it also matches the standard).
+		p = ~p;
+		u = 0x80^0x10^0xff;  // Sign bit = 1 (^0x10 because this will get inverted later) ^0xff ^0xff to invert final u-Law code
+		}
+	else
+		{
+		// +ve value
+		u = 0x00^0x10^0xff;  // Sign bit = 0 (-0x10 because this amount extra will get added later) ^0xff to invert final u-Law code
+		}
+
+	p += 0x84; // Add uLaw bias
+
+	if(p>0x7f00)
+		p = 0x7f00;  // Clip to 15 bits
+
+	// Calculate segment and interval numbers
+	p >>= 3;	// Shift down to 13bit
+	if(p>=0x100)
+		{
+		p >>= 4;
+		u ^= 0x40;
+		}
+	if(p>=0x40)
+		{
+		p >>= 2;
+		u ^= 0x20;
+		}
+	if(p>=0x20)
+		{
+		p >>= 1;
+		u ^= 0x10;
+		}
+	// (u^0x10)&0x70 now equal to the segment value and 'p' the interval number (^0x10)
+
+	u ^= p; // u now equal to encoded u-law value (with all bits inverted)
+
+	return u;
+	}
+
+
+int G711::ULawDecode(uint8 ulaw)
+	{
+	ulaw ^= 0xff;  // u-law has all bits inverted for transmission
+
+	int linear = ulaw&0x0f;
+	linear <<= 3;
+	linear |= 0x84;  // Set MSB (0x80) and a 'half' bit (0x04) to place PCM value in middle of range
+
+	uint shift = ulaw>>4;
+	shift &= 7;
+	linear <<= shift;
+
+	linear -= 0x84; // Subract uLaw bias
+	
+	if(ulaw&0x80)
+		return -linear;
+	else
+		return linear;
+	}
+
+
+uint8 G711::ALawToULaw(uint8 alaw)
+	{
+	uint8 sign=alaw&0x80;
+	alaw ^= sign;
+	alaw ^= 0x55;
+	uint ulaw;
+	if(alaw<45)
+		{
+		if(alaw<24)
+			ulaw = (alaw<8) ? (alaw<<1)+1 : alaw+8;
+		else
+			ulaw = (alaw<32) ? (alaw>>1)+20 : alaw+4;
+		}
+	else
+		{
+		if(alaw<63)
+			ulaw = (alaw<47) ? alaw+3 : alaw+2;
+		else
+			ulaw = (alaw<79) ? alaw+1 : alaw;
+		}
+	ulaw ^= sign;
+	return ulaw^0x7f;
+	}
+
+
+uint8 G711::ULawToALaw(uint8 ulaw)
+	{
+	uint8 sign=ulaw&0x80;
+	ulaw ^= sign;
+	ulaw ^= 0x7f;
+	uint alaw;
+	if(ulaw<48)
+		{
+		if(ulaw<=32)
+			alaw = (ulaw<=15) ? ulaw>>1 : ulaw-8;
+		else
+			alaw = (ulaw<=35) ? (ulaw<<1)-40 : ulaw-4;
+		}
+	else
+		{
+		if(ulaw<=63)
+			alaw = (ulaw==48) ? ulaw-3 : ulaw-2;
+		else
+			alaw = (ulaw<=79) ? ulaw-1 : ulaw;
+		}
+	alaw ^= sign;
+	return alaw^0x55;
+	}
+
+
+uint G711::ALawEncode(uint8* dst, int16* src, uint srcSize)
+	{
+	srcSize >>= 1;
+	uint8* end = dst+srcSize;
+	while(dst<end)
+		*dst++ = ALawEncode(*src++);
+	return srcSize;
+	}
+
+
+uint G711::ALawDecode(int16* dst, uint8* src, uint srcSize)
+	{
+	int16* end = dst+srcSize;
+	while(dst<end)
+		*dst++ = ALawDecode(*src++);
+	return srcSize<<1;
+	}
+
+
+uint G711::ULawEncode(uint8* dst, int16* src, uint srcSize)
+	{
+	srcSize >>= 1;
+	uint8* end = dst+srcSize;
+	while(dst<end)
+		*dst++ = ULawEncode(*src++);
+	return srcSize;
+	}
+
+
+uint G711::ULawDecode(int16* dst, uint8* src, uint srcSize)
+	{
+	int16* end = dst+srcSize;
+	while(dst<end)
+		*dst++ = ULawDecode(*src++);
+	return srcSize<<1;
+	}
+
+
+uint G711::ALawToULaw(uint8* dst, uint8* src, uint srcSize)
+	{
+	uint8* end = dst+srcSize;
+	while(dst<end)
+		*dst++ = ALawToULaw(*src++);
+	return srcSize;
+	}
+
+
+uint G711::ULawToALaw(uint8* dst, uint8* src, uint srcSize)
+	{
+	uint8* end = dst+srcSize;
+	while(dst<end)
+		*dst++ = ULawToALaw(*src++);
+	return srcSize;
+	}
diff --git a/src/audio/g711.h b/src/audio/g711.h
new file mode 100644
index 0000000000000000000000000000000000000000..37cd32984930c19159ee56dbbb43847a44e82d9c
--- /dev/null
+++ b/src/audio/g711.h
@@ -0,0 +1,145 @@
+/**
+ * Copyright (C) 2005 Savoir-Faire Linux inc.
+ * Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+    Implementation of ITU-T (formerly CCITT) Recomendation G711
+
+    Copyright (C) 2004  J.D.Medhurst (a.k.a. Tixy)
+
+ * This program 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.
+ * 
+ * This program is distributed in the hope that 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 this 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 __G711_H__
+#define __G711_H__
+
+#include "common.h"
+
+/**
+A class which implements ITU-T (formerly CCITT) Recomendation G711
+"Pulse Code Modulation (PCM) of Voice Frequencies"
+
+This encodes and decodes uniform PCM values to/from 8 bit A-law and u-Law values.
+
+Note, the methods in this class use uniform PCM values which are of 16 bits precision,
+these are 'left justified' values corresponding to the 13 and 14 bit values described
+in G711.
+*/
+class G711
+	{
+public:
+	/**
+	Encode a 16 bit uniform PCM value into an A-Law value
+	@param pcm16 A 16 bit uniform PCM value (sign extented into an int).
+	             If the value doesn't lie in the range -32768 to 32767 then the
+				 result is undefined.
+	@return The A-Law encoded value corresponding to pcm16
+	*/
+	static uint8 ALawEncode(int16 pcm16);
+
+	/**
+	Encode an A-Law value into a 16 bit uniform PCM value
+	@param alaw An A-Law encoded value
+	@return The 16 bit uniform PCM value corresponding to alaw
+	*/
+	static int ALawDecode(uint8 alaw);
+
+	/**
+	Encode a 16 bit uniform PCM value into an u-Law value
+	@param pcm16 A 16 bit uniform PCM value (sign extented into an int)
+	             If the value doesn't lie in the range -32768 to 32767 then the
+				 result is undefined.
+	@return The u-Law encoded value corresponding to pcm16
+	*/
+	static uint8 ULawEncode(int16 pcm16);
+
+	/**
+	Encode an u-Law value into a 16 bit uniform PCM value
+	@param ulaw An u-Law encoded value
+	@return The 16 bit uniform PCM value corresponding to ulaw
+	*/
+	static int ULawDecode(uint8 ulaw);
+
+	/**
+	Convert an A-Law value into a u-law value.
+	@param alaw An A-Law encoded value
+	@return The u-law value.
+	*/
+	static uint8 ALawToULaw(uint8 alaw);
+
+	/**
+	Convert a u-Law value into an A-law value.
+	@param ulaw An u-Law encoded value
+	@return The A-Law value
+	*/
+	static uint8 ULawToALaw(uint8 ulaw);
+
+	/**
+	Encode a buffer of 16 bit uniform PCM values into A-Law values
+	@param dst Pointer to location to store A-Law encoded values
+	@param src Pointer to the buffer of 16 bit uniform PCM values to be encoded
+	@param srcSize The size in bytes of the src buffer
+	@return The number of bytes which were stored at dst (equal to srcSize>>1)
+	*/
+	static uint ALawEncode(uint8* dst, int16* src, uint srcSize);
+
+	/**
+	Decode a buffer of A-Law values into 16 bit uniform PCM values
+	@param dst Pointer to location to store decoded 16 bit uniform PCM values
+	@param src Pointer to the buffer of A-Law values to be decoded
+	@param srcSize The size in bytes of the src buffer
+	@return The number of bytes which were stored at dst (equal to srcSize<<1)
+	*/
+	static uint ALawDecode(int16* dst, uint8* src, uint srcSize);
+
+	/**
+	Encode a buffer of 16 bit uniform PCM values into u-Law values
+	@param dst Pointer to location to store u-Law encoded values
+	@param src Pointer to the buffer of 16 bit uniform PCM values to be encoded
+	@param srcSize The size in bytes of the src buffer
+	@return The number of bytes which were stored at dst (equal to srcSize>>1)
+	*/
+	static uint ULawEncode(uint8* dst, int16* src, uint srcSize);
+
+	/**
+	Decode a buffer of u-Law values into 16 bit uniform PCM values
+	@param dst Pointer to location to store decoded 16 bit uniform PCM values
+	@param src Pointer to the buffer of u-Law values to be decoded
+	@param srcSize The size in bytes of the src buffer
+	@return The number of bytes which were stored at dst (equal to srcSize<<1)
+	*/
+	static uint ULawDecode(int16* dst, uint8* src, uint srcSize);
+
+	/**
+	Convert a buffer of A-Law value into u-law values.
+	@param dst Pointer to location to store u-law values
+	@param src Pointer to the buffer of A-Law values to be converted
+	@param srcSize The size in bytes of the src buffer
+	@return The number of bytes which were stored at dst (equal to srcSize)
+	*/
+	static uint ALawToULaw(uint8* dst, uint8* src, uint srcSize);
+
+	/**
+	Convert a buffer of u-Law value into A-law values.
+	@param dst Pointer to location to store A-law values
+	@param src Pointer to the buffer of u-Law values to be converted
+	@param srcSize The size in bytes of the src buffer
+	@return The number of bytes which were stored at dst (equal to srcSize)
+	*/
+	static uint ULawToALaw(uint8* dst, uint8* src, uint srcSize);
+	};
+
+#endif
+
diff --git a/src/audio/gsm/Makefile.am b/src/audio/gsm/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..6e50e548c4b8f7d8a01749a7516cb7db7f6ee2e5
--- /dev/null
+++ b/src/audio/gsm/Makefile.am
@@ -0,0 +1,26 @@
+EXTRA_DIST = ChangeLog INSTALL MACHINES MANIFEST README COPYRIGHT
+
+noinst_LTLIBRARIES = libgsm.la
+
+noinst_HEADERS = config.h  gsm.h  private.h  proto.h  toast.h  unproto.h
+
+libgsm_la_SOURCES = \
+	add.c\
+	gsm_create.c\
+	gsm_explode.c\
+	long_term.c\
+	short_term.c\
+	code.c\
+	gsm_decode.c\
+	gsm_implode.c\
+	lpc.c\
+	table.c\
+	debug.c\
+	gsm_destroy.c\
+	gsm_option.c\
+	preprocess.c\
+	decode.c\
+	gsm_encode.c\
+	gsm_print.c\
+	rpe.c
+
diff --git a/src/audio/gsm/add.c b/src/audio/gsm/add.c
new file mode 100644
index 0000000000000000000000000000000000000000..21ccfabe7b6fb663e739cd7bc08ba45d92151acd
--- /dev/null
+++ b/src/audio/gsm/add.c
@@ -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$ */
+
+/*
+ *  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;
+}
diff --git a/src/audio/gsm/code.c b/src/audio/gsm/code.c
new file mode 100644
index 0000000000000000000000000000000000000000..90593dc9aa7c10f547471548155f1dd75b1e9ba4
--- /dev/null
+++ b/src/audio/gsm/code.c
@@ -0,0 +1,103 @@
+/*
+ * 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$ */
+
+#include	"config.h"
+
+
+/*
+  #ifdef	HAS_STDLIB_H
+//#include	<stdlib.h>
+*/
+#ifdef	HAS_STRING_H
+#include	<string.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 ]	 */
+
+	static word e[50];
+
+	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	*/
+					e + 5,	  /* e      [0..39] OUT	*/
+					dpp,	  /* dpp    [0..39] OUT */
+					 Nc++,
+					 bc++);
+
+		Gsm_RPE_Encoding	( S,
+					e + 5,	/* e	  ][0..39][ IN/OUT */
+					  xmaxc++, Mc++, xMc );
+		/*
+		 * Gsm_Update_of_reconstructed_short_time_residual_signal
+		 *			( dpp, e + 5, dp );
+		 */
+
+		{ register int i;
+		  register longword ltmp;
+		  for (i = 0; i <= 39; i++)
+			dp[ i ] = GSM_ADD( e[5 + i], dpp[i] );
+		}
+		dp  += 40;
+		dpp += 40;
+
+	}
+	(void)memcpy( (char *)S->dp0, (char *)(S->dp0 + 160),
+		120 * sizeof(*S->dp0) );
+}
diff --git a/src/audio/gsm/config.h b/src/audio/gsm/config.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad57d91faf32c4056070b3c89c77e0c47468a651
--- /dev/null
+++ b/src/audio/gsm/config.h
@@ -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$*/
+
+#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	*/
+/*efine	HAS_LIMITS_H	1	*/	/* /usr/include/limits.h	*/
+#define	HAS_FCNTL_H	1		/* /usr/include/fcntl.h		*/
+/*efine	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		*/
+/*efine	HAS_UTIMBUF	1	*/	/* struct utimbuf		*/
+/*efine	HAS_UTIMEUSEC   1*/		/* microseconds in utimbuf?	*/
+
+#endif	/* CONFIG_H */
diff --git a/src/audio/gsm/debug.c b/src/audio/gsm/debug.c
new file mode 100644
index 0000000000000000000000000000000000000000..e05210428f3ee87732c887e9e0cf5cfbb07ea17d
--- /dev/null
+++ b/src/audio/gsm/debug.c
@@ -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$ */
+
+#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, "%ld ", 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: %ld\n", name, (long)value );
+}
+
+void gsm_debug_word P2(  (name, value),
+	char	* name,
+	word	  value	)
+{
+	fprintf(stderr, "%s: %ld\n", name, (long)value);
+}
+
+#endif
diff --git a/src/audio/gsm/decode.c b/src/audio/gsm/decode.c
new file mode 100644
index 0000000000000000000000000000000000000000..34e5586633af1bf58fb73ad7220d20aef641bdbb
--- /dev/null
+++ b/src/audio/gsm/decode.c
@@ -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$ */
+
+#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);
+}
diff --git a/src/audio/gsm/gsm.h b/src/audio/gsm/gsm.h
new file mode 100644
index 0000000000000000000000000000000000000000..81065e51290283a971c77279a5d913aef2f3f57a
--- /dev/null
+++ b/src/audio/gsm/gsm.h
@@ -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$*/
+
+#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 */
diff --git a/src/audio/gsm/gsm_create.c b/src/audio/gsm/gsm_create.c
new file mode 100644
index 0000000000000000000000000000000000000000..a59aa2f2a38335b87ac0d943a5b1787bd3450ae2
--- /dev/null
+++ b/src/audio/gsm/gsm_create.c
@@ -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$";
+
+#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;
+}
diff --git a/src/audio/gsm/gsm_decode.c b/src/audio/gsm/gsm_decode.c
new file mode 100644
index 0000000000000000000000000000000000000000..7318ba2d4d801ea8f6dee4a2558a61bb92ca594b
--- /dev/null
+++ b/src/audio/gsm/gsm_decode.c
@@ -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$ */
+
+#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;
+}
diff --git a/src/audio/gsm/gsm_destroy.c b/src/audio/gsm/gsm_destroy.c
new file mode 100644
index 0000000000000000000000000000000000000000..4807c0acdda2442411619418bc76671afce875ac
--- /dev/null
+++ b/src/audio/gsm/gsm_destroy.c
@@ -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$ */
+
+#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);
+}
diff --git a/src/audio/gsm/gsm_encode.c b/src/audio/gsm/gsm_encode.c
new file mode 100644
index 0000000000000000000000000000000000000000..62338300ee44460597438158e702a59ab58676a1
--- /dev/null
+++ b/src/audio/gsm/gsm_encode.c
@@ -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$ */
+
+#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);
+
+	}
+}
diff --git a/src/audio/gsm/gsm_explode.c b/src/audio/gsm/gsm_explode.c
new file mode 100644
index 0000000000000000000000000000000000000000..a906fc2ed88e5d4fb2502f7646f5182f0e6cbefd
--- /dev/null
+++ b/src/audio/gsm/gsm_explode.c
@@ -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$ */
+
+#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;
+}
diff --git a/src/audio/gsm/gsm_implode.c b/src/audio/gsm/gsm_implode.c
new file mode 100644
index 0000000000000000000000000000000000000000..453b8cf390268ac8e140ccd4093faa7a97bc5c3b
--- /dev/null
+++ b/src/audio/gsm/gsm_implode.c
@@ -0,0 +1,515 @@
+/*
+ * 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$ */
+
+#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 == 0) {
+
+			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	(source + 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	(source + 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	(source + 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	(source + 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	(source + 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	(source + 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	(source + 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	(source + 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 
+	{
+
+	*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);
+	}
+}
diff --git a/src/audio/gsm/gsm_option.c b/src/audio/gsm/gsm_option.c
new file mode 100644
index 0000000000000000000000000000000000000000..2807801328ed2b73d37ecb9cd0e4eec5ee2e9de3
--- /dev/null
+++ b/src/audio/gsm/gsm_option.c
@@ -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$ */
+
+#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;
+}
diff --git a/src/audio/gsm/gsm_print.c b/src/audio/gsm/gsm_print.c
new file mode 100644
index 0000000000000000000000000000000000000000..af745bc48a0742580ae8a162809f7315f3231aec
--- /dev/null
+++ b/src/audio/gsm/gsm_print.c
@@ -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$ */
+
+#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;
+}
diff --git a/src/audio/gsm/long_term.c b/src/audio/gsm/long_term.c
new file mode 100644
index 0000000000000000000000000000000000000000..fd67bda193f027ed9829b683224622d19adb928c
--- /dev/null
+++ b/src/audio/gsm/long_term.c
@@ -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$ */
+
+#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 ];
+}
diff --git a/src/audio/gsm/lpc.c b/src/audio/gsm/lpc.c
new file mode 100644
index 0000000000000000000000000000000000000000..ac2b8a9eb067ac1a3760f26cfa21a846b2eb6a96
--- /dev/null
+++ b/src/audio/gsm/lpc.c
@@ -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$ */
+
+#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);
+}
diff --git a/src/audio/gsm/preprocess.c b/src/audio/gsm/preprocess.c
new file mode 100644
index 0000000000000000000000000000000000000000..99c0709dcfb007fbb92116457d0be509f49f0001
--- /dev/null
+++ b/src/audio/gsm/preprocess.c
@@ -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$ */
+
+#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;
+}
diff --git a/src/audio/gsm/private.h b/src/audio/gsm/private.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b538cc27aa353ac3ef68692e820d6c43a26e224
--- /dev/null
+++ b/src/audio/gsm/private.h
@@ -0,0 +1,268 @@
+/*
+ * 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$*/
+
+#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		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 */
diff --git a/src/audio/gsm/proto.h b/src/audio/gsm/proto.h
new file mode 100644
index 0000000000000000000000000000000000000000..87cf05e8a76a5c8cc7a0822baa549230da8590d4
--- /dev/null
+++ b/src/audio/gsm/proto.h
@@ -0,0 +1,65 @@
+/*
+ * 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$*/
+
+#ifndef	PROTO_H
+#define	PROTO_H
+
+#if __cplusplus
+#	define	NeedFunctionPrototypes	1
+#endif
+
+#if __STDC__
+#	define	NeedFunctionPrototypes	1
+#endif
+
+#ifdef	_NO_PROTO
+#	undef	NeedFunctionPrototypes
+#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 */
diff --git a/src/audio/gsm/rpe.c b/src/audio/gsm/rpe.c
new file mode 100644
index 0000000000000000000000000000000000000000..8a6b81fae78b89de2c64275b896d3d4642dc7735
--- /dev/null
+++ b/src/audio/gsm/rpe.c
@@ -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$ */
+
+#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( SASR(xmax, temp), 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 );
+
+}
diff --git a/src/audio/gsm/short_term.c b/src/audio/gsm/short_term.c
new file mode 100644
index 0000000000000000000000000000000000000000..4f5fd7be741c770e3168568217fc87782e47bc40
--- /dev/null
+++ b/src/audio/gsm/short_term.c
@@ -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$ */
+
+#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);
+}
diff --git a/src/audio/gsm/table.c b/src/audio/gsm/table.c
new file mode 100644
index 0000000000000000000000000000000000000000..16a04118c13c0e6080ddaf146046bcf95c07ea24
--- /dev/null
+++ b/src/audio/gsm/table.c
@@ -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$ */
+
+/*  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 };
diff --git a/src/audio/gsm/toast.c b/src/audio/gsm/toast.c
new file mode 100644
index 0000000000000000000000000000000000000000..bea46827f6aec079a315c324e73d297ee80f7ea0
--- /dev/null
+++ b/src/audio/gsm/toast.c
@@ -0,0 +1,800 @@
+/*
+ * 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$ */
+
+#include	"toast.h"
+
+/*  toast -- lossy sound compression using the gsm library.
+ */
+
+char   * progname;
+
+int	f_decode   = 0;		/* decode rather than encode	 (-d) */
+int 	f_cat	   = 0;		/* write to stdout; implies -p   (-c) */
+int	f_force	   = 0;		/* don't ask about replacements  (-f) */
+int	f_precious = 0;		/* avoid deletion of original	 (-p) */
+int	f_fast	   = 0;		/* use faster fpt algorithm	 (-F) */
+int	f_verbose  = 0;		/* debugging			 (-V) */
+int	f_ltp_cut  = 0;		/* LTP cut-off margin	      	 (-C) */
+
+struct stat instat;		/* stat (inname) 		 */
+
+FILE	*in, 	 *out;
+char	*inname, *outname;
+
+/*
+ *  The function (*output)() writes a frame of 160 samples given as
+ *  160 signed 16 bit values (gsm_signals) to <out>.
+ *  The function (*input)() reads one such frame from <in>.
+ *  The function (*init_output)() begins output (e.g. writes a header).,
+ *  The function (*init_input)() begins input (e.g. skips a header).
+ *
+ *  There are different versions of input, output, init_input and init_output
+ *  for different formats understood by toast; which ones are used 
+ *  depends on the command line arguments and, in their absence, the
+ *  filename; the fallback is #defined in toast.h
+ *
+ *  The specific implementations of input, output, init_input and init_output
+ *  for a format `foo' live in toast_foo.c.
+ */
+
+int	(*output   ) P((gsm_signal *)),
+	(*input    ) P((gsm_signal *));
+int	(*init_input)  P((void)),
+	(*init_output) P((void));
+
+static int	generic_init P0() { return 0; }	/* NOP */
+
+struct fmtdesc {
+
+	char * name, * longname, * suffix;
+
+	int  (* init_input )  P((void)),
+	     (* init_output)  P((void));
+
+	int  (* input ) P((gsm_signal * )),
+	     (* output) P((gsm_signal * ));
+
+} f_audio = {
+		"audio",
+		"8 kHz, 8 bit u-law encoding with Sun audio header", ".au",
+		audio_init_input,
+		audio_init_output,
+		ulaw_input,
+		ulaw_output
+}, f_ulaw = {
+		"u-law", "plain 8 kHz, 8 bit u-law encoding", ".u",
+		generic_init,
+		generic_init,
+		ulaw_input,
+		ulaw_output 
+
+}, f_alaw = {
+		"A-law", "8 kHz, 8 bit A-law encoding", ".A",
+		generic_init,
+		generic_init,
+		alaw_input,
+		alaw_output
+
+}, f_linear = {
+		"linear",
+		"16 bit (13 significant) signed 8 kHz signal", ".l",
+		generic_init,
+		generic_init,
+		linear_input,
+		linear_output
+};
+
+struct fmtdesc * alldescs[] = {
+	&f_audio,
+	&f_alaw,
+	&f_ulaw,
+	&f_linear,
+	(struct fmtdesc *)NULL
+};
+
+#define	DEFAULT_FORMAT	f_ulaw		/* default audio format, others	*/
+					/* are: f_alaw,f_audio,f_linear */
+struct fmtdesc * f_format  = 0;
+
+/*
+ *  basename + suffix of a pathname
+ */
+static char * endname P1((name), char * name)
+{
+	if (name) {
+		char * s = strrchr(name, '/');
+		if (s && s[1]) name = s + 1;
+	}
+	return name;
+
+}
+
+/*
+ *  Try to figure out what we're supposed to do from the argv[0], if
+ *  any, and set the parameters accordingly.
+ */
+static void parse_argv0 P1((av0), char * av0 )
+{
+	int 	l;
+
+	progname = av0 = endname(av0 ? av0 : "toast");
+
+	/*  If the name starts with `un', we want to decode, not code.
+	 *  If the name ends in `cat', we want to write to stdout,
+	 *  and decode as well.
+	 */
+
+	if (!strncmp(av0, "un", 2)) f_decode = 1;
+	if (  (l = strlen(av0)) >= 3 /* strlen("cat") */
+	   && !strcmp( av0 + l - 3, "cat" )) f_cat = f_decode = 1;
+}
+
+
+/*
+ *  Check whether the name (possibly generated by appending
+ *  .gsm to something else) is short enough for this system.
+ */
+static int length_okay P1((name), char * name)
+{
+	long	max_filename_length = 0;
+	char	* end;
+
+	/* If our _pathname_ is too long, we'll usually not be
+	 * able to open the file at all -- don't worry about that.
+	 * 
+	 * But if the _filename_ is too long, there is danger of
+	 * silent truncation on some systems, which results
+	 * in the target replacing the source!
+	 */
+
+	if (!name) return 0;
+	end = endname(name);
+
+#ifdef	NAME_MAX
+	max_filename_length  = NAME_MAX;
+#else
+#ifdef	_PC_NAME_MAX
+#ifdef USE_PATHCONF
+	{	char * s, tmp; 
+		
+		/*  s = dirname(name)
+		 */
+		if ((s = end) > name) {
+			if (s > name + 1) s--;
+			tmp = s;
+			*s  = 0;
+		}
+
+		errno = 0;
+		max_filename_length = pathconf(s > name ? name : ".",
+			_PC_NAME_MAX);
+		if (max_filename_length == -1 && errno) {
+			perror( s > name ? name : "." );
+			fprintf(stderr,
+		"%s: cannot get dynamic filename length limit for %s.\n",
+				progname, s > name ? name : ".");
+			return 0;
+		}
+		if (s > name) *s = tmp;
+	}
+#endif /* USE_PATHCONF  */
+#endif /* _PC_NAME_MAX  */
+#endif /* !NAME_MAX 	*/
+
+	if (max_filename_length > 0 && strlen(end) > max_filename_length) {
+		fprintf(stderr,
+			"%s: filename \"%s\" is too long (maximum is %ld)\n",
+			progname, endname(name), max_filename_length );
+		return 0;
+	}
+
+	return 1;
+}
+
+/*
+ *  Return a pointer the suffix of a string, if any.
+ *  A suffix alone has no suffix, an empty suffix can not be had.
+ */
+static char * suffix P2((name, suf), char *name, char * suf) 
+{
+	size_t nlen = strlen(name);
+	size_t slen = strlen(suf);
+
+	if (!slen || nlen <= slen) return (char *)0;
+	name += nlen - slen;
+	return memcmp(name, suf, slen) ? (char *)0 : name;
+}
+
+
+static void catch_signals P1((fun), SIGHANDLER_T (*fun) ()) 
+{
+#ifdef	SIGHUP
+	signal( SIGHUP,   fun );
+#endif
+#ifdef	SIGINT
+	signal( SIGINT,   fun );
+#endif
+#ifdef	SIGPIPE
+	signal( SIGPIPE,  fun );
+#endif
+#ifdef	SIGTERM
+	signal( SIGTERM,  fun );
+#endif
+#ifdef	SIGXFSZ
+	signal( SIGXFSZ,  fun );
+#endif
+}
+
+static SIGHANDLER_T onintr P0()
+{
+	char * tmp = outname;
+
+#ifdef	HAS_SYSV_SIGNALS
+	catch_signals( SIG_IGN );
+#endif
+
+	outname = (char *)0;
+	if (tmp) (void)unlink(tmp);
+
+	exit(1);
+}
+
+/*
+ *  Allocate some memory and complain if it fails.
+ */
+static char * emalloc P1((len), size_t len)
+{
+	char * s;
+	if (!(s = malloc(len))) {
+		fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
+			progname, len);
+		onintr();
+		exit(1);
+	}
+	return s;
+}
+
+static char* normalname P3((name, want, cut), char *name, char *want,char *cut)
+{
+	size_t	maxlen;
+	char 	* s, * p;
+
+	p = (char *)0;
+	if (!name) return p;
+
+	maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
+	p = strcpy(emalloc(maxlen), name);
+
+	if (s = suffix(p, cut)) strcpy(s, want);
+	else if (*want && !suffix(p, want)) strcat(p, want);
+
+	return p;
+}
+
+/*
+ *  Generate a `plain' (non-encoded) name from a given name.
+ */
+static char * plainname P1((name), char *name)
+{
+	return normalname(name, "", SUFFIX_TOASTED );
+}
+
+/*
+ *  Generate a `code' name from a given name.
+ */
+static char * codename P1((name), char *name)
+{
+	return normalname( name, SUFFIX_TOASTED, "" );
+}
+
+/*
+ *  If we're supposed to ask (fileno (stderr) is a tty, and f_force not
+ *  set), ask the user whether to overwrite a file or not.
+ */
+static int ok_to_replace P1(( name ), char * name)
+{
+	int reply, c;
+
+	if (f_force) return 1;			/* YES, do replace   */
+	if (!isatty(fileno(stderr))) return 0;	/* NO, don't replace */
+
+	fprintf(stderr,
+		"%s already exists; do you wish to overwrite %s (y or n)? ",
+		name, name);
+	fflush(stderr);
+
+	for (c = reply = getchar(); c != '\n' && c != EOF; c = getchar()) ;
+	if (reply == 'y') return 1;
+
+	fprintf(stderr, "\tnot overwritten\n");
+	return 0;
+}
+
+static void update_mode P0()
+{
+	if (!instat.st_nlink) return;		/* couldn't stat in */
+
+#ifdef HAS_FCHMOD
+	if (fchmod(fileno(out), instat.st_mode & 07777)) {
+		perror(outname);
+		fprintf(stderr, "%s: could not change file mode of \"%s\"\n",
+			progname, outname);
+	}
+#else 
+#ifdef HAS_CHMOD
+	if (outname && chmod(outname, instat.st_mode & 07777)) {
+		perror(outname);
+		fprintf(stderr, "%s: could not change file mode of \"%s\"\n",
+			progname, outname);
+	}
+#endif /* HAS_CHMOD  */
+#endif /* HAS_FCHMOD */
+}
+
+static void update_own P0()
+{
+	if (!instat.st_nlink) return; /* couldn't stat in */
+#ifdef HAS_FCHOWN
+	(void)fchown(fileno(out), instat.st_uid, instat.st_gid);
+#else 
+#ifdef HAS_CHOWN
+	(void)chown(outname, instat.st_uid, instat.st_gid);
+#endif /* HAS_CHOWN  */
+#endif /* HAS_FCHOWN */
+}
+
+static void update_times P0()
+{
+	if (!instat.st_nlink) return; 	/* couldn't stat in */
+
+#ifdef HAS_UTIMES
+	if (outname) {
+		struct timeval tv[2];
+
+		tv[0].tv_sec  = instat.st_atime;
+		tv[1].tv_sec  = instat.st_mtime;
+		tv[0].tv_usec = tv[1].tv_usec = 0;
+		(void) utimes(outname, tv);
+	}
+#else
+#ifdef HAS_UTIME
+
+	if (outname) {
+
+#ifdef	HAS_UTIMBUF
+		struct utimbuf ut;
+
+		ut.actime     = instat.st_atime;
+		ut.modtime    = instat.st_mtime;
+
+#	ifdef	HAS_UTIMEUSEC
+		ut.acusec     = instat.st_ausec;
+		ut.modusec    = instat.st_musec;
+#	endif 	/* HAS_UTIMEUSEC */
+
+		(void) utime(outname, &ut);
+
+#else /* UTIMBUF */
+
+		time_t ut[2];
+
+		ut[0] = instat.st_atime;
+		ut[1] = instat.st_mtime;
+
+		(void) utime(outname, ut);
+
+#endif	/* UTIMBUF */
+	}
+#endif /* HAS_UTIME */
+#endif /* HAS_UTIMES */
+}
+
+
+static int okay_as_input P3((name,f,st), char* name, FILE* f, struct stat * st)
+{
+# ifdef	HAS_FSTAT
+	if (fstat(fileno(f), st) < 0)
+# else
+	if (stat(name, st) < 0)
+# endif
+	{
+		perror(name);
+		fprintf(stderr, "%s: cannot stat \"%s\"\n", progname, name);
+		return 0;
+	}
+
+	if (!S_ISREG(st->st_mode)) {
+		fprintf(stderr,
+			"%s: \"%s\" is not a regular file -- unchanged.\n",
+			progname, name);
+		return 0;
+	}
+	if (st->st_nlink > 1 && !f_cat && !f_precious) {
+		fprintf(stderr, 
+		      "%s: \"%s\" has %s other link%s -- unchanged.\n",
+			progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
+		return 0;
+	}
+	return 1;
+}
+
+static void prepare_io P1(( desc), struct fmtdesc * desc)
+{
+	output      = desc->output;
+	input       = desc->input;
+
+	init_input  = desc->init_input;
+	init_output = desc->init_output;
+}
+
+static struct fmtdesc * grok_format P1((name), char * name)
+{
+	char * c;
+	struct fmtdesc ** f;
+
+	if (name) {
+		c = plainname(name);
+
+		for (f = alldescs; *f; f++) {
+			if (  (*f)->suffix
+			   && *(*f)->suffix
+			   && suffix(c, (*f)->suffix)) {
+
+				free(c);
+				return *f;
+			}
+		}
+
+		free(c);
+	}
+	return (struct fmtdesc *)0;
+}
+
+static int open_input P2((name, st), char * name, struct stat * st)
+{
+	struct fmtdesc * f = f_format;
+
+	st->st_nlink = 0;	/* indicates `undefined' value */
+	if (!name) {
+		inname = (char *)NULL;
+		in     = stdin;
+#ifdef	HAS__FSETMODE
+		_fsetmode(in, "b");
+#endif
+	}
+	else {
+		if (f_decode) inname = codename(name);
+		else {
+			if (!f_cat && suffix(name, SUFFIX_TOASTED)) {
+				fprintf(stderr,
+			"%s: %s already has \"%s\" suffix -- unchanged.\n",
+					progname, name, SUFFIX_TOASTED );
+				return 0;
+			}
+			inname = strcpy(emalloc(strlen(name)+1), name);
+		}
+		if (!(in = fopen(inname, READ))) {
+			perror(inname);	/* not guaranteed to be valid here */
+			fprintf(stderr, "%s: cannot open \"%s\" for reading\n",
+				progname, inname);
+			return 0;
+		}
+		if (!okay_as_input(inname, in, st)) return 0;
+		if (!f) f = grok_format(inname);
+	}
+	prepare_io( f ? f : & DEFAULT_FORMAT );
+	return 1;
+}
+
+static int open_output P1((name), char *name)
+{
+	if (!name || f_cat) {
+		out     = stdout;
+		outname = (char *)NULL;
+#ifdef	HAS__FSETMODE
+		_fsetmode(out, "b"); 
+#endif
+	}
+	else {
+		int outfd = -1;
+		char * o;
+
+		o = (*(f_decode ? plainname : codename))(name);
+		if (!length_okay(o)) return 0;
+		if ((outfd = open(o, O_WRITE_EXCL, 0666)) >= 0)
+			out = fdopen(outfd, WRITE);
+		else if (errno != EEXIST) out = (FILE *)NULL;
+		else if (ok_to_replace(o)) out = fopen(o, WRITE);
+		else return 0;
+
+		if (!out) {
+			perror(o);
+			fprintf(stderr,
+				"%s: can't open \"%s\" for writing\n",
+				progname, o);
+			if (outfd >= 0) (void)close(outfd);
+			return 0;
+		}
+
+		outname = o;
+	}
+	return 1;
+}
+
+static int process_encode P0()
+{
+	gsm      	r;
+	gsm_signal    	s[ 160 ];
+	gsm_frame	d;
+ 
+	int		cc;
+
+	if (!(r = gsm_create())) {
+		perror(progname);
+		return -1;
+	}
+	(void)gsm_option(r, GSM_OPT_FAST,       &f_fast);
+	(void)gsm_option(r, GSM_OPT_VERBOSE,    &f_verbose);
+	(void)gsm_option(r, GSM_OPT_LTP_CUT,	&f_ltp_cut);
+
+	while ((cc = (*input)(s)) > 0) {
+		if (cc < sizeof(s) / sizeof(*s))
+			memset((char *)(s+cc), 0, sizeof(s)-(cc * sizeof(*s)));
+		gsm_encode(r, s, d);
+		if (fwrite((char *)d, sizeof(d), 1, out) != 1) {
+			perror(outname ? outname : "stdout");
+			fprintf(stderr, "%s: error writing to %s\n",
+				progname, outname ? outname : "stdout");
+			gsm_destroy(r);
+			return -1;
+		}
+	}
+	if (cc < 0) {
+		perror(inname ? inname : "stdin");
+		fprintf(stderr, "%s: error reading from %s\n",
+			progname, inname ? inname : "stdin");
+		gsm_destroy(r);
+		return -1;
+	}
+	gsm_destroy(r);
+
+	return 0;
+}
+
+static int process_decode P0()
+{
+	gsm      	r;
+	gsm_frame	s;
+	gsm_signal	d[ 160 ];
+ 
+	int		cc;
+
+	if (!(r = gsm_create())) {	/* malloc failed */
+		perror(progname);
+		return -1;
+	}
+	(void)gsm_option(r, GSM_OPT_FAST,    &f_fast);
+	(void)gsm_option(r, GSM_OPT_VERBOSE, &f_verbose);
+
+	while ((cc = fread(s, 1, sizeof(s), in)) > 0) {
+
+		if (cc != sizeof(s)) {
+			if (cc >= 0) fprintf(stderr,
+			"%s: incomplete frame (%d byte%s missing) from %s\n",
+					progname, sizeof(s) - cc,
+					"s" + (sizeof(s) - cc == 1),
+					inname ? inname : "stdin" );
+			gsm_destroy(r);
+			errno = 0;
+			return -1;
+		}
+		if (gsm_decode(r, s, d)) {
+			fprintf(stderr, "%s: bad frame in %s\n", 
+				progname, inname ? inname : "stdin");
+			gsm_destroy(r);
+			errno = 0;
+			return -1;
+		}
+
+		if ((*output)(d) < 0) {
+			perror(outname);
+			fprintf(stderr, "%s: error writing to %s\n",
+					progname, outname);
+			gsm_destroy(r);
+			return -1;
+		}
+	}
+
+	if (cc < 0) {
+		perror(inname ? inname : "stdin" );
+		fprintf(stderr, "%s: error reading from %s\n", progname,
+			inname ? inname : "stdin");
+		gsm_destroy(r);
+		return -1;
+	}
+
+	gsm_destroy(r);
+	return 0;
+}
+
+static int process P1((name), char * name)
+{
+	int step = 0;
+
+	out     = (FILE *)0;
+	in      = (FILE *)0;
+
+	outname = (char *)0;
+	inname  = (char *)0;
+
+	if (!open_input(name, &instat) || !open_output(name))
+		goto err;
+
+	if ((*(f_decode ? init_output    : init_input))()) {
+		fprintf(stderr, "%s: error %s %s\n",
+			progname,
+			f_decode ? "writing header to" : "reading header from",
+			f_decode ? (outname ? outname : "stdout")
+				 : (inname ? inname : "stdin"));
+		goto err;
+	}
+
+	if ((*(f_decode ? process_decode : process_encode))())
+		goto err;
+
+	if (fflush(out) < 0 || ferror(out)) {
+		perror(outname ? outname : "stdout");
+		fprintf(stderr, "%s: error writing \"%s\"\n", progname,
+				outname ? outname:"stdout");
+		goto err;
+	}
+
+	if (out != stdout) {
+
+		update_times();
+		update_mode ();
+		update_own  ();
+
+		if (fclose(out) < 0) {
+			perror(outname);
+			fprintf(stderr, "%s: error writing \"%s\"\n",
+				progname, outname);
+			goto err;
+		}
+		if (outname != name) free(outname);
+		outname = (char *)0;
+	}
+	out = (FILE *)0;
+	if (in  != stdin) {
+		(void)fclose(in), in = (FILE *)0;
+		if (!f_cat && !f_precious) {
+			if (unlink(inname) < 0) {
+				perror(inname);
+				fprintf(stderr,
+					"%s: source \"%s\" not deleted.\n",
+					progname, inname);
+			}
+			goto err;
+		}
+		if (inname != name) free(inname);
+		inname = (char *)0;
+	}
+	return 0;
+
+	/*
+	 *  Error handling and cleanup.
+	 */
+err:
+	if (out && out != stdout) {
+		(void)fclose(out), out = (FILE *)0;
+		if (unlink(outname) < 0 && errno != ENOENT && errno != EINTR) {
+			perror(outname);
+			fprintf(stderr, "%s: could not unlink \"%s\"\n",
+				progname, outname);
+		}
+	}
+	if (in && in != stdin) (void)fclose(in), in = (FILE *)0;
+
+	if (inname  && inname  != name) free(inname);
+	if (outname && outname != name) free(outname);
+
+	return -1;
+}
+
+static void version P0()
+{
+	printf( "%s 1.0, version %s\n",
+		progname,
+		"$Id$" );
+}
+
+static void help P0()
+{
+	printf("Usage: %s [-fcpdhvaulsFC] [files...]\n", progname);
+	printf("\n");
+
+	printf(" -f  force     Replace existing files without asking\n");
+	printf(" -c  cat       Write to stdout, do not remove source files\n");
+	printf(" -d  decode    Decode data (default is encode)\n");
+	printf(" -p  precious  Do not delete the source\n");
+	printf("\n");
+
+	printf(" -u  u-law     Force 8 kHz/8 bit u-law in/output format\n");
+	printf(" -s  sun .au   Force Sun .au u-law in/output format\n");
+	printf(" -a  A-law     Force 8 kHz/8 bit A-law in/output format\n");
+	printf(" -l  linear    Force 16 bit linear in/output format\n");
+	printf("\n");
+
+	printf(" -F  fast      Sacrifice conformance to performance\n");
+	printf(" -C  cutoff    Ignore most samples during LTP\n");
+	printf(" -v  version   Show version information\n");
+	printf(" -h  help      Print this text\n");
+	printf("\n");
+}
+
+
+static void set_format P1((f), struct fmtdesc * f)
+{
+	if (f_format && f_format != f) {
+		fprintf( stderr,
+	"%s: only one of -[uals] is possible (%s -h for help)\n",
+			progname, progname);
+		exit(1);
+	}
+
+	f_format = f;
+}
+
+int main P2((ac, av), int ac, char **av)
+{
+	int  		opt;
+	extern int	optind;
+	extern char	* optarg;
+
+	parse_argv0(*av);
+
+	while ((opt = getopt(ac, av, "fcdpvhuaslVFC:")) != EOF) switch (opt) {
+
+	case 'd': f_decode   = 1; break;
+	case 'f': f_force    = 1; break;
+	case 'c': f_cat      = 1; break;
+	case 'p': f_precious = 1; break;
+	case 'F': f_fast     = 1; break;
+	case 'C': f_ltp_cut  = 100; break;
+#ifndef	NDEBUG
+	case 'V': f_verbose  = 1; break;	/* undocumented */
+#endif
+
+	case 'u': set_format( &f_ulaw   ); break;
+	case 'l': set_format( &f_linear ); break;
+	case 'a': set_format( &f_alaw	); break;
+	case 's': set_format( &f_audio  ); break;
+
+	case 'v': version(); exit(0);
+	case 'h': help();    exit(0);
+
+	default: 
+	usage:
+		fprintf(stderr,
+	"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
+			progname);
+		exit(1);
+	}
+
+	f_precious |= f_cat;
+
+	av += optind;
+	ac -= optind;
+
+	catch_signals(onintr);
+
+	if (ac <= 0) process( (char *)0 );
+	else while (ac--) process( *av++ );
+
+	exit(0);
+}
diff --git a/src/audio/gsm/toast.h b/src/audio/gsm/toast.h
new file mode 100644
index 0000000000000000000000000000000000000000..1eaeb6c5668655358b437ccc58e13aad37969ce3
--- /dev/null
+++ b/src/audio/gsm/toast.h
@@ -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$ */
+
+#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 */
diff --git a/src/audio/gsm/toast_alaw.c b/src/audio/gsm/toast_alaw.c
new file mode 100644
index 0000000000000000000000000000000000000000..98917372e1730683e08218c56f9b5784955eef8a
--- /dev/null
+++ b/src/audio/gsm/toast_alaw.c
@@ -0,0 +1,334 @@
+/*
+ * 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$ */
+
+#include	"toast.h"
+
+/*  toast_alaw.c -- manipulate A-law encoded sound.
+ */
+
+extern FILE	* in, * out;
+
+#define	A2S(x)	(a2s[  (unsigned char )(x)       ])
+#define	S2A(x)	(s2a[ ((unsigned short)(x)) >> 4 ])
+
+static unsigned short a2s[] = {
+
+ 60032, 60288, 59520, 59776, 61056, 61312, 60544, 60800,
+ 57984, 58240, 57472, 57728, 59008, 59264, 58496, 58752,
+ 62784, 62912, 62528, 62656, 63296, 63424, 63040, 63168,
+ 61760, 61888, 61504, 61632, 62272, 62400, 62016, 62144,
+ 43520, 44544, 41472, 42496, 47616, 48640, 45568, 46592,
+ 35328, 36352, 33280, 34304, 39424, 40448, 37376, 38400,
+ 54528, 55040, 53504, 54016, 56576, 57088, 55552, 56064,
+ 50432, 50944, 49408, 49920, 52480, 52992, 51456, 51968,
+ 65192, 65208, 65160, 65176, 65256, 65272, 65224, 65240,
+ 65064, 65080, 65032, 65048, 65128, 65144, 65096, 65112,
+ 65448, 65464, 65416, 65432, 65512, 65528, 65480, 65496,
+ 65320, 65336, 65288, 65304, 65384, 65400, 65352, 65368,
+ 64160, 64224, 64032, 64096, 64416, 64480, 64288, 64352,
+ 63648, 63712, 63520, 63584, 63904, 63968, 63776, 63840,
+ 64848, 64880, 64784, 64816, 64976, 65008, 64912, 64944,
+ 64592, 64624, 64528, 64560, 64720, 64752, 64656, 64688,
+  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
+
+};
+
+
+static unsigned char  s2a[] = {
+
+	213,212,215,214,209,208,211,210,221,220,223,222,217,216,219,218,
+	197,196,199,198,193,192,195,194,205,204,207,206,201,200,203,202,
+	245,245,244,244,247,247,246,246,241,241,240,240,243,243,242,242,
+	253,253,252,252,255,255,254,254,249,249,248,248,251,251,250,250,
+	229,229,229,229,228,228,228,228,231,231,231,231,230,230,230,230,
+	225,225,225,225,224,224,224,224,227,227,227,227,226,226,226,226,
+	237,237,237,237,236,236,236,236,239,239,239,239,238,238,238,238,
+	233,233,233,233,232,232,232,232,235,235,235,235,234,234,234,234,
+	149,149,149,149,149,149,149,149,148,148,148,148,148,148,148,148,
+	151,151,151,151,151,151,151,151,150,150,150,150,150,150,150,150,
+	145,145,145,145,145,145,145,145,144,144,144,144,144,144,144,144,
+	147,147,147,147,147,147,147,147,146,146,146,146,146,146,146,146,
+	157,157,157,157,157,157,157,157,156,156,156,156,156,156,156,156,
+	159,159,159,159,159,159,159,159,158,158,158,158,158,158,158,158,
+	153,153,153,153,153,153,153,153,152,152,152,152,152,152,152,152,
+	155,155,155,155,155,155,155,155,154,154,154,154,154,154,154,154,
+	133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,
+	132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,
+	135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,
+	134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,
+	129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,
+	128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,
+	131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,
+	130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,
+	141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,
+	140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,
+	143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,
+	142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,142,
+	137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,
+	136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
+	139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,
+	138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,
+	181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
+	181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
+	180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,
+	180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,
+	183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
+	183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,183,
+	182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+	182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+	177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+	177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+	176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,
+	176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,
+	179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
+	179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,
+	178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+	178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+	189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
+	189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
+	188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
+	188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,188,
+	191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+	191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
+	190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+	190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+	185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+	185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+	184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
+	184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
+	187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
+	187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,
+	186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
+	186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,
+	165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+	165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+	165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+	165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
+	164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+	164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+	164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+	164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
+	167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+	167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+	167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+	167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,
+	166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+	166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+	166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+	166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
+	161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+	161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+	161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+	161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,
+	160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+	160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+	160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+	160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,
+	163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+	163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+	163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+	163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
+	162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+	162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+	162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+	162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,
+	173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+	173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+	173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+	173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+	172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+	172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+	172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+	172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+	175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+	175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+	175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+	175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,
+	174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+	174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+	174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+	174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+	169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+	169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+	169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+	169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,
+	168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+	168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+	168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+	168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,
+	171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+	171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+	171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+	171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+	170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+	170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+	170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+	170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
+	 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,
+	 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,
+	 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+	 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+	 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+	 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+	 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+	 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+	 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+	 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+	 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+	 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+	 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+	 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+	 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+	 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+	 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+	 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+	 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+	 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+	 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+	 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+	 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+	 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+	 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+	 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+	 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+	 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+	 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+	 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+	 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+	 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+	 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+	 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+	 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+	 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+	 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+	 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+	 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+	 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+	 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+	 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+	 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+	 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+	 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+	 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+	 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+	 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+	 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+	 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+	 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+	 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+	 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+	 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+	 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+	 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+	 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+	 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+	 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+	 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+	 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+	 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
+	 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+	 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+	 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+	 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+	 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+	 56, 56, 56, 56, 56, 56, 56, 56, 56, 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,
+	 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+	 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+	 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+	 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+	 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
+	 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
+	 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+	 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+	 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+	 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+	 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+	 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+	 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+	 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+	 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+	 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+	 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+	 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+	 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+	 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+	 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+	 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+	 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+	 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+	 10, 10, 10, 10, 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, 11, 11,
+	  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
+	  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,  9,
+	 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+	 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+	 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+	 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+	  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,
+	  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,
+	  6,  6,  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,
+	  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,
+	  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,
+	 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
+	 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25,
+	 30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31,
+	 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29,
+	 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19,
+	 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17,
+	 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
+	 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21,
+	106,106,106,106,107,107,107,107,104,104,104,104,105,105,105,105,
+	110,110,110,110,111,111,111,111,108,108,108,108,109,109,109,109,
+	 98, 98, 98, 98, 99, 99, 99, 99, 96, 96, 96, 96, 97, 97, 97, 97,
+	102,102,102,102,103,103,103,103,100,100,100,100,101,101,101,101,
+	122,122,123,123,120,120,121,121,126,126,127,127,124,124,125,125,
+	114,114,115,115,112,112,113,113,118,118,119,119,116,116,117,117,
+	 74, 75, 72, 73, 78, 79, 76, 77, 66, 67, 64, 65, 70, 71, 68, 69,
+	 90, 91, 88, 89, 94, 95, 92, 93, 82, 83, 80, 81, 86, 87, 84, 85
+};
+
+int alaw_input P1((buf), gsm_signal * buf) 
+{
+	int  i, c;
+
+	for (i = 0; i < 160 && (c = fgetc(in)) != EOF; i++) buf[i] = A2S( c );
+	if (c == EOF && ferror(in)) return -1;
+	return i;
+}
+
+int alaw_output P1((buf), gsm_signal * buf) 
+{
+	int  i;
+
+	for (i = 0; i < 160; i++, buf++)
+		if (fputc( S2A( *buf ), out) == EOF) return -1;
+	return 0;
+}
+
diff --git a/src/audio/gsm/toast_audio.c b/src/audio/gsm/toast_audio.c
new file mode 100644
index 0000000000000000000000000000000000000000..42300e3a9d6c3983e739505c40f0b9c70df2fbbe
--- /dev/null
+++ b/src/audio/gsm/toast_audio.c
@@ -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$ */
+
+#include	"toast.h"
+
+/*  toast_audio -- functions to manipulate SunOS audio files.
+ *
+ *  This is reverse engineered from our present soundfiles
+ *  and in no way portable, durable or aesthetically pleasing.
+ */
+
+extern FILE	* in, 	  * out;
+extern char	* inname;
+extern char	* progname;
+
+extern int	(*output) P((gsm_signal *)),
+		(*input ) P((gsm_signal *));
+
+extern int	alaw_input   P((gsm_signal *)),
+		ulaw_input   P((gsm_signal *)),
+		linear_input P((gsm_signal *));
+
+extern int	ulaw_output P((gsm_signal *));
+
+static int put_u32 P2((f, u), FILE * f, unsigned long u)
+{
+	/*  Write a 32-bit unsigned value msb first. 
+	 */
+	if (  putc( (char)((u>>24) & 0x0FF), f) == EOF
+	   || putc( (char)((u>>16) & 0x0FF), f) == EOF
+	   || putc( (char)((u>> 8) & 0x0FF), f) == EOF
+	   || putc( (char)( u      & 0x0FF), f) == EOF) return -1;
+
+	return 0;
+}
+
+static int get_u32 P2((f, up), FILE * f, unsigned long * up)
+{
+	/*  Read a 32-bit unsigned value msb first.
+	 */
+	int		i;
+	unsigned long 	u;
+
+	if (  				      (i = getc(f)) == EOF
+	   || ((u =        (unsigned char)i), (i = getc(f)) == EOF)
+	   || ((u = (u<<8)|(unsigned char)i), (i = getc(f)) == EOF)
+	   || ((u = (u<<8)|(unsigned char)i), (i = getc(f)) == EOF)) return -1;
+	*up = 	    (u<<8)|(unsigned char)i;
+	return 0;
+}
+
+int audio_init_input P0()
+{
+	unsigned long	len, enc;	/* unsigned 32 bits	*/
+
+	if (  fgetc(in) != '.' 
+	   || fgetc(in) != 's'
+	   || fgetc(in) != 'n'
+	   || fgetc(in) != 'd'
+	   || get_u32( in, &len )
+	   || get_u32( in, &enc )	/* skip this */
+	   || get_u32( in, &enc )) {
+		fprintf(stderr, 
+	"%s: bad (missing?) header in Sun audio file \"%s\";\n\
+	Try one of -u, -a, -l instead (%s -h for help).\n",
+			progname, inname ? inname : "stdin", progname);
+		return -1;
+	}
+
+	switch (enc) {
+	case 1:	input = ulaw_input;  	break;
+	case 2: input = alaw_input;  	break;
+	case 3: input = linear_input; 	break;
+	default:
+		fprintf(stderr,
+"%s: warning: file format #%lu for %s not implemented, defaulting to u-law.\n",
+			progname, enc, inname);
+		input = ulaw_input;
+		break;
+	}
+
+	while (len > 4*4)
+		if (getc(in) == EOF) {
+			fprintf(stderr, 
+			"%s: EOF in header of Sun audio file \"%s\";\n\
+			Try one of -u, -a, -l instead (%s -h for help).\n",
+				progname, inname ? inname : "stdin", progname);
+			return -1;
+		}
+		else len--;
+
+	return 0;
+}
+
+int audio_init_output P0()
+{
+	if (  fputs(".snd", out) == EOF
+	   || put_u32(out, 32)
+	   || put_u32(out, ~(unsigned long)0)
+	   || put_u32(out, 1)
+	   || put_u32(out, 8000)
+	   || put_u32(out, 1)
+	   || put_u32(out, 0)
+	   || put_u32(out, 0)) return -1;
+
+	return 0;
+}
+
diff --git a/src/audio/gsm/toast_lin.c b/src/audio/gsm/toast_lin.c
new file mode 100644
index 0000000000000000000000000000000000000000..b9f9c890e2f0c42cad4bdacff39accc879279a7d
--- /dev/null
+++ b/src/audio/gsm/toast_lin.c
@@ -0,0 +1,24 @@
+/*
+ * 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$ */
+
+#include	"toast.h"
+
+/*  toast_linear.c -- read and write 16 bit linear sound in host byte order.
+ */
+
+extern FILE	*in, *out;
+
+int linear_input (buf) gsm_signal * buf;
+{
+	return fread( (char *)buf, sizeof(*buf), 160, in );
+}
+
+int linear_output P1((buf), gsm_signal * buf) 
+{
+	return -( fwrite( (char *)buf, sizeof(*buf), 160, out ) != 160 );
+}
diff --git a/src/audio/gsm/toast_ulaw.c b/src/audio/gsm/toast_ulaw.c
new file mode 100644
index 0000000000000000000000000000000000000000..987de113627f0e14edaa41cc87e4066123d82486
--- /dev/null
+++ b/src/audio/gsm/toast_ulaw.c
@@ -0,0 +1,621 @@
+/*
+ * 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$ */
+
+#include	"toast.h"
+
+/* toast_ulaw -- functions to manipulate u-law encoded sound.
+ */
+
+extern FILE	*in, *out;
+
+#define	U2S(x)	(u2s[  (unsigned  char)(x)       ])
+#define	S2U(x)	(s2u[ ((unsigned short)(x)) >> 3 ])
+
+static unsigned short u2s[] = {
+	33280, 34308, 35336, 36364, 37393, 38421, 39449, 40477,
+	41505, 42534, 43562, 44590, 45618, 46647, 47675, 48703,
+	49474, 49988, 50503, 51017, 51531, 52045, 52559, 53073,
+	53587, 54101, 54616, 55130, 55644, 56158, 56672, 57186,
+	57572, 57829, 58086, 58343, 58600, 58857, 59114, 59371,
+	59628, 59885, 60142, 60399, 60656, 60913, 61171, 61428,
+	61620, 61749, 61877, 62006, 62134, 62263, 62392, 62520,
+	62649, 62777, 62906, 63034, 63163, 63291, 63420, 63548,
+	63645, 63709, 63773, 63838, 63902, 63966, 64030, 64095,
+	64159, 64223, 64287, 64352, 64416, 64480, 64544, 64609,
+	64657, 64689, 64721, 64753, 64785, 64818, 64850, 64882,
+	64914, 64946, 64978, 65010, 65042, 65075, 65107, 65139,
+	65163, 65179, 65195, 65211, 65227, 65243, 65259, 65275,
+	65291, 65308, 65324, 65340, 65356, 65372, 65388, 65404,
+	65416, 65424, 65432, 65440, 65448, 65456, 65464, 65472,
+	65480, 65488, 65496, 65504, 65512, 65520, 65528,     0,
+	32256, 31228, 30200, 29172, 28143, 27115, 26087, 25059,
+	24031, 23002, 21974, 20946, 19918, 18889, 17861, 16833,
+	16062, 15548, 15033, 14519, 14005, 13491, 12977, 12463,
+	11949, 11435, 10920, 10406,  9892,  9378,  8864,  8350,
+	 7964,  7707,  7450,  7193,  6936,  6679,  6422,  6165, 
+	 5908,  5651,  5394,  5137,  4880,  4623,  4365,  4108, 
+	 3916,  3787,  3659,  3530,  3402,  3273,  3144,  3016, 
+	 2887,  2759,  2630,  2502,  2373,  2245,  2116,  1988, 
+	 1891,  1827,  1763,  1698,  1634,  1570,  1506,  1441, 
+	 1377,  1313,  1249,  1184,  1120,  1056,   992,   927, 
+	  879,   847,   815,   783,   751,   718,   686,   654,
+	  622,   590,   558,   526,   494,   461,   429,   397,
+	  373,   357,   341,   325,   309,   293,   277,   261,
+	  245,   228,   212,   196,   180,   164,   148,   132,
+	  120,   112,   104,    96,    88,    80,    72,    64,
+ 	   56,    48,    40,    32,    24,    16,    8,      0
+};
+
+static unsigned char s2u[] = {
+0377,0376,0375,0374,0373,0372,0371,0370,0367,0366,0365,0364,0363,0362,0361,
+0360,0357,0357,0356,0356,0355,0355,0354,0354,0353,0353,0352,0352,0351,0351,
+0350,0350,0347,0347,0346,0346,0345,0345,0344,0344,0343,0343,0342,0342,0341,
+0341,0340,0340,0337,0337,0337,0337,0336,0336,0336,0336,0335,0335,0335,0335,
+0334,0334,0334,0334,0333,0333,0333,0333,0332,0332,0332,0332,0331,0331,0331,
+0331,0330,0330,0330,0330,0327,0327,0327,0327,0326,0326,0326,0326,0325,0325,
+0325,0325,0324,0324,0324,0324,0323,0323,0323,0323,0322,0322,0322,0322,0321,
+0321,0321,0321,0320,0320,0320,0320,0317,0317,0317,0317,0317,0317,0317,0317,
+0316,0316,0316,0316,0316,0316,0316,0316,0315,0315,0315,0315,0315,0315,0315,
+0315,0314,0314,0314,0314,0314,0314,0314,0314,0313,0313,0313,0313,0313,0313,
+0313,0313,0312,0312,0312,0312,0312,0312,0312,0312,0311,0311,0311,0311,0311,
+0311,0311,0311,0310,0310,0310,0310,0310,0310,0310,0310,0307,0307,0307,0307,
+0307,0307,0307,0307,0306,0306,0306,0306,0306,0306,0306,0306,0305,0305,0305,
+0305,0305,0305,0305,0305,0304,0304,0304,0304,0304,0304,0304,0304,0303,0303,
+0303,0303,0303,0303,0303,0303,0303,0302,0302,0302,0302,0302,0302,0302,0302,
+0301,0301,0301,0301,0301,0301,0301,0301,0300,0300,0300,0300,0300,0300,0300,
+0300,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,
+0277,0277,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,
+0276,0276,0276,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,
+0275,0275,0275,0275,0274,0274,0274,0274,0274,0274,0274,0274,0274,0274,0274,
+0274,0274,0274,0274,0274,0273,0273,0273,0273,0273,0273,0273,0273,0273,0273,
+0273,0273,0273,0273,0273,0273,0272,0272,0272,0272,0272,0272,0272,0272,0272,
+0272,0272,0272,0272,0272,0272,0272,0271,0271,0271,0271,0271,0271,0271,0271,
+0271,0271,0271,0271,0271,0271,0271,0271,0270,0270,0270,0270,0270,0270,0270,
+0270,0270,0270,0270,0270,0270,0270,0270,0270,0267,0267,0267,0267,0267,0267,
+0267,0267,0267,0267,0267,0267,0267,0267,0267,0267,0266,0266,0266,0266,0266,
+0266,0266,0266,0266,0266,0266,0266,0266,0266,0266,0266,0265,0265,0265,0265,
+0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0264,0264,0264,
+0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0263,0263,
+0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0262,
+0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,
+0262,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,
+0261,0261,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,
+0260,0260,0260,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,
+0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,
+0257,0257,0257,0257,0257,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,
+0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,
+0256,0256,0256,0256,0256,0256,0256,0255,0255,0255,0255,0255,0255,0255,0255,
+0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,
+0255,0255,0255,0255,0255,0255,0255,0255,0255,0254,0254,0254,0254,0254,0254,
+0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,
+0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0253,0253,0253,0253,
+0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,
+0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0252,0252,
+0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,
+0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,
+0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,
+0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,
+0251,0251,0251,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,
+0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,
+0250,0250,0250,0250,0250,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,
+0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,
+0247,0247,0247,0247,0247,0247,0247,0246,0246,0246,0246,0246,0246,0246,0246,
+0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,
+0246,0246,0246,0246,0246,0246,0246,0246,0246,0245,0245,0245,0245,0245,0245,
+0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,
+0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0244,0244,0244,0244,
+0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,
+0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0243,0243,
+0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,
+0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,
+0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,
+0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,
+0242,0242,0242,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,
+0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,
+0241,0241,0241,0241,0241,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,
+0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,
+0240,0240,0240,0240,0240,0240,0240,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0040,0040,0040,0040,0040,
+0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,
+0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0041,0041,
+0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,
+0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,
+0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,
+0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,
+0042,0042,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,
+0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,
+0043,0043,0043,0043,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,
+0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,
+0044,0044,0044,0044,0044,0044,0045,0045,0045,0045,0045,0045,0045,0045,0045,
+0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,
+0045,0045,0045,0045,0045,0045,0045,0045,0046,0046,0046,0046,0046,0046,0046,
+0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,
+0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0047,0047,0047,0047,0047,
+0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,
+0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0050,0050,
+0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,
+0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,
+0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,
+0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,
+0051,0051,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,
+0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,
+0052,0052,0052,0052,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,
+0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,
+0053,0053,0053,0053,0053,0053,0054,0054,0054,0054,0054,0054,0054,0054,0054,
+0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,
+0054,0054,0054,0054,0054,0054,0054,0054,0055,0055,0055,0055,0055,0055,0055,
+0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,
+0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0056,0056,0056,0056,0056,
+0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,
+0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0057,0057,0057,
+0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,
+0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,
+0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,
+0060,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,
+0061,0061,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,
+0062,0062,0062,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,
+0063,0063,0063,0063,0064,0064,0064,0064,0064,0064,0064,0064,0064,0064,0064,
+0064,0064,0064,0064,0064,0065,0065,0065,0065,0065,0065,0065,0065,0065,0065,
+0065,0065,0065,0065,0065,0065,0066,0066,0066,0066,0066,0066,0066,0066,0066,
+0066,0066,0066,0066,0066,0066,0066,0067,0067,0067,0067,0067,0067,0067,0067,
+0067,0067,0067,0067,0067,0067,0067,0067,0070,0070,0070,0070,0070,0070,0070,
+0070,0070,0070,0070,0070,0070,0070,0070,0070,0071,0071,0071,0071,0071,0071,
+0071,0071,0071,0071,0071,0071,0071,0071,0071,0071,0072,0072,0072,0072,0072,
+0072,0072,0072,0072,0072,0072,0072,0072,0072,0072,0072,0073,0073,0073,0073,
+0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0074,0074,0074,
+0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0075,0075,
+0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,
+0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,
+0076,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,
+0077,0077,0100,0100,0100,0100,0100,0100,0100,0100,0101,0101,0101,0101,0101,
+0101,0101,0101,0102,0102,0102,0102,0102,0102,0102,0102,0103,0103,0103,0103,
+0103,0103,0103,0103,0104,0104,0104,0104,0104,0104,0104,0104,0105,0105,0105,
+0105,0105,0105,0105,0105,0106,0106,0106,0106,0106,0106,0106,0106,0107,0107,
+0107,0107,0107,0107,0107,0107,0110,0110,0110,0110,0110,0110,0110,0110,0111,
+0111,0111,0111,0111,0111,0111,0111,0112,0112,0112,0112,0112,0112,0112,0112,
+0113,0113,0113,0113,0113,0113,0113,0113,0114,0114,0114,0114,0114,0114,0114,
+0114,0115,0115,0115,0115,0115,0115,0115,0115,0116,0116,0116,0116,0116,0116,
+0116,0116,0117,0117,0117,0117,0117,0117,0117,0117,0120,0120,0120,0120,0121,
+0121,0121,0121,0122,0122,0122,0122,0123,0123,0123,0123,0124,0124,0124,0124,
+0125,0125,0125,0125,0126,0126,0126,0126,0127,0127,0127,0127,0130,0130,0130,
+0130,0131,0131,0131,0131,0132,0132,0132,0132,0133,0133,0133,0133,0134,0134,
+0134,0134,0135,0135,0135,0135,0136,0136,0136,0136,0137,0137,0137,0137,0140,
+0140,0141,0141,0142,0142,0143,0143,0144,0144,0145,0145,0146,0146,0147,0147,
+0150,0150,0150,0151,0151,0152,0152,0153,0153,0154,0154,0155,0155,0156,0156,
+0157,0157,0160,0161,0162,0163,0164,0165,0166,0167,0170,0171,0172,0173,0174,
+0175,0176
+};
+
+int ulaw_input P1((buf), gsm_signal * buf)
+{
+	int i, c;
+
+	for (i = 0; i < 160 && (c = fgetc(in)) != EOF; i++) buf[i] = U2S(c);
+	if (c == EOF && ferror(in)) return -1;
+	return i;
+}
+
+int ulaw_output P1((buf), gsm_signal * buf)
+{
+	int i;
+
+	for(i = 0; i < 160; i++, buf++)
+		if (fputc( (char)S2U( (unsigned short)*buf ), out) == EOF)
+			return -1;
+	return 0;
+}
diff --git a/src/audio/gsm/unproto.h b/src/audio/gsm/unproto.h
new file mode 100644
index 0000000000000000000000000000000000000000..ccd565109b11b68fbd0eeec4856d9ea541ac251a
--- /dev/null
+++ b/src/audio/gsm/unproto.h
@@ -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$*/
+
+#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 */
diff --git a/src/audio/gsmcodec.cpp b/src/audio/gsmcodec.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..26b5ed2912ef4ae1a13b9a687b3b849e73be39dd
--- /dev/null
+++ b/src/audio/gsmcodec.cpp
@@ -0,0 +1,60 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <iostream>
+#include "gsmcodec.h"
+#include "../global.h"
+
+// 3 GSM A 8000 1 [RFC3551]
+Gsm::Gsm(int payload) : AudioCodec(payload, "GSM")
+{
+  _clockRate = 8000;
+  _channel   = 1;
+  if (!(_decode_gsmhandle = gsm_create() )) 
+    _debug("ERROR: decode_gsm_create\n");
+  if (!(_encode_gsmhandle = gsm_create() )) 
+    _debug("AudioCodec: ERROR: encode_gsm_create\n");
+}
+
+Gsm::~Gsm (void)
+{
+  gsm_destroy(_decode_gsmhandle);
+  gsm_destroy(_encode_gsmhandle);
+}
+
+int
+Gsm::codecDecode (short *dst, unsigned char *src, unsigned int size) 
+{
+  (void)size;
+  if (gsm_decode(_decode_gsmhandle, (gsm_byte*)src, (gsm_signal*)dst) < 0) {
+    _debug("ERROR: gsm_decode\n");
+  }
+  return 320;
+}
+
+int
+Gsm::codecEncode (unsigned char *dst, short *src, unsigned int size) 
+{
+  (void)size;
+  gsm_encode(_encode_gsmhandle, (gsm_signal*)src, (gsm_byte*)dst);
+  return 33;
+}
+
+
diff --git a/src/audio/gsmcodec.h b/src/audio/gsmcodec.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f21aca8c7299722c8046d0cb2778829e08086c5
--- /dev/null
+++ b/src/audio/gsmcodec.h
@@ -0,0 +1,43 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __GSM_H__
+#define __GSM_H__
+
+#include "audiocodec.h"
+extern "C" {
+#include "gsm/gsm.h"
+}
+
+class Gsm : public AudioCodec {
+public:
+  // _payload should be 3
+  Gsm (int payload=3);
+  ~Gsm (void);
+
+  int	codecDecode	(short *, unsigned char *, unsigned int);
+  int	codecEncode	(unsigned char *, short *, unsigned int);
+
+private:
+  gsm _decode_gsmhandle;
+  gsm _encode_gsmhandle;
+};
+
+#endif // __ULAW_H__
diff --git a/src/audio/pacpp/Makefile.am b/src/audio/pacpp/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..4f6f53c3b4ef980e775a60942c5e0f298b6010ea
--- /dev/null
+++ b/src/audio/pacpp/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = source include
\ No newline at end of file
diff --git a/src/audio/pacpp/example/devs.cxx b/src/audio/pacpp/example/devs.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..31a560f884e6cd3322d78e2f43b64c2a23af3054
--- /dev/null
+++ b/src/audio/pacpp/example/devs.cxx
@@ -0,0 +1,177 @@
+#include <iostream>
+#include "portaudiocpp/PortAudioCpp.hxx"
+
+#ifdef WIN32
+#include "portaudiocpp/AsioDeviceAdapter.hxx"
+#endif
+
+// ---------------------------------------------------------------------------------------
+
+void printSupportedStandardSampleRates(
+		const portaudio::DirectionSpecificStreamParameters &inputParameters, 
+		const portaudio::DirectionSpecificStreamParameters &outputParameters)
+{
+	static double STANDARD_SAMPLE_RATES[] = {
+		8000.0, 9600.0, 11025.0, 12000.0, 16000.0, 22050.0, 24000.0, 32000.0,
+		44100.0, 48000.0, 88200.0, 96000.0, -1 }; // negative terminated list
+
+	int printCount = 0;
+
+	for (int i = 0; STANDARD_SAMPLE_RATES[i] > 0; ++i)
+	{
+		portaudio::StreamParameters tmp = portaudio::StreamParameters(inputParameters, outputParameters, STANDARD_SAMPLE_RATES[i], 0, paNoFlag);
+
+		if (tmp.isSupported())
+		{
+			if (printCount == 0)
+			{
+				std::cout << "    " << STANDARD_SAMPLE_RATES[i]; // 8.2
+				printCount = 1;
+			}
+			else if (printCount == 4)
+			{
+				std::cout << "," << std::endl;
+				std::cout << "    " << STANDARD_SAMPLE_RATES[i]; // 8.2
+				printCount = 1;
+			}
+			else
+			{
+				std::cout << ", " << STANDARD_SAMPLE_RATES[i]; // 8.2
+				++printCount;
+			}
+		}
+	}
+
+	if (printCount == 0)
+		std::cout << "None" << std::endl;
+	else
+		std::cout << std::endl;
+}
+
+// ---------------------------------------------------------------------------------------
+
+int main(int, char*[]);
+int main(int, char*[])
+{
+	try
+	{
+		portaudio::AutoSystem autoSys;
+
+		portaudio::System &sys = portaudio::System::instance();
+
+		std::cout << "PortAudio version number = " << sys.version() << std::endl;
+		std::cout << "PortAudio version text = '" << sys.versionText() << "'" << std::endl;
+
+		int numDevices = sys.deviceCount();
+		std::cout << "Number of devices = " << numDevices << std::endl;
+
+		for (portaudio::System::DeviceIterator i = sys.devicesBegin(); i != sys.devicesEnd(); ++i)
+		{
+			std::cout << "--------------------------------------- device #" << (*i).index() << std::endl;
+
+			// Mark global and API specific default devices:
+			bool defaultDisplayed = false;
+
+			if ((*i).isSystemDefaultInputDevice())
+			{
+				std::cout << "[ Default Input";
+				defaultDisplayed = true;
+			}
+			else if ((*i).isHostApiDefaultInputDevice())
+			{
+				std::cout << "[ Default " << (*i).hostApi().name() << " Input";
+				defaultDisplayed = true;
+			}
+
+			if ((*i).isSystemDefaultOutputDevice())
+			{
+				std::cout << (defaultDisplayed ? "," : "[");
+				std::cout << " Default Output";
+				defaultDisplayed = true;
+			}
+			else if ((*i).isHostApiDefaultOutputDevice())
+			{
+				std::cout << (defaultDisplayed ? "," : "[");
+				std::cout << " Default " << (*i).hostApi().name() << " Output";
+				defaultDisplayed = true;
+			}
+			
+			if (defaultDisplayed)
+				std::cout << " ]" << std::endl;
+
+			// Print device info:
+			std::cout << "Name                        = " << (*i).name() << std::endl;
+			std::cout << "Host API                    = " << (*i).hostApi().name() << std::endl;
+			std::cout << "Max inputs = " << (*i).maxInputChannels() << ", Max outputs = " << (*i).maxOutputChannels() << std::endl;
+
+			std::cout << "Default low input latency   = " << (*i).defaultLowInputLatency() << std::endl; // 8.3
+			std::cout << "Default low output latency  = " << (*i).defaultLowOutputLatency() << std::endl; // 8.3
+			std::cout << "Default high input latency  = " << (*i).defaultHighInputLatency() << std::endl; // 8.3
+			std::cout << "Default high output latency = " << (*i).defaultHighOutputLatency() << std::endl; // 8.3
+
+#ifdef WIN32
+			// ASIO specific latency information:
+			if ((*i).hostApi().typeId() == paASIO)
+			{
+				portaudio::AsioDeviceAdapter asioDevice((*i));
+
+				std::cout << "ASIO minimum buffer size    = " << asioDevice.minBufferSize() << std::endl;
+				std::cout << "ASIO maximum buffer size    = " << asioDevice.maxBufferSize() << std::endl;
+				std::cout << "ASIO preferred buffer size  = " << asioDevice.preferredBufferSize() << std::endl;
+
+				if (asioDevice.granularity() == -1)
+					std::cout << "ASIO buffer granularity     = power of 2" << std::endl;
+				else
+					std::cout << "ASIO buffer granularity     = " << asioDevice.granularity() << std::endl;
+			}
+#endif // WIN32
+
+			std::cout << "Default sample rate         = " << (*i).defaultSampleRate() << std::endl; // 8.2
+
+			// Poll for standard sample rates:
+			portaudio::DirectionSpecificStreamParameters inputParameters((*i), (*i).maxInputChannels(), portaudio::INT16, true, 0.0, NULL);
+			portaudio::DirectionSpecificStreamParameters outputParameters((*i), (*i).maxOutputChannels(), portaudio::INT16, true, 0.0, NULL);
+
+			if (inputParameters.numChannels() > 0)
+			{
+				std::cout << "Supported standard sample rates" << std::endl;
+				std::cout << " for half-duplex 16 bit " << inputParameters.numChannels() << " channel input = " << std::endl;
+				printSupportedStandardSampleRates(inputParameters, portaudio::DirectionSpecificStreamParameters::null());
+			}
+
+			if (outputParameters.numChannels() > 0)
+			{
+				std::cout << "Supported standard sample rates" << std::endl;
+				std::cout << " for half-duplex 16 bit " << outputParameters.numChannels() << " channel output = " << std::endl;
+				printSupportedStandardSampleRates(portaudio::DirectionSpecificStreamParameters::null(), outputParameters);
+			}
+
+			if (inputParameters.numChannels() > 0 && outputParameters.numChannels() > 0)
+			{
+				std::cout << "Supported standard sample rates" << std::endl;
+				std::cout << " for full-duplex 16 bit " << inputParameters.numChannels() << " channel input, " << outputParameters.numChannels() << " channel output = " << std::endl;
+				printSupportedStandardSampleRates(inputParameters, outputParameters);
+			}
+		}
+
+		std::cout << "----------------------------------------------" << std::endl;
+	}
+	catch (const portaudio::PaException &e)
+	{
+		std::cout << "A PortAudio error occured: " << e.paErrorText() << std::endl;
+	}
+	catch (const portaudio::PaCppException &e)
+	{
+		std::cout << "A PortAudioCpp error occured: " << e.what() << std::endl;
+	}
+	catch (const std::exception &e)
+	{
+		std::cout << "A generic exception occured: " << e.what() << std::endl;
+	}
+	catch (...)
+	{
+		std::cout << "An unknown exception occured." << std::endl;
+	}
+
+	return 0;
+}
diff --git a/src/audio/pacpp/example/sine.cxx b/src/audio/pacpp/example/sine.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d13f765f935f0c3c63bfac21d54919c9b7c28bc2
--- /dev/null
+++ b/src/audio/pacpp/example/sine.cxx
@@ -0,0 +1,137 @@
+// ---------------------------------------------------------------------------------------
+
+#include <iostream>
+#include <cmath>
+#include <cassert>
+#include <cstddef>
+#include "portaudiocpp/PortAudioCpp.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Some constants:
+const int NUM_SECONDS = 5;
+const double SAMPLE_RATE = 44100.0;
+const int FRAMES_PER_BUFFER = 64;
+const int TABLE_SIZE = 200;
+
+// ---------------------------------------------------------------------------------------
+
+// SineGenerator class:
+class SineGenerator
+{
+public:
+	SineGenerator(int tableSize) : tableSize_(tableSize), leftPhase_(0), rightPhase_(0)
+	{
+		const double PI = 3.14159265;
+		table_ = new float[tableSize];
+		for (int i = 0; i < tableSize; ++i)
+		{
+			table_[i] = 0.125f * (float)sin(((double)i/(double)tableSize)*PI*2.);
+		}
+	}
+
+	~SineGenerator()
+	{
+		delete[] table_; table_ = NULL;
+	}
+
+	int generate(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, 
+		const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)
+	{
+		assert(outputBuffer != NULL);
+
+		float **out = static_cast<float **>(outputBuffer);
+
+		for (unsigned int i = 0; i < framesPerBuffer; ++i)
+		{
+			out[0][i] = table_[leftPhase_];
+			out[1][i] = table_[rightPhase_];
+
+			leftPhase_ += 1;
+			if (leftPhase_ >= tableSize_)
+				leftPhase_ -= tableSize_;
+
+			rightPhase_ += 3;
+			if (rightPhase_ >= tableSize_)
+				rightPhase_ -= tableSize_;
+		}
+
+		return paContinue;
+	}
+
+private:
+	float *table_;
+	int tableSize_;
+	int leftPhase_;
+	int rightPhase_;
+};
+
+// ---------------------------------------------------------------------------------------
+
+// main:
+int main(int, char *[]);
+int main(int, char *[])
+{
+	try
+	{
+		// Create a SineGenerator object:
+		SineGenerator sineGenerator(TABLE_SIZE);
+
+		std::cout << "Setting up PortAudio..." << std::endl;
+
+		// Set up the System:
+		portaudio::AutoSystem autoSys;
+		portaudio::System &sys = portaudio::System::instance();
+
+		// Set up the parameters required to open a (Callback)Stream:
+		portaudio::DirectionSpecificStreamParameters outParams(sys.defaultOutputDevice(), 2, portaudio::FLOAT32, false, sys.defaultOutputDevice().defaultLowOutputLatency(), NULL);
+		portaudio::StreamParameters params(portaudio::DirectionSpecificStreamParameters::null(), outParams, SAMPLE_RATE, FRAMES_PER_BUFFER, paClipOff);
+
+		std::cout << "Opening stereo output stream..." << std::endl;
+
+		// Create (and open) a new Stream, using the SineGenerator::generate function as a callback:
+		portaudio::MemFunCallbackStream<SineGenerator> stream(params, sineGenerator, &SineGenerator::generate);
+
+		std::cout << "Starting playback for " << NUM_SECONDS << " seconds." << std::endl;
+
+		// Start the Stream (audio playback starts):
+		stream.start();
+
+		// Wait for 5 seconds:
+		sys.sleep(NUM_SECONDS * 1000);
+
+		std::cout << "Closing stream..." <<std::endl;
+
+		// Stop the Stream (not strictly needed as termintating the System will also stop all open Streams):
+		stream.stop();
+
+		// Close the Stream (not strictly needed as terminating the System will also close all open Streams):
+		stream.close();
+
+		// Terminate the System (not strictly needed as the AutoSystem will also take care of this when it 
+		// goes out of scope):
+		sys.terminate();
+
+		std::cout << "Test finished." << std::endl;
+	}
+	catch (const portaudio::PaException &e)
+	{
+		std::cout << "A PortAudio error occured: " << e.paErrorText() << std::endl;
+	}
+	catch (const portaudio::PaCppException &e)
+	{
+		std::cout << "A PortAudioCpp error occured: " << e.what() << std::endl;
+	}
+	catch (const std::exception &e)
+	{
+		std::cout << "A generic exception occured: " << e.what() << std::endl;
+	}
+	catch (...)
+	{
+		std::cout << "An unknown exception occured." << std::endl;
+	}
+
+	return 0;
+}
+
+
diff --git a/src/audio/pacpp/include/Makefile.am b/src/audio/pacpp/include/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..d8e4f6c8040c22a3ae292a50043907a0995b46bb
--- /dev/null
+++ b/src/audio/pacpp/include/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = portaudiocpp
\ No newline at end of file
diff --git a/src/audio/pacpp/include/portaudiocpp/AsioDeviceAdapter.hxx b/src/audio/pacpp/include/portaudiocpp/AsioDeviceAdapter.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..3637c597470ef7cf331d0221c227e36f30d662b7
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/AsioDeviceAdapter.hxx
@@ -0,0 +1,41 @@
+#ifndef INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX
+#define INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX
+
+namespace portaudio
+{
+
+	// Forward declaration(s):
+	class Device;
+
+	// Declaration(s):
+	//////
+	/// @brief Adapts the given Device to an ASIO specific extension.
+	///
+	/// Deleting the AsioDeviceAdapter does not affect the underlaying 
+	/// Device.
+	//////
+	class AsioDeviceAdapter
+	{
+	public:
+		AsioDeviceAdapter(Device &device);
+
+		Device &device();
+
+		long minBufferSize() const;
+		long maxBufferSize() const;
+		long preferredBufferSize() const;
+		long granularity() const;
+
+		void showControlPanel(void *systemSpecific);
+
+	private:
+		Device *device_;
+
+		long minBufferSize_;
+		long maxBufferSize_;
+		long preferredBufferSize_;
+		long granularity_;
+	};
+}
+
+#endif // INCLUDED_PORTAUDIO_ASIODEVICEADAPTER_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/AutoSystem.hxx b/src/audio/pacpp/include/portaudiocpp/AutoSystem.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..16cac5ed502f623a659f596a042b96a49620a5d1
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/AutoSystem.hxx
@@ -0,0 +1,62 @@
+#ifndef INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+#define INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+	//////
+	/// @brief A RAII idiom class to ensure automatic clean-up when an exception is 
+	/// raised.
+	///
+	/// A simple helper class which uses the 'Resource Acquisition is Initialization' 
+	/// idiom (RAII). Use this class to initialize/terminate the System rather than 
+	/// using System directly. AutoSystem must be created on stack and must be valid 
+	/// throughout the time you wish to use PortAudioCpp. Your 'main' function might be 
+	/// a good place for it.
+	///
+	/// To avoid having to type portaudio::System::instance().xyz() all the time, it's usually 
+	/// a good idea to make a reference to the System which can be accessed directly.
+	/// @verbatim
+	/// portaudio::AutoSys autoSys;
+	/// portaudio::System &sys = portaudio::System::instance();
+	/// @endverbatim
+	//////
+	class AutoSystem
+	{
+	public:
+		AutoSystem(bool initialize = true)
+		{
+			if (initialize)
+				System::initialize();
+		}
+
+		~AutoSystem()
+		{
+			if (System::exists())
+				System::terminate();
+		}
+
+		void initialize()
+		{
+			System::initialize();
+		}
+
+		void terminate()
+		{
+			System::terminate();
+		}
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_AUTOSYSTEM_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/BlockingStream.hxx b/src/audio/pacpp/include/portaudiocpp/BlockingStream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..37fa76652dc19a770f54d8ecd5a2fccd5f61d8f2
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/BlockingStream.hxx
@@ -0,0 +1,45 @@
+#ifndef INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+#define INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudiocpp/Stream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+
+	//////
+	/// @brief Stream class for blocking read/write-style input and output.
+	//////
+	class BlockingStream : public Stream
+	{
+	public:
+		BlockingStream();
+		BlockingStream(const StreamParameters &parameters);
+		~BlockingStream();
+
+		void open(const StreamParameters &parameters);
+
+		void read(void *buffer, unsigned long numFrames);
+		void write(const void *buffer, unsigned long numFrames);
+
+		signed long availableReadSize() const;
+		signed long availableWriteSize() const;
+
+	private:
+		BlockingStream(const BlockingStream &); // non-copyable
+		BlockingStream &operator=(const BlockingStream &); // non-copyable
+	};
+
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_BLOCKINGSTREAM_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/CFunCallbackStream.hxx b/src/audio/pacpp/include/portaudiocpp/CFunCallbackStream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..b3e3b5c1b88a1cd85ffa9b704fbe6a93626a8683
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/CFunCallbackStream.hxx
@@ -0,0 +1,49 @@
+#ifndef INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s)
+namespace portaudio
+{
+	class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// @brief Callback stream using a free function with C linkage. It's important that the function 
+	/// the passed function pointer points to is declared ``extern "C"''.
+	//////
+	class CFunCallbackStream : public CallbackStream
+	{
+	public:
+		CFunCallbackStream();
+		CFunCallbackStream(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);
+		~CFunCallbackStream();
+		
+		void open(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData);
+
+	private:
+		CFunCallbackStream(const CFunCallbackStream &); // non-copyable
+		CFunCallbackStream &operator=(const CFunCallbackStream &); // non-copyable
+	};
+
+	// -----------------------------------------------------------------------------------
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/CallbackInterface.hxx b/src/audio/pacpp/include/portaudiocpp/CallbackInterface.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..d498ec5b780306c655d6c4d5f077edad995a568e
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/CallbackInterface.hxx
@@ -0,0 +1,45 @@
+#ifndef INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+#define INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// @brief Interface for an object that's callable as a PortAudioCpp callback object (ie that implements the 
+	/// paCallbackFun method).
+	//////
+	class CallbackInterface
+	{
+	public:
+		virtual ~CallbackInterface() {}
+
+		virtual int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+			const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags) = 0;
+	};
+
+	// -----------------------------------------------------------------------------------
+
+	namespace impl
+	{
+		extern "C"
+		{
+			int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+				const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, 
+				void *userData);
+		} // extern "C"
+	}
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CALLBACKINTERFACE_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/CallbackStream.hxx b/src/audio/pacpp/include/portaudiocpp/CallbackStream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..0382275e3ac2e3b7add3aa7a314b48d614163d6d
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/CallbackStream.hxx
@@ -0,0 +1,40 @@
+#ifndef INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/Stream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	//////
+	/// @brief Base class for all Streams which use a callback-based mechanism.
+	//////
+	class CallbackStream : public Stream
+	{
+	protected:
+		CallbackStream();
+		virtual ~CallbackStream();
+
+	public:
+		// stream info (time-varying)
+		double cpuLoad() const;
+
+	private:
+		CallbackStream(const CallbackStream &); // non-copyable
+		CallbackStream &operator=(const CallbackStream &); // non-copyable
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CALLBACKSTREAM_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/CppFunCallbackStream.hxx b/src/audio/pacpp/include/portaudiocpp/CppFunCallbackStream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..e0c001274dd3f7fb55a80f60ed5b56aad66d5f8e
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/CppFunCallbackStream.hxx
@@ -0,0 +1,86 @@
+#ifndef INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	namespace impl
+	{
+		extern "C"
+		{
+			int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+				const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, 
+				void *userData);
+		} // extern "C"
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// @brief Callback stream using a C++ function (either a free function or a static function) 
+	/// callback.
+	//////
+	class FunCallbackStream : public CallbackStream
+	{
+	public:
+		typedef int (*CallbackFunPtr)(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+			const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, 
+			void *userData);
+
+		// -------------------------------------------------------------------------------
+
+		//////
+		/// @brief Simple structure containing a function pointer to the C++ callback function and a 
+		/// (void) pointer to the user supplied data.
+		//////
+		struct CppToCCallbackData
+		{
+			CppToCCallbackData();
+			CppToCCallbackData(CallbackFunPtr funPtr, void *userData);
+			void init(CallbackFunPtr funPtr, void *userData);
+
+			CallbackFunPtr funPtr;
+			void *userData;
+		};
+
+		// -------------------------------------------------------------------------------
+
+		FunCallbackStream();
+		FunCallbackStream(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData);
+		~FunCallbackStream();
+
+		void open(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData);
+
+	private:
+		FunCallbackStream(const FunCallbackStream &); // non-copyable
+		FunCallbackStream &operator=(const FunCallbackStream &); // non-copyable
+
+		CppToCCallbackData adapterData_;
+
+		void open(const StreamParameters &parameters);
+	};
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_CPPFUNCALLBACKSTREAM_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/Device.hxx b/src/audio/pacpp/include/portaudiocpp/Device.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..ffde7aa8e33f54b6b2d2a950c65b00a0f92ce5be
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/Device.hxx
@@ -0,0 +1,91 @@
+#ifndef INCLUDED_PORTAUDIO_DEVICE_HXX
+#define INCLUDED_PORTAUDIO_DEVICE_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <iterator>
+
+#include "portaudio.h"
+
+#include "portaudiocpp/SampleDataFormat.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class System;
+	class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+	//////
+	/// @brief Class which represents a PortAudio device in the System.
+	///
+	/// A single physical device in the system may have multiple PortAudio 
+	/// Device representations using different HostApi 's though. A Device 
+	/// can be half-duplex or full-duplex. A half-duplex Device can be used 
+	/// to create a half-duplex Stream. A full-duplex Device can be used to 
+	/// create a full-duplex Stream. If supported by the HostApi, two 
+	/// half-duplex Devices can even be used to create a full-duplex Stream.
+	///
+	/// Note that Device objects are very light-weight and can be passed around 
+	/// by-value.
+	//////
+	class Device
+	{
+	public:
+		// query info: name, max in channels, max out channels, 
+		// default low/hight input/output latency, default sample rate
+		PaDeviceIndex index() const;
+		const char *name() const;
+		int maxInputChannels() const;
+		int maxOutputChannels() const;
+		PaTime defaultLowInputLatency() const;
+		PaTime defaultHighInputLatency() const;
+		PaTime defaultLowOutputLatency() const;
+		PaTime defaultHighOutputLatency() const;
+		double defaultSampleRate() const;
+
+		bool isInputOnlyDevice() const; // extended
+		bool isOutputOnlyDevice() const; // extended
+		bool isFullDuplexDevice() const; // extended
+		bool isSystemDefaultInputDevice() const; // extended
+		bool isSystemDefaultOutputDevice() const; // extended
+		bool isHostApiDefaultInputDevice() const; // extended
+		bool isHostApiDefaultOutputDevice() const; // extended
+
+		bool operator==(const Device &rhs);
+		bool operator!=(const Device &rhs);
+
+		// host api reference
+		HostApi &hostApi();
+		const HostApi &hostApi() const;
+
+	private:
+		PaDeviceIndex index_;
+		const PaDeviceInfo *info_;
+
+	private:
+		friend class System;
+		
+		explicit Device(PaDeviceIndex index);
+		~Device();
+
+		Device(const Device &); // non-copyable
+		Device &operator=(const Device &); // non-copyable
+	};
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_DEVICE_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/DirectionSpecificStreamParameters.hxx b/src/audio/pacpp/include/portaudiocpp/DirectionSpecificStreamParameters.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..dd5ae0b90859eaf92982dcf72dc1f1f57f43f1e1
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/DirectionSpecificStreamParameters.hxx
@@ -0,0 +1,77 @@
+#ifndef INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+#define INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <cstddef>
+
+#include "portaudio.h"
+
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/SampleDataFormat.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class Device;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+	//////
+	/// @brief All parameters for one direction (either in or out) of a Stream. Together with 
+	/// parameters common to both directions, two DirectionSpecificStreamParameters can make up 
+	/// a StreamParameters object which contains all parameters for a Stream.
+	//////
+	class DirectionSpecificStreamParameters
+	{
+	public:
+		static DirectionSpecificStreamParameters null();
+
+		DirectionSpecificStreamParameters();
+		DirectionSpecificStreamParameters(const Device &device, int numChannels, SampleDataFormat format, 
+			bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo);
+
+		// Set up methods:
+		void setDevice(const Device &device);
+		void setNumChannels(int numChannels);
+
+		void setSampleFormat(SampleDataFormat format, bool interleaved = true);
+		void setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved = true);
+
+		void setSuggestedLatency(PaTime latency);
+
+		void setHostApiSpecificStreamInfo(void *streamInfo);
+
+		// Accessor methods:
+		PaStreamParameters *paStreamParameters();
+		const PaStreamParameters *paStreamParameters() const;
+
+		Device &device() const;
+		int numChannels() const;
+
+		SampleDataFormat sampleFormat() const;
+		bool isSampleFormatInterleaved() const;
+		bool isSampleFormatHostApiSpecific() const;
+		PaSampleFormat hostApiSpecificSampleFormat() const;
+
+		PaTime suggestedLatency() const;
+
+		void *hostApiSpecificStreamInfo() const;
+	
+	private:
+		PaStreamParameters paStreamParameters_;
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SINGLEDIRECTIONSTREAMPARAMETERS_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/Exception.hxx b/src/audio/pacpp/include/portaudiocpp/Exception.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..a70c2f1d6e725edf3b4e659b8a6f2e73ab91f020
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/Exception.hxx
@@ -0,0 +1,108 @@
+#ifndef INCLUDED_PORTAUDIO_EXCEPTION_HXX
+#define INCLUDED_PORTAUDIO_EXCEPTION_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <exception>
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+	//////
+	/// @brief Base class for all exceptions PortAudioCpp can throw.
+	///
+	/// Class is derived from std::exception.
+	//////
+	class Exception : public std::exception
+	{
+	public:
+		virtual ~Exception() throw() {}
+
+		virtual const char *what() const throw() = 0;
+	};
+	
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// @brief Wrapper for PortAudio error codes to C++ exceptions.
+	///
+	/// It wraps up PortAudio's error handling mechanism using 
+	/// C++ exceptions and is derived from std::exception for 
+	/// easy exception handling and to ease integration with 
+	/// other code.
+	///
+	/// To know what exceptions each function may throw, look up 
+	/// the errors that can occure in the PortAudio documentation 
+	/// for the equivalent functions.
+	///
+	/// Some functions are likely to throw an exception (such as 
+	/// Stream::open(), etc) and these should always be called in 
+	/// try{} catch{} blocks and the thrown exceptions should be 
+	/// handled properly (ie. the application shouldn't just abort, 
+	/// but merely display a warning dialog to the user or something).
+	/// However nearly all functions in PortAudioCpp are capable 
+	/// of throwing exceptions. When a function like Stream::isStopped() 
+	/// throws an exception, it's such an exceptional state that it's 
+	/// not likely that it can be recovered. PaExceptions such as these 
+	/// can ``safely'' be left to be handled by some outer catch-all-like 
+	/// mechanism for unrecoverable errors.
+	//////
+	class PaException : public Exception
+	{
+	public:
+		explicit PaException(PaError error);
+
+		const char *what() const throw();
+
+		PaError paError() const;
+		const char *paErrorText() const;
+
+		bool isHostApiError() const; // extended
+		long lastHostApiError() const;
+		const char *lastHostApiErrorText() const;
+
+		bool operator==(const PaException &rhs) const;
+		bool operator!=(const PaException &rhs) const;
+
+	private:
+		PaError error_;
+ 	};
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// @brief Exceptions specific to PortAudioCpp (ie. exceptions which do not have an 
+	/// equivalent PortAudio error code).
+	//////
+	class PaCppException : public Exception
+	{
+	public:
+		enum ExceptionSpecifier
+		{
+			UNABLE_TO_ADAPT_DEVICE
+		};
+
+		PaCppException(ExceptionSpecifier specifier);
+
+		const char *what() const throw();
+
+		ExceptionSpecifier specifier() const;
+
+		bool operator==(const PaCppException &rhs) const;
+		bool operator!=(const PaCppException &rhs) const;
+
+	private:
+		ExceptionSpecifier specifier_;
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_EXCEPTION_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/HostApi.hxx b/src/audio/pacpp/include/portaudiocpp/HostApi.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..899fc42d768198c5d2dd140d38e57b4fa036f911
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/HostApi.hxx
@@ -0,0 +1,76 @@
+#ifndef INCLUDED_PORTAUDIO_HOSTAPI_HXX
+#define INCLUDED_PORTAUDIO_HOSTAPI_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class Device;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	//////
+	/// @brief HostApi represents a host API (usually type of driver) in the System.
+	///
+	/// A single System can support multiple HostApi's each one typically having 
+	/// a set of Devices using that HostApi (usually driver type). All Devices in 
+	/// the HostApi can be enumerated and the default input/output Device for this 
+	/// HostApi can be retreived.
+	//////
+	class HostApi
+	{
+	public:
+		typedef System::DeviceIterator DeviceIterator;
+
+		// query info: id, name, numDevices
+		PaHostApiTypeId typeId() const;
+		PaHostApiIndex index() const;
+		const char *name() const;
+		int deviceCount() const;
+
+		// iterate devices
+		DeviceIterator devicesBegin();
+		DeviceIterator devicesEnd();
+
+		// default devices
+		Device &defaultInputDevice() const;
+		Device &defaultOutputDevice() const;
+
+		// comparison operators
+		bool operator==(const HostApi &rhs) const;
+		bool operator!=(const HostApi &rhs) const;
+
+	private:
+		const PaHostApiInfo *info_;
+		Device **devices_;
+
+	private:
+		friend class System;
+
+		explicit HostApi(PaHostApiIndex index);
+		~HostApi();
+
+		HostApi(const HostApi &); // non-copyable
+		HostApi &operator=(const HostApi &); // non-copyable
+	};
+
+
+}
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_HOSTAPI_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/InterfaceCallbackStream.hxx b/src/audio/pacpp/include/portaudiocpp/InterfaceCallbackStream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..e496dd272a0d7e5c5c89f54597026aebf5bb452a
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/InterfaceCallbackStream.hxx
@@ -0,0 +1,49 @@
+#ifndef INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s)
+namespace portaudio
+{
+	class StreamParameters;
+	class CallbackInterface;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	//////
+	/// @brief Callback stream using an instance of an object that's derived from the CallbackInterface 
+	/// interface.
+	//////
+	class InterfaceCallbackStream : public CallbackStream
+	{
+	public:
+		InterfaceCallbackStream();
+		InterfaceCallbackStream(const StreamParameters &parameters, CallbackInterface &instance);
+		~InterfaceCallbackStream();
+		
+		void open(const StreamParameters &parameters, CallbackInterface &instance);
+
+	private:
+		InterfaceCallbackStream(const InterfaceCallbackStream &); // non-copyable
+		InterfaceCallbackStream &operator=(const InterfaceCallbackStream &); // non-copyable
+	};
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_INTERFACECALLBACKSTREAM_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/Makefile.am b/src/audio/pacpp/include/portaudiocpp/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..c594894e3c06b2d84d76d0a083e6e1f84b3e3222
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/Makefile.am
@@ -0,0 +1,20 @@
+noinst_HEADERS = \
+	AutoSystem.hxx \
+	BlockingStream.hxx \
+	CFunCallbackStream.hxx \
+	CallbackInterface.hxx \
+	CallbackStream.hxx \
+	CppFunCallbackStream.hxx \
+	Device.hxx \
+	DirectionSpecificStreamParameters.hxx \
+	Exception.hxx \
+	HostApi.hxx \
+	InterfaceCallbackStream.hxx \
+	MemFunCallbackStream.hxx \
+	PortAudioCpp.hxx \
+	SampleDataFormat.hxx \
+	Stream.hxx \
+	StreamParameters.hxx \
+	System.hxx \
+	SystemDeviceIterator.hxx \
+	SystemHostApiIterator.hxx
diff --git a/src/audio/pacpp/include/portaudiocpp/MemFunCallbackStream.hxx b/src/audio/pacpp/include/portaudiocpp/MemFunCallbackStream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..a9e50ca6377ea8c94751857900e6955c8ce9709c
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/MemFunCallbackStream.hxx
@@ -0,0 +1,107 @@
+#ifndef INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+#define INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/CallbackStream.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+	//////
+	/// @brief Callback stream using a class's member function as a callback. Template argument T is the type of the 
+	/// class of which a member function is going to be used.
+	///
+	/// Example usage:
+	/// @verbatim MemFunCallback<MyClass> stream = MemFunCallbackStream(parameters, *this, &MyClass::myCallbackFunction); @endverbatim
+	//////
+	template<typename T>
+	class MemFunCallbackStream : public CallbackStream
+	{
+	public:
+		typedef int (T::*CallbackFunPtr)(const void *, void *, unsigned long, const PaStreamCallbackTimeInfo *, 
+			PaStreamCallbackFlags);
+
+		// -------------------------------------------------------------------------------
+
+		MemFunCallbackStream()
+		{
+		}
+
+		MemFunCallbackStream(const StreamParameters &parameters, T &instance, CallbackFunPtr memFun) : adapter_(instance, memFun)
+		{
+			open(parameters);
+		}
+
+		~MemFunCallbackStream()
+		{
+			close();
+		}
+
+		void open(const StreamParameters &parameters, T &instance, CallbackFunPtr memFun)
+		{
+			// XXX:	need to check if already open?
+
+			adapter_.init(instance, memFun);
+			open(parameters);
+		}
+
+	private:
+		MemFunCallbackStream(const MemFunCallbackStream &); // non-copyable
+		MemFunCallbackStream &operator=(const MemFunCallbackStream &); // non-copyable
+
+		//////
+		/// @brief Inner class which adapts a member function callback to a CallbackInterface compliant 
+		/// class (so it can be adapted using the paCallbackAdapter function).
+		//////
+		class MemFunToCallbackInterfaceAdapter : public CallbackInterface
+		{
+		public:
+			MemFunToCallbackInterfaceAdapter() {}
+			MemFunToCallbackInterfaceAdapter(T &instance, CallbackFunPtr memFun) : instance_(&instance), memFun_(memFun) {}
+
+			void init(T &instance, CallbackFunPtr memFun)
+			{
+				instance_ = &instance;
+				memFun_ = memFun;
+			}
+
+			int paCallbackFun(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+				const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags)
+			{
+				return (instance_->*memFun_)(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
+			}
+
+		private:
+			T *instance_;
+			CallbackFunPtr memFun_;
+		};
+
+		MemFunToCallbackInterfaceAdapter adapter_;
+
+		void open(const StreamParameters &parameters)
+		{
+			PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), 
+				parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, 
+				static_cast<void *>(&adapter_));
+
+			if (err != paNoError)
+				throw PaException(err);
+		}
+	};
+
+
+} // portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_MEMFUNCALLBACKSTREAM_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/PortAudioCpp.hxx b/src/audio/pacpp/include/portaudiocpp/PortAudioCpp.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..f11e7fb9f4e4ff601950806567c1b18d2668234f
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/PortAudioCpp.hxx
@@ -0,0 +1,109 @@
+#ifndef INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+#define INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @mainpage PortAudioCpp
+///
+///	<h1>PortAudioCpp - A Native C++ Binding of PortAudio V19</h1>
+/// <h2>PortAudio</h2>
+/// <p>
+///   PortAudio is a portable and mature C API for accessing audio hardware. It offers both callback-based and blocking 
+///   style input and output, deals with sample data format conversions, dithering and much more. There are a large number 
+///   of implementations available for various platforms including Windows MME, Windows DirectX, Windows and MacOS (Classic) 
+///   ASIO, MacOS Classic SoundManager, MacOS X CoreAudio, OSS (Linux), Linux ALSA, JACK (MacOS X and Linux) and SGI Irix 
+///   AL. Note that, currently not all of these implementations are equally complete or up-to-date (as PortAudio V19 is 
+///   still in development). Because PortAudio has a C API, it can easily be called from a variety of other programming 
+///   languages.
+/// </p>
+/// <h2>PortAudioCpp</h2>
+/// <p>
+///   Although, it is possible to use PortAudio's C API from within a C++ program, this is usually a little awkward 
+///   as procedural and object-oriented paradigms need to be mixed. PortAudioCpp aims to resolve this by encapsulating 
+///   PortAudio's C API to form an equivalent object-oriented C++ API. It provides a more natural integration of PortAudio 
+///   into C++ programs as well as a more structured interface. PortAudio's concepts were preserved as much as possible and 
+///   no additional features were added except for some `convenience methods'.
+/// </p>
+/// <p>
+///   PortAudioCpp's main features are:
+///   <ul>
+///     <li>Structured object model.</li>
+///     <li>C++ exception handling instead of C-style error return codes.</li>
+///     <li>Handling of callbacks using free functions (C and C++), static functions, member functions or instances of classes 
+///     derived from a given interface.</li>
+///     <li>STL compliant iterators to host APIs and devices.</li>
+///     <li>Some additional convenience functions to more easily set up and use PortAudio.</li>
+///   </ul>
+/// </p>
+/// <p>
+///   PortAudioCpp requires a recent version of the PortAudio V19 source code. This can be obtained from CVS or as a snapshot 
+///   from the website. The examples also require the ASIO 2 SDK which can be obtained from the Steinberg website. Alternatively, the 
+///   examples can easily be modified to compile without needing ASIO.
+/// </p>
+/// <p>
+///   Supported platforms:
+///   <ul>
+///     <li>Microsoft Visual C++ 6.0, 7.0 (.NET 2002) and 7.1 (.NET 2003).</li>
+///     <li>GNU G++ 2.95 and G++ 3.3.</li>
+///   </ul>
+///   Other platforms should be easily supported as PortAudioCpp is platform-independent and (reasonably) C++ standard compliant.
+/// </p>
+/// <p>
+///   This documentation mainly provides information specific to PortAudioCpp. For a more complete explaination of all of the 
+///   concepts used, please consult the PortAudio documentation.
+/// </p>
+/// <p>
+///   PortAudioCpp was developed by Merlijn Blaauw with many great suggestions and help from Ross Bencina. Ludwig Schwardt provided 
+///   GNU/Linux build files and checked G++ compatibility. PortAudioCpp may be used under the same licensing, conditions and 
+///   warranty as PortAudio. See <a href="http://www.portaudio.com/license.html">the PortAudio license</a> for more details.
+/// </p>
+/// <h2>Links</h2>
+/// <p>
+///   <a href="http://www.portaudio.com/">Official PortAudio site.</a><br>
+/// </p>
+//////
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @namespace portaudio
+///
+/// To avoid name collision, everything in PortAudioCpp is in the portaudio 
+/// namespace. If this name is too long it's usually pretty safe to use an 
+/// alias like ``namespace pa = portaudio;''.
+//////
+
+// ---------------------------------------------------------------------------------------
+
+//////
+/// @file PortAudioCpp.hxx
+/// An include-all header file (for lazy programmers and using pre-compiled headers).
+//////
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/AutoSystem.hxx"
+#include "portaudiocpp/BlockingStream.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+#include "portaudiocpp/CallbackStream.hxx"
+#include "portaudiocpp/CFunCallbackStream.hxx"
+#include "portaudiocpp/CppFunCallbackStream.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+#include "portaudiocpp/MemFunCallbackStream.hxx"
+#include "portaudiocpp/SampleDataFormat.hxx"
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+#include "portaudiocpp/Stream.hxx"
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_PORTAUDIOCPP_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/SampleDataFormat.hxx b/src/audio/pacpp/include/portaudiocpp/SampleDataFormat.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..a7e25b24136789a8f62983dcedbfcfb2fa5889f3
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/SampleDataFormat.hxx
@@ -0,0 +1,35 @@
+#ifndef INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+#define INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+namespace portaudio
+{
+
+
+	//////
+	/// @brief PortAudio sample data formats.
+	///
+	/// Small helper enum to wrap the PortAudio defines.
+	//////
+	enum SampleDataFormat
+	{
+		INVALID_FORMAT	= 0,
+		FLOAT32			= paFloat32,
+		INT32			= paInt32,
+		INT24			= paInt24,
+		INT16			= paInt16,
+		INT8			= paInt8,
+		UINT8			= paUInt8
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SAMPLEDATAFORMAT_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/Stream.hxx b/src/audio/pacpp/include/portaudiocpp/Stream.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..8a255ec7684e684b305cc63a47863a2c4ac6e1a1
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/Stream.hxx
@@ -0,0 +1,82 @@
+#ifndef INCLUDED_PORTAUDIO_STREAM_HXX
+#define INCLUDED_PORTAUDIO_STREAM_HXX
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class StreamParameters;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	//////
+	/// @brief A Stream represents an active or inactive input and/or output data 
+	/// stream in the System.
+	/// 
+	/// Concrete Stream classes should ensure themselves being in a closed state at 
+	/// destruction (i.e. by calling their own close() method in their deconstructor). 
+	/// Following good C++ programming practices, care must be taken to ensure no 
+	/// exceptions are thrown by the deconstructor of these classes. As a consequence, 
+	/// clients need to explicitly call close() to ensure the stream closed successfully.
+	///
+	/// The Stream object can be used to manipulate the Stream's state. Also, time-constant 
+	/// and time-varying information about the Stream can be retreived.
+	//////
+	class Stream
+	{
+	public:
+		// Opening/closing:
+		virtual ~Stream();
+
+		virtual void close();
+		bool isOpen() const;
+
+		// Additional set up:
+		void setStreamFinishedCallback(PaStreamFinishedCallback *callback);
+
+		// State management:
+		void start();
+		void stop();
+		void abort();
+
+		bool isStopped() const;
+		bool isActive() const;
+
+		// Stream info (time-constant, but might become time-variant soon):
+		PaTime inputLatency() const;
+		PaTime outputLatency() const;
+		double sampleRate() const;
+
+		// Stream info (time-varying):
+		PaTime time() const;
+
+		// Accessors for PortAudio PaStream, useful for interfacing 
+		// with PortAudio add-ons (such as PortMixer) for instance:
+		const PaStream *paStream() const;
+		PaStream *paStream();
+
+	protected:
+		Stream(); // abstract class
+
+		PaStream *stream_;
+
+	private:
+		Stream(const Stream &); // non-copyable
+		Stream &operator=(const Stream &); // non-copyable
+	};
+
+
+} // namespace portaudio
+
+
+#endif // INCLUDED_PORTAUDIO_STREAM_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/StreamParameters.hxx b/src/audio/pacpp/include/portaudiocpp/StreamParameters.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..2b6aa2ef4c39e2a1d6e8509f68a5a28a7dcf80c4
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/StreamParameters.hxx
@@ -0,0 +1,77 @@
+#ifndef INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+#define INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+	//////
+	/// @brief The entire set of parameters needed to configure and open 
+	/// a Stream.
+	///
+	/// It contains parameters of input, output and shared parameters. 
+	/// Using the isSupported() method, the StreamParameters can be 
+	/// checked if opening a Stream using this StreamParameters would 
+	/// succeed or not. Accessors are provided to higher-level parameters 
+	/// aswell as the lower-level parameters which are mainly intended for 
+	/// internal use.
+	//////
+	class StreamParameters
+	{
+	public:
+		StreamParameters();
+		StreamParameters(const DirectionSpecificStreamParameters &inputParameters, 
+			const DirectionSpecificStreamParameters &outputParameters, double sampleRate, 
+			unsigned long framesPerBuffer, PaStreamFlags flags);
+
+		// Set up for direction-specific:
+		void setInputParameters(const DirectionSpecificStreamParameters &parameters);
+		void setOutputParameters(const DirectionSpecificStreamParameters &parameters);
+
+		// Set up for common parameters:
+		void setSampleRate(double sampleRate);
+		void setFramesPerBuffer(unsigned long framesPerBuffer);
+		void setFlag(PaStreamFlags flag);
+		void unsetFlag(PaStreamFlags flag);
+		void clearFlags();
+
+		// Validation:
+		bool isSupported() const;
+
+		// Accessors (direction-specific):
+		DirectionSpecificStreamParameters &inputParameters();
+		const DirectionSpecificStreamParameters &inputParameters() const;
+		DirectionSpecificStreamParameters &outputParameters();
+		const DirectionSpecificStreamParameters &outputParameters() const;
+
+		// Accessors (common):
+		double sampleRate() const;
+		unsigned long framesPerBuffer() const;
+		PaStreamFlags flags() const;
+		bool isFlagSet(PaStreamFlags flag) const;
+
+	private:
+		// Half-duplex specific parameters:
+		DirectionSpecificStreamParameters inputParameters_;
+		DirectionSpecificStreamParameters outputParameters_;
+
+		// Common parameters:
+		double sampleRate_;
+		unsigned long framesPerBuffer_;
+		PaStreamFlags flags_;
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_STREAMPARAMETERS_HXX
diff --git a/src/audio/pacpp/include/portaudiocpp/System.hxx b/src/audio/pacpp/include/portaudiocpp/System.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..f5fb7132afd4da74f580affd2f188bef2f283b52
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/System.hxx
@@ -0,0 +1,107 @@
+#ifndef INCLUDED_PORTAUDIO_SYSTEM_HXX
+#define INCLUDED_PORTAUDIO_SYSTEM_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include "portaudio.h"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class Device;
+	class Stream;
+	class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	//////
+	/// @brief System singleton which represents the PortAudio system.
+	///
+	/// The System is used to initialize/terminate PortAudio and provide 
+	/// a single acccess point to the PortAudio System (instance()).
+	/// It can be used to iterate through all HostApi 's in the System as 
+	/// well as all devices in the System. It also provides some utility 
+	/// functionality of PortAudio.
+	///
+	/// Terminating the System will also abort and close the open streams. 
+	/// The Stream objects will need to be deallocated by the client though 
+	/// (it's usually a good idea to have them cleaned up automatically).
+	//////
+	class System
+	{
+	public:
+		class HostApiIterator; // forward declaration
+		class DeviceIterator; // forward declaration
+
+		// -------------------------------------------------------------------------------
+
+		static int version();
+		static const char *versionText();
+
+		static void initialize();
+		static void terminate();
+
+		static System &instance();
+		static bool exists();
+
+		// -------------------------------------------------------------------------------
+
+		// host apis:
+		HostApiIterator hostApisBegin();
+		HostApiIterator hostApisEnd();
+
+		HostApi &defaultHostApi();
+
+		HostApi &hostApiByTypeId(PaHostApiTypeId type);
+		HostApi &hostApiByIndex(PaHostApiIndex index);
+
+		int hostApiCount();
+
+		// -------------------------------------------------------------------------------
+
+		// devices:
+		DeviceIterator devicesBegin();
+		DeviceIterator devicesEnd();
+
+		Device &defaultInputDevice();
+		Device &defaultOutputDevice();
+
+		Device &deviceByIndex(PaDeviceIndex index);
+
+		int deviceCount();
+
+		static Device &nullDevice();
+
+		// -------------------------------------------------------------------------------
+
+		// misc:
+		void sleep(long msec);
+		int sizeOfSample(PaSampleFormat format);
+
+	private:
+		System();
+		~System();
+
+		static System *instance_;
+		static int initCount_;
+
+		static HostApi **hostApis_;
+		static Device **devices_;
+
+		static Device *nullDevice_;
+	};
+
+
+} // namespace portaudio
+
+
+#endif // INCLUDED_PORTAUDIO_SYSTEM_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/SystemDeviceIterator.hxx b/src/audio/pacpp/include/portaudiocpp/SystemDeviceIterator.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..613fc3db51a025b48b3e71c25d05741d65efaa05
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/SystemDeviceIterator.hxx
@@ -0,0 +1,66 @@
+#ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+#define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <iterator>
+#include <cstddef>
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class Device;
+	class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+	
+	//////
+	/// @brief Iterator class for iterating through all Devices in a System.
+	///
+	/// Devices will be iterated by iterating all Devices in each 
+	/// HostApi in the System. Compliant with the STL bidirectional 
+	/// iterator concept.
+	//////
+	class System::DeviceIterator
+	{
+	public:
+		typedef std::bidirectional_iterator_tag iterator_category;
+		typedef Device value_type;
+		typedef ptrdiff_t difference_type;
+		typedef Device * pointer;
+		typedef Device & reference;
+
+		Device &operator*() const;
+		Device *operator->() const;
+
+		DeviceIterator &operator++();
+		DeviceIterator operator++(int);
+		DeviceIterator &operator--();
+		DeviceIterator operator--(int);
+
+		bool operator==(const DeviceIterator &rhs);
+		bool operator!=(const DeviceIterator &rhs);
+
+	private:
+		friend class System;
+		friend class HostApi;
+		Device **ptr_;
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX
+
diff --git a/src/audio/pacpp/include/portaudiocpp/SystemHostApiIterator.hxx b/src/audio/pacpp/include/portaudiocpp/SystemHostApiIterator.hxx
new file mode 100644
index 0000000000000000000000000000000000000000..b9b13b85eb73571d515839fad201e4d1ab0d4a47
--- /dev/null
+++ b/src/audio/pacpp/include/portaudiocpp/SystemHostApiIterator.hxx
@@ -0,0 +1,61 @@
+#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
+
+// ---------------------------------------------------------------------------------------
+
+#include <iterator>
+#include <cstddef>
+
+#include "portaudiocpp/System.hxx"
+
+// ---------------------------------------------------------------------------------------
+
+// Forward declaration(s):
+namespace portaudio
+{
+	class HostApi;
+}
+
+// ---------------------------------------------------------------------------------------
+
+// Declaration(s):
+namespace portaudio
+{
+
+
+	//////
+	/// @brief Iterator class for iterating through all HostApis in a System.
+	///
+	/// Compliant with the STL bidirectional iterator concept.
+	//////
+	class System::HostApiIterator
+	{
+	public:
+		typedef std::bidirectional_iterator_tag iterator_category;
+		typedef Device value_type;
+		typedef ptrdiff_t difference_type;
+		typedef HostApi * pointer;
+		typedef HostApi & reference;
+
+		HostApi &operator*() const;
+		HostApi *operator->() const;
+
+		HostApiIterator &operator++();
+		HostApiIterator operator++(int);
+		HostApiIterator &operator--();
+		HostApiIterator operator--(int);
+
+		bool operator==(const HostApiIterator &rhs);
+		bool operator!=(const HostApiIterator &rhs);
+
+	private:
+		friend class System;
+		HostApi **ptr_;
+	};
+
+
+} // namespace portaudio
+
+// ---------------------------------------------------------------------------------------
+
+#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
diff --git a/src/audio/pacpp/source/Makefile.am b/src/audio/pacpp/source/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..d8e4f6c8040c22a3ae292a50043907a0995b46bb
--- /dev/null
+++ b/src/audio/pacpp/source/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = portaudiocpp
\ No newline at end of file
diff --git a/src/audio/pacpp/source/portaudiocpp/AsioDeviceAdapter.cxx b/src/audio/pacpp/source/portaudiocpp/AsioDeviceAdapter.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..295c26709a4c8ffe1826cc44e94cd7da29396126
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/AsioDeviceAdapter.cxx
@@ -0,0 +1,61 @@
+#include "portaudiocpp/AsioDeviceAdapter.hxx"
+
+#include "portaudio.h"
+#include "pa_asio/pa_asio.h"
+
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+	AsioDeviceAdapter::AsioDeviceAdapter(Device &device)
+	{
+		if (device.hostApi().typeId() != paASIO)
+			throw PaCppException(PaCppException::UNABLE_TO_ADAPT_DEVICE);
+
+		device_ = &device;
+
+		PaError err = PaAsio_GetAvailableLatencyValues(device_->index(), &minBufferSize_, &maxBufferSize_, 
+			&preferredBufferSize_, &granularity_);
+
+		if (err != paNoError)
+			throw PaException(err);
+
+	}
+
+	Device &AsioDeviceAdapter::device()
+	{
+		return *device_;
+	}
+
+	long AsioDeviceAdapter::minBufferSize() const
+	{
+		return minBufferSize_;
+	}
+
+	long AsioDeviceAdapter::maxBufferSize() const
+	{
+		return maxBufferSize_;
+	}
+
+	long AsioDeviceAdapter::preferredBufferSize() const
+	{
+		return preferredBufferSize_;
+	}
+
+	long AsioDeviceAdapter::granularity() const
+	{
+		return granularity_;
+	}
+
+	void AsioDeviceAdapter::showControlPanel(void *systemSpecific)
+	{
+		PaError err = PaAsio_ShowControlPanel(device_->index(), systemSpecific);
+
+		if (err != paNoError)
+			throw PaException(err);
+	}
+}
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/BlockingStream.cxx b/src/audio/pacpp/source/portaudiocpp/BlockingStream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c21535f0618699f4c7f7410033586844afd867dc
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/BlockingStream.cxx
@@ -0,0 +1,100 @@
+#include "portaudiocpp/BlockingStream.hxx"
+
+#include "portaudio.h"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+
+	// --------------------------------------------------------------------------------------
+
+	BlockingStream::BlockingStream()
+	{
+	}
+
+	BlockingStream::BlockingStream(const StreamParameters &parameters)
+	{
+		open(parameters);
+	}
+
+	BlockingStream::~BlockingStream()
+	{
+		try
+		{
+			close();
+		}
+		catch (...)
+		{
+			// ignore all errors
+		}
+	}
+
+	// --------------------------------------------------------------------------------------
+
+	void BlockingStream::open(const StreamParameters &parameters)
+	{
+		PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), 
+			parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), NULL, NULL);
+
+		if (err != paNoError)
+		{
+			throw PaException(err);
+		}
+	}
+
+	// --------------------------------------------------------------------------------------
+
+	void BlockingStream::read(void *buffer, unsigned long numFrames)
+	{
+		PaError err = Pa_ReadStream(stream_, buffer, numFrames);
+
+		if (err != paNoError)
+		{
+			throw PaException(err);
+		}
+	}
+
+	void BlockingStream::write(const void *buffer, unsigned long numFrames)
+	{
+		PaError err = Pa_WriteStream(stream_, buffer, numFrames);
+
+		if (err != paNoError)
+		{
+			throw PaException(err);
+		}
+	}
+
+	// --------------------------------------------------------------------------------------
+
+	signed long BlockingStream::availableReadSize() const
+	{
+		signed long avail = Pa_GetStreamReadAvailable(stream_);
+
+		if (avail < 0)
+		{
+			throw PaException(avail);
+		}
+
+		return avail;
+	}
+
+	signed long BlockingStream::availableWriteSize() const
+	{
+		signed long avail = Pa_GetStreamWriteAvailable(stream_);
+
+		if (avail < 0)
+		{
+			throw PaException(avail);
+		}
+
+		return avail;
+	}
+
+	// --------------------------------------------------------------------------------------
+
+} // portaudio
+
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/CFunCallbackStream.cxx b/src/audio/pacpp/source/portaudiocpp/CFunCallbackStream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..fd2fb53be7c8268a167cfea927578367d33aa0a4
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/CFunCallbackStream.cxx
@@ -0,0 +1,41 @@
+#include "portaudiocpp/CFunCallbackStream.hxx"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+	CFunCallbackStream::CFunCallbackStream()
+	{
+	}
+
+	CFunCallbackStream::CFunCallbackStream(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData)
+	{
+		open(parameters, funPtr, userData);
+	}
+
+	CFunCallbackStream::~CFunCallbackStream()
+	{
+		try
+		{
+			close();
+		}
+		catch (...)
+		{
+			// ignore all errors
+		}
+	}
+
+	// ---------------------------------------------------------------------------------==
+
+	void CFunCallbackStream::open(const StreamParameters &parameters, PaStreamCallback *funPtr, void *userData)
+	{
+		PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), 
+			parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), funPtr, userData);
+
+		if (err != paNoError)
+		{
+			throw PaException(err);
+		}
+	}
+}
diff --git a/src/audio/pacpp/source/portaudiocpp/CallbackInterface.cxx b/src/audio/pacpp/source/portaudiocpp/CallbackInterface.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7e343122f7a8255f4a89a3c896babde1bb962bc1
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/CallbackInterface.cxx
@@ -0,0 +1,25 @@
+#include "portaudiocpp/CallbackInterface.hxx"
+
+namespace portaudio
+{
+
+	namespace impl
+	{
+
+		//////
+		/// Adapts any CallbackInterface object to a C-callable function (ie this function). A 
+		/// pointer to the object should be passed as ``userData'' when setting up the callback.
+		//////
+		int callbackInterfaceToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+			const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
+		{
+			CallbackInterface *cb = static_cast<CallbackInterface *>(userData);
+			return cb->paCallbackFun(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags);
+		}
+
+
+	} // namespace impl
+
+} // namespace portaudio
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/CallbackStream.cxx b/src/audio/pacpp/source/portaudiocpp/CallbackStream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..4204dbba9b51fc9d31a7db61a952b24665cfdfdd
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/CallbackStream.cxx
@@ -0,0 +1,20 @@
+#include "portaudiocpp/CallbackStream.hxx"
+
+namespace portaudio
+{
+	CallbackStream::CallbackStream()
+	{
+	}
+
+	CallbackStream::~CallbackStream()
+	{
+	}
+
+	// -----------------------------------------------------------------------------------
+	
+	double CallbackStream::cpuLoad() const
+	{
+		return Pa_GetStreamCpuLoad(stream_);
+	}
+
+} // namespace portaudio
diff --git a/src/audio/pacpp/source/portaudiocpp/CppFunCallbackStream.cxx b/src/audio/pacpp/source/portaudiocpp/CppFunCallbackStream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..95381398e34a3d86b06bbf89b088e6af8ada8254
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/CppFunCallbackStream.cxx
@@ -0,0 +1,81 @@
+#include "portaudiocpp/CppFunCallbackStream.hxx"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+	namespace impl
+	{
+		//////
+		/// Adapts any a C++ callback to a C-callable function (ie this function). A 
+		/// pointer to a struct with the C++ function pointer and the actual user data should be 
+		/// passed as the ``userData'' parameter when setting up the callback.
+		//////
+		int cppCallbackToPaCallbackAdapter(const void *inputBuffer, void *outputBuffer, unsigned long numFrames, 
+			const PaStreamCallbackTimeInfo *timeInfo, PaStreamCallbackFlags statusFlags, void *userData)
+		{
+			FunCallbackStream::CppToCCallbackData *data = static_cast<FunCallbackStream::CppToCCallbackData *>(userData);
+			return data->funPtr(inputBuffer, outputBuffer, numFrames, timeInfo, statusFlags, data->userData);
+		}
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	FunCallbackStream::CppToCCallbackData::CppToCCallbackData()
+	{
+	}
+
+	FunCallbackStream::CppToCCallbackData::CppToCCallbackData(CallbackFunPtr funPtr, void *userData) : funPtr(funPtr), userData(userData)
+	{
+	}
+
+	void FunCallbackStream::CppToCCallbackData::init(CallbackFunPtr funPtr, void *userData)
+	{
+		this->funPtr = funPtr;
+		this->userData = userData;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	FunCallbackStream::FunCallbackStream()
+	{
+	}
+
+	FunCallbackStream::FunCallbackStream(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData) : adapterData_(funPtr, userData)
+	{
+		open(parameters);
+	}
+
+	FunCallbackStream::~FunCallbackStream()
+	{
+		try
+		{
+			close();
+		}
+		catch (...)
+		{
+			// ignore all errors
+		}
+	}
+
+	void FunCallbackStream::open(const StreamParameters &parameters, CallbackFunPtr funPtr, void *userData)
+	{
+		adapterData_.init(funPtr, userData);
+		open(parameters);
+	}
+
+	void FunCallbackStream::open(const StreamParameters &parameters)
+	{
+		PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), 
+			parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::cppCallbackToPaCallbackAdapter, 
+			static_cast<void *>(&adapterData_));
+
+		if (err != paNoError)
+		{
+			throw PaException(err);
+		}
+	}
+
+	// -----------------------------------------------------------------------------------
+}
diff --git a/src/audio/pacpp/source/portaudiocpp/Device.cxx b/src/audio/pacpp/source/portaudiocpp/Device.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..cd7eb7cbd65acb15aa9b549e5cccbd5f98b0aff3
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/Device.cxx
@@ -0,0 +1,168 @@
+#include "portaudiocpp/Device.hxx"
+
+#include <cstddef>
+
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+
+		// -------------------------------------------------------------------------------
+
+		Device::Device(PaDeviceIndex index) : index_(index)
+		{
+			if (index == paNoDevice)
+				info_ = NULL;
+			else
+				info_ = Pa_GetDeviceInfo(index);
+		}
+
+		Device::~Device()
+		{
+		}
+
+		PaDeviceIndex Device::index() const
+		{
+			return index_;
+		}
+
+		const char *Device::name() const
+		{
+			if (info_ == NULL)
+				return "";
+
+			return info_->name;
+		}
+
+		int Device::maxInputChannels() const
+		{
+			if (info_ == NULL)
+				return 0;
+
+			return info_->maxInputChannels;
+		}
+
+		int Device::maxOutputChannels() const
+		{
+			if (info_ == NULL)
+				return 0;
+
+			return info_->maxOutputChannels;
+		}
+
+		PaTime Device::defaultLowInputLatency() const
+		{
+			if (info_ == NULL)
+				return static_cast<PaTime>(0.0);
+
+			return info_->defaultLowInputLatency;
+		}
+
+		PaTime Device::defaultHighInputLatency() const
+		{
+			if (info_ == NULL)
+				return static_cast<PaTime>(0.0);
+
+			return info_->defaultHighInputLatency;
+		}
+
+		PaTime Device::defaultLowOutputLatency() const
+		{
+			if (info_ == NULL)
+				return static_cast<PaTime>(0.0);
+
+			return info_->defaultLowOutputLatency;
+		}
+
+		PaTime Device::defaultHighOutputLatency() const
+		{
+			if (info_ == NULL)
+				return static_cast<PaTime>(0.0);
+
+			return info_->defaultHighOutputLatency;
+		}
+
+		double Device::defaultSampleRate() const
+		{
+			if (info_ == NULL)
+				return 0.0;
+
+			return info_->defaultSampleRate;
+		}
+
+		// -------------------------------------------------------------------------------
+
+		bool Device::isInputOnlyDevice() const
+		{
+			return (maxOutputChannels() == 0);
+		}
+
+		bool Device::isOutputOnlyDevice() const
+		{
+			return (maxInputChannels() == 0);
+		}
+
+		bool Device::isFullDuplexDevice() const
+		{
+			return (maxInputChannels() > 0 && maxOutputChannels() > 0);
+		}
+
+		bool Device::isSystemDefaultInputDevice() const
+		{
+			return (System::instance().defaultInputDevice() == *this);
+		}
+
+		bool Device::isSystemDefaultOutputDevice() const
+		{
+			return (System::instance().defaultOutputDevice() == *this);
+		}
+
+		bool Device::isHostApiDefaultInputDevice() const
+		{
+			return (hostApi().defaultInputDevice() == *this);
+		}
+
+		bool Device::isHostApiDefaultOutputDevice() const
+		{
+			return (hostApi().defaultOutputDevice() == *this);
+		}
+
+		// -------------------------------------------------------------------------------
+
+		bool Device::operator==(const Device &rhs)
+		{
+			return (index_ == rhs.index_);
+		}
+
+		bool Device::operator!=(const Device &rhs)
+		{
+			return !(*this == rhs);
+		}
+
+		// -------------------------------------------------------------------------------
+
+		HostApi &Device::hostApi()
+		{
+			// NOTE: will cause an exception when called for the null device
+			if (info_ == NULL)
+				throw PaException(paInternalError);
+
+			return System::instance().hostApiByIndex(info_->hostApi);
+		}
+
+		const HostApi &Device::hostApi() const
+		{
+			// NOTE; will cause an exception when called for the null device
+			if (info_ == NULL)
+				throw PaException(paInternalError);
+
+			return System::instance().hostApiByIndex(info_->hostApi);
+		}
+
+		// -------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/DirectionSpecificStreamParameters.cxx b/src/audio/pacpp/source/portaudiocpp/DirectionSpecificStreamParameters.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d3c307c311acd6323d1d41b6ee4758edd3eee4fd
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/DirectionSpecificStreamParameters.cxx
@@ -0,0 +1,163 @@
+#include "portaudiocpp/DirectionSpecificStreamParameters.hxx"
+
+#include "portaudiocpp/Device.hxx"
+
+namespace portaudio
+{
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Returns a `nil' DirectionSpecificStreamParameters object. This can be used to 
+	/// specify that one direction of a Stream is not required (i.e. when creating 
+	/// a half-duplex Stream). All fields of the null DirectionSpecificStreamParameters 
+	/// object are invalid except for the device and the number of channel, which are set 
+	/// to paNoDevice and 0 respectively.
+	//////
+	DirectionSpecificStreamParameters DirectionSpecificStreamParameters::null()
+	{
+		DirectionSpecificStreamParameters tmp;
+		tmp.paStreamParameters_.device = paNoDevice;
+		tmp.paStreamParameters_.channelCount = 0;
+		return tmp;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Default constructor -- all parameters will be uninitialized.
+	//////
+	DirectionSpecificStreamParameters::DirectionSpecificStreamParameters()
+	{
+	}
+
+	//////
+	/// Constructor which sets all required fields.
+	//////
+	DirectionSpecificStreamParameters::DirectionSpecificStreamParameters(const Device &device, int numChannels, 
+		SampleDataFormat format, bool interleaved, PaTime suggestedLatency, void *hostApiSpecificStreamInfo)
+	{
+		setDevice(device);
+		setNumChannels(numChannels);
+		setSampleFormat(format, interleaved);
+		setSuggestedLatency(suggestedLatency);
+		setHostApiSpecificStreamInfo(hostApiSpecificStreamInfo);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	void DirectionSpecificStreamParameters::setDevice(const Device &device)
+	{
+		paStreamParameters_.device = device.index();
+	}
+
+	void DirectionSpecificStreamParameters::setNumChannels(int numChannels)
+	{
+		paStreamParameters_.channelCount = numChannels;
+	}
+
+	void DirectionSpecificStreamParameters::setSampleFormat(SampleDataFormat format, bool interleaved)
+	{
+		paStreamParameters_.sampleFormat = static_cast<PaSampleFormat>(format);
+
+		if (!interleaved)
+			paStreamParameters_.sampleFormat |= paNonInterleaved;
+	}
+
+	void DirectionSpecificStreamParameters::setHostApiSpecificSampleFormat(PaSampleFormat format, bool interleaved)
+	{
+		paStreamParameters_.sampleFormat = format;
+
+		paStreamParameters_.sampleFormat |= paCustomFormat;
+
+		if (!interleaved)
+			paStreamParameters_.sampleFormat |= paNonInterleaved;
+	}
+
+	void DirectionSpecificStreamParameters::setSuggestedLatency(PaTime latency)
+	{
+		paStreamParameters_.suggestedLatency = latency;
+	}
+
+	void DirectionSpecificStreamParameters::setHostApiSpecificStreamInfo(void *streamInfo)
+	{
+		paStreamParameters_.hostApiSpecificStreamInfo = streamInfo;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters()
+	{
+		if (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)
+			return &paStreamParameters_;
+		else
+			return NULL;
+	}
+
+	const PaStreamParameters *DirectionSpecificStreamParameters::paStreamParameters() const
+	{
+		if (paStreamParameters_.channelCount > 0 && paStreamParameters_.device != paNoDevice)
+			return &paStreamParameters_;
+		else
+			return NULL;
+	}
+
+	Device &DirectionSpecificStreamParameters::device() const
+	{
+		return System::instance().deviceByIndex(paStreamParameters_.device);
+	}
+
+	int DirectionSpecificStreamParameters::numChannels() const
+	{
+		return paStreamParameters_.channelCount;
+	}
+
+	//////
+	/// Returns the (non host api-specific) sample format, without including 
+	/// the paNonInterleaved flag. If the sample format is host api-spefific, 
+	/// INVALID_FORMAT (0) will be returned.
+	//////
+	SampleDataFormat DirectionSpecificStreamParameters::sampleFormat() const
+	{
+		if (isSampleFormatHostApiSpecific())
+			return INVALID_FORMAT;
+		else
+			return static_cast<SampleDataFormat>(paStreamParameters_.sampleFormat & ~paNonInterleaved);
+	}
+
+	bool DirectionSpecificStreamParameters::isSampleFormatInterleaved() const
+	{
+		return ((paStreamParameters_.sampleFormat & paNonInterleaved) == 0);
+	}
+
+	bool DirectionSpecificStreamParameters::isSampleFormatHostApiSpecific() const
+	{
+		return ((paStreamParameters_.sampleFormat & paCustomFormat) == 0);
+	}
+
+	//////
+	/// Returns the host api-specific sample format, without including any 
+	/// paCustomFormat or paNonInterleaved flags. Will return 0 if the sample format is 
+	/// not host api-specific.
+	//////
+	PaSampleFormat DirectionSpecificStreamParameters::hostApiSpecificSampleFormat() const
+	{
+		if (isSampleFormatHostApiSpecific())
+			return paStreamParameters_.sampleFormat & ~paCustomFormat & ~paNonInterleaved;
+		else
+			return 0;
+	}
+
+	PaTime DirectionSpecificStreamParameters::suggestedLatency() const
+	{
+		return paStreamParameters_.suggestedLatency;
+	}
+
+	void *DirectionSpecificStreamParameters::hostApiSpecificStreamInfo() const
+	{
+		return paStreamParameters_.hostApiSpecificStreamInfo;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
diff --git a/src/audio/pacpp/source/portaudiocpp/Exception.cxx b/src/audio/pacpp/source/portaudiocpp/Exception.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2e7e70137c5d3181b7fc41747568a2e5944d1b2c
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/Exception.cxx
@@ -0,0 +1,123 @@
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+	// PaException:
+	// -----------------------------------------------------------------------------------
+
+	//////
+	///  Wraps a PortAudio error into a PortAudioCpp PaException.
+	//////
+	PaException::PaException(PaError error) : error_(error)
+	{
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Alias for paErrorText(), to have std::exception compliance.
+	//////
+	const char *PaException::what() const throw()
+	{
+		return paErrorText();
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Returns the PortAudio error code (PaError).
+	//////
+	PaError PaException::paError() const
+	{
+		return error_;
+	}
+
+	//////
+	/// Returns the error as a (zero-terminated) text string.
+	//////
+	const char *PaException::paErrorText() const
+	{
+		return Pa_GetErrorText(error_);
+	}
+
+	//////
+	/// Returns true is the error is a HostApi error.
+	//////
+	bool PaException::isHostApiError() const
+	{
+		return (error_ == paUnanticipatedHostError);
+	}
+
+	//////
+	/// Returns the last HostApi error (which is the current one if 
+	/// isHostApiError() returns true) as an error code.
+	//////
+	long PaException::lastHostApiError() const
+	{
+		return Pa_GetLastHostErrorInfo()->errorCode;
+	}
+
+	//////
+	/// Returns the last HostApi error (which is the current one if 
+	/// isHostApiError() returns true) as a (zero-terminated) text 
+	/// string, if it's available.
+	//////
+	const char *PaException::lastHostApiErrorText() const
+	{
+		return Pa_GetLastHostErrorInfo()->errorText;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	bool PaException::operator==(const PaException &rhs) const
+	{
+		return (error_ == rhs.error_);
+	}
+
+	bool PaException::operator!=(const PaException &rhs) const
+	{
+		return !(*this == rhs);
+	}
+
+	// -----------------------------------------------------------------------------------
+	// PaCppException:
+	// -----------------------------------------------------------------------------------
+	
+	PaCppException::PaCppException(ExceptionSpecifier specifier) : specifier_(specifier)
+	{
+	}
+
+	const char *PaCppException::what() const throw()
+	{
+		switch (specifier_)
+		{
+			case UNABLE_TO_ADAPT_DEVICE:
+			{
+				return "Unable to adapt the given device to the specified host api specific device extension";
+			}
+		}
+
+		return "Unknown exception";
+	}
+
+	PaCppException::ExceptionSpecifier PaCppException::specifier() const
+	{
+		return specifier_;
+	}
+
+	bool PaCppException::operator==(const PaCppException &rhs) const
+	{
+		return (specifier_ == rhs.specifier_);
+	}
+
+	bool PaCppException::operator!=(const PaCppException &rhs) const
+	{
+		return !(*this == rhs);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/HostApi.cxx b/src/audio/pacpp/source/portaudiocpp/HostApi.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c6ae019ad43813fcb5c41da7c6c861a010f34af2
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/HostApi.cxx
@@ -0,0 +1,121 @@
+#include "portaudiocpp/HostApi.hxx"
+
+#include "portaudiocpp/System.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+#include "portaudiocpp/Exception.hxx"
+
+namespace portaudio
+{
+
+	// -----------------------------------------------------------------------------------
+
+	HostApi::HostApi(PaHostApiIndex index) : devices_(NULL)
+	{
+		try
+		{
+			info_ = Pa_GetHostApiInfo(index);
+
+			// Create and populate devices array:
+			int numDevices = deviceCount();
+
+			devices_ = new Device*[numDevices];
+
+			for (int i = 0; i < numDevices; ++i)
+			{
+				PaDeviceIndex deviceIndex = Pa_HostApiDeviceIndexToDeviceIndex(index, i);
+
+				if (deviceIndex < 0)
+				{
+					throw PaException(deviceIndex);
+				}
+
+				devices_[i] = &System::instance().deviceByIndex(deviceIndex);
+			}
+		}
+		catch (const std::exception &e)
+		{
+			// Delete any (partially) constructed objects (deconstructor isn't called):
+			delete[] devices_; // devices_ is either NULL or valid
+
+			// Re-throw exception:
+			throw e;
+		}
+	}
+
+	HostApi::~HostApi()
+	{
+		// Destroy devices array:
+		delete[] devices_;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	PaHostApiTypeId HostApi::typeId() const
+	{
+		return info_->type;
+	}
+
+	PaHostApiIndex HostApi::index() const
+	{
+		PaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(typeId());
+
+		if (index < 0)
+			throw PaException(index);
+
+		return index;
+	}
+
+	const char *HostApi::name() const
+	{
+		return info_->name;
+	}
+
+	int HostApi::deviceCount() const
+	{
+		return info_->deviceCount;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	HostApi::DeviceIterator HostApi::devicesBegin()
+	{
+		DeviceIterator tmp;
+		tmp.ptr_ = &devices_[0]; // begin (first element)
+		return tmp;
+	}
+
+	HostApi::DeviceIterator HostApi::devicesEnd()
+	{
+		DeviceIterator tmp;
+		tmp.ptr_ = &devices_[deviceCount()]; // end (one past last element)
+		return tmp;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	Device &HostApi::defaultInputDevice() const
+	{
+		return System::instance().deviceByIndex(info_->defaultInputDevice);
+	}
+
+	Device &HostApi::defaultOutputDevice() const
+	{
+		return System::instance().deviceByIndex(info_->defaultOutputDevice);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	bool HostApi::operator==(const HostApi &rhs) const
+	{
+		return (typeId() == rhs.typeId());
+	}
+
+	bool HostApi::operator!=(const HostApi &rhs) const
+	{
+		return !(*this == rhs);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
diff --git a/src/audio/pacpp/source/portaudiocpp/InterfaceCallbackStream.cxx b/src/audio/pacpp/source/portaudiocpp/InterfaceCallbackStream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..09e02de67847f48ab0dfdadebf394aacb72879f5
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/InterfaceCallbackStream.cxx
@@ -0,0 +1,45 @@
+#include "portaudiocpp/InterfaceCallbackStream.hxx"
+
+#include "portaudiocpp/StreamParameters.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/CallbackInterface.hxx"
+
+namespace portaudio
+{
+
+	// ---------------------------------------------------------------------------------==
+
+	InterfaceCallbackStream::InterfaceCallbackStream()
+	{
+	}
+
+	InterfaceCallbackStream::InterfaceCallbackStream(const StreamParameters &parameters, CallbackInterface &instance)
+	{
+		open(parameters, instance);
+	}
+
+	InterfaceCallbackStream::~InterfaceCallbackStream()
+	{
+		try
+		{
+			close();
+		}
+		catch (...)
+		{
+			// ignore all errors
+		}
+	}
+
+	// ---------------------------------------------------------------------------------==
+
+	void InterfaceCallbackStream::open(const StreamParameters &parameters, CallbackInterface &instance)
+	{
+		PaError err = Pa_OpenStream(&stream_, parameters.inputParameters().paStreamParameters(), parameters.outputParameters().paStreamParameters(), 
+			parameters.sampleRate(), parameters.framesPerBuffer(), parameters.flags(), &impl::callbackInterfaceToPaCallbackAdapter, static_cast<void *>(&instance));
+
+		if (err != paNoError)
+		{
+			throw PaException(err);
+		}
+	}
+}
diff --git a/src/audio/pacpp/source/portaudiocpp/Makefile.am b/src/audio/pacpp/source/portaudiocpp/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..94e80b56ec353ca00bbbc40188c253cc28333098
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/Makefile.am
@@ -0,0 +1,22 @@
+noinst_LTLIBRARIES = libportaudiocpp.la
+
+libportaudiocpp_la_SOURCES = \
+	BlockingStream.cxx \
+	CallbackInterface.cxx \
+	CallbackStream.cxx \
+	CFunCallbackStream.cxx \
+	CppFunCallbackStream.cxx \
+	Device.cxx \
+	DirectionSpecificStreamParameters.cxx \
+	Exception.cxx \
+	HostApi.cxx \
+	InterfaceCallbackStream.cxx \
+	MemFunCallbackStream.cxx \
+	Stream.cxx \
+	StreamParameters.cxx \
+	System.cxx \
+	SystemDeviceIterator.cxx \
+	SystemHostApiIterator.cxx 
+
+
+AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src/audio/pacpp/include  -I$(top_srcdir)/libs/portaudio/pa_common/
diff --git a/src/audio/pacpp/source/portaudiocpp/MemFunCallbackStream.cxx b/src/audio/pacpp/source/portaudiocpp/MemFunCallbackStream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..113fe5a4dd382c557e92d6537c639101e014fd48
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/MemFunCallbackStream.cxx
@@ -0,0 +1,4 @@
+#include "portaudiocpp/MemFunCallbackStream.hxx"
+
+// (... template class ...)
+
diff --git a/src/audio/pacpp/source/portaudiocpp/Stream.cxx b/src/audio/pacpp/source/portaudiocpp/Stream.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3b21f09082efa3c58ea959d36764ac0ee209ac9b
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/Stream.cxx
@@ -0,0 +1,195 @@
+#include "portaudiocpp/Stream.hxx"
+
+#include <cstddef>
+
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/System.hxx"
+
+namespace portaudio
+{
+
+	// -----------------------------------------------------------------------------------
+
+	Stream::Stream() : stream_(NULL)
+	{
+	}
+
+	Stream::~Stream()
+	{
+		// (can't call close here, 
+		// the derived class should atleast call 
+		// close() in it's deconstructor)
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Closes the Stream if it's open, else does nothing.
+	//////
+	void Stream::close()
+	{
+		if (isOpen() && System::exists())
+		{
+			PaError err = Pa_CloseStream(stream_);
+			stream_ = NULL;
+
+			if (err != paNoError)
+				throw PaException(err);
+		}
+	}
+
+	//////
+	/// Returns true if the Stream is open.
+	//////
+	bool Stream::isOpen() const
+	{
+		return (stream_ != NULL);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	void Stream::setStreamFinishedCallback(PaStreamFinishedCallback *callback)
+	{
+		PaError err = Pa_SetStreamFinishedCallback(stream_, callback);
+
+		if (err != paNoError)
+			throw PaException(err);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	void Stream::start()
+	{
+		PaError err = Pa_StartStream(stream_);
+
+		if (err != paNoError)
+			throw PaException(err);
+	}
+
+	void Stream::stop()
+	{
+		PaError err = Pa_StopStream(stream_);
+
+		if (err != paNoError)
+			throw PaException(err);
+	}
+
+	void Stream::abort()
+	{
+		PaError err = Pa_AbortStream(stream_);
+
+		if (err != paNoError)
+			throw PaException(err);
+	}
+
+	bool Stream::isStopped() const
+	{
+		PaError ret = Pa_IsStreamStopped(stream_);
+
+		if (ret < 0)
+			throw PaException(ret);
+
+		return (ret == 1);
+	}
+
+	bool Stream::isActive() const
+	{
+		PaError ret = Pa_IsStreamActive(stream_);
+
+		if (ret < 0)
+			throw PaException(ret);
+
+		return (ret == 1);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Returns the best known input latency for the Stream. This value may differ from the 
+	/// suggested input latency set in the StreamParameters. Includes all sources of 
+	/// latency known to PortAudio such as internal buffering, and Host API reported latency. 
+	/// Doesn't include any estimates of unknown latency.
+	//////
+	PaTime Stream::inputLatency() const
+	{
+		const PaStreamInfo *info = Pa_GetStreamInfo(stream_);
+		if (info == NULL)
+		{
+			throw PaException(paInternalError);
+			return PaTime(0.0);
+		}
+
+		return info->inputLatency;
+	}
+
+	//////
+	/// Returns the best known output latency for the Stream. This value may differ from the 
+	/// suggested output latency set in the StreamParameters. Includes all sources of 
+	/// latency known to PortAudio such as internal buffering, and Host API reported latency. 
+	/// Doesn't include any estimates of unknown latency.
+	//////
+	PaTime Stream::outputLatency() const
+	{
+		const PaStreamInfo *info = Pa_GetStreamInfo(stream_);
+		if (info == NULL)
+		{
+			throw PaException(paInternalError);
+			return PaTime(0.0);
+		}
+
+		return info->outputLatency;
+	}
+
+	//////
+	/// Returns the sample rate of the Stream. Usually this will be the 
+	/// best known estimate of the used sample rate. For instance when opening a 
+	/// Stream setting 44100.0 Hz in the StreamParameters, the actual sample 
+	/// rate might be something like 44103.2 Hz (due to imperfections in the 
+	/// sound card hardware).
+	//////
+	double Stream::sampleRate() const
+	{
+		const PaStreamInfo *info = Pa_GetStreamInfo(stream_);
+		if (info == NULL)
+		{
+			throw PaException(paInternalError);
+			return 0.0;
+		}
+
+		return info->sampleRate;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	PaTime Stream::time() const
+	{
+		return Pa_GetStreamTime(stream_);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Accessor (const) for PortAudio PaStream pointer, useful for interfacing with 
+	/// PortAudio add-ons such as PortMixer for instance. Normally accessing this 
+	/// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's 
+	/// functionality.
+	//////
+	const PaStream *Stream::paStream() const
+	{
+		return stream_;
+	}
+
+	//////
+	/// Accessor (non-const) for PortAudio PaStream pointer, useful for interfacing with 
+	/// PortAudio add-ons such as PortMixer for instance. Normally accessing this 
+	/// pointer should not be needed as PortAudioCpp aims to provide all of PortAudio's 
+	/// functionality.
+	//////
+	PaStream *Stream::paStream()
+	{
+		return stream_;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
diff --git a/src/audio/pacpp/source/portaudiocpp/StreamParameters.cxx b/src/audio/pacpp/source/portaudiocpp/StreamParameters.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..670873bfdb9d1f159955ff635db113cd4950a167
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/StreamParameters.cxx
@@ -0,0 +1,165 @@
+#include "portaudiocpp/StreamParameters.hxx"
+
+#include <cstddef>
+
+#include "portaudiocpp/Device.hxx"
+
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Default constructor; does nothing.
+	//////
+	StreamParameters::StreamParameters()
+	{
+	}
+
+	//////
+	/// Sets up the all parameters needed to open either a half-duplex or full-duplex Stream.
+	///
+	/// @param inputParameters The parameters for the input direction of the to-be opened 
+	/// Stream or DirectionSpecificStreamParameters::null() for an output-only Stream.
+	/// @param outputParameters The parameters for the output direction of the to-be opened
+	/// Stream or DirectionSpecificStreamParameters::null() for an input-only Stream.
+	/// @param sampleRate The to-be opened Stream's sample rate in Hz.
+	/// @param framesPerBuffer The number of frames per buffer for a CallbackStream, or 
+	/// the preferred buffer granularity for a BlockingStream.
+	/// @param flags The flags for the to-be opened Stream; default paNoFlag.
+	//////
+	StreamParameters::StreamParameters(const DirectionSpecificStreamParameters &inputParameters, 
+		const DirectionSpecificStreamParameters &outputParameters, double sampleRate, unsigned long framesPerBuffer, 
+		PaStreamFlags flags) : inputParameters_(inputParameters), outputParameters_(outputParameters), 
+		sampleRate_(sampleRate), framesPerBuffer_(framesPerBuffer), flags_(flags)
+	{
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	//////
+	/// Sets the requested sample rate. If this sample rate isn't supported by the hardware, the 
+	/// Stream will fail to open. The real-life sample rate used might differ slightly due to 
+	/// imperfections in the sound card hardware; use Stream::sampleRate() to retreive the 
+	/// best known estimate for this value.
+	//////
+	void StreamParameters::setSampleRate(double sampleRate)
+	{
+		sampleRate_ = sampleRate;
+	}
+
+	//////
+	/// Either the number of frames per buffer for a CallbackStream, or 
+	/// the preferred buffer granularity for a BlockingStream. See PortAudio 
+	/// documentation.
+	//////
+	void StreamParameters::setFramesPerBuffer(unsigned long framesPerBuffer)
+	{
+		framesPerBuffer_ = framesPerBuffer;
+	}
+
+	//////
+	/// Sets the specified flag or does nothing when the flag is already set. Doesn't 
+	/// `unset' any previously existing flags (use clearFlags() for that).
+	//////
+	void StreamParameters::setFlag(PaStreamFlags flag)
+	{
+		flags_ |= flag;
+	}
+
+	//////
+	/// Unsets the specified flag or does nothing if the flag isn't set. Doesn't affect 
+	/// any other flags.
+	//////
+	void StreamParameters::unsetFlag(PaStreamFlags flag)
+	{
+		flags_ &= ~flag;
+	}
+
+	//////
+	/// Clears or `unsets' all set flags.
+	//////
+	void StreamParameters::clearFlags()
+	{
+		flags_ = paNoFlag;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	void StreamParameters::setInputParameters(const DirectionSpecificStreamParameters &parameters)
+	{
+		inputParameters_ = parameters;
+	}
+
+	void StreamParameters::setOutputParameters(const DirectionSpecificStreamParameters &parameters)
+	{
+		outputParameters_ = parameters;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	bool StreamParameters::isSupported() const
+	{
+		return (Pa_IsFormatSupported(inputParameters_.paStreamParameters(), 
+			outputParameters_.paStreamParameters(), sampleRate_) == paFormatIsSupported);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	double StreamParameters::sampleRate() const
+	{
+		return sampleRate_;
+	}
+
+	unsigned long StreamParameters::framesPerBuffer() const
+	{
+		return framesPerBuffer_;
+	}
+
+	//////
+	/// Returns all currently set flags as a binary combined 
+	/// integer value (PaStreamFlags). Use isFlagSet() to 
+	/// avoid dealing with the bitmasks.
+	//////
+	PaStreamFlags StreamParameters::flags() const
+	{
+		return flags_;
+	}
+
+	//////
+	/// Returns true if the specified flag is currently set 
+	/// or false if it isn't.
+	//////
+	bool StreamParameters::isFlagSet(PaStreamFlags flag) const
+	{
+		return ((flags_ & flag) != 0);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	DirectionSpecificStreamParameters &StreamParameters::inputParameters()
+	{
+		return inputParameters_;
+	}
+
+	const DirectionSpecificStreamParameters &StreamParameters::inputParameters() const
+	{
+		return inputParameters_;
+	}
+
+	DirectionSpecificStreamParameters &StreamParameters::outputParameters()
+	{
+		return outputParameters_;
+	}
+
+	const DirectionSpecificStreamParameters &StreamParameters::outputParameters() const
+	{
+		return outputParameters_;
+	}
+
+	// -----------------------------------------------------------------------------------
+} // namespace portaudio
+
+
+
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/System.cxx b/src/audio/pacpp/source/portaudiocpp/System.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..692c7a10ac00b5bc2bc7fec0594e76ed0efe866e
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/System.cxx
@@ -0,0 +1,308 @@
+#include "portaudiocpp/System.hxx"
+
+#include <cstddef>
+#include <cassert>
+
+#include "portaudiocpp/HostApi.hxx"
+#include "portaudiocpp/Device.hxx"
+#include "portaudiocpp/Stream.hxx"
+#include "portaudiocpp/Exception.hxx"
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+
+	// Static members:
+	System *System::instance_ = NULL;
+	int System::initCount_ = 0;
+	HostApi **System::hostApis_ = NULL;
+	Device **System::devices_ = NULL;
+	Device *System::nullDevice_ = NULL;
+
+	// -----------------------------------------------------------------------------------
+
+	int System::version()
+	{
+		return Pa_GetVersion();
+	}
+
+	const char *System::versionText()
+	{
+		return Pa_GetVersionText();
+	}
+
+	void System::initialize()
+	{
+		++initCount_;
+
+		if (initCount_ == 1)
+		{
+			// Create singleton:
+			assert(instance_ == NULL);
+			instance_ = new System();
+
+			// Initialize the PortAudio system:
+			{
+				PaError err = Pa_Initialize();
+
+				if (err != paNoError)
+					throw PaException(err);
+			}
+
+			// Create and populate device array:
+			{
+				int numDevices = instance().deviceCount();
+
+				devices_ = new Device*[numDevices];
+
+				for (int i = 0; i < numDevices; ++i)
+					devices_[i] = new Device(i);
+			}
+
+			// Create and populate host api array:
+			{
+				int numHostApis = instance().hostApiCount();
+
+				hostApis_ = new HostApi*[numHostApis];
+
+				for (int i = 0; i < numHostApis; ++i)
+					hostApis_[i] = new HostApi(i);
+			}
+			
+			// Create null device:
+			nullDevice_ = new Device(paNoDevice);
+		}
+	}
+
+	void System::terminate()
+	{
+		PaError err = paNoError;
+
+		if (initCount_ == 1)
+		{
+			// Destroy null device:
+			delete nullDevice_;
+
+			// Destroy host api array:
+			{
+				if (hostApis_ != NULL)
+				{
+					int numHostApis = instance().hostApiCount();
+
+					for (int i = 0; i < numHostApis; ++i)
+						delete hostApis_[i];
+
+					delete[] hostApis_;
+					hostApis_ = NULL;
+				}
+			}
+
+			// Destroy device array:
+			{
+				if (devices_ != NULL)
+				{
+					int numDevices = instance().deviceCount();
+
+					for (int i = 0; i < numDevices; ++i)
+						delete devices_[i];
+
+					delete[] devices_;
+					devices_ = NULL;
+				}
+			}
+
+			// Terminate the PortAudio system:
+			assert(instance_ != NULL);
+			err = Pa_Terminate();
+
+			// Destroy singleton:
+			delete instance_;
+			instance_ = NULL;
+		}
+
+		if (initCount_ > 0)
+			--initCount_;
+
+		if (err != paNoError)
+			throw PaException(err);
+	}
+
+
+	System &System::instance()
+	{
+		assert(exists());
+
+		return *instance_;
+	}
+
+	bool System::exists()
+	{
+		return (instance_ != NULL);
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	System::HostApiIterator System::hostApisBegin()
+	{
+		System::HostApiIterator tmp;
+		tmp.ptr_ = &hostApis_[0]; // begin (first element)
+		return tmp;
+	}
+
+	System::HostApiIterator System::hostApisEnd()
+	{
+		int count = hostApiCount();
+
+		System::HostApiIterator tmp;
+		tmp.ptr_ = &hostApis_[count]; // end (one past last element)
+		return tmp;
+	}
+
+	HostApi &System::defaultHostApi()
+	{
+		PaHostApiIndex defaultHostApi = Pa_GetDefaultHostApi();
+
+		if (defaultHostApi < 0)
+			throw PaException(defaultHostApi);
+
+		return *hostApis_[defaultHostApi];
+	}
+
+	HostApi &System::hostApiByTypeId(PaHostApiTypeId type)
+	{
+		PaHostApiIndex index = Pa_HostApiTypeIdToHostApiIndex(type);
+
+		if (index < 0)
+			throw PaException(index);
+
+		return *hostApis_[index];
+	}
+
+	HostApi &System::hostApiByIndex(PaHostApiIndex index)
+	{
+		if (index < 0 || index >= hostApiCount())
+			throw PaException(paInternalError);
+
+		return *hostApis_[index];
+	}
+
+	int System::hostApiCount()
+	{
+		PaHostApiIndex count = Pa_GetHostApiCount();
+
+		if (count < 0)
+			throw PaException(count);
+
+		return count;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	System::DeviceIterator System::devicesBegin()
+	{
+		DeviceIterator tmp;
+		tmp.ptr_ = &devices_[0];
+
+		return tmp;
+	}
+
+	System::DeviceIterator System::devicesEnd()
+	{
+		int count = deviceCount();
+
+		DeviceIterator tmp;
+		tmp.ptr_ = &devices_[count];
+
+		return tmp;
+	}
+
+	//////
+	/// Returns the System's default input Device, or the null Device if none 
+	/// was available.
+	//////
+	Device &System::defaultInputDevice()
+	{
+		PaDeviceIndex index = Pa_GetDefaultInputDevice();
+		return deviceByIndex(index);
+	}
+
+	//////
+	/// Returns the System's default output Device, or the null Device if none 
+	/// was available.
+	//////
+	Device &System::defaultOutputDevice()
+	{
+		PaDeviceIndex index = Pa_GetDefaultOutputDevice();
+		return deviceByIndex(index);
+	}
+
+	//////
+	/// Returns the Device for the given index.
+	/// Will throw a paInternalError equivalent PaException if the given index 
+	/// is out of range.
+	//////
+	Device &System::deviceByIndex(PaDeviceIndex index)
+	{
+		if (index < -1 || index >= deviceCount())
+		{
+			throw PaException(paInternalError);
+		}
+
+		if (index == -1)
+			return System::instance().nullDevice();
+
+		return *devices_[index];
+	}
+
+	int System::deviceCount()
+	{
+		PaDeviceIndex count = Pa_GetDeviceCount();
+
+		if (count < 0)
+			throw PaException(count);
+
+		return count;
+	}
+
+	Device &System::nullDevice()
+	{
+		return *nullDevice_;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	void System::sleep(long msec)
+	{
+		Pa_Sleep(msec);
+	}
+
+	int System::sizeOfSample(PaSampleFormat format)
+	{
+		PaError err = Pa_GetSampleSize(format);
+		if (err < 0)
+		{
+			throw PaException(err);
+			return 0;
+		}
+
+		return err;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	System::System()
+	{
+		// (left blank intentionally)
+	}
+
+	System::~System()
+	{
+		// (left blank intentionally)
+	}
+
+	// -----------------------------------------------------------------------------------
+
+} // namespace portaudio
+
diff --git a/src/audio/pacpp/source/portaudiocpp/SystemDeviceIterator.cxx b/src/audio/pacpp/source/portaudiocpp/SystemDeviceIterator.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c3c00f70e53c0b32b89065b77f8ea18b81deb097
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/SystemDeviceIterator.cxx
@@ -0,0 +1,60 @@
+#include "portaudiocpp/SystemDeviceIterator.hxx"
+
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+
+	Device &System::DeviceIterator::operator*() const
+	{
+		return **ptr_;
+	}
+
+	Device *System::DeviceIterator::operator->() const
+	{
+		return &**this;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	System::DeviceIterator &System::DeviceIterator::operator++()
+	{
+		++ptr_;
+		return *this;
+	}
+
+	System::DeviceIterator System::DeviceIterator::operator++(int)
+	{
+		System::DeviceIterator prev = *this;
+		++*this;
+		return prev;
+	}
+
+	System::DeviceIterator &System::DeviceIterator::operator--()
+	{
+		--ptr_;
+		return *this;
+	}
+
+	System::DeviceIterator System::DeviceIterator::operator--(int)
+	{
+		System::DeviceIterator prev = *this;
+		--*this;
+		return prev;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	bool System::DeviceIterator::operator==(const System::DeviceIterator &rhs)
+	{
+		return (ptr_ == rhs.ptr_);
+	}
+
+	bool System::DeviceIterator::operator!=(const System::DeviceIterator &rhs)
+	{
+		return !(*this == rhs);
+	}
+
+	// -----------------------------------------------------------------------------------
+} // namespace portaudio
+
+
diff --git a/src/audio/pacpp/source/portaudiocpp/SystemHostApiIterator.cxx b/src/audio/pacpp/source/portaudiocpp/SystemHostApiIterator.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f34ca40c939792a615894753bad11889fb78bf5a
--- /dev/null
+++ b/src/audio/pacpp/source/portaudiocpp/SystemHostApiIterator.cxx
@@ -0,0 +1,59 @@
+#include "portaudiocpp/SystemHostApiIterator.hxx"
+
+namespace portaudio
+{
+	// -----------------------------------------------------------------------------------
+
+	HostApi &System::HostApiIterator::operator*() const
+	{
+		return **ptr_;
+	}
+
+	HostApi *System::HostApiIterator::operator->() const
+	{
+		return &**this;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	System::HostApiIterator &System::HostApiIterator::operator++()
+	{
+		++ptr_;
+		return *this;
+	}
+
+	System::HostApiIterator System::HostApiIterator::operator++(int)
+	{
+		System::HostApiIterator prev = *this;
+		++*this;
+		return prev;
+	}
+
+	System::HostApiIterator &System::HostApiIterator::operator--()
+	{
+		--ptr_;
+		return *this;
+	}
+
+	System::HostApiIterator System::HostApiIterator::operator--(int)
+	{
+		System::HostApiIterator prev = *this;
+		--*this;
+		return prev;
+	}
+
+	// -----------------------------------------------------------------------------------
+
+	bool System::HostApiIterator::operator==(const System::HostApiIterator &rhs)
+	{
+		return (ptr_ == rhs.ptr_);
+	}
+
+	bool System::HostApiIterator::operator!=(const System::HostApiIterator &rhs)
+	{
+		return !(*this == rhs);
+	}
+
+	// -----------------------------------------------------------------------------------
+} // namespace portaudio
+
diff --git a/src/audio/ringbuffer.cpp b/src/audio/ringbuffer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fe8f49b9b11357e28cf2737e722f01faa2fc8f9b
--- /dev/null
+++ b/src/audio/ringbuffer.cpp
@@ -0,0 +1,166 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ *  Portions (c) Dominic Mazzoni (Audacity)
+ *                                                                              
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *                                                                              
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *                                                                              
+ *  You 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.
+ */
+
+#include <assert.h>
+#include <stdlib.h> 
+#include <string.h>  
+ 
+#include "ringbuffer.h"
+#include "../global.h"
+ 
+#define MIN_BUFFER_SIZE	1280
+
+// Create  a ring buffer with 'size' bytes
+RingBuffer::RingBuffer(int size) {
+   mBufferSize = (size > MIN_BUFFER_SIZE ? size : MIN_BUFFER_SIZE);
+   mStart = 0;
+   mEnd = 0;
+   mBuffer = new unsigned char[mBufferSize];
+   assert (mBuffer != NULL);
+}
+
+// Free memory on object deletion
+RingBuffer::~RingBuffer() {
+   delete[] mBuffer;  mBuffer = NULL;
+}
+ 
+void
+RingBuffer::flush (void) {
+	mStart = 0; 
+	mEnd = 0;
+} 
+
+int 
+RingBuffer::Len() const { 
+   return (mEnd + mBufferSize - mStart) % mBufferSize;
+}
+ 
+//
+// For the writer only:
+//
+int 
+RingBuffer::AvailForPut() const {
+   return (mBufferSize-4) - Len();
+} 
+
+// This one puts some data inside the ring buffer.
+// Change the volume if it's not 100
+int 
+RingBuffer::Put(void* buffer, int toCopy, unsigned short volume) {
+   samplePtr src;
+   int block;
+   int copied;
+   int pos;
+   int len = Len();
+
+   if (toCopy > (mBufferSize-4) - len)
+      toCopy = (mBufferSize-4) - len;
+
+   src = (samplePtr) buffer;
+
+   copied = 0;
+   pos = mEnd;
+
+   while(toCopy) {
+      block = toCopy;
+      if (block > (mBufferSize - pos)) // from current pos. to end of buffer
+         block = mBufferSize - pos;
+
+      // put the data inside the buffer.
+      if (volume!=100) {
+        int16* src16 = (int16*)src;
+        int int16len = (block >> 1);
+        for (int i=0; i < int16len; i++) { src16[i] = src16[i] * volume / 100; }
+      }
+      // bcopy(src, dest, len)
+      //fprintf(stderr, "has %d put %d\t", len, block);
+      bcopy (src, mBuffer + pos, block);
+      src += block;
+      pos = (pos + block) % mBufferSize;
+      toCopy -= block;
+      copied += block;
+   }
+
+   mEnd = pos;
+
+   // How many items copied.
+   return copied;
+}
+
+//
+// For the reader only:
+//
+
+int 
+RingBuffer::AvailForGet() const {
+	// Used space
+   return Len();
+}
+
+// Get will move 'toCopy' bytes from the internal FIFO to 'buffer'
+int 
+RingBuffer::Get(void *buffer, int toCopy, unsigned short volume) {
+   samplePtr dest;
+   int block;
+   int copied;
+   int len = Len();
+
+   if (toCopy > len)
+      toCopy = len;
+
+   dest = (samplePtr) buffer;
+   copied = 0;
+
+   //fprintf(stderr, "get start... ");
+   while(toCopy) {
+      block = toCopy;
+      if (block > (mBufferSize - mStart))
+         block = mBufferSize - mStart;
+
+      if(volume!=100) {
+        int16* start = (int16*)(mBuffer + mStart);
+        int int16len = (block >> 1);
+        for (int i=0; i<int16len; i++) { start[i] = start[i] * volume / 100; }
+      }
+      // bcopy(src, dest, len)
+      bcopy (mBuffer + mStart, dest, block);
+      dest += block;
+      mStart = (mStart + block) % mBufferSize;
+      toCopy -= block;
+      copied += block;
+   }
+	
+   return copied;
+}
+
+// Used to discard some bytes.
+int 
+RingBuffer::Discard(int toDiscard) {
+   int len = Len();
+
+   if (toDiscard > len)
+      toDiscard = len;
+
+   mStart = (mStart + toDiscard) % mBufferSize;
+
+   return toDiscard;
+}
diff --git a/src/audio/ringbuffer.h b/src/audio/ringbuffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..f5de45606f1053eb2f7d644eb3490c97dd21e243
--- /dev/null
+++ b/src/audio/ringbuffer.h
@@ -0,0 +1,61 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
+ * 
+ *  Portions Copyright (C) Dominic Mazzoni (Audacity)
+ *                                                                              
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *                                                                              
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *                                                                              
+ *  You 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.
+ */
+
+#ifndef __RING_BUFFER__
+#define __RING_BUFFER__
+
+typedef unsigned char* samplePtr;
+
+class RingBuffer {
+ public:
+   RingBuffer(int size);
+   ~RingBuffer();
+
+   // To set counters to 0
+   void flush (void);
+   
+   //
+   // For the writer only:
+   //
+   int AvailForPut (void) const;
+   int Put (void*, int, unsigned short volume = 100);
+
+   //
+   // For the reader only:
+   //
+   int AvailForGet (void) const;
+   int Get (void *, int, unsigned short volume = 100);
+   int Discard(int);
+
+   int Len() const;
+   
+ private:
+
+   int           mStart;
+   int           mEnd;
+   int           mBufferSize;
+   samplePtr     mBuffer;
+};
+
+#endif /*  __RING_BUFFER__ */
+
+
diff --git a/src/audio/tone.cpp b/src/audio/tone.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8a84e140b22e07856c37996c3c7243f90f438d5f
--- /dev/null
+++ b/src/audio/tone.cpp
@@ -0,0 +1,132 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ *  Inspired by ringbuffer of Audacity Project
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#include "tone.h"
+#include <math.h>
+
+int INT16_AMPLITUDE = 32767;
+
+Tone::Tone(const std::string& definition, unsigned int sampleRate, unsigned int nbChannel) : AudioLoop()
+{
+  _nbChannel  = nbChannel;
+  _sampleRate = sampleRate;
+  genBuffer(definition); // allocate memory with definition parameter
+}
+
+Tone::~Tone()
+{
+}
+
+void 
+Tone::genBuffer(const std::string& definition)
+{
+  if (definition.empty()) { return; }
+  _size = 0;
+
+  int16 *buffer = new int16[SIZEBUF]; //1kb
+  int16 *bufferPos = buffer;
+
+  // Number of format sections 
+  unsigned int posStart = 0; // position of precedent comma
+  unsigned int posEnd = 0; // position of the next comma
+
+  std::string s; // portion of frequency
+  int count; // number of int for one sequence
+
+  unsigned int deflen = definition.length();
+  do {
+    posEnd = definition.find(',', posStart);
+    if (posEnd == std::string::npos) {
+      posEnd = deflen;
+    }
+
+    {
+      // Sample string: "350+440" or "350+440/2000,244+655/2000"
+      int freq1, freq2, time;
+      s = definition.substr(posStart, posEnd-posStart);
+
+      // The 1st frequency is before the first + or the /
+      unsigned int pos_plus = s.find('+');
+      unsigned int pos_slash = s.find('/');
+      unsigned int len = s.length();
+      unsigned int endfrequency = 0;
+
+      if ( pos_slash == std::string::npos ) {
+        time = 0;
+        endfrequency = len;
+      } else {
+        time = atoi((s.substr(pos_slash+1,len-pos_slash-1)).data());
+        endfrequency = pos_slash;
+      }
+
+      // without a plus = 1 frequency
+      if (pos_plus == std::string::npos ) {
+        freq1 = atoi((s.substr(0,endfrequency)).data());
+        freq2 = 0;
+      } else {
+        freq1 = atoi((s.substr(0,pos_plus)).data());
+        freq2 = atoi((s.substr(pos_plus+1, endfrequency-pos_plus-1)).data());
+      }
+
+      // If there is time or if it's unlimited
+      if (time == 0) {
+        count = _sampleRate;
+      } else {
+        count = (_sampleRate * time) / 1000;
+      }
+      // Generate SAMPLING_RATE samples of sinus, buffer is the result
+      genSin(bufferPos, freq1, freq2, count);
+
+      // To concatenate the different buffers for each section.
+      _size += (count * _nbChannel); 
+      bufferPos += (count * _nbChannel);
+    }
+
+    posStart = posEnd+1;
+  } while (posStart < deflen);
+
+  _buffer = new int16[_size];
+  // src, dest, tocopy
+  bcopy(buffer, _buffer, _size<<1); // copy char, not int16..
+  delete[] buffer; buffer=0; bufferPos=0;
+}
+
+void
+Tone::genSin(int16 *buffer, int frequency1, int frequency2, int nb) 
+{
+  double var1 = (double)2 * (double)M_PI * (double)frequency1 / (double)_sampleRate; 
+  double var2 = (double)2 * (double)M_PI * (double)frequency2 / (double)_sampleRate;
+
+  double amp = (double)(INT16_AMPLITUDE >> 2);
+  if (_nbChannel == 2) { // stereo
+    int k = 0;
+    for(int t = 0; t < nb; t++) {
+      k = t << 1; // double channel : left/right
+      buffer[k] = buffer[k+1] = (int16)(amp * ((sin(var1 * t) + sin(var2 * t))));
+    }
+  } else {
+    for(int t = 0; t < nb; t++) {
+      buffer[t] = (int16)(amp * ((sin(var1 * t) + sin(var2 * t))));
+    }
+  }
+}
+
diff --git a/src/audio/tone.h b/src/audio/tone.h
new file mode 100644
index 0000000000000000000000000000000000000000..42d0dfe833e5f32ca608444a47160ab261aea0ba
--- /dev/null
+++ b/src/audio/tone.h
@@ -0,0 +1,67 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#ifndef __TONE_H__
+#define __TONE_H__
+
+#include <string>
+#include "audioloop.h"
+
+#define TONE_NBTONE 4
+#define TONE_NBCOUNTRY 7
+
+/**
+ * @author Yan Morin <yan.morin@savoirfairelinux.com>
+ */
+class Tone : public AudioLoop {
+public:
+  /**
+   * @param definition String that contain frequency/time of the tone
+   * @param sampleRate SampleRating of audio tone
+   */
+  Tone(const std::string& definition, unsigned int sampleRate, unsigned int nbChannel);
+  ~Tone();
+  enum TONEID {
+    TONE_DIALTONE = 0,
+    TONE_BUSY,
+    TONE_RINGTONE,
+    TONE_CONGESTION,
+    TONE_NULL
+  };
+  /**
+   * add a simple or double sin to the buffer, it double the sin in stereo 
+   * @param nb are the number of int16 (mono) to generate
+   * by example nb=5 generate 10 int16, 5 for the left, 5 for the right
+   */
+  void genSin(int16 *buffer, int frequency1, int frequency2, int nb);
+
+private:
+
+  /**
+   * allocate the memory with the definition
+   */
+  void genBuffer(const std::string& definition);
+
+  unsigned int _sampleRate;
+};
+
+#endif // __TONE_H__
+
diff --git a/src/audio/tonegenerator.cpp b/src/audio/tonegenerator.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f1b755241573f5caefe0ed4ae7cf9c91b1f5d34c
--- /dev/null
+++ b/src/audio/tonegenerator.cpp
@@ -0,0 +1,68 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */ 
+ 
+#include <fstream>
+#include <math.h> 
+#include <stdlib.h>
+ 
+#include "audiolayer.h"
+#include "codecDescriptor.h"
+#include "ringbuffer.h"
+#include "tonegenerator.h"
+#include "../global.h"
+#include "../manager.h"
+#include "../user_cfg.h"
+
+int AMPLITUDE = 32767;
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// ToneGenerator implementation
+///////////////////////////////////////////////////////////////////////////////
+
+ToneGenerator::ToneGenerator (unsigned int sampleRate) {	
+  _sampleRate = sampleRate;
+}
+
+ToneGenerator::~ToneGenerator (void) {
+}
+
+/**
+ * Calculate superposition of 2 sinus 
+ *
+ * @param	lower frequency
+ * @param	higher frequency
+ * @param	ptr for result buffer
+ */
+void
+ToneGenerator::generateSin (int lowerfreq, int higherfreq, int16* ptr, int len) const {
+	double var1, var2;
+													
+	var1 = (double)2 * (double)M_PI * (double)higherfreq / (double)_sampleRate; 
+	var2 = (double)2 * (double)M_PI * (double)lowerfreq / (double)_sampleRate;
+
+  double amp = (double)(AMPLITUDE >> 2);
+	
+	for(int t = 0; t < len; t++) {
+		ptr[t] = (int16)(amp * ((sin(var1 * t) + sin(var2 * t))));
+	}
+}
+
diff --git a/src/audio/tonegenerator.h b/src/audio/tonegenerator.h
new file mode 100644
index 0000000000000000000000000000000000000000..968c5946b42b0f9fbafb1aff1a26117b3b109fd3
--- /dev/null
+++ b/src/audio/tonegenerator.h
@@ -0,0 +1,61 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __TONE_GENERATOR_H__
+#define __TONE_GENERATOR_H__
+
+#include <string>
+#include <cc++/thread.h>
+
+#include "../global.h"
+
+///////////////////////////////////////////////////////////////////////////////
+// ToneGenerator
+///////////////////////////////////////////////////////////////////////////////
+class ToneGenerator {
+public:
+	ToneGenerator (unsigned int sampleRate);
+	~ToneGenerator (void);
+	
+	/**
+	 * Calculate sinus with superposition of 2 frequencies
+	 */
+	void generateSin	(int, int, int16 *, int len) const;
+
+
+	///////////////////////////
+	// Public members variable
+	//////////////////////////
+	int16 *sample;
+	int freq1, freq2;
+	int time;
+	int totalbytes;
+	
+private:
+	/*
+	 * Initialisation of the supported tones according to the countries.
+	 */
+	void		initTone (void);
+
+	int16 _buf[SIZEBUF];
+  int _sampleRate;
+};
+
+#endif // __TONE_GENRATOR_H__
diff --git a/src/audio/tonelist.cpp b/src/audio/tonelist.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bc6caaad36247329f027e3e24f000ccfe3015564
--- /dev/null
+++ b/src/audio/tonelist.cpp
@@ -0,0 +1,148 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#include "tonelist.h"
+
+ToneList::ToneList() {
+  _nbTone = TONE_NBTONE; // could be dynamic
+  _nbCountry = TONE_NBCOUNTRY; // could be dynamic
+
+  _defaultCountryId = ZID_NORTH_AMERICA;
+  initToneDefinition();
+}
+
+ToneList::~ToneList() {
+}
+
+void 
+ToneList::initToneDefinition() 
+{
+  _toneZone[ZID_NORTH_AMERICA][Tone::TONE_DIALTONE] = "350+440";
+  _toneZone[ZID_NORTH_AMERICA][Tone::TONE_BUSY] = "480+620/500,0/500";
+  _toneZone[ZID_NORTH_AMERICA][Tone::TONE_RINGTONE] = "440+480/2000,0/4000";
+  _toneZone[ZID_NORTH_AMERICA][Tone::TONE_CONGESTION] = "480+620/250,0/250"; 
+
+  _toneZone[ZID_FRANCE][Tone::TONE_DIALTONE] = "440";
+  _toneZone[ZID_FRANCE][Tone::TONE_BUSY] = "440/500,0/500";
+  _toneZone[ZID_FRANCE][Tone::TONE_RINGTONE] = "440/1500,0/3500";
+  _toneZone[ZID_FRANCE][Tone::TONE_CONGESTION] = "440/250,0/250";
+
+  _toneZone[ZID_AUSTRALIA][Tone::TONE_DIALTONE] = "413+438";
+  _toneZone[ZID_AUSTRALIA][Tone::TONE_BUSY] = "425/375,0/375";
+  _toneZone[ZID_AUSTRALIA][Tone::TONE_RINGTONE] = 
+    "413+438/400,0/200,413+438/400,0/2000";
+  _toneZone[ZID_AUSTRALIA][Tone::TONE_CONGESTION] = "425/375,0/375,420/375,8/375"; 
+
+  _toneZone[ZID_UNITED_KINGDOM][Tone::TONE_DIALTONE] = "350+440";
+  _toneZone[ZID_UNITED_KINGDOM][Tone::TONE_BUSY] = "400/375,0/375";
+  _toneZone[ZID_UNITED_KINGDOM][Tone::TONE_RINGTONE] = 
+    "400+450/400,0/200,400+450/400,0/2000";
+  _toneZone[ZID_UNITED_KINGDOM][Tone::TONE_CONGESTION] = 
+    "400/400,0/350,400/225,0/525";
+
+  _toneZone[ZID_SPAIN][Tone::TONE_DIALTONE] = "425";
+  _toneZone[ZID_SPAIN][Tone::TONE_BUSY] = "425/200,0/200";
+  _toneZone[ZID_SPAIN][Tone::TONE_RINGTONE] = "425/1500,0/3000";
+  _toneZone[ZID_SPAIN][Tone::TONE_CONGESTION] = 
+    "425/200,0/200,425/200,0/200,425/200,0/600";
+
+  _toneZone[ZID_ITALY][Tone::TONE_DIALTONE] = "425/600,0/1000,425/200,0/200";
+  _toneZone[ZID_ITALY][Tone::TONE_BUSY] = "425/500,0/500";
+  _toneZone[ZID_ITALY][Tone::TONE_RINGTONE] = "425/1000,0/4000";
+  _toneZone[ZID_ITALY][Tone::TONE_CONGESTION] = "425/200,0/200";
+
+  _toneZone[ZID_JAPAN][Tone::TONE_DIALTONE] = "400";
+  _toneZone[ZID_JAPAN][Tone::TONE_BUSY] = "400/500,0/500";
+  _toneZone[ZID_JAPAN][Tone::TONE_RINGTONE] = "400+15/1000,0/2000";
+  _toneZone[ZID_JAPAN][Tone::TONE_CONGESTION] = "400/500,0/500";
+}
+
+std::string
+ToneList::getDefinition(COUNTRYID countryId, Tone::TONEID toneId) 
+{
+  if (toneId == Tone::TONE_NULL) { return ""; }
+  return _toneZone[countryId][toneId];
+}
+
+ToneList::COUNTRYID 
+ToneList::getCountryId(const std::string& countryName) 
+{
+  if (countryName.compare("North America") == 0) {
+    return ZID_NORTH_AMERICA;
+  } else if (countryName.compare("France") == 0) {
+    return ZID_FRANCE;
+  } else if (countryName.compare("Australia") == 0) {
+    return ZID_AUSTRALIA;
+  } else if (countryName.compare("United Kingdom") == 0) {
+    return ZID_UNITED_KINGDOM;
+  } else if (countryName.compare("Spain") == 0) {
+    return ZID_SPAIN;
+  } else if (countryName.compare("Italy") == 0) {
+    return ZID_ITALY;
+  } else if (countryName.compare("Japan") == 0) {
+    return ZID_JAPAN;
+  } else {
+    return _defaultCountryId; // default, we don't want segmentation fault
+  }
+}
+
+TelephoneTone::TelephoneTone(const std::string& countryName, unsigned int sampleRate, unsigned int nbChannel=2) {
+  ToneList::COUNTRYID countryId = _toneList.getCountryId(countryName);
+  _tone[Tone::TONE_DIALTONE] = new Tone(_toneList.getDefinition(countryId, Tone::TONE_DIALTONE), sampleRate, nbChannel);
+  _tone[Tone::TONE_BUSY] = new Tone(_toneList.getDefinition(countryId, Tone::TONE_BUSY), sampleRate, nbChannel);
+  _tone[Tone::TONE_RINGTONE] = new Tone(_toneList.getDefinition(countryId, Tone::TONE_RINGTONE), sampleRate, nbChannel);
+  _tone[Tone::TONE_CONGESTION] = new Tone(_toneList.getDefinition(countryId, Tone::TONE_CONGESTION), sampleRate, nbChannel);
+
+  _currentTone = Tone::TONE_NULL; 
+}
+
+TelephoneTone::~TelephoneTone() 
+{
+  for (int i=0; i<_toneList.getNbTone(); i++) {
+    delete _tone[i]; _tone[i] = 0;
+  }
+}
+
+void
+TelephoneTone::setCurrentTone(Tone::TONEID toneId)
+{
+  if ( toneId != Tone::TONE_NULL && _currentTone != toneId ) {
+    _tone[toneId]->reset();
+  }
+  _currentTone = toneId;
+}
+
+Tone*
+TelephoneTone::getCurrentTone()
+{
+  if ( _currentTone == Tone::TONE_NULL ) {
+    return 0;
+  }
+  return _tone[_currentTone];
+}
+
+bool
+TelephoneTone::shouldPlay()
+{
+  return (( _currentTone != Tone::TONE_NULL ) ? true : false );
+}
+
+
diff --git a/src/audio/tonelist.h b/src/audio/tonelist.h
new file mode 100644
index 0000000000000000000000000000000000000000..3791c280a8cec1110ea760491d238281004993fc
--- /dev/null
+++ b/src/audio/tonelist.h
@@ -0,0 +1,97 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *
+ *  Inspired by tonegenerator of 
+ *   Laurielle Lea <laurielle.lea@savoirfairelinux.com> (2004)
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#ifndef __TONELIST_H__
+#define __TONELIST_H__
+
+#include "tone.h"
+
+/**
+ * @author Yan Morin <yan.morin@savoirfairelinux.com>
+ */
+class ToneList {
+public:
+  ToneList();
+  ~ToneList();
+
+  enum COUNTRYID {
+    ZID_NORTH_AMERICA = 0,
+    ZID_FRANCE,
+    ZID_AUSTRALIA,
+    ZID_UNITED_KINGDOM,
+    ZID_SPAIN,
+    ZID_ITALY,
+    ZID_JAPAN
+  };
+
+  /**
+    * get the string definition of a tone
+    * return the default country or default tone if id are invalid
+    * @param country the country Id, see ToneList constructor for the list
+    * @param toneId  toneId
+    * @return a string definition of the tone
+    */
+  std::string getDefinition(COUNTRYID countryId, Tone::TONEID toneId);
+  /**
+   * get the country id associate to a country name
+   * return the default country id if not found
+   * The default tone/country are set inside the ToneList constructor
+   * @param countryName countryName, see the ToneList constructor list
+   * @return Country Id or default Id
+   */
+  COUNTRYID getCountryId(const std::string& countryName);
+  int getNbTone() { return _nbTone; }
+private:
+  void initToneDefinition();
+  std::string _toneZone[TONE_NBCOUNTRY][TONE_NBTONE];
+  int _nbTone;
+  int _nbCountry;
+  COUNTRYID _defaultCountryId;
+};
+
+/**
+ * @author Yan Morin <yan.morin@savoirfairelinux.com>
+ */
+class TelephoneTone {
+public:
+  /** Initialize the toneList and set the current tone to null */
+  TelephoneTone(const std::string& countryName, unsigned int sampleRate, unsigned int nbChannel);
+  ~TelephoneTone();
+
+  /** send TONE::ZT_TONE_NULL to stop the playing */
+  void setCurrentTone(Tone::TONEID toneId);
+
+  /** 
+    * @return the currentTone after setting it with setCurrentTone 
+    *         0 if the current tone is null
+    */
+  Tone* getCurrentTone();
+
+  /** @return true if you should play the tone (CurrentTone is not NULL) */
+  bool shouldPlay();
+
+private:
+  Tone* _tone[TONE_NBTONE];
+  Tone::TONEID _currentTone;
+  ToneList _toneList;
+};
+
+#endif
diff --git a/src/audio/ulaw.cpp b/src/audio/ulaw.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ac836bd28f1449d4b5392b636c313d006c029227
--- /dev/null
+++ b/src/audio/ulaw.cpp
@@ -0,0 +1,48 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "g711.h"
+#include "ulaw.h"
+
+// 0 PCMU A 8000 1 [RFC3551]
+Ulaw::Ulaw(int payload)
+ : AudioCodec(payload, "PCMU")
+{
+  _officialName = "G711u";
+  _clockRate = 8000;
+  _channel   = 1;
+}
+
+Ulaw::~Ulaw (void)
+{
+}
+
+int
+Ulaw::codecDecode (short *dst, unsigned char *src, unsigned int size) 
+{
+	return G711::ULawDecode (dst, src, size);
+}
+
+int
+Ulaw::codecEncode (unsigned char *dst, short *src, unsigned int size) 
+{
+  return G711::ULawEncode (dst, src, size);
+}
+
diff --git a/src/audio/ulaw.h b/src/audio/ulaw.h
new file mode 100644
index 0000000000000000000000000000000000000000..a515d9bfad73299ae629a98a43581629593c2088
--- /dev/null
+++ b/src/audio/ulaw.h
@@ -0,0 +1,36 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author:  Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ULAW_H__
+#define __ULAW_H__
+
+#include "audiocodec.h"
+
+class Ulaw : public AudioCodec {
+public:
+  // payload should be 0
+  Ulaw(int payload=0);
+  ~Ulaw(void);
+
+  int codecDecode(short *, unsigned char *, unsigned int);
+  int codecEncode(unsigned char *, short *, unsigned int);
+};
+
+#endif // __ULAW_H__
diff --git a/src/call.cpp b/src/call.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..09419400b2e8f9c6039934513dccd97c45d02af5
--- /dev/null
+++ b/src/call.cpp
@@ -0,0 +1,271 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <iostream>
+
+#include "call.h"
+#include "voIPLink.h"
+
+Call::Call (CALLID id, CallType type, VoIPLink* voiplink)
+{
+	_state = NotExist;
+	_type = Null;
+	_id = id; 
+	_type = type;
+	_voIPLink = voiplink;
+  _flagNotAnswered = true;
+	
+	switch (_type) {
+	case Outgoing:
+		_voIPLink->newOutgoingCall(_id);
+		break;
+	case Incoming:
+		_voIPLink->newIncomingCall(_id);
+		break;
+	default:
+		break;
+	}
+}
+
+Call::~Call (void)
+{
+}
+
+CALLID
+Call::getId (void)
+{
+	return _id;
+}
+
+void 
+Call::setId (CALLID id)
+{
+	_id = id;
+}
+
+void 
+Call::setVoIPLink (VoIPLink* voIPLink)
+{
+	_voIPLink = voIPLink;
+}
+
+VoIPLink*
+Call::getVoIPLink (void)
+{
+	return _voIPLink;
+}
+
+std::string 
+Call::getCallerIdName (void)
+{
+	return _callerIdName;
+}
+
+void 
+Call::setCallerIdName (const std::string& callerId_name)
+{
+	_callerIdName = callerId_name;
+}
+
+std::string 
+Call::getCallerIdNumber (void)
+{
+	return _callerIdNumber;
+}
+
+void 
+Call::setCallerIdNumber (const std::string& callerId_number)
+{
+	_callerIdNumber = callerId_number;
+}
+
+Call::CallState
+Call::getState (void)
+{
+	return _state;  
+}
+
+void 
+Call::setState (Call::CallState state) 
+{
+	_state = state;
+}
+
+enum CallType 
+Call::getType (void)
+{
+	return _type;
+}
+
+void 
+Call::setType (enum CallType type)
+{
+	_type = type;
+}
+
+bool
+Call::isBusy (void)
+{
+	if (isAnswered() or isOffHold() or isOnMute() or isOffMute()) {
+		return true;
+	} else {
+		return false;
+	}
+}
+bool 
+Call::isOnHold (void)
+{
+	return (_state == OnHold) ? true : false;
+}
+
+bool 
+Call::isOffHold (void)
+{
+	return (_state == OffHold) ? true : false;
+}
+
+bool 
+Call::isOnMute (void)
+{
+	return (_state == MuteOn) ? true : false;
+}
+
+bool 
+Call::isOffMute (void)
+{
+	return (_state == MuteOff) ? true : false;
+}
+
+bool 
+Call::isTransfered (void)
+{
+	return (_state == Transfered) ? true : false;
+}
+
+bool 
+Call::isHungup (void)
+{
+	return (_state == Hungup) ? true : false;
+}
+
+bool 
+Call::isRinging (void)
+{
+	return (_state == Ringing) ? true : false;
+}
+
+bool 
+Call::isRefused (void)
+{
+	return (_state == Refused) ? true : false;
+}
+
+
+bool 
+Call::isAnswered (void)
+{
+	return (_state == Answered) ? true : false;
+}
+
+bool 
+Call::isNotAnswered (void)
+{
+	return (_state == Error || _state == NotExist || _state == Busy) ? true : false;
+}
+
+bool 
+Call::isProgressing (void)
+{
+	return (_state == Progressing) ? true : false;
+}
+
+bool
+Call::isOutgoingType (void)
+{
+	return (_type == Outgoing) ? true : false;
+}
+
+bool
+Call::isIncomingType (void)
+{
+	return (_type == Incoming) ? true : false;
+}
+
+int 
+Call::outgoingCall(const std::string& to)
+{
+	return _voIPLink->outgoingInvite(_id, to);
+}
+
+int 
+Call::hangup  (void)
+{
+	int i = _voIPLink->hangup(_id);
+  setState(Hungup);
+	return i;
+}
+
+int 
+Call::cancel  (void)
+{
+	int i = _voIPLink->cancel(_id);
+  setState(Hungup);
+	return i;
+}
+
+int 
+Call::answer  (void)
+{
+  _flagNotAnswered = false;
+	int i = _voIPLink->answer(_id);
+  setState(Answered);
+	return i;
+}
+
+int 
+Call::onHold  (void)
+{
+	int i = _voIPLink->onhold(_id);
+  setState(OnHold);
+	return i;
+}
+
+int 
+Call::offHold  (void)
+{
+	int i = _voIPLink->offhold(_id);
+  setState(OffHold);
+	return i;
+}
+
+int 
+Call::transfer  (const std::string& to)
+{
+	int i = _voIPLink->transfer(_id, to);
+  setState(Transfered);
+	return i;
+}
+
+int 
+Call::refuse  (void)
+{
+	int i = _voIPLink->refuse(_id);
+	return i;
+}
diff --git a/src/call.h b/src/call.h
new file mode 100644
index 0000000000000000000000000000000000000000..0baa2b22ff4c6163f804982b27483e1dd955b860
--- /dev/null
+++ b/src/call.h
@@ -0,0 +1,120 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CALL_H__
+#define __CALL_H__
+
+#include <string>
+
+typedef unsigned int CALLID;
+
+enum CallType {
+	Null = 0,
+	Incoming,
+	Outgoing
+};
+
+
+class VoIPLink;
+
+class Call {
+public:
+  enum CallState {
+    NotExist = 0,
+    Busy,
+    OnHold,
+    OffHold,
+    MuteOn,
+    MuteOff,
+    Transfered,
+    Hungup,
+    Answered,
+    Ringing,
+    Progressing,
+    Refused,	// for refuse incoming ringing call	
+    Error     // when a error occur
+  };
+
+	// Constructor
+	Call(CALLID id, CallType type, VoIPLink* voiplink);
+	// Destructor
+	~Call(void);
+	
+
+	// Handle call-id
+	CALLID getId (void);
+	void setId (CALLID id);
+	
+	// Accessor and modifior of VoIPLink
+	VoIPLink* getVoIPLink(void);
+	void setVoIPLink (VoIPLink* voIPLink);
+		
+	// Handle id name and id number
+	std::string getCallerIdName (void);
+	void setCallerIdName (const std::string& callerId_name);
+	std::string getCallerIdNumber (void);
+	void setCallerIdNumber (const std::string& callerId_number);
+ 	
+	// Handle state
+	CallState getState (void);
+	void setState (CallState state);
+	
+	// Handle type of call (incoming or outoing)
+	enum CallType getType (void);
+	void setType (enum CallType type);
+
+  bool isNotAnswered(void);
+	bool isBusy			  (void);
+	bool isOnHold 		(void);
+	bool isOffHold 		(void);
+	bool isOnMute 		(void);
+	bool isOffMute 		(void);
+	bool isTransfered 	(void);
+	bool isHungup 		(void);
+	bool isRinging 		(void);
+	bool isRefused 		(void);
+	bool isAnswered 	(void);
+	bool isProgressing 	(void);
+	bool isOutgoingType (void);
+	bool isIncomingType (void);
+	
+	int outgoingCall  	(const std::string& to);
+	int hangup  		(void);
+	int cancel  		(void);
+	int answer  		(void);
+	int onHold  		(void);
+	int offHold  		(void);
+	int transfer  		(const std::string& to);
+	int refuse  		(void);
+  void setFlagNotAnswered(bool value) { _flagNotAnswered = value; }
+  bool getFlagNotAnswered() const { return _flagNotAnswered; }
+
+private:
+	VoIPLink		*_voIPLink;	
+	CALLID 		  	 _id;
+	enum CallState 	 _state;
+	enum CallType 	 _type;
+	std::string 			 _callerIdName;
+	std::string 			 _callerIdNumber;
+
+  bool _flagNotAnswered;
+};
+
+#endif // __CALL_H__
diff --git a/src/config/Makefile.am b/src/config/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..d72225850fc3415ab1c5818cace8bc740401fe29
--- /dev/null
+++ b/src/config/Makefile.am
@@ -0,0 +1,6 @@
+SUBDIRS = 
+
+noinst_LTLIBRARIES = libconfig.la
+
+libconfig_la_SOURCES = \
+	config.cpp config.h
diff --git a/src/config/config.cpp b/src/config/config.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6e0018e57b870cb52f0e66de05c9ec7adf867a3d
--- /dev/null
+++ b/src/config/config.cpp
@@ -0,0 +1,305 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "config.h"
+#include <fstream>
+
+namespace Conf {
+
+// ctor
+ConfigTree::ConfigTree() 
+{
+}
+
+// dtor
+ConfigTree::~ConfigTree() 
+{
+  // erase every new ItemMap (by CreateSection)
+  SectionMap::iterator iter = _sections.begin();
+  while(iter != _sections.end()) {
+    delete iter->second; iter->second = NULL;
+    iter++;
+  }
+}
+
+/**
+ * Create the section only if it doesn't exists
+ */
+void
+ConfigTree::createSection(const std::string& section) {
+  // if we doesn't find the item, create it
+  if (_sections.find(section) == _sections.end()) {
+    _sections[section] = new ItemMap;
+  }
+}
+
+/**
+ * Add the config item only if it exists..
+ * If the section doesn't exists, create it
+ */
+void 
+ConfigTree::addConfigTreeItem(const std::string& section, const ConfigTreeItem item) 
+{
+  // if we doesn't find the item, create it
+  SectionMap::iterator iter = _sections.find(section);
+  if ( iter == _sections.end()) {
+    _sections[section] = new ItemMap;
+    iter = _sections.find(section);
+  }
+  // be prudent here
+  if (iter != _sections.end()) {
+    std::string name = item.getName();
+
+    if ( iter->second->find(name) == iter->second->end()) {
+      (*(iter->second))[name] = item;
+    }
+  }
+}
+
+// throw a ConfigTreeItemException if not found
+std::string 
+ConfigTree::getConfigTreeItemValue(const std::string& section, const std::string& itemName) 
+{
+  ConfigTreeItem* item = getConfigTreeItem(section, itemName);
+  if (item!=NULL) {
+    return item->getValue();
+  } else {
+    throw ConfigTreeItemException();
+  }
+  return "";
+}
+
+// throw a ConfigTreeItemException if not found
+int 
+ConfigTree::getConfigTreeItemIntValue(const std::string& section, const std::string& itemName) 
+{
+  ConfigTreeItem* item = getConfigTreeItem(section, itemName);
+  if (item!=NULL && item->getType() == "int") {
+    return atoi(item->getValue().data());
+  } else {
+    throw ConfigTreeItemException();
+  }
+  return 0;
+}
+
+bool
+ConfigTree::getConfigTreeItemToken(const std::string& section, const std::string& itemName, TokenList& arg) {
+  ConfigTreeItem *item = getConfigTreeItem(section, itemName);
+  if (item) {
+    arg.clear();
+    arg.push_back(section);
+    arg.push_back(itemName);
+    arg.push_back(item->getType());
+    arg.push_back(item->getValue());
+    arg.push_back(item->getDefaultValue());
+    return true;
+  }
+  return false;
+}
+
+
+
+/**
+ * Return a ConfigTreeItem or NULL if not found
+ */
+ConfigTreeItem* 
+ConfigTree::getConfigTreeItem(const std::string& section, const std::string& itemName) {
+  SectionMap::iterator iter = _sections.find(section);
+  if ( iter == _sections.end()) {
+    return NULL;
+  }
+  ItemMap::iterator iterItem = iter->second->find(itemName);
+  if ( iterItem == iter->second->end()) {
+    return NULL;
+  } 
+  return &(iterItem->second);
+}
+
+/**
+ * Set the configItem if found, else do nothing
+ */
+bool 
+ConfigTree::setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value) {
+  SectionMap::iterator iter = _sections.find(section);
+  if ( iter == _sections.end()) {
+    return false;
+  }
+  ItemMap::iterator iterItem = iter->second->find(itemName);
+  if ( iterItem == iter->second->end()) {
+    return false;
+  }
+  iterItem->second.setValue(value);
+  return true;
+}
+
+// Save config to a file (ini format)
+// return false if empty, no config, or enable to open
+// return true if everything is ok
+bool 
+ConfigTree::saveConfigTree(const std::string& fileName) {
+  if (fileName.empty() && _sections.begin() == _sections.end() ) {
+    return false;
+  }
+
+  std::fstream file;
+  file.open(fileName.data(), std::fstream::out);
+
+  if (!file.is_open()) {
+    return false;
+  }
+
+  // for each section, for each item...
+  SectionMap::iterator iter = _sections.begin();
+  while(iter != _sections.end()) {
+    file << "[" << iter->first << "]" << std::endl;
+    ItemMap::iterator iterItem = iter->second->begin();
+    while ( iterItem != iter->second->end() ) {
+      file << iterItem->first << "=" << iterItem->second.getValue() << std::endl;
+      iterItem++;
+    }
+    file << std::endl;
+
+    iter++;
+  }
+
+  file.close();
+  return true;
+}
+
+// Create the tree from an existing ini file
+// 0 = error
+// 1 = OK
+// 2 = unable to open
+int
+ConfigTree::populateFromFile(const std::string& fileName) {
+  bool out = false;
+  if (fileName.empty()) {
+    return 0;
+  }
+
+  std::fstream file;
+  file.open(fileName.data(), std::fstream::in);
+
+  if (!file.is_open()) {
+    file.open(fileName.data(), std::fstream::out);
+    out = true;
+    if (!file.is_open()) {
+      return 0;
+    }
+    file.close();
+    return 2;
+  }
+  // get length of file:
+  file.seekg (0, std::ios::end);
+  int length = file.tellg();
+  file.seekg (0, std::ios::beg);
+
+  if ( length == 0 ) {
+    file.close();
+    return 2; // should load config
+  }
+
+  std::string line;
+  std::string section("");
+  std::string key("");
+  std::string val("");
+  int pos;
+
+  while (!file.eof()) {
+    // Read the file line by line
+    std::getline(file, line);
+    if (!line.empty()) {
+      if (line[0] == '[') {
+        // If the line is a section
+        pos = line.find(']');
+        section = line.substr(1, pos - 1);
+
+      } else if (line[0] != '#') {
+        // If the line is "key=value" and doesn't begin with '#'(comments)
+
+        pos = line.find('=');
+        key = line.substr(0, pos);
+        val = line.substr(pos + 1, line.length() - pos);
+
+        if (key.length() > 0 && val.length() > 0) {
+          setConfigTreeItem(section, key, val);
+        }
+      }
+    }
+  }
+  
+  file.close();
+  return 1;
+}
+
+TokenList
+ConfigTreeIterator::begin()
+{
+  TokenList tk;
+  _iter = _tree->_sections.begin();
+  if (_iter!=_tree->_sections.end()) {
+    _iterItem = _iter->second->begin();
+    if (_iterItem!=_iter->second->end()) {
+      tk.push_back(_iter->first);
+      tk.push_back(_iterItem->first);
+      tk.push_back(_iterItem->second.getType());
+      tk.push_back(_iterItem->second.getValue());
+      tk.push_back(_iterItem->second.getDefaultValue());
+    }
+  }
+  return tk;
+}
+
+TokenList
+ConfigTreeIterator::next()
+{
+  TokenList tk;
+  // we return tk empty if we are at the end of the list...
+  if (_iter==_tree->_sections.end()) {
+    return tk;
+  }
+  if (_iterItem!=_iter->second->end()) {
+    _iterItem++;
+  }
+  if (_iterItem==_iter->second->end()) {
+    // if we increment, and we are at the end of a section
+    _iter++;
+    if (_iter!=_tree->_sections.end()) {
+      _iterItem = _iter->second->begin();
+      if (_iterItem!=_iter->second->end()) {
+        tk.push_back(_iter->first);
+        tk.push_back(_iterItem->first);
+        tk.push_back(_iterItem->second.getType());
+        tk.push_back(_iterItem->second.getValue());
+        tk.push_back(_iterItem->second.getDefaultValue());
+      }
+    }
+  } else {
+    tk.push_back(_iter->first);
+    tk.push_back(_iterItem->first);
+    tk.push_back(_iterItem->second.getType());
+    tk.push_back(_iterItem->second.getValue());
+    tk.push_back(_iterItem->second.getDefaultValue());
+  }
+  return tk;
+}
+
+} // end namespace ConfigTree
+
+
diff --git a/src/config/config.h b/src/config/config.h
new file mode 100644
index 0000000000000000000000000000000000000000..b09e3094394755ab23726079b95f281fde6fdf90
--- /dev/null
+++ b/src/config/config.h
@@ -0,0 +1,114 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CONFIG_CONFIG_H_
+#define __CONFIG_CONFIG_H_
+
+#include <map>
+#include <string>
+#include <list>
+
+namespace Conf {
+
+class ConfigTreeItem;
+typedef std::map<std::string, ConfigTreeItem> ItemMap;
+typedef std::map<std::string, ItemMap*> SectionMap;
+typedef std::list<std::string> TokenList;
+
+class ConfigTreeItemException {
+public:
+  ConfigTreeItemException() {}
+  ~ConfigTreeItemException() {}
+};
+
+class ConfigTree;
+class ConfigTreeIterator 
+{
+public:
+  TokenList begin();
+  const TokenList& end() const { return _endToken; }
+  TokenList next();
+  
+private:
+  friend class ConfigTree;
+  ConfigTreeIterator(ConfigTree *configTree) : _tree(configTree) {}
+
+  ConfigTree* _tree;
+  TokenList _endToken;
+  SectionMap::iterator _iter;
+  ItemMap::iterator _iterItem;
+};
+
+class ConfigTree {
+public:
+  ConfigTree();
+  ~ConfigTree();
+
+  void createSection(const std::string& section);
+  void addConfigTreeItem(const std::string& section, const ConfigTreeItem item);
+  bool setConfigTreeItem(const std::string& section, const std::string& itemName, const std::string& value);
+
+  // throw a ConfigTreeItemException if not found
+  std::string getConfigTreeItemValue(const std::string& section, const std::string& itemName);
+  int getConfigTreeItemIntValue(const std::string& section, const std::string& itemName);
+  bool saveConfigTree(const std::string& fileName);
+  int  populateFromFile(const std::string& fileName);
+
+  bool getConfigTreeItemToken(const std::string& section, const std::string& itemName, TokenList& arg);
+
+private:
+  ConfigTreeItem* getConfigTreeItem(const std::string& section, const std::string& itemName);
+
+  SectionMap _sections;
+  friend class ConfigTreeIterator;
+
+public:
+  ConfigTreeIterator createIterator() {
+    return ConfigTreeIterator(this);
+  }
+};
+
+class ConfigTreeItem {
+public:
+  ConfigTreeItem() : _defaultValue(""), _type("string") {}
+  // defaultvalue = value
+  ConfigTreeItem(const std::string& name, const std::string& value, const std::string& type) : 
+    _name(name), _value(value), 
+    _defaultValue(value), _type(type) {}
+  ConfigTreeItem(const std::string& name, const std::string& value, const std::string& defaultValue, const std::string& type) : 
+    _name(name), _value(value), 
+    _defaultValue(defaultValue), _type(type) {}
+  ~ConfigTreeItem() {}
+
+  void setValue(const std::string& value) { _value = value; }
+  const std::string getName() const { return _name; }
+  const std::string getValue() const  { return _value; }
+  const std::string getDefaultValue() const  { return _defaultValue; }
+  const std::string getType() const  { return _type; }
+
+private:
+  std::string _name;
+  std::string _value;
+  std::string _defaultValue;
+  std::string _type;
+};
+
+} // end namespace ConfigTree
+
+#endif
diff --git a/src/eventthread.cpp b/src/eventthread.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6e445ab232c3adda875de21ae6842ca0743dd7f9
--- /dev/null
+++ b/src/eventthread.cpp
@@ -0,0 +1,45 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "eventthread.h"
+#include "sipvoiplink.h"
+
+EventThread::EventThread (SipVoIPLink* sip) : Thread () 
+{
+	_sipthread = sip;
+	setCancel(cancelDeferred);
+}
+
+EventThread::~EventThread (void) 
+{
+  terminate();
+}
+
+/**
+ * Reimplementation of run() 
+ */
+void
+EventThread::run (void) 
+{
+  while(!testCancel()) {
+    _sipthread->getEvent();
+  }
+}
+
diff --git a/src/eventthread.h b/src/eventthread.h
new file mode 100644
index 0000000000000000000000000000000000000000..7508b1cfc33effb6911cb74ec83c028efaf7ff42
--- /dev/null
+++ b/src/eventthread.h
@@ -0,0 +1,38 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __EVENT_THREAD_H__
+#define __EVENT_THREAD_H__
+
+#include <cc++/thread.h>
+
+
+class SipVoIPLink;
+class EventThread : public ost::Thread {
+public:
+	EventThread (SipVoIPLink*);
+	~EventThread (void);
+	
+	virtual void 	 run ();
+private:
+	SipVoIPLink*	_sipthread;
+};
+
+#endif // __EVENT_THREAD_H__
diff --git a/src/global.h b/src/global.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7ab539b89205792830747f9f44ab582fa8510d9
--- /dev/null
+++ b/src/global.h
@@ -0,0 +1,55 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __GLOBAL_H__
+#define __GLOBAL_H__
+
+#include <assert.h>
+#include <stdio.h>
+
+typedef float float32;
+typedef short int16;
+
+//#define DEBUG
+
+#ifdef DEBUG
+	#define _debug(...)          fprintf(stderr, "[sflphoned] " __VA_ARGS__)
+  #define _debugException(...) fprintf(stderr, "[sflphoned-exception] " __VA_ARGS__ "\n")
+	#define _debugInit(...)      fprintf(stderr, "[sflphoned-init] " __VA_ARGS__ "\n")
+#else
+	#define _debug(...)
+  #define _debugException(...)
+	#define _debugInit(...)
+#endif
+
+#define SFLPHONED_VERSION "0.6.1"
+#define SFLPHONED_VERSIONNUM 0x000605
+
+#define PROGNAME         "sflphoned"
+#define PROGNAME_GLOBAL  "sflphone"
+#define PROGDIR          "sflphone"
+#define RINGDIR          "ringtones"
+#define CODECDIR         "codecs"
+
+#define _(arg) arg
+#define MONO					1
+#define CHANNELS				2
+#define SIZEBUF 				1024*1024
+#endif	// __GLOBAL_H__
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..bcac34b03ec02e90c4a0eee16dcea2a9aed30d72
--- /dev/null
+++ b/src/gui/Makefile.am
@@ -0,0 +1,17 @@
+serverdir = server
+serverlib = server/libsflphoneguiserver.la
+
+#libexec_PROGRAMS = qt/sflphone-qt
+
+#qt/sflphone-qt:
+#	cd qt && make
+
+SUBDIRS = $(serverdir)
+
+noinst_LTLIBRARIES = libguiframework.la
+
+libguiframework_la_SOURCES = guiframework.cpp guiframework.h
+
+libguiframework_la_CPPFLAGS = -I$(top_srcdir)/libs -I$(top_srcdir)/src
+libguiframework_la_CXXFLAGS = $(libccext2_CFLAGS)
+libguiframework_la_LIBADD = $(serverlib)
diff --git a/src/gui/guiframework.cpp b/src/gui/guiframework.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..d0a84605d0c85e73cc18b7852f3fb1c3128f88a0
--- /dev/null
+++ b/src/gui/guiframework.cpp
@@ -0,0 +1,297 @@
+/** 
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <string>
+#include <libintl.h>
+
+#include "global.h"
+#include "guiframework.h"
+#include "../manager.h"
+
+GuiFramework::GuiFramework ()
+{}
+
+GuiFramework::~GuiFramework (void) {}
+
+int 
+GuiFramework::outgoingCall(const std::string&, const std::string& to)
+{
+  return Manager::instance().outgoingCall(to);
+}
+
+bool
+GuiFramework::sendTextMessage(const std::string& account, const std::string& to, const std::string& message)
+{
+  return Manager::instance().sendTextMessage(account, to, message);
+}
+
+int 
+GuiFramework::hangupCall (CALLID id)
+{
+	if (Manager::instance().hangupCall(id) == 0) {
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+int 
+GuiFramework::cancelCall (CALLID id)
+{
+	if (Manager::instance().cancelCall(id) == 0) {
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+int 
+GuiFramework::answerCall (CALLID id)
+{
+  if (Manager::instance().answerCall(id) == 0) {
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+int 
+GuiFramework::onHoldCall (CALLID id)
+{
+  if (Manager::instance().onHoldCall(id) == 0) {
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+int 
+GuiFramework::offHoldCall (CALLID id)
+{
+  if (Manager::instance().offHoldCall(id) == 0) {
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+int 
+GuiFramework::transferCall (CALLID id, const std::string& to)
+{
+	if (Manager::instance().transferCall(id, to) == 0) {
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+void
+GuiFramework::mute() 
+{
+  Manager::instance().mute();
+}
+void
+GuiFramework::unmute() 
+{
+  Manager::instance().unmute();
+}
+
+int 
+GuiFramework::refuseCall (CALLID id)
+{
+	if (Manager::instance().refuseCall(id) == 0) {
+		return 1;
+	} else {
+		return 0;
+	}
+}
+
+bool
+GuiFramework::saveConfig (void)
+{
+	return Manager::instance().saveConfig();
+}
+
+bool 
+GuiFramework::registerVoIPLink (void)
+{
+  return Manager::instance().registerVoIPLink();
+}
+
+bool 
+GuiFramework::unregisterVoIPLink (void)
+{
+  return Manager::instance().unregisterVoIPLink();
+}
+
+bool 
+GuiFramework::sendDtmf (CALLID id, char code)
+{
+	return Manager::instance().sendDtmf(id, code);
+}
+
+bool 
+GuiFramework::playDtmf (char code)
+{
+	return Manager::instance().playDtmf(code);
+}
+
+bool 
+GuiFramework::playTone ()
+{
+	return Manager::instance().playTone();
+}
+
+bool 
+GuiFramework::stopTone ()
+{
+  Manager::instance().stopTone();
+  return true;
+}
+
+/**
+ * Initialization section / redirection
+ */
+bool
+GuiFramework::getEvents() 
+{
+  return Manager::instance().getEvents();
+}
+
+/**
+ * Configuration section / redirection
+ */
+bool 
+GuiFramework::getZeroconf(const std::string& sequenceId) 
+{
+  return Manager::instance().getZeroconf(sequenceId);
+}
+
+bool 
+GuiFramework::attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer)
+{
+  return Manager::instance().attachZeroconfEvents(sequenceId, observer);
+}
+
+bool 
+GuiFramework::detachZeroconfEvents(Pattern::Observer& observer)
+{
+  return Manager::instance().detachZeroconfEvents(observer);
+}
+
+bool 
+GuiFramework::getCallStatus(const std::string& sequenceId)
+{
+  return Manager::instance().getCallStatus(sequenceId);
+}
+
+CALLID
+GuiFramework::getCurrentId() 
+{
+  return Manager::instance().getCurrentCallId();
+}
+
+bool 
+GuiFramework::getConfigAll(const std::string& sequenceId)
+{
+  return Manager::instance().getConfigAll(sequenceId);
+}
+
+bool 
+GuiFramework::getConfig(const std::string& section, const std::string& name, TokenList& arg)
+{
+  return Manager::instance().getConfig(section, name, arg);
+}
+
+bool 
+GuiFramework::setConfig(const std::string& section, const std::string& name, const std::string& value)
+{
+  return Manager::instance().setConfig(section, name, value);
+}
+
+bool 
+GuiFramework::getConfigList(const std::string& sequenceId, const std::string& name)
+{
+  return Manager::instance().getConfigList(sequenceId, name);
+}
+
+bool 
+GuiFramework::setSpkrVolume(int volume)
+{
+  Manager::instance().setSpkrVolume(volume);
+  return true;
+}
+
+bool 
+GuiFramework::setMicVolume(int volume)
+{
+  Manager::instance().setMicVolume(volume);
+  return true;
+}
+
+int
+GuiFramework::getSpkrVolume()
+{
+  return Manager::instance().getSpkrVolume();
+}
+
+int
+GuiFramework::getMicVolume()
+{
+  return Manager::instance().getMicVolume();
+}
+
+bool
+GuiFramework::hasLoadedSetup()
+{
+  return Manager::instance().hasLoadedSetup();
+}
+
+bool 
+GuiFramework::getRegistrationState(std::string& stateCode, std::string& stateMessage) {
+  ManagerImpl::REGISTRATION_STATE state = Manager::instance().getRegistrationState();
+  bool returnValue = false;
+  switch( state ) {
+    case ManagerImpl::REGISTERED:
+      returnValue = true;
+      stateCode    = "103";
+      stateMessage = _("Registration succeed");
+    break;
+
+    case ManagerImpl::FAILED:
+      returnValue = true;
+      stateCode    = "104";
+      stateMessage = _("Registration failed");
+    break;
+
+    case ManagerImpl::UNREGISTERED:
+      returnValue = false;
+      stateCode    = "";
+      stateMessage = "";
+    break;
+  }
+  return returnValue;
+}
+
+bool 
+GuiFramework::setSwitch(const std::string& switchName)
+{
+  return Manager::instance().setSwitch(switchName);
+}
diff --git a/src/gui/guiframework.h b/src/gui/guiframework.h
new file mode 100644
index 0000000000000000000000000000000000000000..18242b499899f0ea4dae66cb805661143e0385dc
--- /dev/null
+++ b/src/gui/guiframework.h
@@ -0,0 +1,102 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __GUI_FRAMEWORK_H__
+#define __GUI_FRAMEWORK_H__
+/* Inherited class by GUI classes */
+/* The GuiFramework class is the base of all user interface */
+
+#include <string>
+#include "server/argtokenizer.h"
+#include "../observer.h"
+#include "../call.h"
+
+class GuiFramework {
+public:
+	GuiFramework ();
+	virtual ~GuiFramework (void);
+
+	/* Parent class to child class */
+	virtual int incomingCall (CALLID id, const std::string& accountId, const std::string& from) = 0;
+	virtual void peerAnsweredCall (CALLID id) = 0;
+	virtual void peerRingingCall (CALLID id) = 0;
+	virtual void peerHungupCall (CALLID id) = 0;
+  virtual void incomingMessage(const std::string& message) = 0;
+	virtual void displayStatus (const std::string& status) = 0;
+	virtual void displayConfigError (const std::string& error) = 0;
+	virtual void displayTextMessage (CALLID id, const std::string& message) = 0;
+	virtual void displayErrorText (CALLID id, const std::string& message) = 0;
+	virtual void displayError (const std::string& error) = 0;
+	virtual void startVoiceMessageNotification (void) {}
+	virtual void stopVoiceMessageNotification (void) {}
+  virtual void sendVoiceNbMessage(const std::string& nb_msg) = 0;
+	virtual void setup() = 0;
+  virtual void sendMessage(const std::string& code, const std::string& seqId, TokenList& arg) = 0;
+  virtual void sendCallMessage(const std::string& code, 
+  const std::string& sequenceId, CALLID id, TokenList arg) = 0;
+  virtual void sendRegistrationState(bool state) = 0;
+  virtual void callFailure(CALLID id) = 0;
+
+	/* Child class to parent class */
+	int outgoingCall(const std::string& account, const std::string& to);
+  bool sendTextMessage(const std::string& account, const std::string& to, const std::string& message);
+	int hangupCall (CALLID id);
+	int cancelCall (CALLID id);
+	int answerCall (CALLID id);
+	int onHoldCall (CALLID id);
+	int offHoldCall (CALLID id);
+	int transferCall (CALLID id, const std::string& to);
+	void mute ();
+	void unmute ();
+	int refuseCall (CALLID id);
+
+  bool saveConfig(void);
+  bool registerVoIPLink(void);
+  bool unregisterVoIPLink(void);
+  bool sendDtmf (CALLID id, char code);
+  bool playDtmf (char code);
+  bool playTone ();
+  bool stopTone ();
+
+  // config
+  bool getEvents();
+  bool getZeroconf(const std::string& sequenceId);
+  bool attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer);
+  bool detachZeroconfEvents(Pattern::Observer& observer);
+  bool getCallStatus(const std::string& sequenceId);
+  bool getConfigAll(const std::string& sequenceId);
+  bool getConfig(const std::string& section,  const std::string& name, TokenList& arg);
+  bool setConfig(const std::string& section, const std::string& name, const std::string& value);
+  bool getConfigList(const std::string& sequenceId, const std::string& name);
+  bool setSpkrVolume(int volume);
+  bool setMicVolume(int volume);
+  int getSpkrVolume();
+  int getMicVolume();
+  bool setSwitch(const std::string& switchName);
+
+  bool hasLoadedSetup();
+  CALLID getCurrentId();
+  bool getRegistrationState(std::string& stateCode, std::string& stateMessage);
+
+protected:
+  std::string _message;
+};
+
+#endif // __GUI_FRAMEWORK_H__
diff --git a/src/gui/server/Makefile.am b/src/gui/server/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..7e0365d62db479135e5bdae9ca81df94573b5ea4
--- /dev/null
+++ b/src/gui/server/Makefile.am
@@ -0,0 +1,13 @@
+noinst_LTLIBRARIES = libsflphoneguiserver.la
+
+libsflphoneguiserver_la_SOURCES = guiserverimpl.cpp \
+		responsemessage.cpp request.cpp requestfactory.cpp argtokenizer.cpp tcpsessionio.cpp \
+		requestmanager.cpp sessionio.cpp tcpstreampool.cpp requestconfig.cpp
+
+libsflphoneguiserver_la_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\"
+libsflphoneguiserver_la_CPPFLAGS = -I$(top_srcdir)/libs -I$(top_srcdir)/src $(libccext2_CFLAGS)
+libsflphoneguiserver_la_LIBADD = 
+
+noinst_HEADERS = responsemessage.h request.h requestfactory.h subcall.h \
+		argtokenizer.h tcpsessionio.h requestmanager.h guiserver.h guiserverimpl.h sessionio.h \
+		tcpsessionio.h tcpstreampool.h requestconfig.h ObjectPool.hpp ObjectPool.inl
diff --git a/src/gui/server/ObjectPool.hpp b/src/gui/server/ObjectPool.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..fa1f19af9a30c017beb00915dbbe0fad093ec554
--- /dev/null
+++ b/src/gui/server/ObjectPool.hpp
@@ -0,0 +1,53 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com> (cc++ mutex)
+ *  Author: Jean-Philippe Barrette-LaPierre
+ *             <jean-philippe.barrette-lapierre@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef SFLPHONEGUI_OBJECTPOOL_H
+#define SFLPHONEGUI_OBJECTPOOL_H
+
+#include <list>
+#include <string>
+#include <cc++/thread.h>
+
+template< typename T >
+class ObjectPool
+{
+ public:
+  /**
+   * This function will push a line in the pool.
+   */
+  void push(const T &line);
+
+  /**
+   * This function will wait for an available line.
+   */
+  bool pop(T &value, unsigned long time = ULONG_MAX);
+
+ private:
+  std::list< T > mPool;
+
+  ost::Mutex mMutex;
+  ost::Semaphore mSemaphore;
+};
+
+#include "ObjectPool.inl"
+
+#endif
+
diff --git a/src/gui/server/ObjectPool.inl b/src/gui/server/ObjectPool.inl
new file mode 100644
index 0000000000000000000000000000000000000000..4132e8e38629fdbf88a299a17cb6da5613db5383
--- /dev/null
+++ b/src/gui/server/ObjectPool.inl
@@ -0,0 +1,55 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com> (cc++ mutex)
+ *  Author: Jean-Philippe Barrette-LaPierre
+ *             <jean-philippe.barrette-lapierre@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef SFLPHONEGUI_OBJECTPOOL_INL
+#define SFLPHONEGUI_OBJECTPOOL_INL
+
+#include <iostream>
+
+template< typename T >
+void
+ObjectPool< T >::push(const T &value)
+{
+  ost::MutexLock guard(mMutex);
+  mPool.push_back(value);
+  mSemaphore.post();
+}
+
+template< typename T >
+bool
+ObjectPool< T >::pop(T &value, unsigned long time)
+{
+  //ost::MutexLock guard(mMutex);
+  if (mSemaphore.wait(time)) {
+
+    if(mPool.begin() == mPool.end()) {
+      return false;
+    } else {
+      typename std::list< T >::iterator pos = mPool.begin();
+      value = (*pos);
+      mPool.pop_front();
+      return true;
+    }
+  }
+  return false;
+}
+
+#endif
diff --git a/src/gui/server/argtokenizer.cpp b/src/gui/server/argtokenizer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0391645f30dd992efc55ce114ee9d4d56bd11d76
--- /dev/null
+++ b/src/gui/server/argtokenizer.cpp
@@ -0,0 +1,45 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "argtokenizer.h"
+#include <ios>
+#include <iostream>
+#include <sstream>
+#include <cc++/url.h>
+#include <cstring>
+
+TokenList 
+ArgTokenizer::tokenize(const std::string& str) {
+  std::istringstream s(str);
+  std::string output;
+
+  TokenList args;
+  while(s.good()) {
+    s >> output;
+    // if we have a string that end with an space
+    // failbit is set
+    if ( ! ( s.rdstate() & std::ios_base::failbit) ) {
+      char *tmp = new char[output.length()+1];
+      strcpy(tmp, output.c_str());
+      ost::urlDecode(tmp, NULL);
+      args.push_back(tmp);
+      delete[] tmp; tmp = NULL;
+    }
+  }
+  return args;
+}
diff --git a/src/gui/server/argtokenizer.h b/src/gui/server/argtokenizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6b5d07367ba8eafc4ed622dc5297ca32fa18fc1
--- /dev/null
+++ b/src/gui/server/argtokenizer.h
@@ -0,0 +1,55 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ARG_TOKENIZER__
+#define __ARG_TOKENIZER__
+
+#include <list>
+#include <string>
+
+typedef std::list<std::string> TokenList;
+
+/**
+Separate a string into token
+a b c%20d = 3 tokens: [a], [b], [c d]
+
+Example:
+#include <argtokenizer.h>
+
+ArgTokenizer tokenizer;
+TokenList tList = tokenizer.tokenize(std::string("bla bla bla"));
+TokenList::iterator iter = tList.begin();
+while( iter != tList.end() ) {
+  std::cout << *iter << std::endl;
+}
+*/
+class ArgTokenizer {
+public:
+  ArgTokenizer() {}   //  ctor
+  ~ArgTokenizer() {}  //  dtor
+
+  /**
+   * Tokenize a string into a list of string
+   * Separators are: space, newline and tab ( ,\n,\t)
+   * @author: Jean-Philippe Barrette-LaPierre
+   */
+  TokenList tokenize(const std::string& str);
+};
+
+#endif // __ARG_TOKENIZER__
diff --git a/src/gui/server/guiserver.h b/src/gui/server/guiserver.h
new file mode 100644
index 0000000000000000000000000000000000000000..4633045de5a5bd827ff940e5977f2c670d9f7bd0
--- /dev/null
+++ b/src/gui/server/guiserver.h
@@ -0,0 +1,28 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __GUISERVERSINGLETON_H__
+#define __GUISERVERSINGLETON_H__
+
+#include "utilspp/Singleton.hpp"
+#include "guiserverimpl.h"
+
+typedef utilspp::SingletonHolder< GUIServerImpl > GUIServer;
+
+#endif // __GUISERVERSINGLETON_H__
diff --git a/src/gui/server/guiserverimpl.cpp b/src/gui/server/guiserverimpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..50f99f8796293bfa5bbf262223e47176eb38ac3d
--- /dev/null
+++ b/src/gui/server/guiserverimpl.cpp
@@ -0,0 +1,487 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "guiserver.h"
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+
+#include "../../global.h" // for VERSION and PROGNAME
+#include "responsemessage.h"
+
+// default constructor
+GUIServerImpl::GUIServerImpl() : _getEventsSequenceId("seq0")
+{
+  _sessionPort = 3999;
+}
+
+// destructor
+GUIServerImpl::~GUIServerImpl()
+{
+}
+
+int
+GUIServerImpl::exec() {
+  return _requestManager.exec(_sessionPort);
+}
+
+/** 
+ * SubCall operations
+ *  insert
+ *  remove
+ */
+void 
+GUIServerImpl::insertSubCall(CALLID id, SubCall& subCall) {
+  _callMap[id] = subCall;
+}
+
+void
+GUIServerImpl::removeSubCall(CALLID id) {
+  _callMap.erase(id);
+}
+
+/**
+ * Retreive the sequenceId or send default sequenceId
+ */
+std::string 
+GUIServerImpl::getSequenceIdFromId(CALLID id) {
+  CallMap::iterator iter = _callMap.find(id);
+  if (iter != _callMap.end()) {
+    return iter->second.sequenceId();
+  }
+  return _getEventsSequenceId;
+}
+/**
+ * Retreive the string callid from the id
+ */
+std::string 
+GUIServerImpl::getCallIdFromId(CALLID id) {
+  CallMap::iterator iter = _callMap.find(id);
+  if (iter != _callMap.end()) {
+    return iter->second.callId();
+  }
+  throw std::runtime_error(_("No match for this id"));
+}
+
+bool
+GUIServerImpl::getCurrentCallId(std::string& callId) {
+  bool returnValue = false;
+  try {
+    CALLID id = GuiFramework::getCurrentId();
+    if (id!=0) {
+      callId = getCallIdFromId(id);
+      returnValue = true;
+    }
+  } catch(...) {
+    // nothing, it's false
+  }
+  return returnValue;
+}
+
+CALLID
+GUIServerImpl::getIdFromCallId(const std::string& callId) 
+{
+  CallMap::iterator iter = _callMap.begin();
+  while (iter != _callMap.end()) {
+    if (iter->second.callId()==callId) {
+      return iter->first;
+    }
+    iter++;
+  }
+  throw std::runtime_error(_("No match for this CallId"));
+}
+
+bool 
+GUIServerImpl::getEvents(const std::string& sequenceId)
+{
+  _getEventsSequenceId=sequenceId;
+
+  // didn't loaded the setup?
+  // 010 <CSeq> Load setup
+  if ( !GuiFramework::hasLoadedSetup() ) {
+    _requestManager.sendResponse(ResponseMessage("010", sequenceId, _("Load setup")));
+  }
+
+  TokenList tk;
+  std::ostringstream percentSpkr;
+  // 021 <CSeq> <percentage of speaker volume> Speaker volume changed.
+  percentSpkr << GuiFramework::getSpkrVolume();
+  tk.push_back(percentSpkr.str());
+  tk.push_back(_("Speaker volume changed"));
+  _requestManager.sendResponse(ResponseMessage("021", sequenceId, tk));
+
+  // 022 <CSeq> <percentage of microphone volume> Microphone volume changed.
+  tk.clear();
+  std::ostringstream percentMic;
+  percentMic << GuiFramework::getMicVolume();
+  tk.push_back(percentMic.str());
+  tk.push_back(_("Microphone volume changed"));
+  _requestManager.sendResponse(ResponseMessage("022", sequenceId, tk));
+
+  std::string stateCode;
+  std::string stateMessage;
+
+  // try to register, if not done yet...
+  GuiFramework::getEvents();
+
+  if (GuiFramework::getRegistrationState(stateCode,stateMessage)) {
+    _requestManager.sendResponse(ResponseMessage(stateCode, sequenceId, stateMessage));
+  }
+
+
+  return true;
+}
+
+bool
+GUIServerImpl::sendGetEventsEnd()
+{
+  if ( _getEventsSequenceId != "seq0" ) {
+    _requestManager.sendResponse(ResponseMessage("202", _getEventsSequenceId,
+_("getcallstatus request stopped me")));
+  }
+  return true;
+}
+
+bool 
+GUIServerImpl::outgoingCall(const std::string& seq, 
+ const std::string& account,
+ const std::string& callid, 
+ const std::string& to) 
+{
+  CALLID serverCallId = GuiFramework::outgoingCall(account, to);
+  if ( serverCallId ) {
+    SubCall subcall(seq, callid);
+    insertSubCall(serverCallId, subcall);
+    return true;
+  } else {
+    return false;
+  }
+}
+
+bool 
+GUIServerImpl::answerCall(const std::string& callId) 
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    if (GuiFramework::answerCall(id)) {
+      return true;
+    }
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+
+bool
+GUIServerImpl::refuseCall(const std::string& callId) 
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    if (GuiFramework::refuseCall(id)) {
+      return true;
+    }
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+bool 
+GUIServerImpl::transferCall(const std::string& callId, const std::string& to)
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    if (GuiFramework::transferCall(id, to)) {
+      return true;
+    }
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+
+bool
+GUIServerImpl::holdCall(const std::string& callId) 
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    if (GuiFramework::onHoldCall(id)) {
+      return true;
+    }
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+
+bool
+GUIServerImpl::unholdCall(const std::string& callId) 
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    if (GuiFramework::offHoldCall(id)) {
+      return true;
+    }
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+
+bool
+GUIServerImpl::hangupCall(const std::string& callId) 
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    if (GuiFramework::hangupCall(id)) {
+      _callMap.erase(id);
+      return true;
+    }
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+
+/*
+ * we hangup everything in callmap, and flush it
+ * @return false if atleast one hangup failed
+ */
+bool
+GUIServerImpl::hangupAll()
+{
+  bool result = true;
+  CALLID id;
+  CallMap::iterator iter = _callMap.begin();
+  // try to hangup every call, even if one fail
+  while(iter!=_callMap.end()) {
+    id = iter->first;
+    if (!GuiFramework::hangupCall(id)) {
+      result = false;
+    }
+    iter++;
+  }
+  _callMap.clear();
+  return result;
+}
+
+bool 
+GUIServerImpl::dtmfCall(const std::string& callId, const std::string& dtmfKey) 
+{
+  try {
+    CALLID id = getIdFromCallId(callId);
+    char code = dtmfKey[0];
+    return GuiFramework::sendDtmf(id, code);
+  } catch(...) {
+    return false;
+  }
+  return false;
+}
+
+/**
+ * Version constant are in global.h
+ * @return the version (name number)
+ */
+std::string 
+GUIServerImpl::version() 
+{
+  std::ostringstream programVersion;
+  programVersion << PROGNAME << " " << SFLPHONED_VERSION;
+  return programVersion.str();
+}
+
+
+int 
+GUIServerImpl::incomingCall (CALLID id, const std::string& accountId, const std::string& from) 
+{
+  TokenList arg;
+  std::ostringstream callId;
+  callId << "s" << id;
+  arg.push_back(callId.str());
+  arg.push_back(accountId);
+  arg.push_back(from);
+  arg.push_back("call");
+
+  SubCall subcall(_getEventsSequenceId, callId.str());
+
+  insertSubCall(id, subcall);
+
+  _requestManager.sendResponse(ResponseMessage("001", _getEventsSequenceId,arg));
+
+  return 0;
+}
+
+void
+GUIServerImpl::incomingMessage(const std::string& message) {
+  _requestManager.sendResponse(ResponseMessage("030", _getEventsSequenceId, message));
+}
+
+void  
+GUIServerImpl::peerAnsweredCall (CALLID id) 
+{
+  CallMap::iterator iter = _callMap.find(id);
+  if ( iter != _callMap.end() ) {
+    _requestManager.sendResponse(ResponseMessage("200", iter->second.sequenceId(), _("Established")));
+  }
+}
+
+void
+GUIServerImpl::peerRingingCall (CALLID id) 
+{
+  CallMap::iterator iter = _callMap.find(id);
+  if ( iter != _callMap.end() ) {
+    _requestManager.sendResponse(ResponseMessage("151", iter->second.sequenceId(), _("Ringing")));
+  } 
+}
+
+void
+GUIServerImpl::peerHungupCall (CALLID id) 
+{
+  CallMap::iterator iter = _callMap.find(id);
+  if ( iter != _callMap.end() ) {
+    TokenList tk;
+    tk.push_back(iter->second.callId());
+    tk.push_back("hangup");
+
+    _requestManager.sendResponse(ResponseMessage("002", _getEventsSequenceId,tk));
+    
+    // remove this call...
+    _callMap.erase(id);
+  }
+}
+
+void  
+GUIServerImpl::displayStatus (const std::string& status) 
+{
+  TokenList tk;
+  tk.push_back(status);
+  tk.push_back("Status");
+  _requestManager.sendResponse(ResponseMessage("100", _getEventsSequenceId, tk));
+}
+
+void  
+GUIServerImpl::displayConfigError (const std::string& error) 
+{
+  TokenList tk;
+  tk.push_back(error);
+  tk.push_back("Config Error");
+  _requestManager.sendResponse(ResponseMessage("101", _getEventsSequenceId, tk));
+}
+
+void  
+GUIServerImpl::displayTextMessage (CALLID id, const std::string& message) 
+{
+  try {
+    std::string callId = getCallIdFromId(id);
+    TokenList tk;
+    tk.push_back(callId);
+    tk.push_back(message);
+    tk.push_back("Text message");
+    _requestManager.sendResponse(ResponseMessage("102", _getEventsSequenceId, tk));
+  } catch(...) {
+    TokenList tk;
+    tk.push_back(message);
+    tk.push_back("Text message");
+    _requestManager.sendResponse(ResponseMessage("103", _getEventsSequenceId, tk));
+  }
+}
+
+void  
+GUIServerImpl::displayErrorText (CALLID id, const std::string& message) 
+{
+  try {
+    std::string callId = getCallIdFromId(id);
+    TokenList tk;
+    tk.push_back(callId);
+    tk.push_back(message);
+    tk.push_back("Error");
+    _requestManager.sendResponse(ResponseMessage("104", _getEventsSequenceId, tk));
+  } catch(...) {
+    displayError(message);
+  }
+}
+
+void  
+GUIServerImpl::displayError (const std::string& error) 
+{
+  TokenList tk;
+  tk.push_back(error);
+  tk.push_back("Error");
+  _requestManager.sendResponse(ResponseMessage("105", _getEventsSequenceId, tk));
+}
+
+void
+GUIServerImpl::sendVoiceNbMessage(const std::string& nb_msg)
+{
+  _requestManager.sendResponse(ResponseMessage("020", _getEventsSequenceId, nb_msg));
+}
+
+void
+GUIServerImpl::sendRegistrationState(bool state) 
+{
+  if (state == true) {
+  _requestManager.sendResponse(ResponseMessage("003", _getEventsSequenceId, _("Registration succeed")));
+  } else {
+  _requestManager.sendResponse(ResponseMessage("004", _getEventsSequenceId, _("Registration failed")));
+  }
+}
+void
+GUIServerImpl::setup() 
+{
+}
+
+void 
+GUIServerImpl::sendMessage(const std::string& code, const std::string& seqId, TokenList& arg) 
+{
+  _requestManager.sendResponse(ResponseMessage(code, seqId, arg));
+}
+
+void 
+GUIServerImpl::sendCallMessage(const std::string& code, 
+  const std::string& sequenceId, 
+  CALLID id, 
+  TokenList arg) 
+{
+  try {
+    std::string callid = getCallIdFromId(id);
+    arg.push_front(callid);
+    _requestManager.sendResponse(ResponseMessage(code, sequenceId, arg));
+  } catch(...) {
+    // no callid found
+  }
+}
+
+void 
+GUIServerImpl::update()
+{
+  
+}
+
+void
+GUIServerImpl::callFailure(CALLID id)
+{
+  CallMap::iterator iter = _callMap.find(id);
+  if ( iter != _callMap.end() ) {
+    TokenList tk;
+    tk.push_back(iter->second.callId());
+    tk.push_back("Wrong number");
+
+    _requestManager.sendResponse(ResponseMessage("504", iter->second.sequenceId(), tk));
+  }
+}
diff --git a/src/gui/server/guiserverimpl.h b/src/gui/server/guiserverimpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..d8585870fd07bb1bab5beca24779c45d09a2101a
--- /dev/null
+++ b/src/gui/server/guiserverimpl.h
@@ -0,0 +1,119 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __GUI_SERVER_H__
+#define __GUI_SERVER_H__
+
+#include "../guiframework.h"
+#include <string>
+#include <map>
+
+#include "subcall.h"
+#include "requestmanager.h"
+
+
+/** Session port for the daemon, default is DEFAULT_SESSION_PORT */
+#define DEFAULT_SESSION_PORT 3999
+
+typedef std::map<CALLID, SubCall> CallMap;
+
+class GUIServerImpl : public GuiFramework {
+public:
+  // GUIServerImpl constructor
+  GUIServerImpl();
+  // GUIServerImpl destructor
+  ~GUIServerImpl();
+  
+  // exec loop
+  int exec(void);
+
+  int incomingCall(CALLID id, const std::string& accountId, const std::string& from);
+  void incomingMessage(const std::string& message);
+
+	void peerAnsweredCall (CALLID id);
+	void peerRingingCall (CALLID id);
+	void peerHungupCall (CALLID id);
+	void displayStatus (const std::string& status);
+  void displayConfigError(const std::string& error);
+	void displayTextMessage (CALLID id, const std::string& message);
+	void displayErrorText (CALLID id, const std::string& message);
+	void displayError (const std::string& error);
+  void sendVoiceNbMessage(const std::string& nb_msg);
+  void sendRegistrationState(bool state);
+  void setup();
+
+  void sendMessage(const std::string& code, const std::string& seqId, TokenList&
+arg);
+  void sendCallMessage(const std::string& code, 
+  const std::string& sequenceId, 
+  CALLID id, 
+  TokenList arg);
+  void callFailure(CALLID id);
+
+  bool getEvents(const std::string& sequenceId);
+  bool sendGetEventsEnd();
+
+  bool outgoingCall (const std::string& seq, 
+    const std::string& account,
+    const std::string& callid, 
+    const std::string& to);
+  bool answerCall(const std::string& callId);
+  bool refuseCall(const std::string& callId);
+  bool holdCall(const std::string& callId);
+  bool unholdCall(const std::string& callId);
+  bool hangupCall(const std::string& callId);
+  bool transferCall(const std::string& callId, const std::string& to);
+  bool dtmfCall(const std::string& callId, const std::string& dtmfKey);
+  bool hangupAll();
+  bool getCurrentCallId(std::string& callId);
+
+  std::string version();
+  void quit() { _getEventsSequenceId="seq0"; _requestManager.quit(); }
+  void stop() { _requestManager.stop(); }
+
+  // observer methods
+  void update();
+
+  void setSessionPort(int port) {
+    if(port>0 && port<65536) {_sessionPort=port;}
+  };
+
+private:
+  void insertSubCall(CALLID id, SubCall& subCall);
+  void removeSubCall(CALLID id);
+  std::string getSequenceIdFromId(CALLID id);
+  std::string getCallIdFromId(CALLID id);
+  CALLID getIdFromCallId(const std::string& callId);
+
+  /**
+   * This callMap is necessary because
+   * ManagerImpl use callid-int
+   * and the client use a  callid-string
+   * and also a sequence number
+   */
+  CallMap _callMap;
+
+  // RequestManager execute received request 
+  // and send response
+  RequestManager _requestManager;
+
+  std::string _getEventsSequenceId; // default is seq0
+  int _sessionPort;
+};
+
+#endif // __GUI_SERVER_H__
diff --git a/src/gui/server/request.cpp b/src/gui/server/request.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..c4d84edfc6790a005edbeb14701c106275092475
--- /dev/null
+++ b/src/gui/server/request.cpp
@@ -0,0 +1,230 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "global.h"
+#include "request.h"
+#include "guiserver.h"
+#include "subcall.h"
+
+ResponseMessage
+RequestCall::execute()
+{
+  if ( GUIServer::instance().outgoingCall(_sequenceId, _account, _callId, _destination) ) {
+    return message("150", _("Trying"));
+  }
+  return message("500",_("Server Error"));
+}
+
+ResponseMessage
+RequestTextMessage::execute()
+{
+  if ( GUIServer::instance().sendTextMessage(_account, _destination, _message) ) {
+    return message("200", "Sending message");
+  }
+  return message("500","Server Error");
+}
+
+ResponseMessage
+RequestAnswer::execute()
+{
+  if ( GUIServer::instance().answerCall(_callId) ) {
+    return message("200", _("OK"));
+  }
+  return message("500","Server Error");
+}
+
+ResponseMessage
+RequestRefuse::execute()
+{
+  if ( GUIServer::instance().refuseCall(_callId) ) {
+    return message("200", _("OK"));
+  }
+  return message("500",_("Server Error"));
+}
+
+ResponseMessage
+RequestHold::execute()
+{
+  if ( GUIServer::instance().holdCall(_callId) ) {
+    return message("200", _("Held"));
+  }
+  return message("500",_("Server Error"));
+}
+
+ResponseMessage
+RequestUnhold::execute()
+{
+  if ( GUIServer::instance().unholdCall(_callId) ) {
+    return message("200", _("Unheld"));
+  }
+  return message("500",_("Server Error"));
+}
+
+RequestTransfer::RequestTransfer(const std::string &sequenceId, 
+    const TokenList& argList) : RequestGlobalCall(sequenceId, argList)
+{
+  TokenList::iterator iter = _argList.begin();
+
+  // check for the transfer destination
+  bool argsAreValid = false;
+  if (iter != _argList.end()) {
+    _destination = *iter;
+    _argList.pop_front();
+    argsAreValid = true;
+  }
+  if (!argsAreValid) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestTransfer::execute()
+{
+  if ( GUIServer::instance().transferCall(_callId, _destination) ) {
+    return message("200", _("Transfered"));
+  }
+  return message("500",_("Server Error"));
+}
+
+ResponseMessage
+RequestHangup::execute()
+{
+  if ( GUIServer::instance().hangupCall(_callId) ) {
+    return message("200", _("Hungup"));
+  }
+  return message("500", _("Hangup Error"));
+}
+
+ResponseMessage
+RequestHangupAll::execute()
+{
+  if ( GUIServer::instance().hangupAll() ) {
+    return message("200", _("All hungup"));
+  }
+  return message("500", _("Hangup Error"));
+}
+
+RequestDTMF::RequestDTMF(const std::string &sequenceId, 
+    const TokenList& argList) : RequestGlobalCall(sequenceId, argList)
+{
+  TokenList::iterator iter = _argList.begin();
+
+  // check for the dtmf key
+  bool argsAreValid = false;
+  if (iter != _argList.end() && (*iter).length()==1) {
+    _dtmfKey = *iter;
+    _argList.pop_front();
+    argsAreValid = true;
+  }
+  if (!argsAreValid) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestDTMF::execute()
+{
+  if ( GUIServer::instance().dtmfCall(_callId, _dtmfKey) ) {
+    return message("200", _("OK"));
+  }
+  return message("500", _("DTMF Error"));
+}
+
+RequestPlayDtmf::RequestPlayDtmf(const std::string &sequenceId, 
+    const TokenList& argList) : RequestGlobal(sequenceId, argList)
+{
+
+  TokenList::iterator iter = _argList.begin();
+
+  // check for the dtmf key
+  bool argsAreValid = false;
+  if (iter != _argList.end() && (*iter).length()==1) {
+    _dtmfKey = *iter;
+    _argList.pop_front();
+    argsAreValid = true;
+  }
+  if (!argsAreValid) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestPlayDtmf::execute()
+{
+  if ( GUIServer::instance().playDtmf(_dtmfKey[0]) ) {
+    return message("200", _("OK"));
+  }
+  return message("500", _("DTMF Error"));
+}
+
+ResponseMessage
+RequestPlayTone::execute()
+{
+  if ( GUIServer::instance().playTone() ) {
+    return message("200", _("OK"));
+  }
+  return message("500", _("Tone Error"));
+}
+
+ResponseMessage
+RequestStopTone::execute()
+{
+  if ( GUIServer::instance().stopTone() ) {
+    return message("200", _("OK"));
+  }
+  return message("500", _("Tone Error"));
+}
+
+ResponseMessage
+RequestMute::execute()
+{
+  GUIServer::instance().mute();
+  return message("200",_("Muted"));
+}
+
+ResponseMessage
+RequestUnmute::execute()
+{
+  GUIServer::instance().unmute();
+  return message("200",_("Unmuted"));
+}
+
+ResponseMessage
+RequestVersion::execute()
+{
+  return message("200",GUIServer::instance().version());
+}
+
+ResponseMessage
+RequestQuit::execute()
+{
+  // GUIServer::instance().hangupAll(); don't hangup call, so we can do a netcat session that call someone
+  GUIServer::instance().stopTone();
+  GUIServer::instance().quit();
+  return message("200", _("Quitting"));
+}
+
+ResponseMessage
+RequestStop::execute()
+{
+  GUIServer::instance().hangupAll();
+  GUIServer::instance().stopTone();
+  GUIServer::instance().stop();
+  return message("200", _("Stopping server"));
+}
diff --git a/src/gui/server/request.h b/src/gui/server/request.h
new file mode 100644
index 0000000000000000000000000000000000000000..b90bc8ec05e6d0112cb8d51c3e7fc2e2ed3c80bb
--- /dev/null
+++ b/src/gui/server/request.h
@@ -0,0 +1,271 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __REQUEST_H__
+#define __REQUEST_H__
+
+#include <string>
+#include <list>
+#include "responsemessage.h"
+
+typedef std::list<std::string> TokenList;
+
+/**
+Request are received from the client
+and execute on the server
+Request execution always return a ResponseMessage
+@author Yan Morin
+*/
+class RequestConstructorException {
+};
+
+class Request 
+{
+public:
+  Request(const std::string &sequenceId, const TokenList& argList) : _sequenceId(sequenceId), _argList(argList) {}
+  virtual ~Request() {}
+  virtual ResponseMessage execute() = 0;
+  ResponseMessage message(const std::string &code, const std::string &aMessage) {
+    ResponseMessage response(code, _sequenceId, aMessage);
+    return response;
+  }
+  ResponseMessage message(const std::string &code, TokenList& arg) {
+    ResponseMessage response(code, _sequenceId, arg);
+    return response;
+  }
+  std::string getSequenceId () const { return _sequenceId; }
+  
+protected:
+  std::string _sequenceId;
+  TokenList _argList;
+};
+
+
+class RequestCall : public Request {
+public:
+  RequestCall(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId,argList) {
+    TokenList::iterator iter = _argList.begin();
+    // check for the callid
+    bool argsAreValid = false;
+    // Args are: account callid destination
+    //           acc1000 c10345 sip:test@test.com
+    if (iter != _argList.end() && iter->length()!=0) {
+      _account = *iter;
+      _argList.pop_front();
+      iter = _argList.begin();
+      if (iter != _argList.end() && iter->length() != 0) {
+        _callId = *iter;
+        // last arg is the destination
+        iter++;
+        if (iter != _argList.end()) {
+          _destination = *iter;
+          argsAreValid = true;
+        }
+      }
+    }
+    if (!argsAreValid) {
+      throw RequestConstructorException();
+    }
+  }
+  virtual ResponseMessage execute();
+
+private:
+  std::string _callId;
+  std::string _destination;
+  std::string _account;
+};
+
+/**
+ * Class for Text Message
+ * message <seq> <acc> <to> <message>
+ */
+class RequestTextMessage : public Request {
+public:
+  RequestTextMessage(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId,argList) {
+    TokenList::iterator iter = _argList.begin();
+    // check for the callid
+    bool argsAreValid = false;
+    if (iter != _argList.end() && iter->length()!=0) {
+      _account = *iter;
+      _argList.pop_front();
+      iter = _argList.begin();
+      if (iter != _argList.end() && iter->length() != 0) {
+        _destination = *iter;
+        // last arg is the destination
+        iter++;
+        if (iter != _argList.end()) {
+          _message = *iter;
+          argsAreValid = true;
+        }
+      }
+    }
+    if (!argsAreValid) {
+      throw RequestConstructorException();
+    }
+  }
+  virtual ResponseMessage execute();
+
+private:
+  std::string _account;
+  std::string _destination;
+  std::string _message;
+};
+
+
+class RequestGlobalCall : public Request
+{
+public:
+  RequestGlobalCall(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId, argList) {
+    TokenList::iterator iter = _argList.begin();
+
+    if (iter != _argList.end() && iter->length() != 0 ) {
+      _callId = *iter;
+      _argList.pop_front();
+    } else {
+      throw RequestConstructorException();
+    }
+  }
+  virtual ~RequestGlobalCall() {}
+  virtual ResponseMessage execute() = 0;
+
+protected:
+  std::string _callId;
+};
+
+class RequestAnswer : public RequestGlobalCall {
+public:
+  RequestAnswer(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestRefuse : public RequestGlobalCall {
+public:
+  RequestRefuse(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestHold : public RequestGlobalCall {
+public:
+  RequestHold(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestUnhold : public RequestGlobalCall {
+public:
+  RequestUnhold(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestTransfer : public RequestGlobalCall {
+public:
+  RequestTransfer(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  std::string _destination;
+};
+class RequestHangup : public RequestGlobalCall {
+public:
+  RequestHangup(const std::string &sequenceId, const TokenList& argList) : RequestGlobalCall(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+class RequestDTMF : public RequestGlobalCall {
+public:
+  RequestDTMF(const std::string &sequenceId, 
+    const TokenList& argList);
+
+  ResponseMessage execute();
+private:
+  std::string _dtmfKey;
+};
+
+
+class RequestGlobal : public Request
+{
+public:
+  RequestGlobal(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId,argList) {}
+  virtual ~RequestGlobal() {}
+  virtual ResponseMessage execute() = 0;
+};
+
+class RequestMute : public RequestGlobal {
+public:
+  RequestMute(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestUnmute : public RequestGlobal {
+public:
+  RequestUnmute(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestVersion : public RequestGlobal {
+public:
+  RequestVersion(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestQuit : public RequestGlobal {
+public:
+  RequestQuit(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestStop : public RequestGlobal {
+public:
+  RequestStop(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+class RequestHangupAll : public RequestGlobal {
+public:
+  RequestHangupAll(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+class RequestPlayDtmf : public RequestGlobal {
+public:
+  RequestPlayDtmf(const std::string &sequenceId, 
+    const TokenList& argList);
+  ResponseMessage execute();
+private:
+  std::string _dtmfKey;
+};
+
+class RequestPlayTone : public RequestGlobal {
+public:
+  RequestPlayTone(const std::string &sequenceId, 
+    const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+class RequestStopTone : public RequestGlobal {
+public:
+  RequestStopTone(const std::string &sequenceId, 
+    const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+
+
+
+
+class RequestSyntaxError : public Request 
+{
+public:
+  RequestSyntaxError(const std::string &sequenceId, const TokenList& argList) : Request(sequenceId, argList) {}
+  ~RequestSyntaxError() {}
+  ResponseMessage execute() {
+    return message("501", "Syntax Error");
+  }
+};
+
+#endif
diff --git a/src/gui/server/requestconfig.cpp b/src/gui/server/requestconfig.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5ce1f5431a01ae13cef5a9254af925dcb63e8d5d
--- /dev/null
+++ b/src/gui/server/requestconfig.cpp
@@ -0,0 +1,285 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "global.h"
+#include "requestconfig.h"
+#include "guiserver.h"
+#include "subcall.h"
+
+ResponseMessage
+RequestGetEvents::execute()
+{
+  GUIServer::instance().getEvents(_sequenceId);
+  return message("000", _("OK"));
+}
+
+ResponseMessage
+RequestZeroconf::execute()
+{
+  if (GUIServer::instance().getZeroconf(_sequenceId)) {
+    return message("200", _("OK"));
+  } else {
+    return message("501",_("Zeroconf not enabled or activated"));
+  }
+}
+
+ResponseMessage
+RequestZeroconfEvent::execute()
+{
+  if (GUIServer::instance().attachZeroconfEvents(_sequenceId, *this)) {
+    return message("000", _("Zeroconf Events are running"));
+  } else {
+    return message("501",_("Zeroconf not enabled or activated"));
+  }
+}
+
+RequestZeroconfEvent::~RequestZeroconfEvent() 
+{
+  GUIServer::instance().detachZeroconfEvents(*this);
+}
+
+void
+RequestZeroconfEvent::update()
+{
+  TokenList tk; tk.push_back("New Zeroconf events - Not Implemented");
+  GUIServer::instance().sendMessage("100", _sequenceId, tk);
+}
+
+ResponseMessage
+RequestCallStatus::execute()
+{
+  GUIServer::instance().sendGetEventsEnd();
+  TokenList tk;
+  tk.push_back(_("OK"));
+  std::string code = "206";
+  GUIServer::instance().getCallStatus(_sequenceId);
+
+  std::string callid;
+  if (GUIServer::instance().getCurrentCallId(callid)) {
+    tk.push_front(callid);
+  } else {
+    code = "205";
+  }
+  return message(code, tk);
+}
+
+ResponseMessage
+RequestConfigGetAll::execute()
+{
+  if (GUIServer::instance().getConfigAll(_sequenceId)) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Server Error"));
+  }
+}
+
+RequestConfigGet::RequestConfigGet(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList)
+{
+  TokenList::iterator iter = _argList.begin();
+  bool argsAreValid = false;
+  if (iter != _argList.end()) {
+    _section = *iter;
+    _argList.pop_front();
+    iter = _argList.begin();
+    if (iter != _argList.end()) {
+      _name = *iter;
+      _argList.pop_front();
+      argsAreValid = true;
+    }
+  }
+  if (!argsAreValid) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestConfigGet::execute()
+{
+  TokenList arg;
+  if (GUIServer::instance().getConfig(_section, _name, arg)) {
+    return message("200", arg);
+  } else {
+    //  402 seq10001 Variable unknown
+    return message("402",_("Variable unknown"));
+  }
+}
+
+RequestConfigSet::RequestConfigSet(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList)
+{
+  TokenList::iterator iter = _argList.begin();
+
+  // get three strings arguments
+  bool argsAreValid = false;
+  if (iter != _argList.end()) {
+    _section = *iter;
+    _argList.pop_front();
+    iter = _argList.begin();
+    if (iter != _argList.end()) {
+      _name = *iter;
+      _argList.pop_front();
+      iter = _argList.begin();
+      if (iter != _argList.end()) {
+        _value = *iter;
+        _argList.pop_front();
+        argsAreValid = true;
+      } else {
+        _value = "";
+        argsAreValid = true;
+      }
+    }
+  }
+  if (!argsAreValid) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestConfigSet::execute()
+{
+  if (GUIServer::instance().setConfig(_section, _name, _value)) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Server Error"));
+  }
+}
+
+ResponseMessage
+RequestConfigSave::execute()
+{
+  if (GUIServer::instance().saveConfig()) {
+    return message("200", _("Config saved"));
+  } else {
+    return message("400",_("Error Unable to save the configuration"));
+  }
+}
+
+RequestList::RequestList(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList)
+{
+  TokenList::iterator iter = _argList.begin();
+  if (iter != _argList.end()) {
+    _name = *iter;
+    _argList.pop_front();
+  } else {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestList::execute()
+{
+  if (GUIServer::instance().getConfigList(_sequenceId, _name)) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Server Error"));
+  }
+}
+
+RequestVolumeSpkr::RequestVolumeSpkr(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList)
+{
+  TokenList::iterator iter = _argList.begin();
+  bool error = true;
+  if (iter != _argList.end()) {
+    _percent = atoi(iter->c_str());
+    if (_percent >= 0 && _percent <= 100) {
+      _argList.pop_front();
+      error = false;
+    }
+  }
+  if (error) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestVolumeSpkr::execute()
+{
+  if (GUIServer::instance().setSpkrVolume(_percent)) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Server Error"));
+  }
+}
+
+RequestVolumeMic::RequestVolumeMic(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList)
+{
+  TokenList::iterator iter = _argList.begin();
+  bool error = true;
+  if (iter != _argList.end()) {
+    _percent = atoi(iter->c_str());
+    if (_percent >= 0 && _percent <= 100) {
+      _argList.pop_front();
+      error = false;
+    }
+  }
+  if (error) {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestVolumeMic::execute()
+{
+  if (GUIServer::instance().setMicVolume(_percent)) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Server Error"));
+  }
+}
+
+ResponseMessage
+RequestRegister::execute()
+{
+  if (GUIServer::instance().registerVoIPLink()) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Registration sending failed"));
+  }
+}
+
+ResponseMessage
+RequestUnregister::execute()
+{
+  if (GUIServer::instance().unregisterVoIPLink()) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Unregistration sending failed"));
+  }
+}
+
+RequestSwitch::RequestSwitch(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList)
+{
+  TokenList::iterator iter = _argList.begin();
+  if (iter != _argList.end()) {
+    _switchName = *iter;
+  } else {
+    throw RequestConstructorException();
+  }
+}
+
+ResponseMessage
+RequestSwitch::execute()
+{
+  if (GUIServer::instance().setSwitch(_switchName)) {
+    return message("200", _("OK"));
+  } else {
+    return message("500",_("Server Error"));
+  }
+}
+
+
diff --git a/src/gui/server/requestconfig.h b/src/gui/server/requestconfig.h
new file mode 100644
index 0000000000000000000000000000000000000000..c34cbb8202ddd77a08526c6d2550134067bd5a69
--- /dev/null
+++ b/src/gui/server/requestconfig.h
@@ -0,0 +1,133 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __REQUESTCONFIG_H__
+#define __REQUESTCONFIG_H__
+
+#include "request.h"
+#include "../../observer.h"
+
+class RequestGetEvents : public RequestGlobal {
+public:
+  RequestGetEvents(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+class RequestZeroconf : public RequestGlobal {
+public:
+  RequestZeroconf(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+
+class RequestZeroconfEvent : public RequestGlobal, public Pattern::Observer {
+public:
+  RequestZeroconfEvent(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ~RequestZeroconfEvent();
+  ResponseMessage execute();
+  void update();
+};
+
+
+class RequestCallStatus : public RequestGlobal {
+public:
+  RequestCallStatus(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+
+class RequestConfigGetAll : public RequestGlobal {
+public:
+  RequestConfigGetAll(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+
+class RequestConfigGet : public RequestGlobal {
+public:
+  RequestConfigGet(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  std::string _section;
+  std::string _name;
+};
+
+
+class RequestConfigSet : public RequestGlobal {
+public:
+  RequestConfigSet(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  std::string _section;
+  std::string _name;
+  std::string _value;
+};
+
+
+class RequestConfigSave : public RequestGlobal {
+public:
+  RequestConfigSave(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId,argList) {}
+  ResponseMessage execute();
+};
+
+class RequestList : public RequestGlobal {
+public:
+  RequestList(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  std::string _name;
+};
+
+class RequestVolumeSpkr : public RequestGlobal {
+public:
+  RequestVolumeSpkr(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  int _percent;
+};
+
+class RequestVolumeMic : public RequestGlobal {
+public:
+  RequestVolumeMic(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  int _percent;
+};
+
+class RequestRegister : public RequestGlobal {
+public:
+  RequestRegister(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId, argList) {}
+  ResponseMessage execute();
+};
+
+class RequestUnregister : public RequestGlobal {
+public:
+  RequestUnregister(const std::string &sequenceId, const TokenList& argList) : RequestGlobal(sequenceId, argList) {}
+  ResponseMessage execute();
+};
+class RequestSwitch : public RequestGlobal {
+public:
+  RequestSwitch(const std::string &sequenceId, const TokenList& argList);
+  ResponseMessage execute();
+private:
+  std::string _switchName;
+};
+
+
+#endif // __REQUESTCONFIG_H__
diff --git a/src/gui/server/requestfactory.cpp b/src/gui/server/requestfactory.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..9a45c39d8d825d8bb3cb03f8f2f6ad05bbbe50a0
--- /dev/null
+++ b/src/gui/server/requestfactory.cpp
@@ -0,0 +1,137 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <stdexcept>
+
+#include "global.h"
+#include "requestfactory.h"
+#include "request.h"
+#include "requestconfig.h"
+
+Request *
+RequestFactory::create(const std::string& requestLine)
+{
+  
+  TokenList tList = _tokenizer.tokenize(requestLine);
+  TokenList::iterator iter = tList.begin();
+
+  // there is atleast one token (the command)
+  if (iter != tList.end()) {
+    std::string requestName = *iter;
+    tList.pop_front();
+    iter = tList.begin();
+
+    // there is atleast a second token (the sequenceId)
+    if (iter != tList.end() && iter->size() != 0 ) {
+      std::string sequenceId = *iter;
+      tList.pop_front();
+      try {
+        Request *r = create(requestName, sequenceId, tList);
+        return r;
+      } catch (...) {
+        // if the create return an exception
+        // we create a syntaxerror
+        return create("syntaxerror", sequenceId, tList);
+      }
+    }
+  }
+  return create("syntaxerror", "seq0", tList);
+}
+
+Request *
+RequestFactory::create(
+  const std::string& requestName, 
+  const std::string& sequenceId, 
+  const TokenList& argList)
+{
+  std::map< std::string, RequestCreatorBase * >::iterator pos = mRequests.find(requestName);
+  if(pos == mRequests.end()) {
+    pos = mRequests.find("syntaxerror");
+    if(pos == mRequests.end()) {
+      throw std::runtime_error(_("There's no request of that name"));
+    }
+  }
+  
+  return pos->second->create(sequenceId, argList);
+}
+
+RequestFactory::~RequestFactory() 
+{
+  std::map< std::string, RequestCreatorBase * >::iterator iter = mRequests.begin();
+  while ( iter != mRequests.end() ) {
+    // delete RequestCreator< T >
+    delete iter->second; iter->second = NULL;
+    iter++;
+  }
+  mRequests.clear();
+}
+
+template< typename T >
+void 
+RequestFactory::registerRequest(const std::string &requestname)
+{
+  std::map< std::string, RequestCreatorBase * >::iterator pos = 
+    mRequests.find(requestname);
+  if(pos != mRequests.end()) {
+    delete pos->second; pos->second = NULL;
+    mRequests.erase(pos);
+  }
+  
+  mRequests.insert(std::make_pair(requestname, new RequestCreator< T >()));
+}
+
+void 
+RequestFactory::registerAll() {
+  registerRequest<RequestSyntaxError> ("syntaxerror");
+  registerRequest<RequestCall>        ("call");
+  registerRequest<RequestTextMessage> ("message");
+  registerRequest<RequestAnswer>      ("answer");
+  registerRequest<RequestRefuse>      ("refuse");
+  registerRequest<RequestHold>        ("hold");
+  registerRequest<RequestUnhold>      ("unhold");
+  registerRequest<RequestHangup>      ("hangup");
+  registerRequest<RequestHangupAll>   ("hangupall");
+  registerRequest<RequestDTMF>        ("senddtmf");
+  registerRequest<RequestPlayDtmf>    ("playdtmf");
+  registerRequest<RequestPlayTone>    ("playtone");
+  registerRequest<RequestStopTone>    ("stoptone");
+  registerRequest<RequestTransfer>    ("transfer");
+  registerRequest<RequestMute>        ("mute");
+  registerRequest<RequestUnmute>      ("unmute");
+  registerRequest<RequestVersion>     ("version");
+  registerRequest<RequestQuit>        ("quit");
+  registerRequest<RequestStop>        ("stop");
+
+  // request config
+  registerRequest<RequestGetEvents>   ("getevents");
+  registerRequest<RequestZeroconf>    ("getzeroconf");
+  registerRequest<RequestZeroconfEvent>("getzeroconfevents");
+  registerRequest<RequestCallStatus>  ("getcallstatus");
+  registerRequest<RequestConfigGetAll>("configgetall");
+  registerRequest<RequestConfigGet>   ("configget");
+  registerRequest<RequestConfigSet>   ("configset");
+  registerRequest<RequestConfigSave>  ("configsave");
+  registerRequest<RequestList>        ("list");
+  registerRequest<RequestVolumeSpkr>  ("setspkrvolume");
+  registerRequest<RequestVolumeMic>   ("setmicvolume");
+  registerRequest<RequestRegister>    ("register");
+  registerRequest<RequestUnregister>  ("unregister");
+
+  registerRequest<RequestSwitch>      ("switch");
+}
diff --git a/src/gui/server/requestfactory.h b/src/gui/server/requestfactory.h
new file mode 100644
index 0000000000000000000000000000000000000000..7021171c1f1f38e6e7746b05b69f699eb668ce8c
--- /dev/null
+++ b/src/gui/server/requestfactory.h
@@ -0,0 +1,73 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef REQUESTFACTORY_H
+#define REQUESTFACTORY_H
+
+#include <string>
+#include <map>
+
+#include "request.h"
+#include "argtokenizer.h"
+
+class Request;
+/**
+*/
+class RequestCreatorBase
+{
+public:
+  virtual Request *create(const std::string &sequenceId, const TokenList& argList) = 0;
+  virtual RequestCreatorBase *clone() = 0;
+};
+
+template< typename T >
+class RequestCreator : public RequestCreatorBase
+{
+public:
+  virtual Request *create(const std::string &sequenceId, const TokenList& argList)
+  {
+    return new T(sequenceId, argList);
+  }
+
+  virtual RequestCreatorBase *clone()
+  {
+    return new RequestCreator< T >();
+  }
+};
+
+
+class RequestFactory
+{
+public:
+  ~RequestFactory();
+  Request *create(const std::string& requestLine);
+  Request *create(
+    const std::string& requestname, 
+    const std::string& sequenceId, 
+    const TokenList& argList);
+
+  template< typename T >
+  void registerRequest(const std::string& requestname);
+  void registerAll();
+private:
+  std::map< std::string, RequestCreatorBase * > mRequests;
+  ArgTokenizer _tokenizer;
+};
+
+
+#endif
diff --git a/src/gui/server/requestmanager.cpp b/src/gui/server/requestmanager.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7d42acff4669f1a4886fce2c7b0fd28d452fa0f0
--- /dev/null
+++ b/src/gui/server/requestmanager.cpp
@@ -0,0 +1,153 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "global.h"
+#include "requestmanager.h"
+#include "tcpsessionio.h"
+#include <iostream>
+
+RequestManager::RequestManager() : _sessionIO(0)
+{
+  _factory.registerAll();
+  _quit = false;
+}
+
+
+RequestManager::~RequestManager()
+{
+  delete _sessionIO; _sessionIO = NULL;
+  flushWaitingRequest();
+}
+
+int 
+RequestManager::exec(int port) 
+{
+  _debug("Request manager waiting TCP session\n");
+  try {
+    _stop = false;
+    while(std::cin.good() && !_stop) {
+
+      // TCPSessionIO start a thread for the stream socket
+      {
+        _sessionMutex.enterMutex(); 
+        _sessionIO = new TCPSessionIO(port);
+        _sessionMutex.leaveMutex();
+      }
+
+      ResponseMessage outputResponse; // TCPStream output line
+      std::string input;
+      std::string output;
+      Request *request;
+
+      _quit = false;
+      _debug("Initiate a new TCP Session... \n");
+      _sessionIO->init();
+
+      // std::cin.good() is only there to close the server when
+      // we do a CTRL+D
+      while(_sessionIO && _sessionIO->good() && std::cin.good() && !_quit) {
+
+        if (_sessionIO->receive(input)) {
+          request = _factory.create(input);
+          outputResponse = request->execute();
+
+          _sessionIO->send(outputResponse.toString());
+
+          handleExecutedRequest(request, outputResponse);
+        } // end pop
+      } // end streaming
+
+      { // session mutex block
+        _debug("Closing TCP Session... \n");
+        _sessionMutex.enterMutex(); 
+        if (_sessionIO) _sessionIO->sendLast();
+        delete _sessionIO; _sessionIO = NULL;
+        _sessionMutex.leaveMutex();
+        _debug("TCP Session has closed\n");
+      }
+
+    } // end while
+
+  } catch(ost::Socket *e) {
+    fprintf(stderr, "Exception: %s\n", e->getErrorString());
+  }
+  _debug("Request manager has closed\n");
+  return 0;
+}
+
+/**
+ * Delete the request from the list of request
+ * or send it into the waitingRequest map
+ */
+void 
+RequestManager::handleExecutedRequest(Request * request, const ResponseMessage& response) 
+{
+  if (response.isFinal()) {
+    delete request; request = NULL;
+  } else {
+    ost::MutexLock lock(_waitingRequestsMutex);
+    if (_waitingRequests.find(request->getSequenceId()) == _waitingRequests.end()) {
+      // add the requests
+      _waitingRequests[response.getSequenceId()] = request;
+    } else {
+      // we don't deal with requests with a sequenceId already send...
+      delete request; request = NULL;
+    }
+  }
+}
+
+/**
+ * Remove waiting requests that was not handle by the server
+ */
+void
+RequestManager::flushWaitingRequest()
+{
+  ost::MutexLock lock(_waitingRequestsMutex);
+  // Waiting Requests cleanup
+  std::map<std::string, Request*>::iterator iter = _waitingRequests.begin();
+  while (iter != _waitingRequests.end()) {
+    delete iter->second; iter->second = NULL;
+    iter++;
+  }
+  _waitingRequests.clear();
+}
+
+/**
+ * This function is use by extern object
+ * to send response
+ */
+void
+RequestManager::sendResponse(const ResponseMessage& response) {
+  _sessionMutex.enterMutex();
+  if (_sessionIO) {
+    _sessionIO->send(response.toString());
+  } 
+  _sessionMutex.leaveMutex();
+
+  // remove the request from the waiting requests list
+  if (response.isFinal()) {
+    ost::MutexLock lock(_waitingRequestsMutex);
+    std::map<std::string, Request*>::iterator iter = _waitingRequests.find(response.getSequenceId());
+
+    if (iter != _waitingRequests.end()) {
+      delete iter->second; iter->second = NULL;
+      _waitingRequests.erase(iter);
+    }
+  }
+}
diff --git a/src/gui/server/requestmanager.h b/src/gui/server/requestmanager.h
new file mode 100644
index 0000000000000000000000000000000000000000..a6f03706112143fd0ee02aa0b8b58e395ba6e6d2
--- /dev/null
+++ b/src/gui/server/requestmanager.h
@@ -0,0 +1,58 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef REQUESTMANAGER_H
+#define REQUESTMANAGER_H
+
+#include <cc++/thread.h>
+
+#include "sessionio.h"
+#include "requestfactory.h"
+#include "responsemessage.h"
+
+/**
+@author Yan Morin
+*/
+class RequestManager{
+public:
+    RequestManager();
+
+    ~RequestManager();
+
+    int exec(int);
+    void sendResponse(const ResponseMessage& response);
+    void quit() { _quit = true; }
+    void stop() { _stop = true; quit(); }
+
+private:
+  void flushWaitingRequest();
+  void handleExecutedRequest(Request * request, const ResponseMessage& response);
+
+  RequestFactory _factory;
+  SessionIO*  _sessionIO;
+  ost::Mutex  _sessionMutex;
+
+  // waiting requests
+  ost::Mutex _waitingRequestsMutex;
+  std::map<std::string, Request*> _waitingRequests;
+
+  bool _quit; // tell to quit and end the exec loop for one client
+  bool _stop; // tell to stop the exec loop
+};
+
+#endif
diff --git a/src/gui/server/responsemessage.cpp b/src/gui/server/responsemessage.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b17174f262e2ba360545a7b67671f901e0e25a9b
--- /dev/null
+++ b/src/gui/server/responsemessage.cpp
@@ -0,0 +1,104 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "responsemessage.h"
+#include <cc++/url.h>
+
+/**
+ * Used by isFinal() to check for the first digit
+ * 2456 Means that 2XX, 4XX, 5XX and 6XX are final messages
+ */
+const std::string ResponseMessage::FINALCODE = "2456";
+
+ResponseMessage::ResponseMessage(const std::string& code,
+      const std::string& seq,
+      const std::string& message) : _code(code), _seq(seq)
+{
+    _message = "";
+    appendMessage(message);
+}
+
+/*
+ * Construct a message with a list of argument
+ * and a space separator between each argument
+ */
+ResponseMessage::ResponseMessage(const std::string& code,
+      const std::string& seq,
+      TokenList& arg) : _code(code), _seq(seq)
+{
+  TokenList::iterator iter=arg.begin();
+  if (iter!=arg.end()) {
+    appendMessage(*iter);
+    iter++;
+  }
+  // add space between each
+  while(iter!=arg.end()) {
+    _message.append(" ");
+    appendMessage(*iter);
+    iter++;
+  }
+}
+
+
+ResponseMessage::~ResponseMessage()
+{
+}
+
+/**
+ * Prepare and return a message, ready to be send to the client
+ * @return message that contains: code sequenceId message
+ */
+std::string 
+ResponseMessage::toString() const
+{
+  return _code + " " + _seq + " " + _message;
+}
+
+/**
+ * Return true when the response message is final (no more coming message for a request)
+ * Note: the code should be 3 numbers-long.
+ * @return true if it's the last message of the request
+ */
+bool 
+ResponseMessage::isFinal() const
+{
+  bool final = false;
+  // only 3 chars code are valid
+  // code that begin by: 2,4,5,6 are final
+  
+  if (_code.size() == 3) {
+    if ( FINALCODE.find(_code[0]) != std::string::npos ) {
+      final = true;
+    }
+  }
+  return final;
+}
+
+void
+ResponseMessage::appendMessage(const std::string& strToken)
+{
+  int len = strToken.length();
+  if (len) {
+    char *tmp = new char[len*3+2];
+    ost::urlEncode(strToken.c_str(), tmp, len*3+2);
+    // we don't have to put a '\0' right?
+    _message.append(tmp);
+    delete [] tmp; tmp = NULL;
+  }
+}
+
diff --git a/src/gui/server/responsemessage.h b/src/gui/server/responsemessage.h
new file mode 100644
index 0000000000000000000000000000000000000000..922e949eca0b0789f125fe2b69e595f473324ccd
--- /dev/null
+++ b/src/gui/server/responsemessage.h
@@ -0,0 +1,56 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __RESPONSEMESSAGE_H__
+#define __RESPONSEMESSAGE_H__
+
+#include <string>
+#include "argtokenizer.h" // for TokenList declare
+
+/**
+Response Message stock a message from a request when it is executed.
+@author Yan Morin
+*/
+class ResponseMessage
+{
+public:
+    // default constructor with empty seq/code/message
+    ResponseMessage() {}
+    // build a constructor with a TokenList
+    // so that they will be encoded..
+    ResponseMessage(const std::string& code,const std::string& seq, const std::string& message);
+    ResponseMessage(const std::string& code,const std::string& seq, TokenList& arg);
+    ~ResponseMessage();
+
+    std::string getSequenceId() const { return _seq; }
+
+    std::string toString() const;
+    bool isFinal() const;
+private:
+    // append an encoded string to the message
+    void appendMessage(const std::string& strToken);
+
+    // 3 numbers long code
+    std::string _code;
+    std::string _seq;
+    std::string _message;
+
+    static const std::string FINALCODE;
+};
+
+#endif
diff --git a/src/gui/server/sessionio.cpp b/src/gui/server/sessionio.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..0e48501c9aaa9ee139b6e87603cb2a381c14f520
--- /dev/null
+++ b/src/gui/server/sessionio.cpp
@@ -0,0 +1,30 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "sessionio.h"
+
+SessionIO::SessionIO(int port=0)
+{
+}
+
+
+SessionIO::~SessionIO()
+{
+}
+
+
diff --git a/src/gui/server/sessionio.h b/src/gui/server/sessionio.h
new file mode 100644
index 0000000000000000000000000000000000000000..9887050a23f551cfd310170d5118887c269bd0d5
--- /dev/null
+++ b/src/gui/server/sessionio.h
@@ -0,0 +1,41 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef SESSIONIO_H
+#define SESSIONIO_H
+
+#include <string>
+
+/**
+Session IO Interface to send and receive requests
+Could be over network or locally
+@author Yan Morin
+*/
+class SessionIO {
+public:
+    SessionIO(int port);
+    virtual ~SessionIO();
+
+    virtual void send(const std::string& response) = 0;
+    virtual void sendLast() = 0;
+    virtual bool receive(std::string& request) = 0;
+    virtual bool good() = 0;
+    virtual void init() = 0;
+};
+
+#endif
diff --git a/src/gui/server/subcall.h b/src/gui/server/subcall.h
new file mode 100644
index 0000000000000000000000000000000000000000..a02bd593f43d783cd3da36660a89128a2bb3d0a5
--- /dev/null
+++ b/src/gui/server/subcall.h
@@ -0,0 +1,43 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef SUBCALL_H
+#define SUBCALL_H
+
+#include <string>
+
+/**
+Contains an sequenceId and a callid. It's allow us to maintain a map of id->SubCall
+
+@author Yan Morin
+*/
+class SubCall{
+public:
+  SubCall() {}
+  SubCall(const std::string& seq, const std::string& callid) : _seq(seq), _callid(callid) {}
+  ~SubCall() {}
+
+  // accessors
+  std::string sequenceId() const { return _seq; }
+  std::string callId() const { return _callid; }
+private:
+  std::string _seq; // sequence id
+  std::string _callid;
+};
+
+#endif
diff --git a/src/gui/server/tcpsessionio.cpp b/src/gui/server/tcpsessionio.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3cafb2301ba3d39ccdbc0fd45755713eb9cadba7
--- /dev/null
+++ b/src/gui/server/tcpsessionio.cpp
@@ -0,0 +1,83 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "tcpsessionio.h"
+
+const int TCPSessionIO::PORT = 3999;
+const char * const TCPSessionIO::IP = "127.0.0.1";
+
+TCPSessionIO::TCPSessionIO(int port=PORT) : SessionIO(port)
+{
+  _clientStream = 0;
+  ost::InetAddress addr(IP);
+
+  //Creating a listening socket
+  try {
+    _serverSocket = new ost::TCPSocket(addr, port);
+  } catch( ost::Socket *e ) {
+    throw e;
+  }
+}
+
+
+TCPSessionIO::~TCPSessionIO()
+{
+  delete _clientStream; _clientStream = NULL;
+  delete _serverSocket; _serverSocket = NULL;
+}
+
+bool
+TCPSessionIO::good()
+{
+  if (_clientStream) { // just in case
+    return _clientStream->good();
+  }
+  return false;
+}
+
+void 
+TCPSessionIO::send(const std::string& response)
+{
+  if (_clientStream) { // just in case
+    _clientStream->send(response);
+  }
+}
+void
+TCPSessionIO::sendLast()
+{
+  if (_clientStream) {
+    _clientStream->sendLast();
+  }
+}
+
+bool 
+TCPSessionIO::receive(std::string& request)
+{
+  bool returnValue = false;
+  if (_clientStream) { // just in case
+    returnValue = _clientStream->receive(request);
+  }
+  return returnValue;
+}
+
+void
+TCPSessionIO::init() {
+  // this is strange to create a waiting client here...
+  _clientStream = new TCPStreamPool(*_serverSocket);
+  _clientStream->start();
+}
diff --git a/src/gui/server/tcpsessionio.h b/src/gui/server/tcpsessionio.h
new file mode 100644
index 0000000000000000000000000000000000000000..b8b2cea28ee274366d5ed7ab2f5d50ba66e1d8e7
--- /dev/null
+++ b/src/gui/server/tcpsessionio.h
@@ -0,0 +1,49 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef TCPSESSIONIO_H
+#define TCPSESSIONIO_H
+
+#include <cc++/socket.h>
+#include "sessionio.h"
+#include "tcpstreampool.h"
+
+/**
+@author Yan Morin
+*/
+class TCPSessionIO : public SessionIO
+{
+public:
+  TCPSessionIO(int port);
+  ~TCPSessionIO();
+
+  void send(const std::string& response);
+  void sendLast();
+  bool receive(std::string& request);
+  bool good();
+  void init();
+
+private:
+  ost::TCPSocket* _serverSocket;
+  TCPStreamPool* _clientStream;
+
+  static const int PORT;
+  static const char * const IP;
+};
+
+#endif
diff --git a/src/gui/server/tcpstreampool.cpp b/src/gui/server/tcpstreampool.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7afd51e1315af9cf47de02635c0780c1b487ded1
--- /dev/null
+++ b/src/gui/server/tcpstreampool.cpp
@@ -0,0 +1,69 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "tcpstreampool.h"
+
+#define WAITING_TIME 2UL
+
+TCPStreamPool::~TCPStreamPool() 
+{
+  terminate();
+}
+
+void 
+TCPStreamPool::run() {
+  std::string output;
+  std::string input;
+  std::string null = ""; // we don't want empty string 
+  char cr13 = '\r'; // we don't want carriage return in empty line
+
+  while(!testCancel() && good()) {
+    while (isPending(ost::TCPSocket::pendingInput, WAITING_TIME)) {
+      std::getline(*this, input);
+      //_debug("TCPStreamPool getline %s\n", input.c_str());
+      if (input != null && input[0]!=cr13) {
+        _inputPool.push(input);
+      }
+      // security check, since we are inside a loop
+      if (testCancel() || !good()) {break;}
+    }
+    if (_outputPool.pop(output, WAITING_TIME)) {
+      //_debug("TCPStreamPool send %s\n", output.c_str());
+      *this << output << std::endl;
+    }
+  }
+}
+
+void 
+TCPStreamPool::send(const std::string& response)
+{
+  _outputPool.push(response);
+}
+void
+TCPStreamPool::sendLast() {
+  std::string output;
+  while (good() && _outputPool.pop(output, WAITING_TIME))  {
+    *this << output << std::endl;
+  }
+}
+
+bool 
+TCPStreamPool::receive(std::string& request)
+{
+  return _inputPool.pop(request, WAITING_TIME);
+}
diff --git a/src/gui/server/tcpstreampool.h b/src/gui/server/tcpstreampool.h
new file mode 100644
index 0000000000000000000000000000000000000000..4a94b882a74a80b73ec0049e85454824d5d7e23b
--- /dev/null
+++ b/src/gui/server/tcpstreampool.h
@@ -0,0 +1,58 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef TCPSTREAMPOOL_H
+#define TCPSTREAMPOOL_H
+
+#include <string>
+#include <cc++/socket.h>
+
+#include "ObjectPool.hpp"
+
+/**
+ * Utilisation:
+ * TCPSessionIO session = TCPStreamPool(aServer);
+ * std::string response = "hello";
+ * std::string request;
+ * session.start();
+ * session.send(response);
+ * while(session.receive(request)) {
+ *   std::cout << request << std::endl;
+ * }
+ * @author Yan Morin
+*/
+class TCPStreamPool : public ost::TCPSession 
+{
+public:
+  TCPStreamPool(ost::TCPSocket& server) : ost::TCPSession(server) 
+  {
+    setCancel(cancelDeferred);
+  }
+  TCPStreamPool::~TCPStreamPool();
+
+  void run();
+  void send(const std::string& response);
+  void sendLast();
+  bool receive(std::string& request);
+
+private:
+  ObjectPool<std::string> _outputPool;
+  ObjectPool<std::string> _inputPool;
+};
+
+#endif
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fafad62cf8d4fc47ffadc77df73882c8e4abbe7c
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,85 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libintl.h>
+#include <cstring>
+#include <iostream>
+
+#include "config.h"
+#include "global.h"
+
+#include "user_cfg.h"
+#include "gui/server/guiserver.h"
+#include "gui/guiframework.h"
+#include "manager.h"
+
+int
+main (int argc, char **argv) {
+  int exit_code = 0;
+
+  //setlocale (LC_ALL, "");
+  //bindtextdomain (PACKAGE, LOCALEDIR);
+  //textdomain (PACKAGE);
+
+  if (argc == 2 && strcmp(argv[1], _("--help")) == 0) {
+
+    
+    printf(_("%1$s Daemon %2$s, by Savoir-Faire Linux 2004-2005\n\n"), 
+	   PROGNAME, 
+	   SFLPHONED_VERSION);
+    printf(_("USAGE: sflphoned [--help]\nParameters: \n  --help\tfor this message\n\n  --port=3999\tchange the session port\n\n"));
+    printf(_("See http://www.sflphone.org/ for more information\n"));
+
+  } else {
+    int sessionPort = 0;
+    if (argc == 2) {
+      char* ptrPort = strstr(argv[1], "--port=");
+      if (ptrPort != 0) {
+         sessionPort = atoi(ptrPort+7);
+      }
+    }
+    GuiFramework *GUI;
+    bool initOK = false;
+    try {
+      Manager::instance().initConfigFile();
+      Manager::instance().init();
+      initOK = true;
+    }
+    catch (std::exception &e) {
+      std::cerr << e.what() << std::endl;
+      exit_code = -1;
+    }
+    catch (...) {
+      fprintf(stderr, _("An exception occured when initializing the system.\n"));
+      exit_code = -1;
+    }
+    if (initOK) {
+      GUI = &(GUIServer::instance());
+      GUIServer::instance().setSessionPort(sessionPort);
+      Manager::instance().setGui(GUI);
+      exit_code = GUIServer::instance().exec();
+    }
+  }
+
+  return exit_code;
+}
+
+// EOF
+
diff --git a/src/manager.h b/src/manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd52b48158e8803540e1839f779b0765cf466d82
--- /dev/null
+++ b/src/manager.h
@@ -0,0 +1,31 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author : Jean-Philippe Barrette-LaPierre 
+ *              <jean-philippe.barrette-lapierre@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef SFLPHONE_MANAGER_H
+#define SFLPHONE_MANAGER_H
+
+#include "utilspp/Singleton.hpp"
+#include "managerimpl.h"
+
+
+typedef utilspp::SingletonHolder< ManagerImpl > Manager;
+
+#endif 
+
diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3065aeeb4fbf92d37d00d6de5345918827ab38c3
--- /dev/null
+++ b/src/managerimpl.cpp
@@ -0,0 +1,1769 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <errno.h>
+#include <time.h>
+#include <cstdlib>
+#include <iostream>
+#include <fstream>
+
+#include <sys/types.h> // mkdir(2)
+#include <sys/stat.h>	// mkdir(2)
+
+#include <cc++/socket.h>   // why do I need this here?
+#include <ccrtp/channel.h> // why do I need this here?
+#include <ccrtp/rtp.h>     // why do I need this here?
+#include <cc++/file.h>
+
+#include "manager.h"
+#include "audio/audiolayer.h"
+#include "audio/audiocodec.h"
+#include "audio/tonelist.h"
+
+#include "sipvoiplink.h"
+#include "voIPLink.h"
+#include "call.h"
+
+#include "user_cfg.h"
+#include "gui/guiframework.h"
+
+#ifdef USE_ZEROCONF
+#include "zeroconf/DNSService.h"
+#include "zeroconf/DNSServiceTXTRecord.h"
+#endif
+
+#define fill_config_str(name, value) \
+  (_config.addConfigTreeItem(section, Conf::ConfigTreeItem(std::string(name), std::string(value), type_str)))
+#define fill_config_int(name, value) \
+  (_config.addConfigTreeItem(section, Conf::ConfigTreeItem(std::string(name), std::string(value), type_int)))
+
+#define DFT_VOIP_LINK 0
+
+ManagerImpl::ManagerImpl (void)
+{
+  // Init private variables 
+  //_error = new Error();
+
+  _hasZeroconf = false;
+#ifdef USE_ZEROCONF
+  _hasZeroconf = true;
+  _DNSService = new DNSService();
+#endif
+
+  // setup
+  _path = ""; 
+  _exist = 0;
+  _setupLoaded = false;
+  _gui = NULL;
+
+  _audiodriverPA = NULL;
+  _dtmfKey = 0;
+
+  // Initialize after by init() -> initVolume()
+  _spkr_volume = 0;
+  _mic_volume  = 0; 
+  _mic_volume_before_mute = 0;
+
+  // Call
+  _currentCallId = 0;
+  _nbIncomingWaitingCall=0;
+  _registerState = UNREGISTERED;
+  _hasTriedToRegister = false;
+  // initialize random generator for call id
+  srand (time(NULL));
+}
+
+// never call if we use only the singleton...
+ManagerImpl::~ManagerImpl (void) 
+{
+  terminate();
+
+#ifdef USE_ZEROCONF
+  delete _DNSService; _DNSService = NULL;
+#endif
+
+  _debug("%s stop correctly.\n", PROGNAME);
+}
+
+void 
+ManagerImpl::init() 
+{
+  initVolume();
+
+  if (_exist == 0) {
+    _debug("Cannot create config file in your home directory\n");
+  }
+
+  try {
+    initAudioDriver();
+    selectAudioDriver();
+  }
+  catch (const portaudio::PaException &e) {
+      getAudioDriver()->setErrorMessage(e.paErrorText());
+      _debug("Portaudio exception: %s\n", e.paErrorText());
+  }
+  catch (const portaudio::PaCppException &e) {
+      getAudioDriver()->setErrorMessage(e.what());
+      _debug("Portaudio exception: %s\n", e.what());
+  }
+  catch (const std::runtime_error &e) {
+      getAudioDriver()->setErrorMessage(e.what());
+      _debug("Portaudio exception: %s\n", e.what());
+  }
+  catch (...) {
+      displayError("An unknown exception occured while selecting audio driver.");
+      throw;
+  }
+  initAudioCodec();
+
+  AudioLayer *audiolayer = getAudioDriver();
+  if (audiolayer!=0) {
+    unsigned int sampleRate = audiolayer->getSampleRate();
+    unsigned int outChannel = audiolayer->getOutChannel();
+
+    _debugInit("Load Telephone Tone");
+    std::string country = getConfigString(PREFERENCES, ZONE_TONE);
+    _telephoneTone = new TelephoneTone(country, sampleRate, outChannel);
+
+    _debugInit("Loading DTMF key");
+    _dtmfKey = new DTMF(sampleRate, outChannel);
+  }
+
+  _debugInit("Adding new VoIP Link");
+  // Set a sip voip link by default
+  _voIPLinkVector.push_back(new SipVoIPLink());
+
+  // initRegisterVoIP was here, but we doing it after the gui loaded... 
+  // the stun detection is long, so it's a better idea to do it after getEvents
+  initZeroconf();
+}
+
+void ManagerImpl::terminate()
+{
+  saveConfig();
+
+  _debug("Removing VoIP Links...\n");
+  for(VoIPLinkVector::iterator pos = _voIPLinkVector.begin();
+      pos != _voIPLinkVector.end();
+      pos++) {
+    delete *pos;
+    *pos = NULL;
+  }
+  _voIPLinkVector.clear();
+
+  _debug("Removing calls\n");
+  _mutex.enterMutex();
+  for(CallVector::iterator pos = _callVector.begin();
+      pos != _callVector.end();
+      pos++) {
+    delete *pos;   *pos = NULL;
+  }
+  _callVector.clear();
+  _mutex.leaveMutex();
+
+  _debug("Unload DTMF Key\n");
+  delete _dtmfKey;
+
+  _debug("Unload Audio Driver\n");
+  delete _audiodriverPA; _audiodriverPA = NULL;
+
+  _debug("Unload Telephone Tone\n");
+  delete _telephoneTone; _telephoneTone = 0;
+}
+
+void
+ManagerImpl::setGui(GuiFramework* gui)
+{
+	_gui = gui;
+}
+
+/**
+ * Multi Thread with _mutex for callVector
+ */
+Call *
+ManagerImpl::pushBackNewCall(CALLID id, enum CallType type)
+{
+  ost::MutexLock m(_mutex);
+  Call* call = new Call(id, type, _voIPLinkVector.at(DFT_VOIP_LINK));
+  // Set the wanted voip-link (first of the list)
+  _callVector.push_back(call);
+  return call;
+}
+
+/**
+ * Multi Thread with _mutex for callVector
+ */
+Call*
+ManagerImpl::getCall(CALLID id)
+{
+  //_debug("%10d: Getting call\n", id);
+  Call* call = NULL;
+  unsigned int size = _callVector.size();
+  for (unsigned int i = 0; i < size; i++) {
+    call = _callVector.at(i);
+    if (call && call->getId() == id) {
+      break;
+    } else {
+      call = NULL;
+    }
+  }
+  return call;
+}
+
+/**
+ * Multi Thread with _mutex for callVector
+ */
+void
+ManagerImpl::deleteCall (CALLID id)
+{
+  //_debug("%10d: Deleting call\n", id);
+  CallVector::iterator iter = _callVector.begin();
+  while(iter!=_callVector.end()) {
+    Call *call = *iter;
+    if (call != NULL && call->getId() == id) {
+      if (call->getFlagNotAnswered() && call->isIncomingType() && call->getState() != Call::NotExist) {
+        decWaitingCall();
+      }
+      delete (*iter); *iter = NULL; 
+      call = NULL;
+      _callVector.erase(iter);
+      return;
+    }
+    iter++;
+  }
+}
+
+void
+ManagerImpl::setCurrentCallId(CALLID id)
+{
+  //_debug("%10d: Setting current callid, old one was: %d\n", id, _currentCallId);
+  _currentCallId = id;
+}
+
+void
+ManagerImpl::removeCallFromCurrent(CALLID id)
+{
+  if ( _currentCallId == id ) {
+    //_debug("%10d: Setting current callid, old one was: %d\n", 0, _currentCallId);
+    _currentCallId = 0;
+  }
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Management of events' IP-phone user
+///////////////////////////////////////////////////////////////////////////////
+/**
+ * Main thread
+ */
+int 
+ManagerImpl::outgoingCall (const std::string& to)
+{
+  CALLID id = generateNewCallId();
+  _debug("%10d: Outgoing Call\n", id);
+  Call *call = pushBackNewCall(id, Outgoing);
+  ost::MutexLock m(_mutex);
+  call->setState(Call::Progressing);
+  call->setCallerIdNumber(to);
+  if (call->outgoingCall(to) == 0) {
+    return id;
+  } else {
+    return 0;
+  }
+}
+
+/**
+ * Main thread
+ */
+bool 
+ManagerImpl::sendTextMessage(const std::string&, const std::string& to, const std::string& message) 
+{
+  return _voIPLinkVector.at(DFT_VOIP_LINK)->sendMessage(to, message);
+}
+
+/**
+ * User action (main thread)
+ * Every Call
+ */
+int 
+ManagerImpl::hangupCall (CALLID id)
+{
+  _debug("%10d: Hangup Call\n", id);
+  stopTone();
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call == NULL) {
+    return -1;
+  }
+  int result = -1;
+  if (call->getState() != Call::Error) { 
+    result = call->hangup();
+  }
+  deleteCall(id);
+  // current call id or no line selected
+  if (id == _currentCallId || _currentCallId == 0) {
+    removeCallFromCurrent(id);
+  }
+  return result;
+}
+
+/**
+ * User action (main thread)
+ * Every Call
+ * -1 : call not found
+ *  0 : already in this state...
+ */
+int
+ManagerImpl::cancelCall (CALLID id)
+{
+  _debug("%10d: Cancel Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call == NULL) { 
+    return -1; 
+  }
+  int result = call->cancel();
+  deleteCall(id);
+  stopTone();
+  return result;
+}
+
+/**
+ * User action (main thread)
+ * Incoming Call
+ */
+int 
+ManagerImpl::answerCall (CALLID id)
+{
+  _debug("%10d: Answer Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call == NULL) {
+    return -1;
+  }
+  if (call->getFlagNotAnswered()) {
+    decWaitingCall();
+    call->setFlagNotAnswered(false);
+  }
+  if (call->getState() != Call::OnHold) {
+    switchCall(id);
+  }
+  stopTone(); // before answer, don't stop the audio stream after open it
+  return call->answer();
+}
+
+/**
+ * User action (main thread)
+ * Every Call
+ * @return 0 if it fails, -1 if not present
+ */
+int 
+ManagerImpl::onHoldCall (CALLID id)
+{
+  _debug("%10d: On Hold Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call == NULL) {
+    return -1;
+  }
+  removeCallFromCurrent(id);
+  if ( call->getState() == Call::OnHold || call->isNotAnswered()) {
+    return 1;
+  }
+  return call->onHold();
+}
+
+/**
+ * User action (main thread)
+ * Every Call
+ */
+int 
+ManagerImpl::offHoldCall (CALLID id)
+{
+  _debug("%10d: Off Hold Call\n", id);
+  ost::MutexLock m(_mutex);
+  stopTone();
+  Call* call = getCall(id);
+  if (call == 0) {
+    return -1;
+  }
+  if (call->getState() == Call::OffHold) {
+    return 1;
+  }
+  setCurrentCallId(id);
+  int returnValue = call->offHold();
+  // start audio if it's ok
+  if (returnValue != -1) {
+    try {
+      getAudioDriver()->startStream();
+    } catch(...) {
+      _debugException("Off hold could not start audio stream");
+    }
+  }
+  return returnValue;
+}
+
+/**
+ * User action (main thread)
+ * Every Call
+ */
+int 
+ManagerImpl::transferCall (CALLID id, const std::string& to)
+{
+  _debug("%10d: Transfer Call to %s\n", id, to.c_str());
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call == 0) {
+    return -1;
+  }
+  removeCallFromCurrent(id);
+  return call->transfer(to);
+}
+
+/**
+ * User action (main thread)
+ * All Call
+ */
+void
+ManagerImpl::mute() {
+  _mic_volume_before_mute = _mic_volume;
+  setMicVolume(0);
+}
+
+/**
+ * User action (main thread)
+ * All Call
+ */
+void
+ManagerImpl::unmute() {
+  if ( _mic_volume == 0 ) {
+    setMicVolume(_mic_volume_before_mute);
+  }
+}
+
+/**
+ * User action (main thread)
+ * Call Incoming
+ */
+int 
+ManagerImpl::refuseCall (CALLID id)
+{
+  _debug("%10d: Refuse Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call *call = getCall(id);
+  if (call == NULL) {
+    return -1;
+  }
+
+  if ( call->getState() != Call::Progressing ) {
+    return -1;
+  }
+
+  int refuse = call->refuse();
+  removeCallFromCurrent(id);
+  deleteCall(id);
+  stopTone();
+  return refuse;
+}
+
+/**
+ * User action (main thread)
+ */
+bool
+ManagerImpl::saveConfig (void)
+{
+  _debug("Saving Configuration...\n");
+  setConfig(AUDIO, VOLUME_SPKR, getSpkrVolume());
+  setConfig(AUDIO, VOLUME_MICRO, getMicVolume());
+
+  _setupLoaded = _config.saveConfigTree(_path.data());
+  return _setupLoaded;
+}
+
+/**
+ * Main Thread
+ */
+bool
+ManagerImpl::initRegisterVoIPLink() 
+{
+  int returnValue = true;
+  _debugInit("Initiate VoIP Link Registration\n");
+  if (_hasTriedToRegister == false) {
+    if ( _voIPLinkVector.at(DFT_VOIP_LINK)->init() ) { 
+      // we call here, because it's long...
+      // If network is available and exosip is start..
+      if (getConfigInt(SIGNALISATION, AUTO_REGISTER) && _exist == 1) {
+        registerVoIPLink();
+        _hasTriedToRegister = true;
+      }
+    } else {
+      returnValue = false;
+    }
+  }
+  return returnValue;
+}
+
+
+/**
+ * Initialize action (main thread)
+ * Note that Registration is only send if STUN is not activated
+ * @return true if setRegister is call without failure, else return false
+ */
+bool
+ManagerImpl::registerVoIPLink (void)
+{
+  _debug("Register VoIP Link\n");
+  int returnValue = false;
+  if (_voIPLinkVector.at(DFT_VOIP_LINK)->setRegister() >= 0) {
+    returnValue = true;
+    _registerState = REGISTERED;
+  } else {
+    _registerState = FAILED;
+  }
+  return returnValue;
+}
+
+/**
+ * Terminate action (main thread)
+ * @return true if the unregister method is send correctly
+ */
+bool 
+ManagerImpl::unregisterVoIPLink (void)
+{
+  _debug("Unregister VoIP Link\n");
+	if (_voIPLinkVector.at(DFT_VOIP_LINK)->setUnregister() == 0) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+/**
+ * User action (main thread)
+ */
+bool 
+ManagerImpl::sendDtmf (CALLID id, char code)
+{
+  int sendType = getConfigInt(SIGNALISATION, SEND_DTMF_AS);
+  int returnValue = false;
+  switch (sendType) {
+  case 0: // SIP INFO
+    playDtmf(code);
+    _voIPLinkVector.at(DFT_VOIP_LINK)->carryingDTMFdigits(id, code);
+    returnValue = true;
+    break;
+
+  case 1: // Audio way
+    break;
+  case 2: // rfc 2833
+    break;
+  default: // unknown - error config?
+    break;
+  }
+  return returnValue;
+}
+
+/**
+ * User action (main thread)
+ * Or sip event (dtmf body submit)
+ */
+bool
+ManagerImpl::playDtmf(char code)
+{
+  stopTone();
+
+  // length in milliseconds
+  int pulselen = getConfigInt(SIGNALISATION, PULSE_LENGTH);
+  if (!pulselen) { return false; }
+
+  // numbers of int = length in milliseconds / 1000 (number of seconds)
+  //                = number of seconds * SAMPLING_RATE by SECONDS
+
+  AudioLayer* audiolayer = getAudioDriver();
+
+  // fast return, no sound, so no dtmf
+  if (audiolayer==0 || _dtmfKey == 0) { return false; }
+  int outChannel = audiolayer->getOutChannel();
+  int size = pulselen * (audiolayer->getSampleRate()/1000);
+
+  // this buffer is for mono
+  int16* _buf = new int16[size];
+  bool returnValue = false;
+
+  // Handle dtmf
+  _dtmfKey->startTone(code);
+
+  // copy the sound...
+  if ( _dtmfKey->generateDTMF(_buf, size * outChannel) ) {
+    int k;
+
+    // Put buffer to urgentRingBuffer 
+    // put the size in bytes...
+    // so size * CHANNELS * 2 (bytes for the int16)
+    audiolayer->putUrgent(_buf, size * outChannel * sizeof(int16));
+
+    try {
+      // We activate the stream if it's not active yet.
+      if (!audiolayer->isStreamActive()) {
+        audiolayer->startStream();
+      } else {
+        audiolayer->sleep(pulselen); // in milliseconds
+      }
+    } catch(...) {
+      _debugException("Portaudio exception when playing a dtmf");
+    }
+    returnValue = true;
+  }
+  delete[] _buf; _buf = 0;
+  return returnValue;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Management of event peer IP-phone 
+////////////////////////////////////////////////////////////////////////////////
+/**
+ * Multi-thread
+ */
+bool
+ManagerImpl::incomingCallWaiting() {
+  ost::MutexLock m(_incomingCallMutex);
+  return (_nbIncomingWaitingCall > 0) ? true : false;
+}
+
+void
+ManagerImpl::incWaitingCall() {
+  ost::MutexLock m(_incomingCallMutex);
+  _nbIncomingWaitingCall++;
+  //_debug("incWaitingCall: %d\n", _nbIncomingWaitingCall);
+}
+
+void
+ManagerImpl::decWaitingCall() {
+  ost::MutexLock m(_incomingCallMutex);
+  _nbIncomingWaitingCall--;
+  //_debug("decWaitingCall: %d\n", _nbIncomingWaitingCall);
+}
+
+
+/**
+ * SipEvent Thread
+ * Set the call info for incoming call
+ */
+void
+ManagerImpl::callSetInfo(CALLID id, const std::string& name, const std::string& number)
+{
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != 0) {
+    call->setCallerIdName(name);
+    call->setCallerIdNumber(number);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * ask if it can close the call
+ */
+bool
+ManagerImpl::callCanBeClosed(CALLID id) {
+  bool returnValue = false;
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != NULL && call->getState() != Call::Progressing) {
+    returnValue = true;
+  }
+  return returnValue;
+}
+
+/**
+ * SipEvent Thread
+ * ask if it can answer the call
+ */
+bool
+ManagerImpl::callCanBeAnswered(CALLID id) {
+  bool returnValue = false;
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != NULL && ( call->getFlagNotAnswered() || 
+       (call->getState()!=Call::OnHold && call->getState()!=Call::OffHold) )) {
+    returnValue = true;
+  }
+  return returnValue;
+}
+
+/**
+ * SipEvent Thread
+ * ask if it can start the sound thread
+ */
+bool
+ManagerImpl::callIsOnHold(CALLID id) {
+  bool returnValue = false;
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != NULL && (call->getState()==Call::OnHold)) {
+    returnValue = true;
+  }
+  return returnValue;
+}
+
+/**
+ * SipEvent Thread
+ */
+int 
+ManagerImpl::incomingCall (CALLID id, const std::string& name, const std::string& number)
+{
+  _debug("%10d: Incoming call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call == NULL) {
+    return -1;
+  }
+  call->setType(Incoming);
+  call->setState(Call::Progressing);
+
+  if ( _currentCallId == 0 ) {
+    call->setFlagNotAnswered(false);
+    ringtone();
+    switchCall(id);
+  } else {
+    incWaitingCall();
+  }
+
+  // TODO: Account not yet implemented
+  std::string accountId = "acc1";
+  std::string from = name;     call->setCallerIdName(name);
+  call->setCallerIdNumber(number);
+  if ( !number.empty() ) {
+    from.append(" <");
+    from.append(number);
+    from.append(">");
+  }
+  return _gui->incomingCall(id, accountId, from);
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing message, send by SipEvent
+ */
+void 
+ManagerImpl::incomingMessage(const std::string& message) {
+  if (_gui) {
+    _gui->incomingMessage(message);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void 
+ManagerImpl::peerAnsweredCall (CALLID id)
+{
+  _debug("%10d: Peer Answered Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != 0) {
+    call->setFlagNotAnswered(false);
+    call->setState(Call::Answered);
+
+    stopTone();
+    // switch current call
+    switchCall(id);
+    if (_gui) _gui->peerAnsweredCall(id);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+int
+ManagerImpl::peerRingingCall (CALLID id)
+{
+  _debug("%10d: Peer Ringing Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != 0) {
+    call->setState(Call::Ringing);
+
+    // ring
+    ringback();
+    if (_gui) _gui->peerRingingCall(id);
+  }
+  return 1;
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+int 
+ManagerImpl::peerHungupCall (CALLID id)
+{
+  _debug("%10d: Peer Hungup Call\n", id);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if ( call == NULL ) {
+    return -1;
+  }
+  if ( _currentCallId == id ) {
+    stopTone();
+  }
+
+  if (_gui) _gui->peerHungupCall(id);
+  deleteCall(id);
+  call->setState(Call::Hungup);
+
+  removeCallFromCurrent(id);
+  return 1;
+}
+
+/**
+ * Multi Thread
+ */
+void
+ManagerImpl::callBusy(CALLID id) {
+  _debug("%10d: Call is busy\n", id);
+  playATone(Tone::TONE_BUSY);
+  ost::MutexLock m(_mutex);
+  Call* call = getCall(id);
+  if (call != 0) {
+    call->setState(Call::Busy);
+  }
+  deleteCall(id);
+  call->setState(Call::Hungup);
+
+  removeCallFromCurrent(id);
+}
+
+/**
+ * Multi Thread
+ */
+void
+ManagerImpl::callFailure(CALLID id) {
+  _debug("%10d: Call failed\n", id);
+  playATone(Tone::TONE_BUSY);
+  _mutex.enterMutex();
+  Call* call = getCall(id);
+  if (call != 0) {
+    call->setState(Call::Error);
+  }
+  _mutex.leaveMutex();
+  if (_gui) {
+    _gui->callFailure(id);
+  }
+  deleteCall(id);
+  call->setState(Call::Hungup);
+
+  removeCallFromCurrent(id);
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void 
+ManagerImpl::displayTextMessage (CALLID id, const std::string& message)
+{
+  if(_gui) {
+    _gui->displayTextMessage(id, message);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void 
+ManagerImpl::displayErrorText (CALLID id, const std::string& message)
+{
+  if(_gui) {
+    _gui->displayErrorText(id, message);
+  } else {
+    std::cerr << message << std::endl;
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void 
+ManagerImpl::displayError (const std::string& voIPError)
+{
+  if(_gui) {
+    _gui->displayError(voIPError);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void 
+ManagerImpl::displayStatus (const std::string& status)
+{
+  if(_gui) {
+    _gui->displayStatus(status);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void 
+ManagerImpl::displayConfigError (const std::string& message)
+{
+  if(_gui) {
+    _gui->displayConfigError(message);
+  }
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void
+ManagerImpl::startVoiceMessageNotification (const std::string& nb_msg)
+{
+  if (_gui) _gui->sendVoiceNbMessage(nb_msg);
+}
+
+/**
+ * SipEvent Thread
+ * for outgoing call, send by SipEvent
+ */
+void
+ManagerImpl::stopVoiceMessageNotification (void)
+{
+  if (_gui) _gui->sendVoiceNbMessage(std::string("0"));
+}
+
+/**
+ * SipEvent Thread
+ */
+void 
+ManagerImpl::registrationSucceed()
+{
+  if (_gui) _gui->sendRegistrationState(true);
+}
+
+/**
+ * SipEvent Thread
+ */
+void 
+ManagerImpl::registrationFailed()
+{
+  if (_gui) _gui->sendRegistrationState(false);
+}
+
+/**
+ * Multi Thread
+ */
+bool 
+ManagerImpl::playATone(Tone::TONEID toneId) {
+  if (_telephoneTone != 0) {
+    _toneMutex.enterMutex();
+    _telephoneTone->setCurrentTone(toneId);
+    _toneMutex.leaveMutex();
+
+    try {
+      getAudioDriver()->startStream();
+    } catch(...) {
+      _debugException("Off hold could not start audio stream");
+    }
+  }
+  return true;
+}
+
+/**
+ * Multi Thread
+ */
+void 
+ManagerImpl::stopTone() {
+  try {
+    getAudioDriver()->stopStream();
+  } catch(...) {
+    _debugException("Stop tone and stop stream");
+  }
+
+  _toneMutex.enterMutex();
+  if (_telephoneTone != 0) {
+    _telephoneTone->setCurrentTone(Tone::TONE_NULL);
+  }
+  _toneMutex.leaveMutex();
+
+  // for ringing tone..
+  _toneMutex.enterMutex();
+  _audiofile.stop();
+  _toneMutex.leaveMutex();
+}
+
+/**
+ * Multi Thread
+ */
+bool
+ManagerImpl::playTone()
+{
+  return playATone(Tone::TONE_DIALTONE);
+}
+
+/**
+ * Multi Thread
+ */
+void
+ManagerImpl::congestion () {
+  playATone(Tone::TONE_CONGESTION);
+}
+
+/**
+ * Multi Thread
+ */
+void
+ManagerImpl::ringback () {
+  playATone(Tone::TONE_RINGTONE);
+}
+
+/**
+ * Multi Thread
+ */
+void
+ManagerImpl::ringtone() 
+{
+  std::string ringchoice = getConfigString(AUDIO, RING_CHOICE);
+  //if there is no / inside the path
+  if ( ringchoice.find(DIR_SEPARATOR_CH) == std::string::npos ) {
+    // check inside global share directory
+    ringchoice = std::string(PROGSHAREDIR) + DIR_SEPARATOR_STR + RINGDIR + DIR_SEPARATOR_STR + ringchoice; 
+  }
+  unsigned int outChannel = getAudioDriver()->getOutChannel();
+  _toneMutex.enterMutex(); 
+  bool loadFile = _audiofile.loadFile(ringchoice, outChannel);
+  _toneMutex.leaveMutex(); 
+  if (loadFile) {
+    _toneMutex.enterMutex(); 
+    _audiofile.start();
+    _toneMutex.leaveMutex(); 
+    try {
+      getAudioDriver()->startStream();
+    } catch(...) {
+      _debugException("Audio file couldn't start audio stream");
+    }
+  } else {
+    ringback();
+  }
+}
+
+AudioLoop*
+ManagerImpl::getTelephoneTone()
+{
+  if(_telephoneTone != 0) {
+    ost::MutexLock m(_toneMutex);
+    return _telephoneTone->getCurrentTone();
+  }
+  else {
+    return 0;
+  }
+}
+
+AudioLoop*
+ManagerImpl::getTelephoneFile()
+{
+  ost::MutexLock m(_toneMutex);
+  if(_audiofile.isStarted()) {
+    return &_audiofile;
+  } else {
+    return 0;
+  }
+}
+
+
+/**
+ * Use Urgent Buffer
+ * By AudioRTP thread
+ */
+void
+ManagerImpl::notificationIncomingCall (void) {
+
+  AudioLayer* audiolayer = getAudioDriver();
+  if (audiolayer != 0) {
+    unsigned int sampleRate = audiolayer->getSampleRate();
+    std::ostringstream frequency;
+    frequency << "440/" << FRAME_PER_BUFFER;
+
+    Tone tone(frequency.str(), sampleRate, audiolayer->getOutChannel());
+    unsigned int nbInt16 = tone.getSize();
+    int16 buf[nbInt16];
+    tone.getNext(buf, tone.getSize());
+    audiolayer->putUrgent(buf, sizeof(int16)*nbInt16);
+  }
+
+}
+
+/**
+ * Multi Thread
+ */
+void
+ManagerImpl::getStunInfo (StunAddress4& stunSvrAddr) 
+{
+  StunAddress4 mappedAddr;
+  struct in_addr in;
+  char* addr;
+  char to[16];
+  bzero (to, 16);
+
+  int fd3, fd4;
+  bool ok = stunOpenSocketPair(stunSvrAddr,
+                                    &mappedAddr,
+                                    &fd3,
+                                    &fd4);
+  if (ok) {
+    closesocket(fd3);
+    closesocket(fd4);
+    _firewallPort = mappedAddr.port;
+    // Convert ipv4 address to host byte ordering
+    in.s_addr = ntohl (mappedAddr.addr);
+    addr = inet_ntoa(in);
+    _firewallAddr = std::string(addr);
+    _debug("STUN Firewall: [%s:%d]\n", _firewallAddr.data(), _firewallPort);
+  } else {
+    _debug("Opening a stun socket pair failed\n");
+  }
+}
+
+bool
+ManagerImpl::useStun (void) 
+{
+  if (getConfigInt(SIGNALISATION, USE_STUN)) {
+      return true;
+  } else {
+      return false;
+  }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Private functions
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ * Multi Thread
+ */
+CALLID 
+ManagerImpl::generateNewCallId (void)
+{
+  CALLID random_id = (unsigned)rand();
+
+  // Check if already a call with this id exists 
+  _mutex.enterMutex();
+  while (getCall(random_id) != NULL && random_id != 0) {
+    random_id = rand();
+  }
+  _mutex.leaveMutex();
+  // If random_id is not attributed, returns it.
+  return random_id;
+}
+
+/**
+ * Initialization: Main Thread
+ * @return 1: ok
+          -1: error directory
+           0: unable to load the setting
+           2: file doesn't exist yet
+ */
+int
+ManagerImpl::createSettingsPath (void) {
+  _path = std::string(HOMEDIR) + DIR_SEPARATOR_STR + "." + PROGDIR;
+
+  if (mkdir (_path.data(), 0755) != 0) {
+    // If directory	creation failed
+    if (errno != EEXIST) {
+      _debug("Cannot create directory: %s\n", strerror(errno));
+      return -1;
+    }
+  }
+
+  // Load user's configuration
+  _path = _path + DIR_SEPARATOR_STR + PROGNAME + "rc";
+  return _config.populateFromFile(_path);
+}
+
+/**
+ * Initialization: Main Thread
+ */
+void
+ManagerImpl::initConfigFile (void) 
+{
+  std::string type_str("string");
+  std::string type_int("int");
+
+  std::string section;
+  section = SIGNALISATION;
+  fill_config_int(SYMMETRIC, YES_STR);
+  fill_config_str(FULL_NAME, EMPTY_FIELD);
+  fill_config_str(USER_PART, EMPTY_FIELD);
+  fill_config_str(AUTH_USER_NAME, EMPTY_FIELD);
+  fill_config_str(PASSWORD, EMPTY_FIELD);
+  fill_config_str(HOST_PART, EMPTY_FIELD);
+  fill_config_str(PROXY, EMPTY_FIELD);
+  fill_config_int(AUTO_REGISTER, YES_STR);
+  fill_config_int(PLAY_TONES, YES_STR);
+  fill_config_int(PULSE_LENGTH, DFT_PULSE_LENGTH_STR);
+  fill_config_int(SEND_DTMF_AS, SIP_INFO_STR);
+  fill_config_str(STUN_SERVER, DFT_STUN_SERVER);
+  fill_config_int(USE_STUN, NO_STR);
+
+  section = AUDIO;
+  fill_config_int(DRIVER_NAME, DFT_DRIVER_STR);
+  fill_config_int(DRIVER_NAME_IN, DFT_DRIVER_STR);
+  fill_config_int(DRIVER_NAME_OUT, DFT_DRIVER_STR);
+  fill_config_str(CODEC1, DFT_CODEC);
+  fill_config_str(CODEC2, DFT_CODEC);
+  fill_config_str(CODEC3, DFT_CODEC);
+  fill_config_str(RING_CHOICE, DFT_RINGTONE);
+  fill_config_int(VOLUME_SPKR, DFT_VOL_SPKR_STR);
+  fill_config_int(VOLUME_MICRO, DFT_VOL_MICRO_STR);
+
+  section = PREFERENCES;
+  fill_config_str(SKIN_CHOICE, DFT_SKIN);
+  fill_config_int(CONFIRM_QUIT, YES_STR);
+  fill_config_str(ZONE_TONE, DFT_ZONE);
+  fill_config_int(CHECKED_TRAY, NO_STR);
+  fill_config_str(VOICEMAIL_NUM, DFT_VOICEMAIL);
+  fill_config_int(CONFIG_ZEROCONF, CONFIG_ZEROCONF_DEFAULT_STR);
+
+  _exist = createSettingsPath();
+  _setupLoaded = (_exist == 2 ) ? false : true;
+}
+
+/**
+ * Initialization: Main Thread
+ */
+void
+ManagerImpl::initAudioCodec (void)
+{
+  _debugInit("Active Codecs");
+  // TODO: need to be more dynamic...
+  _codecDescriptorMap.setActive(getConfigString(AUDIO, CODEC1));
+  _codecDescriptorMap.setActive(getConfigString(AUDIO, CODEC2));
+  _codecDescriptorMap.setActive(getConfigString(AUDIO, CODEC3));
+}
+
+
+/**
+ * Initialization: Main Thread
+ */
+void
+ManagerImpl::initAudioDriver(void) 
+{
+  try {
+    _debugInit("AudioLayer Creation");
+    _audiodriverPA = new AudioLayer();
+  } catch(...) {
+    throw;
+  }
+}
+
+/**
+ * Initialization: Main Thread and gui
+ */
+void
+ManagerImpl::selectAudioDriver (void)
+{
+  try {
+    int noDevice    = getConfigInt(AUDIO, DRIVER_NAME);
+    int noDeviceIn  = getConfigInt(AUDIO, DRIVER_NAME_IN);
+    int noDeviceOut = getConfigInt(AUDIO, DRIVER_NAME_OUT);
+
+    // this is when no audio device in/out are set
+    // or the audio device in/out are set to 0
+    // we take the nodevice instead
+    if (noDeviceIn == 0 && noDeviceOut == 0) {
+      noDeviceIn = noDeviceOut = noDevice;
+    }
+    _debugInit(" AudioLayer Device Count");
+    int nbDevice = portaudio::System::instance().deviceCount();
+    if (nbDevice == 0) {
+      throw std::runtime_error("Portaudio detect no sound card.");
+    } else {
+      if (noDeviceIn >= nbDevice) {
+        _debug(" Portaudio auto-select device #0 for input because device #%d is not found\n", noDeviceIn);
+        _setupLoaded = false;
+        noDeviceIn = 0;
+      }
+      if (noDeviceOut >= nbDevice) {
+        _debug(" Portaudio auto-select device #0 for output because device #%d is not found\n", noDeviceOut);
+        _setupLoaded = false;
+        noDeviceOut = 0;
+      }
+    }
+    _debugInit(" AudioLayer Opening Device");
+    _audiodriverPA->openDevice(noDeviceIn, noDeviceOut);
+  } catch(...) {
+    throw;
+  }
+}
+
+/**
+ * Initialize the Zeroconf scanning services loop
+ * Informations will be store inside a map DNSService->_services
+ * Initialization: Main Thread
+ */
+void 
+ManagerImpl::initZeroconf(void) 
+{
+#ifdef USE_ZEROCONF
+  _debugInit("Zeroconf Initialization");
+  int useZeroconf = getConfigInt(PREFERENCES, CONFIG_ZEROCONF);
+
+  if (useZeroconf) {
+    _DNSService->startScanServices();
+  }
+#endif
+}
+
+/**
+ * Init the volume for speakers/micro from 0 to 100 value
+ * Initialization: Main Thread
+ */
+void
+ManagerImpl::initVolume()
+{
+  _debugInit("Initiate Volume\n");
+  setSpkrVolume(getConfigInt(AUDIO, VOLUME_SPKR));
+  setMicVolume(getConfigInt(AUDIO, VOLUME_MICRO));
+}
+
+/**
+ * configuration function requests
+ * Main Thread
+ */
+bool 
+ManagerImpl::getZeroconf(const std::string& sequenceId)
+{
+  bool returnValue = false;
+#ifdef USE_ZEROCONF
+  int useZeroconf = getConfigInt(PREFERENCES, CONFIG_ZEROCONF);
+  if (useZeroconf && _gui != NULL) {
+    TokenList arg;
+    TokenList argTXT;
+    std::string newService = "new service";
+    std::string newTXT = "new txt record";
+    if (!_DNSService->isStart()) { _DNSService->startScanServices(); }
+    DNSServiceMap services = _DNSService->getServices();
+    DNSServiceMap::iterator iter = services.begin();
+    arg.push_back(newService);
+    while(iter!=services.end()) {
+      arg.push_front(iter->first);
+      _gui->sendMessage("100",sequenceId,arg);
+      arg.pop_front(); // remove the first, the name
+
+      TXTRecordMap record = iter->second.getTXTRecords();
+      TXTRecordMap::iterator iterTXT = record.begin();
+      while(iterTXT!=record.end()) {
+        argTXT.clear();
+        argTXT.push_back(iter->first);
+        argTXT.push_back(iterTXT->first);
+        argTXT.push_back(iterTXT->second);
+        argTXT.push_back(newTXT);
+        _gui->sendMessage("101",sequenceId,argTXT);
+        iterTXT++;
+      }
+      iter++;
+    }
+    returnValue = true;
+  }
+#else
+  (void)sequenceId;
+#endif
+  return returnValue;
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer)
+{
+  bool returnValue = false;
+  // don't need the _gui like getZeroconf function
+  // because Observer is here
+#ifdef USE_ZEROCONF
+  int useZeroconf = getConfigInt(PREFERENCES, CONFIG_ZEROCONF);
+  if (useZeroconf) {
+    if (!_DNSService->isStart()) { _DNSService->startScanServices(); }
+    _DNSService->attach(observer);
+    returnValue = true;
+  }
+#else
+  (void)sequenceId;
+  (void)observer;
+#endif
+  return returnValue;
+}
+bool
+ManagerImpl::detachZeroconfEvents(Pattern::Observer& observer)
+{
+  bool returnValue = false;
+#ifdef USE_ZEROCONF
+  if (_DNSService) {
+    _DNSService->detach(observer);
+    returnValue = true;
+  }
+#else
+  (void)observer;
+#endif
+  return returnValue;
+}
+
+/**
+ * Main Thread
+ */
+bool
+ManagerImpl::getEvents() {
+  initRegisterVoIPLink();
+  return true;
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::getCallStatus(const std::string& sequenceId)
+{
+  // TODO: implement account
+  std::string accountId = "acc1"; 
+  std::string code;
+  std::string status;
+  TokenList tk;
+  Call* call;
+
+  if (_gui!=NULL) {
+    ost::MutexLock m(_mutex);
+    CallVector::iterator iter = _callVector.begin();
+    while(iter!=_callVector.end()){
+      call = (*iter);
+      switch( call->getState() ) {
+       case Call::Progressing: code="110"; status="Trying";        break;
+       case Call::Ringing:     code="111"; status = "Ringing";     break;
+       case Call::Answered:    code="112"; status = "Established"; break;
+       case Call::Busy:        code="113"; status = "Busy";        break;
+       case Call::OnHold:      code="114"; status = "Held";        break;
+       case Call::OffHold:     code="115"; status = "Unheld";      break;
+       default:                code="125"; status="Other";    
+      }
+
+      // No Congestion
+      // No Wrong Number
+      // 116 <CSeq> <call-id> <acc> <destination> Busy
+      std::string destination = call->getCallerIdName();
+      std::string number = call->getCallerIdNumber();
+      if (number!="") {
+        destination.append(" <");
+        destination.append(number);
+        destination.append(">");
+      }
+      tk.push_back(accountId);
+      tk.push_back(destination);
+      tk.push_back(status);
+      _gui->sendCallMessage(code, sequenceId, (*iter)->getId(), tk);
+      iter++;
+      tk.clear();
+    }
+  }
+  return true;
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::getConfigAll(const std::string& sequenceId)
+{
+  bool returnValue = false;
+  Conf::ConfigTreeIterator iter = _config.createIterator();
+  TokenList tk = iter.begin();
+  if (tk.size()) {
+    returnValue = true;
+  }
+  while (tk.size()) {
+    _gui->sendMessage("100", sequenceId, tk);
+    tk = iter.next();
+  }
+  return returnValue;
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::getConfig(const std::string& section, const std::string& name, TokenList& arg)
+{
+  return _config.getConfigTreeItemToken(section, name, arg);
+}
+
+/**
+ * Main Thread
+ */
+// throw an Conf::ConfigTreeItemException if not found
+int 
+ManagerImpl::getConfigInt(const std::string& section, const std::string& name)
+{
+  try {
+    return _config.getConfigTreeItemIntValue(section, name);
+  } catch (Conf::ConfigTreeItemException& e) {
+    throw e;
+  }
+  return 0;
+}
+
+/**
+ * Main Thread
+ */
+std::string 
+ManagerImpl::getConfigString(const std::string& section, const std::string&
+name)
+{
+  try {
+    return _config.getConfigTreeItemValue(section, name);
+  } catch (Conf::ConfigTreeItemException& e) {
+    throw e;
+  }
+  return "";
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::setConfig(const std::string& section, const std::string& name, const std::string& value)
+{
+  return _config.setConfigTreeItem(section, name, value);
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::setConfig(const std::string& section, const std::string& name, int value)
+{
+  std::ostringstream valueStream;
+  valueStream << value;
+  return _config.setConfigTreeItem(section, name, valueStream.str());
+}
+
+/**
+ * Main Thread
+ */
+bool 
+ManagerImpl::getConfigList(const std::string& sequenceId, const std::string& name)
+{
+  bool returnValue = false;
+  TokenList tk;
+  if (name=="codecdescriptor") {
+
+    CodecMap map = _codecDescriptorMap.getMap();
+    CodecMap::iterator iter = map.begin();
+    while( iter != map.end() ) {
+      tk.clear();
+      std::ostringstream strType;
+      strType << iter->first;
+      tk.push_back(strType.str());
+      if (iter->second) {
+        tk.push_back(iter->second->getOfficialName());
+      } else {
+        tk.push_back(strType.str());
+      }
+      _gui->sendMessage("100", sequenceId, tk);
+      iter++;
+    }
+    returnValue = true;
+  } else if (name=="ringtones") {
+    // add empty line
+    std::ostringstream str;
+    str << 1;
+    tk.push_back(str.str());
+    tk.push_back(""); // filepath
+    _gui->sendMessage("100", sequenceId, tk);
+
+    // share directory
+    std::string path = std::string(PROGSHAREDIR) + DIR_SEPARATOR_STR + RINGDIR;
+    int nbFile = 1;
+    returnValue = getDirListing(sequenceId, path, &nbFile);
+
+    // home directory
+    path = std::string(HOMEDIR) + DIR_SEPARATOR_STR + "." + PROGDIR + DIR_SEPARATOR_STR + RINGDIR;
+    getDirListing(sequenceId, path, &nbFile);
+  } else if (name=="audiodevice") {
+    returnValue = getAudioDeviceList(sequenceId, AudioLayer::InputDevice | AudioLayer::OutputDevice);
+  } else if (name=="audiodevicein") {
+    returnValue = getAudioDeviceList(sequenceId, AudioLayer::InputDevice);
+  } else if (name=="audiodeviceout") {
+    returnValue = getAudioDeviceList(sequenceId, AudioLayer::OutputDevice);
+  } else if (name=="countrytones") {
+    returnValue = getCountryTones(sequenceId);
+  }
+  return returnValue;
+}
+
+/**
+ * User request Main Thread (list)
+ */
+bool 
+ManagerImpl::getAudioDeviceList(const std::string& sequenceId, int ioDeviceMask) 
+{
+  bool returnValue = false;
+  try {
+    // TODO: test when there is an error on initializing...
+    TokenList tk;
+    portaudio::System& sys = portaudio::System::instance();
+
+    const char *hostApiName;
+    const char *deviceName;
+
+    for (int index = 0; index < sys.deviceCount(); index++ ) {
+      portaudio::Device& device = sys.deviceByIndex(index);
+
+      if ((ioDeviceMask == AudioLayer::InputDevice  && !device.isOutputOnlyDevice()) ||
+          (ioDeviceMask == AudioLayer::OutputDevice && !device.isInputOnlyDevice() ) ||
+           device.isFullDuplexDevice()) {
+        hostApiName = device.hostApi().name();
+        deviceName  = device.name();
+
+        tk.clear();
+        std::ostringstream str; str << index; tk.push_back(str.str());
+        tk.push_back(deviceName);
+        tk.push_back(std::string(hostApiName));
+        _gui->sendMessage("100", sequenceId, tk);
+      }
+    }
+    returnValue = true;
+  } catch (...) {
+    returnValue = false;
+  }
+  return returnValue;
+}
+
+bool
+ManagerImpl::getCountryTones(const std::string& sequenceId)
+{
+  // see ToneGenerator for the list...
+  sendCountryTone(sequenceId, 1, "North America");
+  sendCountryTone(sequenceId, 2, "France");
+  sendCountryTone(sequenceId, 3, "Australia");
+  sendCountryTone(sequenceId, 4, "United Kingdom");
+  sendCountryTone(sequenceId, 5, "Spain");
+  sendCountryTone(sequenceId, 6, "Italy");
+  sendCountryTone(sequenceId, 7, "Japan");
+
+  return true;
+}
+
+void 
+ManagerImpl::sendCountryTone(const std::string& sequenceId, int index, const std::string& name) {
+  TokenList tk;
+  std::ostringstream str; str << index; tk.push_back(str.str());
+  tk.push_back(name);
+  _gui->sendMessage("100", sequenceId, tk);
+}
+
+/**
+ * User action : main thread
+ */
+bool
+ManagerImpl::getDirListing(const std::string& sequenceId, const std::string& path, int *nbFile) {
+  TokenList tk;
+  try {
+    ost::Dir dir(path.c_str());
+    const char *cFileName = NULL;
+    std::string fileName;
+    std::string filePathName;
+    while ( (cFileName=dir++) != NULL ) {
+      fileName = cFileName;
+      filePathName = path + DIR_SEPARATOR_STR + cFileName;
+      if (fileName.length() && fileName[0]!='.' && !ost::isDir(filePathName.c_str())) {
+        tk.clear();
+        std::ostringstream str;
+        str << (*nbFile);
+        tk.push_back(str.str());
+        tk.push_back(filePathName);
+        _gui->sendMessage("100", sequenceId, tk);
+        (*nbFile)++;
+      }
+    }
+    return true;
+  } catch (...) {
+    // error to open file dir
+    return false;
+  }
+}
+
+/**
+ * Multi Thread
+ */
+void 
+ManagerImpl::switchCall(CALLID id)
+{
+  // we can only switch the current call id if we 
+  // it's not selected yet..
+  if (_currentCallId == 0 ) {
+    setCurrentCallId(id);
+  }
+}
+
+/**
+ * Main Thread - Gui
+ * Experimental...
+ */
+bool
+ManagerImpl::setSwitch(const std::string& switchName) {
+  if (switchName == "audiodriver" ) {
+    try 
+      {
+        selectAudioDriver();
+        return true;
+      }
+    catch (const portaudio::PaException &e) 
+      {
+        getAudioDriver()->setErrorMessage(e.paErrorText());
+        _debug("Portaudio exception: %s\n", e.paErrorText());
+        return false;
+      }
+    catch (const portaudio::PaCppException &e) 
+      {
+        getAudioDriver()->setErrorMessage(e.what());
+        _debug("Portaudio exception: %s\n", e.what());
+        return false;
+      }
+    catch (const std::runtime_error &e) 
+      {
+        getAudioDriver()->setErrorMessage(e.what());
+        _debug("Portaudio exception: %s\n", e.what());
+        return false;
+      } 
+    catch(...) 
+      {
+        _debug("Portaudio exception: <unknown>\n");
+        return false;
+      }
+  } else {
+    return false;
+  }
+}
diff --git a/src/managerimpl.h b/src/managerimpl.h
new file mode 100644
index 0000000000000000000000000000000000000000..df0351628ac9464194040a0519884476ce55cf90
--- /dev/null
+++ b/src/managerimpl.h
@@ -0,0 +1,414 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __MANAGER_H__
+#define __MANAGER_H__
+
+#include <string>
+#include <vector>
+#include <cc++/thread.h>
+
+#include "stund/stun.h"
+#include "call.h"
+#include "observer.h"
+#include "config/config.h"
+
+#include "audio/audiodevice.h"
+#include "audio/tonelist.h" // for Tone::TONEID declaration
+#include "audio/audiofile.h"
+#include "audio/dtmf.h"
+#include "audio/codecDescriptor.h"
+
+class AudioLayer;
+class CodecDescriptor;
+
+class GuiFramework;
+
+class TelephoneTone;
+
+class VoIPLink;
+#ifdef USE_ZEROCONF
+class DNSService;
+#endif
+
+#define	NOTIFICATION_LEN	250
+// Status
+#define CONNECTED_STATUS	"Connected"
+#define LOGGED_IN_STATUS	"Logged in"
+#define RINGING_STATUS		"Ringing"
+#define TRYING_STATUS		"Trying ..."
+#define HANGUP_STATUS       "Hang up"
+#define ONHOLD_STATUS       "On hold ..."
+#define TRANSFER_STATUS     "Transfer to:"
+#define MUTE_ON_STATUS		"Mute on"
+#define ENTER_NUMBER_STATUS "Enter Phone Number:"
+
+/*
+ * Define a type for a list of call
+ */
+typedef std::vector< Call* > CallVector;
+
+/*
+ * Define a type for a list of VoIPLink
+ */
+typedef std::vector< VoIPLink* > VoIPLinkVector;
+
+/**
+ * To send multiple string
+ */
+typedef std::list<std::string> TokenList;
+
+class ManagerImpl {
+public:
+  ManagerImpl (void);
+  ~ManagerImpl (void);
+
+	// Init a new VoIPLink, audio codec and audio driver
+  void init (void);
+  void terminate (void);
+
+	// Set the graphic user interface
+  void setGui (GuiFramework* gui);
+
+	// Accessor to audiodriver
+        // it's multi-thread and use mutex internally
+  AudioLayer* getAudioDriver(void) const { return _audiodriverPA ;}
+
+  	// Accessor to VoIPLinkVector
+  VoIPLinkVector* getVoIPLinkVector (void) {return &_voIPLinkVector;}
+  // Codec Descriptor
+  CodecDescriptorMap& getCodecDescriptorMap(void) {return _codecDescriptorMap;}
+
+  /* 
+   * Attribute a new random id for a new call 
+   * and check if it's already attributed to existing calls. 
+   * If not exists, returns 'id' otherwise return 0 
+   */ 
+  CALLID generateNewCallId (void);
+
+  /*
+   * Add a new call at the end of the CallVector with identifiant 'id'
+   */
+  Call* pushBackNewCall (CALLID id, enum CallType type);
+  void callSetInfo(CALLID id, const std::string& name, const std::string& number);
+  bool callCanBeAnswered(CALLID id);
+  bool callCanBeClosed(CALLID id);
+  bool callIsOnHold(CALLID id);
+	
+  /*
+   * Functions which occur with a user's action
+   */
+  int outgoingCall (const std::string& to);
+  int hangupCall (CALLID id);
+  int cancelCall (CALLID id);
+  int answerCall (CALLID id);
+  int onHoldCall (CALLID id);
+  int offHoldCall (CALLID id);
+  int transferCall (CALLID id, const std::string& to);
+  void mute();
+  void unmute();
+  int refuseCall (CALLID id);
+
+  bool saveConfig (void);
+  bool registerVoIPLink (void);
+  bool unregisterVoIPLink (void);
+
+  bool sendTextMessage(const std::string& account, const std::string& to, const std::string& message);
+	
+  /**
+   * Handle choice of the DTMF-send-way
+   *
+   * @param   id: callid of the line.
+   * @param   code: pressed key.
+   */
+  bool sendDtmf (CALLID id, char code);
+  bool playDtmf (char code);
+  bool playTone ();
+  void stopTone();
+  CALLID getCurrentCallId() { ost::MutexLock m(_mutex); return _currentCallId; }
+
+  int incomingCall (CALLID id, const std::string& name, const std::string& number);
+  void peerAnsweredCall (CALLID id);
+  int peerRingingCall (CALLID id);
+  int peerHungupCall (CALLID id);
+  void incomingMessage(const std::string& message);
+
+  void displayTextMessage (CALLID id, const std::string& message);
+  void displayErrorText (CALLID id, const std::string& message);
+  void displayError (const std::string& error);
+  void displayStatus (const std::string& status);
+  void displayConfigError(const std::string& message);
+
+  void startVoiceMessageNotification (const std::string& nb_msg);
+  void stopVoiceMessageNotification (void);
+
+  void registrationSucceed();
+  void registrationFailed();
+
+  // configuration function requests
+  bool getEvents();
+  bool getZeroconf(const std::string& sequenceId);
+  bool attachZeroconfEvents(const std::string& sequenceId, Pattern::Observer& observer);
+  bool detachZeroconfEvents(Pattern::Observer& observer);
+  bool getCallStatus(const std::string& sequenceId);
+  bool getConfigAll(const std::string& sequenceId);
+  bool getConfig(const std::string& section, const std::string& name, TokenList& arg);
+  bool setConfig(const std::string& section, const std::string& name, const std::string& value);
+  bool setConfig(const std::string& section, const std::string& name, int value);
+  bool getConfigList(const std::string& sequenceId, const std::string& name);
+  void selectAudioDriver(void);
+  bool setSwitch(const std::string& switchName);
+
+  // configuration function for extern
+  // throw an Conf::ConfigTreeItemException if not found
+  int getConfigInt(const std::string& section, const std::string& name);
+  std::string getConfigString(const std::string& section, const std::string& name);
+
+	/*
+	 * Handle audio sounds heard by a caller while they wait for their 
+	 * connection to a called party to be completed.
+	 */
+  void ringback ();
+
+	/*
+	 * Handle played music when an incoming call occurs
+	 */
+  void ringtone ();
+  void congestion ();
+  void callBusy(CALLID id);
+  void callFailure(CALLID id);
+
+  // return 0 if no tone (init before calling this function)
+  AudioLoop* getTelephoneTone();
+  // return 0 if the wav is stopped
+  AudioLoop* getTelephoneFile();
+
+  /**
+   * @return true is there is one or many incoming call waiting
+   * new call, not anwsered or refused
+   */
+  bool incomingCallWaiting(void);
+	/*
+	 * Notification of incoming call when you are already busy
+	 */
+  void notificationIncomingCall (void);
+
+	/*
+	 * Get information about firewall 
+	 * @param	stunSvrAddr: stun server
+	 */
+  void getStunInfo (StunAddress4& stunSvrAddr);
+  bool useStun (void);
+	
+  /*
+   * Inline functions to manage volume control
+   * Read by main thread and AudioLayer thread
+   * Write by main thread only
+   */
+  unsigned short getSpkrVolume(void) { return _spkr_volume; }
+  void setSpkrVolume(unsigned short spkr_vol) {  _spkr_volume = spkr_vol; }
+  unsigned short getMicVolume(void) {  return _mic_volume;  }
+  void setMicVolume(unsigned short mic_vol) {    _mic_volume = mic_vol;   }
+
+  /*
+   * Manage information about firewall
+   */
+  inline int getFirewallPort 		(void) 		{ return _firewallPort; }
+  inline void setFirewallPort 	(int port) 	{ _firewallPort = port; }
+  inline std::string getFirewallAddress (void) 	{ return _firewallAddr; }
+
+	/*
+	 * Init default values for the different fields
+	 */
+  void initConfigFile (void);
+  bool hasLoadedSetup() { return _setupLoaded; }
+	
+
+  enum REGISTRATION_STATE {
+    UNREGISTERED,
+    REGISTERED,
+    FAILED
+  };
+
+  REGISTRATION_STATE getRegistrationState() { return _registerState; }
+
+private:
+ /**
+  * Create .PROGNAME directory in home user and create 
+  * configuration tree from the settings file if this file exists.
+  *
+  * @return	0 if creating file failed
+  *			1 if config-file exists
+  *			2 if file doesn't exist yet.
+  */
+  int createSettingsPath (void);
+
+  /*
+   * Initialize audiocodec with config setting
+   */
+  void initAudioCodec(void);
+	
+  /*
+   * Initialize audiodriver
+   */
+  void initAudioDriver(void);
+
+  /*
+   * Initialize zeroconf module and scanning
+   */
+  void initZeroconf(void);
+  
+  /*
+   * Init the Gui interface (after setting it) inside setGui
+   */
+  void initGui();
+
+  /*
+   * Init the volume for speakers/micro from 0 to 100 value
+   */ 
+  void initVolume();
+
+  /**
+   * Configuration
+   */
+  bool getDirListing(const std::string& sequenceId, const std::string& path, int *nbFile);
+  bool getAudioDeviceList(const std::string& sequenceId, int ioDeviceMask);
+  Conf::ConfigTree _config;
+  bool getCountryTones(const std::string& sequenceId);
+  void sendCountryTone(const std::string& sequenceId, int index, const std::string& name);
+
+  /*
+   * Erase the Call(id) from the CallVector
+   * Protected by other function by _mutex lock
+   */
+  void deleteCall	(CALLID id);
+  Call* getCall (CALLID id);
+  void setCurrentCallId(CALLID id);
+  void removeCallFromCurrent(CALLID id);
+
+  /*
+   * Play one tone
+   * @return false if the driver is uninitialize
+   */
+  bool playATone(Tone::TONEID toneId);
+  
+  //
+  // Multithread variable with extern accessor and change only inside the main thread
+  //
+  /** Vector of VoIPLink */
+  VoIPLinkVector _voIPLinkVector;
+  /** Vector of CodecDescriptor */
+  CodecDescriptor* _codecBuilder;
+
+  //
+  // Sound variable
+  //
+  AudioLayer* _audiodriverPA;
+
+  // Main thread
+  DTMF* _dtmfKey;
+
+  // map of codec (for configlist request)
+  CodecDescriptorMap _codecDescriptorMap;
+
+  /////////////////////
+  // Protected by Mutex
+  /////////////////////
+  ost::Mutex _toneMutex;
+  TelephoneTone* _telephoneTone;
+  AudioFile _audiofile;
+
+  // To handle volume control
+  short _spkr_volume;
+  short _mic_volume;
+  short _mic_volume_before_mute;
+
+  //
+  // End of sound variable
+  //
+
+  // Multithread variable (protected by _mutex)
+  // 
+  /** Mutex to protect access to code section */
+  ost::Mutex _mutex;
+  /* Vector of calls  */
+  CallVector _callVector;
+  // Current callid : protected implicitely by function using _mutex 
+  CALLID _currentCallId; 
+  // functions that set mutex:
+  //  terminate, pushBackNewCall, generateNewCallId, outgoingCall (after gen/push)
+  //  hangupCall, cancelCall, answerCall, onHoldCall, offHoldCall, transferCall, refuseCall, 
+  //  callSetInfo, callCanBeClosed, callCanBeAnswered, callIsOnHold, incomingCall,
+  //  peerAnsweredCall, peerRingingCall, peerHunguCall, callBusy, callFailure
+  //  getCallStatus, getCurrentCallId
+  // functions that are called by those functions
+  //  getCall, deleteCall, stopTone, switchCall, decWaitingCall, setCurrentCallId, getAudioDriver, ringtone, incWaitingCall
+
+  // warning, incomingCallWaiting | incWaitingCall | decWaitingCall are prtected by _incomingCallMutex
+  
+
+  //
+  // Multithread variable (non protected)
+  //
+  GuiFramework* _gui;
+
+  /**
+   * Multithreaded
+   * Incomings Call:
+   */
+  ost::Mutex _incomingCallMutex;
+  unsigned int _nbIncomingWaitingCall;
+  void incWaitingCall(void);
+  void decWaitingCall(void);
+	
+
+	/**
+   * Path of the ConfigFile 
+	 */
+  std::string 	_path;
+  int _exist;
+  int _setupLoaded;
+
+	// To handle firewall
+  int _firewallPort;
+  std::string _firewallAddr;
+
+  // return false if exosip or the network checking failed
+  bool initRegisterVoIPLink();
+  // true if we tried to register Once
+  bool    _hasTriedToRegister;
+  // Register state
+  REGISTRATION_STATE _registerState;
+
+
+  void switchCall(CALLID id);
+
+  // tell if we have zeroconf is enabled
+  int _hasZeroconf;
+
+#ifdef USE_ZEROCONF
+  // DNSService contain every zeroconf services
+  //  configuration detected on the network
+  DNSService *_DNSService;
+#endif
+
+};
+
+#endif // __MANAGER_H__
diff --git a/src/observer.cpp b/src/observer.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..022c3316a50dfc2c2c4636c56e6325e2c3347cb9
--- /dev/null
+++ b/src/observer.cpp
@@ -0,0 +1,53 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "observer.h"
+#include <algorithm>
+namespace Pattern {
+
+void 
+Subject::attach(Observer& observer) 
+{
+  if (std::find(_observers.begin(), _observers.end(), &observer) == _observers.end()) {
+    _observers.push_back(&observer);
+  } 
+}
+
+void 
+Subject::detach(Observer& observer) 
+{
+  std::list<Observer*>::iterator iter = std::find(_observers.begin(), _observers.end(), &observer);
+  if ( iter != _observers.end()) {
+    _observers.erase(iter);
+  } 
+}
+
+void 
+Subject::notify()
+{
+  std::list<Observer*>::iterator iter = _observers.begin();
+  while( iter != _observers.end()) {
+    if (*iter) {
+      (*iter)->update();
+    }
+    iter++;
+  }
+}
+
+} // end of namespace
diff --git a/src/observer.h b/src/observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..785cba8741a1e4ad6d1c9dbf44c48882ee46cd36
--- /dev/null
+++ b/src/observer.h
@@ -0,0 +1,49 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __PATTERN_OBSERVER_H_
+#define __PATTERN_OBSERVER_H_
+
+#include <list>
+
+/**
+ * Observer design pattern interface
+ */
+namespace Pattern {
+
+class Observer {
+public:
+  virtual ~Observer() {};
+  virtual void update() = 0;
+};
+
+class Subject {
+public:
+  virtual ~Subject() {};
+  void attach(Observer& observer);
+  void detach(Observer& observer);
+  void notify();
+
+private:
+  std::list<Observer*> _observers;
+};
+
+} // end namespace
+
+#endif // __PATTERN_OBSERVER_H_
diff --git a/src/sflphone.in b/src/sflphone.in
new file mode 100755
index 0000000000000000000000000000000000000000..f874272e19cea97ccf35dc61a9788b07cf2f4058
--- /dev/null
+++ b/src/sflphone.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+# SFLphone bin launcher script v 3
+# Setup ld's environment
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+
+LD_LIBRARY_PATH=@libdir@:${LD_LIBRARY_PATH}
+export LD_LIBRARY_PATH
+
+message="Warning, you probably did not extract the archive in the / directory,
+you must edit this script ($0) and change SFLPHONE_DIR to the correct location.
+@libexecdir@ must contain the provided libraries."
+if [ ! -d ${SFLPHONE_DIR} ]; then
+  echo $message
+  exit 1
+else
+  if [ ! -d @libexecdir@ ]; then
+    echo $message
+    exit 1
+  fi
+fi
+
+# Let's try to go..
+PATH=@libexecdir@:${PATH}
+binaryqtname=sflphone-qt
+binaryqt=@libexecdir@/${binaryqtname}
+binarycliname=sflphone-cli
+binarycli=@libexecdir@/${binarycliname}
+if [ "$1" != "--text" ]; then
+  if [ -x ${binaryqt} ]; then
+    exec $binaryqt $@
+  else
+    echo "Could not find the ${binaryqtname} executable in @libexecdir@ !"
+    exit 1
+  fi
+else 
+  if [ -x ${binarycli} ]; then
+    shift
+    SFLPHONE_CORE_DIR=@libexecdir@ exec $binarycli $@
+  else
+    echo "Could not find the ${binarycliname} executable in @libexecdir@ !"
+    exit 1
+  fi
+fi
+
+# EOF
diff --git a/src/sipcall.cpp b/src/sipcall.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..36997919e07add582bba505b6ffb5b81f4be1bbe
--- /dev/null
+++ b/src/sipcall.cpp
@@ -0,0 +1,809 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * Portions Copyright (C) 2002,2003   Aymeric Moizard <jack@atosc.org>
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with dpkg; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <osipparser2/sdp_message.h>
+#include <string.h> // strcpy
+ 
+// For AF_INET
+#include <sys/socket.h>
+#include <sstream>
+
+#include "global.h"
+#include "audio/audiocodec.h"
+#include "audio/codecDescriptor.h"
+#include "sipcall.h"
+
+SipCall::SipCall (CALLID id, CodecDescriptorMap& codecMap) : _localIp("127.0.0.1"), _codecMap(codecMap)
+{
+  _id = id;	  // Same id of Call object
+  _cid = 0; // call id, from the sipvoiplink
+  _did = 0; // dialog id
+  _tid = 0; // transaction id
+
+  _standby = false;
+  _status_code = 0;
+
+  alloc(); // char* allocation
+  _audiocodec = 0;
+
+  _local_audio_port = 0;
+  _remote_sdp_audio_port = 0;
+  _local_sendrecv  = 0;           /* _SENDRECV, _SENDONLY, _RECVONLY */
+  _remote_sendrecv = 0;
+
+  _reinvite = false;
+}
+
+
+SipCall::~SipCall (void) 
+{
+	dealloc();
+  //delete _audiocodec;  don't delete it, the Manager will do it...
+  _audiocodec = 0;
+}
+
+void
+SipCall::setLocalAudioPort (int newport) 
+{
+	_local_audio_port = newport;
+}
+
+int
+SipCall::getLocalAudioPort (void) 
+{
+	return _local_audio_port;
+}
+
+void
+SipCall::setId (CALLID id)
+{
+	_id = id;
+}
+
+CALLID
+SipCall::getId (void)
+{
+	return _id;
+}
+
+void
+SipCall::setDid (int did)
+{
+	_did = did;
+}
+
+int
+SipCall::getDid (void)
+{
+	return _did;
+}
+
+void
+SipCall::setCid (int cid)
+{
+	_cid = cid;
+}
+
+int
+SipCall::getCid (void)
+{
+	return _cid;
+}
+
+void
+SipCall::setTid (int tid)
+{
+	_tid = tid;
+}
+
+int
+SipCall::getTid (void)
+{
+	return _tid;
+}
+
+int
+SipCall::getRemoteSdpAudioPort (void)
+{
+	return _remote_sdp_audio_port;
+}
+
+char*
+SipCall::getRemoteSdpAudioIp (void)
+{
+	return _remote_sdp_audio_ip;
+}
+
+// newIncomingCall is called when the IP-Phone user receives a new call.
+int 
+SipCall::newIncomingCall (eXosip_event_t *event) {	
+
+  _cid = event->cid;
+  _did = event->did;
+  _tid = event->tid;
+
+  if (_did < 1 && _cid < 1) {
+    return -1; /* not enough information for this event?? */
+  }
+  osip_strncpy (_textinfo, event->textinfo, 255);
+
+  if (event->response != NULL) {
+    _status_code = event->response->status_code;
+    snprintf (_reason_phrase, 49, "%s", event->response->reason_phrase);
+    _debug("            Status: code:%1$d reason:%2$s\n", _status_code, _reason_phrase);
+  }
+
+  strcpy(_remote_uri, "");
+  _name = "";
+  _number = "";
+  if (event->request != NULL) {
+    char *tmp = NULL;
+
+    osip_from_to_str(event->request->from, &tmp);
+    if (tmp != NULL) {
+      snprintf (_remote_uri, 255, "%s", tmp);
+      osip_free (tmp);
+
+      // Get the name/number
+      osip_from_t *from;
+      osip_from_init(&from);
+      osip_from_parse(from, _remote_uri);
+      char *name = osip_from_get_displayname(from);
+      if ( name != NULL ) {
+        _name = name;
+      }
+      osip_uri_t* url = osip_from_get_url(from); 
+      if ( url != NULL && url->username != NULL) {
+        _number = url->username;
+      }
+      osip_from_free(from);
+    }
+  }
+  _debug("            Name: %s\n", _name.c_str());
+  _debug("            Number: %s\n", _number.c_str());
+  _debug("            Remote URI: %s\n", _remote_uri);
+
+  /* negotiate payloads */
+  sdp_message_t *remote_sdp = NULL;
+  if (event->request != NULL) {
+    eXosip_lock();
+    remote_sdp = eXosip_get_sdp_info (event->request);
+    eXosip_unlock();
+  }
+  if (remote_sdp == NULL) {
+    _debug("< Sending 400 Bad Request (no SDP)\n");
+    eXosip_lock();
+    eXosip_call_send_answer (_tid, 400, NULL);
+    eXosip_unlock();
+    return -1;
+  }
+  /* TODO: else build an offer */
+
+  // Remote Media IP
+  eXosip_lock();
+  sdp_connection_t *conn = eXosip_get_audio_connection (remote_sdp);
+  eXosip_unlock();
+  if (conn != NULL && conn->c_addr != NULL) {
+      snprintf (_remote_sdp_audio_ip, 49, "%s", conn->c_addr);
+      _debug("            Remote Audio IP: %s\n", _remote_sdp_audio_ip);
+  }
+
+  // Remote Media Port
+  eXosip_lock();
+  sdp_media_t *remote_med = eXosip_get_audio_media (remote_sdp);
+  eXosip_unlock();
+
+  if (remote_med == NULL || remote_med->m_port == NULL) {
+    // no audio media proposed
+    _debug("< Sending 415 Unsupported media type\n");
+    eXosip_lock();
+    eXosip_call_send_answer (_tid, 415, NULL);
+    eXosip_unlock();
+    sdp_message_free (remote_sdp);
+    return -1;
+  }
+  _remote_sdp_audio_port = atoi(remote_med->m_port);
+  _debug("            Remote Audio Port: %d\n", _remote_sdp_audio_port);
+
+  // Remote Payload
+  char *tmp = NULL;
+  if (_remote_sdp_audio_port > 0 && _remote_sdp_audio_ip[0] != '\0') {
+    int pos = 0;
+    while (!osip_list_eol (remote_med->m_payloads, pos)) {
+      tmp = (char *) osip_list_get (remote_med->m_payloads, pos);
+      if (tmp != NULL ) {
+        int payload = atoi(tmp);
+        // stop if we find a correct codec
+        if (0 != _codecMap.getCodec((CodecType)payload)){
+           break;
+        }
+      }
+      tmp = NULL;
+      pos++;
+    }
+  }
+  setAudioCodec(0);
+  if (tmp != NULL) {
+    int payload = atoi (tmp);
+    _debug("            Payload: %d\n", payload);
+    setAudioCodec(_codecMap.getCodec((CodecType)payload)); // codec builder for the mic
+  }
+  if (getAudioCodec() == 0) {
+    _debug("< Sending 415 Unsupported media type\n");
+    eXosip_lock();
+    eXosip_call_send_answer (_tid, 415, NULL);
+    eXosip_unlock();
+    sdp_message_free (remote_sdp);
+    return -1;
+  }
+
+  osip_message_t *answer = 0;
+  eXosip_lock();
+  _debug("< Building Answer 183\n");
+  if (0 == eXosip_call_build_answer (_tid, 183, &answer)) {
+    if ( 0 != sdp_complete_message(remote_sdp, answer)) {
+      osip_message_free(answer);
+      // Send 415 Unsupported media type
+      _debug("< Sending Answer 415\n");
+      eXosip_call_send_answer (_tid, 415, NULL);
+    } else {
+
+      sdp_message_t *local_sdp = eXosip_get_sdp_info(answer);
+      sdp_media_t *local_med = NULL;
+      if (local_sdp != NULL) {
+         local_med = eXosip_get_audio_media(local_sdp);
+      }
+      if (local_sdp != NULL && local_med != NULL) {
+        /* search if stream is sendonly or recvonly */
+        _remote_sendrecv = sdp_analyse_attribute (remote_sdp, remote_med);
+        _local_sendrecv =  sdp_analyse_attribute (local_sdp, local_med);
+        _debug("            Remote SendRecv: %d\n", _remote_sendrecv);
+        _debug("            Local  SendRecv: %d\n", _local_sendrecv);
+        if (_local_sendrecv == _SENDRECV) {
+          if (_remote_sendrecv == _SENDONLY)      { _local_sendrecv = _RECVONLY; }
+          else if (_remote_sendrecv == _RECVONLY) { _local_sendrecv = _SENDONLY; }
+        }
+        _debug("            Final Local SendRecv: %d\n", _local_sendrecv);
+        sdp_message_free (local_sdp);
+      }
+      _debug("< Sending answer 183\n");
+      if (0 != eXosip_call_send_answer (_tid, 183, answer)) {
+        _debug("SipCall::newIncomingCall: cannot send 183 progress?\n");
+      }
+    }
+  }
+  eXosip_unlock ();
+  sdp_message_free (remote_sdp);
+
+  return 0;
+}
+
+// newReinviteCall is called when the IP-Phone user receives a change in the call
+// it's almost an newIncomingCall but we send a 200 OK
+// See: 3.7.  Session with re-INVITE (IP Address Change)
+int 
+SipCall::newReinviteCall (eXosip_event_t *event) {
+
+  _cid = event->cid;
+  _did = event->did;
+  _tid = event->tid;
+
+  if (_did < 1 && _cid < 1) {
+    return -1; /* not enough information for this event?? */
+  }
+  osip_strncpy (_textinfo, event->textinfo, 255);
+
+  if (event->response != NULL) {
+    _status_code = event->response->status_code;
+    snprintf (_reason_phrase, 49, "%s", event->response->reason_phrase);
+    _debug("            Status: %d %s\n", _status_code, _reason_phrase);
+  }
+
+  strcpy(_remote_uri, "");
+  _name = "";
+  _number = "";
+  if (event->request != NULL) {
+    char *tmp = NULL;
+
+    osip_from_to_str(event->request->from, &tmp);
+    if (tmp != NULL) {
+      snprintf (_remote_uri, 255, "%s", tmp);
+      osip_free (tmp);
+
+      // Get the name/number
+      osip_from_t *from;
+      osip_from_init(&from);
+      osip_from_parse(from, _remote_uri);
+      char *name = osip_from_get_displayname(from);
+      if ( name != NULL ) {
+        _name = name;
+      }
+      osip_uri_t* url = osip_from_get_url(from); 
+      if ( url != NULL && url->username != NULL ) {
+        _number = url->username;
+      }
+      osip_from_free(from);
+    }
+  }
+  _debug("            Name: %s\n", _name.c_str());
+  _debug("            Number: %s\n", _number.c_str());
+  _debug("            Remote URI: %s\n", _remote_uri);
+
+  /* negotiate payloads */
+  sdp_message_t *remote_sdp = NULL;
+  if (event->request != NULL) {
+    eXosip_lock();
+    remote_sdp = eXosip_get_sdp_info (event->request);
+    eXosip_unlock();
+  }
+  if (remote_sdp == NULL) {
+    _debug("< Sending 400 Bad Request (no sdp)\n");
+    // Send 400 BAD REQUEST
+    eXosip_lock();
+    eXosip_call_send_answer (_tid, 400, NULL);
+    eXosip_unlock();
+    return 0;
+  }
+  /* TODO: else build an offer */
+
+  // Remote Media IP
+  eXosip_lock();
+  sdp_connection_t *conn = eXosip_get_audio_connection (remote_sdp);
+  eXosip_unlock();
+  if (conn != NULL && conn->c_addr != NULL) {
+      snprintf (_remote_sdp_audio_ip, 49, "%s", conn->c_addr);
+      _debug("            Remote Audio IP: %s\n", _remote_sdp_audio_ip);
+  }
+
+  // Remote Media Port
+  eXosip_lock();
+  sdp_media_t *remote_med = eXosip_get_audio_media (remote_sdp);
+  eXosip_unlock();
+
+  if (remote_med == NULL || remote_med->m_port == NULL) {
+    // no audio media proposed
+    _debug("< Sending 415 Unsupported media type\n");
+    eXosip_lock();
+    eXosip_call_send_answer (_tid, 415, NULL);
+    eXosip_unlock();
+    sdp_message_free (remote_sdp);
+    return 0;
+  }
+  _remote_sdp_audio_port = atoi(remote_med->m_port);
+  _debug("            Remote Audio Port: %d\n", _remote_sdp_audio_port);
+
+  // Remote Payload
+  char *tmp = NULL;
+  if (_remote_sdp_audio_port > 0 && _remote_sdp_audio_ip[0] != '\0') {
+    int pos = 0;
+    while (!osip_list_eol (remote_med->m_payloads, pos)) {
+      tmp = (char *) osip_list_get (remote_med->m_payloads, pos);
+      if (tmp != NULL) {
+        // we could check if the payload is active here...
+        break;
+      }
+      tmp = NULL;
+      pos++;
+    }
+  }
+
+  setAudioCodec(0);
+  if (tmp != NULL) {
+    int payload = atoi (tmp);
+    _debug("            Payload: %d\n", payload);
+    setAudioCodec(_codecMap.getCodec((CodecType)payload)); // codec builder for the mic
+  }
+  if (getAudioCodec() == 0) {
+    _debug("< Sending 415 Unsupported media type\n");
+    eXosip_lock();
+    eXosip_call_send_answer (_tid, 415, NULL);
+    eXosip_unlock();
+    sdp_message_free (remote_sdp);
+    return 0;
+  }
+
+  osip_message_t *answer = 0;
+  eXosip_lock();
+  _debug("< Building Answer 200\n");
+  if (0 == eXosip_call_build_answer (_tid, 200, &answer)) {
+    if ( 0 != sdp_complete_message(remote_sdp, answer)) {
+      osip_message_free(answer);
+      // Send 415 Unsupported media type
+      eXosip_call_send_answer (_tid, 415, NULL);
+      _debug("< Sending Answer 415\n");
+    } else {
+
+      sdp_message_t *local_sdp = eXosip_get_sdp_info(answer);
+      sdp_media_t *local_med = NULL;
+      if (local_sdp != NULL) {
+         local_med = eXosip_get_audio_media(local_sdp);
+      }
+      if (local_sdp != NULL && local_med != NULL) {
+        /* search if stream is sendonly or recvonly */
+        _remote_sendrecv = sdp_analyse_attribute (remote_sdp, remote_med);
+        _local_sendrecv =  sdp_analyse_attribute (local_sdp, local_med);
+        _debug("            Remote SendRecv: %d\n", _remote_sendrecv);
+        _debug("            Local  SendRecv: %d\n", _local_sendrecv);
+        if (_local_sendrecv == _SENDRECV) {
+          if (_remote_sendrecv == _SENDONLY)      { _local_sendrecv = _RECVONLY; }
+          else if (_remote_sendrecv == _RECVONLY) { _local_sendrecv = _SENDONLY; }
+        }
+        _debug("            Final Local SendRecv: %d\n", _local_sendrecv);
+        sdp_message_free (local_sdp);
+      }
+      _debug("< Sending answer 200\n");
+      if (0 != eXosip_call_send_answer (_tid, 200, answer)) {
+        _debug("SipCall::newIncomingCall: cannot send 200 OK?\n");
+      }
+    }
+  }
+  eXosip_unlock ();
+  sdp_message_free (remote_sdp);
+  _reinvite = true;
+  return 0;
+}
+
+int 
+SipCall::ringingCall (eXosip_event_t *event) {     
+
+  this->_cid = event->cid;
+  this->_did = event->did;
+  this->_tid = event->tid;
+
+  if (this->_did < 1 && this->_cid < 1) {
+    return -1; 
+  }
+
+  osip_strncpy (_textinfo, event->textinfo, 255);
+
+  if (event->response != NULL) {
+    _status_code = event->response->status_code;
+    snprintf (_reason_phrase, 49, "%s", event->response->reason_phrase);
+  }
+
+  if (event->request != NULL) {
+    char *tmp = NULL;
+
+    osip_from_to_str (event->request->from, &tmp);
+    if (tmp != NULL) {
+      snprintf (_remote_uri, 255, "%s", tmp);
+      osip_free (tmp);
+    }
+  }
+  	return 0;
+}
+
+int
+SipCall::receivedAck (eXosip_event_t *event)
+{
+  _cid = event->cid;
+  _did = event->did;
+  return 0;
+}
+
+
+
+int 
+SipCall::answeredCall(eXosip_event_t *event) {
+  _cid = event->cid;
+  _did = event->did;
+
+  if (_did < 1 && _cid < 1)	{
+    return -1; /* not enough information for this event?? */
+  }
+  osip_strncpy(this->_textinfo,   event->textinfo, 255);
+
+  if (event->response != NULL) {
+    _status_code = event->response->status_code;
+    snprintf (_reason_phrase, 49, "%s", event->response->reason_phrase);
+
+    char *tmp = NULL;
+
+    osip_from_to_str (event->response->from, &tmp);
+    if (tmp != NULL) {
+        snprintf (_remote_uri, 255, "%s", tmp);
+        osip_free (tmp);
+    }
+  }
+  _debug("            Status: %d %s\n", _status_code, _reason_phrase);
+  _debug("            From URI: %s\n", _remote_uri);
+
+  eXosip_lock ();
+  {
+    osip_message_t *ack = NULL;
+    int i;
+
+    i = eXosip_call_build_ack (_did, &ack);
+    if (i != 0) {
+      _debug("SipCall::answeredCall: Cannot build ACK for call!\n");
+    } else {
+      sdp_message_t *local_sdp = NULL;
+      sdp_message_t *remote_sdp = NULL;
+
+      if (event->request != NULL && event->response != NULL) {
+        local_sdp = eXosip_get_sdp_info (event->request);
+        remote_sdp = eXosip_get_sdp_info (event->response);
+      }
+      if (local_sdp == NULL && remote_sdp != NULL) {
+        /* sdp in ACK */
+        i = sdp_complete_message (remote_sdp, ack);
+        if (i != 0) {
+            _debug("SipCall::answeredCall: Cannot complete ACK with sdp body?!\n");
+        }
+      }
+      sdp_message_free (local_sdp);
+      sdp_message_free (remote_sdp);
+
+      _debug("< Send ACK\n");
+      eXosip_call_send_ack (_did, ack);
+    }
+  }
+  eXosip_unlock ();
+
+  return 0;
+}
+
+void
+SipCall::answeredCall_without_hold (eXosip_event_t *event) 
+{
+  if (event->response == NULL ) { return; }
+
+  // TODO: understand this code..
+  if (_cid!=0) {
+    eXosip_lock();
+    sdp_message_t *sdp = eXosip_get_sdp_info (event->response);
+    eXosip_unlock();
+    if (sdp != NULL) {
+       /* audio is started and session has just been modified */
+      sdp_message_free (sdp);
+    }
+  }
+
+  if (event->request != NULL) {   /* audio is started */ 
+
+    eXosip_lock();
+    sdp_message_t *local_sdp = eXosip_get_sdp_info (event->request);
+    sdp_message_t *remote_sdp = eXosip_get_sdp_info (event->response);
+    eXosip_unlock();
+
+    sdp_media_t *remote_med = NULL;
+    char *tmp = NULL;
+    if (remote_sdp == NULL) {
+      _debug("SipCall::answeredCall_without_hold: No remote SDP body found for call\n");
+      /* TODO: remote_sdp = retreive from ack above */
+    } else {
+      eXosip_lock();
+      sdp_connection_t *conn = eXosip_get_audio_connection (remote_sdp);
+      if (conn != NULL && conn->c_addr != NULL) {
+          snprintf (_remote_sdp_audio_ip, 49, "%s", conn->c_addr);
+      }
+
+      remote_med = eXosip_get_audio_media (remote_sdp);
+      if (remote_med != NULL && remote_med->m_port != NULL) {
+        _remote_sdp_audio_port = atoi (remote_med->m_port);
+      }
+      eXosip_unlock();
+      _debug("            Remote Audio: %s:%d\n", _remote_sdp_audio_ip, _remote_sdp_audio_port);
+
+      if (_remote_sdp_audio_port > 0 && _remote_sdp_audio_ip[0] != '\0' && 
+        remote_med != NULL) {
+        tmp = (char *) osip_list_get (remote_med->m_payloads, 0);
+      }
+
+      setAudioCodec(0);
+      if (tmp != NULL) {
+        int payload = atoi (tmp);
+        _debug("            Remote Payload: %d\n", payload);
+        setAudioCodec(_codecMap.getCodec((CodecType)payload)); // codec builder for the mic
+      }
+    }
+
+    if (local_sdp == NULL) {
+      _debug("SipCall::answeredCall_without_hold: SDP body was probably in the ACK (TODO)\n");
+    }
+
+    if (remote_sdp != NULL && local_sdp != NULL) {
+      int audio_port = 0;
+      eXosip_lock();
+      sdp_media_t *local_med = eXosip_get_audio_media (local_sdp);
+      eXosip_unlock();
+      if (local_med != NULL && local_med->m_port != NULL) {
+        audio_port = atoi (local_med->m_port);
+      }
+      _debug("            Local Audio port: %d\n", audio_port);
+
+      if (tmp != NULL && audio_port > 0
+          && _remote_sdp_audio_port > 0
+          && _remote_sdp_audio_ip[0] != '\0') {
+
+        /* search if stream is sendonly or recvonly */
+        _remote_sendrecv = sdp_analyse_attribute (remote_sdp, remote_med);
+        _local_sendrecv = sdp_analyse_attribute (local_sdp, local_med);
+        if (_local_sendrecv == _SENDRECV) {
+          if (_remote_sendrecv == _SENDONLY)
+              _local_sendrecv = _RECVONLY;
+          else if (_remote_sendrecv == _RECVONLY)
+              _local_sendrecv = _SENDONLY;
+        }
+      }
+      _debug("            Remote Sendrecv: %d\n", _remote_sendrecv);
+      _debug("            Local Sendrecv: %d\n", _local_sendrecv);
+    }
+    sdp_message_free (local_sdp);
+    sdp_message_free (remote_sdp);
+  }
+}
+
+int
+SipCall::sdp_complete_message(sdp_message_t * remote_sdp, 
+		osip_message_t * msg)
+{
+  char *tmp = NULL;
+  char buf[4096];
+
+  char localip[128];
+
+  // Format port to a char*
+  if (remote_sdp == NULL) {
+    _debug("SipCall::sdp_complete_message: No remote SDP body found for call\n");
+    return -1;
+  }
+  if (msg == NULL) {
+    _debug("SipCall::sdp_complete_message: No message to complete\n");
+    return -1;
+  }
+
+  // this exosip is locked and is protected by other function
+  eXosip_guess_localip(AF_INET, localip, 128);
+
+  std::ostringstream media;
+
+  // for each medias
+  int iMedia = 0;
+  while (!osip_list_eol(remote_sdp->m_medias, iMedia)) {
+    sdp_media_t *remote_med = (sdp_media_t *)osip_list_get(remote_sdp->m_medias, iMedia);
+    if (remote_med == 0) { continue; }
+
+    if (0 != osip_strcasecmp (remote_med->m_media, "audio")) {
+      // if this is not an "audio" media, we set it to 0
+      media << "m=" << remote_med->m_media << " 0 " << remote_med->m_proto << " \r\n";
+    } else {
+      std::ostringstream listCodec;
+      std::ostringstream listRtpMap;
+
+      // search for compatible codec: foreach payload
+      int iPayload = 0;
+      while (!osip_list_eol(remote_med->m_payloads, iPayload)) {
+        tmp = (char *)osip_list_get(remote_med->m_payloads, iPayload);
+        if (tmp!=NULL) {
+          int payload = atoi(tmp);
+          AudioCodec* audiocodec = _codecMap.getCodec((CodecType)payload);
+          if (audiocodec!=0 && audiocodec->isActive()) {
+            listCodec << payload << " ";
+            listRtpMap << "a=rtpmap: " << payload << " " << audiocodec->getCodecName() << "/" << audiocodec->getClockRate();
+            if ( audiocodec->getChannel() != 1) {
+              listRtpMap << "/" << audiocodec->getChannel();
+            }
+            listRtpMap << "\r\n";
+          }
+        }
+        iPayload++;
+      }
+      if (listCodec.str().empty()) {
+        media << "m=" << remote_med->m_media << " 0 << " << remote_med->m_proto << " \r\n";
+      } else {
+        // we add the media line + a=rtpmap list
+        media << "m=" << remote_med->m_media << " " << _local_audio_port << " RTP/AVP " << listCodec.str() << "\r\n";
+        media << listRtpMap.str();
+      }
+    }
+    iMedia++;
+  }
+  snprintf (buf, 4096,
+    "v=0\r\n"
+    "o=user 0 0 IN IP4 %s\r\n"
+    "s=session\r\n"
+    "c=IN IP4 %s\r\n"
+    "t=0 0\r\n"
+    "%s\n", localip, localip, media.str().c_str());
+
+  osip_message_set_body (msg, buf, strlen (buf));
+  osip_message_set_content_type (msg, "application/sdp");
+  _debug("          sdp: %s", buf);
+  return 0;
+}
+
+int
+SipCall::sdp_analyse_attribute (sdp_message_t * sdp, sdp_media_t * med)
+{
+  	int pos;
+  	int pos_media;
+
+  	/* test media attributes */
+  	pos = 0;
+  	while (!osip_list_eol (med->a_attributes, pos)) {
+      	sdp_attribute_t *at;
+
+      	at = (sdp_attribute_t *) osip_list_get (med->a_attributes, pos);
+      	if (at->a_att_field != NULL && 
+				0 == strcmp (at->a_att_field, "sendonly")) {
+		  	return _SENDONLY;
+      	} else if (at->a_att_field != NULL &&
+                 0 == strcmp (at->a_att_field, "recvonly")) {
+          	return _RECVONLY;
+      	} else if (at->a_att_field != NULL &&
+                 0 == strcmp (at->a_att_field, "sendrecv")) {
+          	return _SENDRECV;
+        }
+      	pos++;
+    }
+
+  	/* test global attributes */
+  	pos_media = -1;
+  	pos = 0;
+  	while (!osip_list_eol (sdp->a_attributes, pos)) {
+      	sdp_attribute_t *at;
+
+      	at = (sdp_attribute_t *) osip_list_get (sdp->a_attributes, pos);
+      	if (at->a_att_field != NULL && 
+				0 == strcmp (at->a_att_field, "sendonly")) {
+          	return _SENDONLY;
+      	} else if (at->a_att_field != NULL &&
+                 0 == strcmp (at->a_att_field, "recvonly")) {
+          	return _RECVONLY;
+      	} else if (at->a_att_field != NULL &&
+                 0 == strcmp (at->a_att_field, "sendrecv")) {
+          	return _SENDRECV;
+        }
+      	pos++;
+    }
+
+  	return _SENDRECV;
+}
+
+void
+SipCall::alloc(void) {
+  this->_reason_phrase = new char[50];
+  this->_textinfo = new char[256];
+  this->_remote_uri = new char[256];
+  this->_remote_sdp_audio_ip = new char[50];
+
+  // initialize the strings...
+  this->_reason_phrase[0] = '\0';
+  this->_textinfo[0] = '\0';
+  this->_remote_uri[0] = '\0';
+  strcpy(this->_remote_sdp_audio_ip, "127.0.0.1");
+}
+
+void
+SipCall::dealloc(void) {
+  delete [] _reason_phrase;       _reason_phrase = NULL;
+  delete [] _textinfo;            _textinfo      = NULL;
+  delete [] _remote_uri;          _remote_uri    = NULL;
+  delete [] _remote_sdp_audio_ip; _remote_sdp_audio_ip = NULL;
+}
+
+void
+SipCall::noSupportedCodec (void) {
+	_debug("SipCall::noSupportedCodec: Codec no supported\n");
+}
+
diff --git a/src/sipcall.h b/src/sipcall.h
new file mode 100644
index 0000000000000000000000000000000000000000..bf9c3ab195abc063853bad1d5e8d9d2dee4ce2a4
--- /dev/null
+++ b/src/sipcall.h
@@ -0,0 +1,155 @@
+/**
+ * Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ * Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ * Author: Laurielle Lea <laurielle.lea@savoirfairelinux.com> 
+ *
+ * Portions Copyright (C) 2002,2003   Aymeric Moizard <jack@atosc.org>
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with dpkg; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __SIP_CALL_H__
+#define __SIP_CALL_H__
+
+#include <eXosip2/eXosip.h>
+#include <vector>
+#include <string>
+#include "call.h"
+
+class CodecDescriptor;
+class AudioCodec;
+
+#define _SENDRECV 0
+#define _SENDONLY 1
+#define _RECVONLY 2
+
+// Vector of CodecDescriptor
+class SipCall {
+public:
+  SipCall(CALLID id, CodecDescriptorMap& codecMap);
+  ~SipCall (void);
+
+  /**
+   * Store information about incoming call and negociate payload
+   */
+  int newIncomingCall(eXosip_event_t *);
+  int newReinviteCall(eXosip_event_t *);
+	
+	/*
+	 * Use to answer to a ONHOLD/OFFHOLD event 
+	 */
+	int answeredCall 		(eXosip_event_t *);
+	
+	/* 
+	 * Use to answer to an incoming call 
+	 */
+	void  	answeredCall_without_hold (eXosip_event_t *);
+
+	int  	ringingCall			(eXosip_event_t *);
+	int  	receivedAck			(eXosip_event_t *);
+
+	/*
+	 * Manage local audio port for each sipcall
+	 */
+	void	setLocalAudioPort 	(int);
+	int 	getLocalAudioPort 	(void);	
+
+  std::string getLocalIp() { return _localIp; }
+  void setLocalIp(const std::string& ip) { _localIp = ip; }
+
+  bool isReinvite() { return _reinvite; }
+  void endReinvite() { _reinvite = false; }; 
+
+	/*
+	 * Manage id, did (dialog-id), cid (call-id) and tid (transaction-id) 
+	 * for each sipcall
+	*/ 
+	void 	setId				(CALLID id);
+	CALLID	getId				(void);
+	void 	setDid				(int did);
+	int 	getDid				(void);
+	void 	setCid				(int cid);
+	int 	getCid				(void);
+	void 	setTid				(int tid);
+	int 	getTid				(void);
+
+	/*
+	 * Manage remote sdp audio port
+	 */
+	int 	getRemoteSdpAudioPort (void);
+	char* 	getRemoteSdpAudioIp (void);
+
+  /*
+   * Manage audio codec
+   */
+  AudioCodec* getAudioCodec(void) { return _audiocodec; }
+  void setAudioCodec(AudioCodec* ac) { _audiocodec = ac; }
+  CodecDescriptorMap& getCodecMap() { return _codecMap; }
+
+  /*
+   * Accessor to remote-uri
+   */
+  inline char* getRemoteUri (void) { return _remote_uri; }
+
+  /*
+   * To avoid confusion when an incoming call occured in the same time 
+   * that you make an outgoing call
+   */
+  inline void setStandBy (bool standby) { _standby = standby; }
+  inline bool getStandBy (void) { return _standby; }
+
+  std::string getName() const { return _name; }
+  std::string getNumber() const { return _number; }
+  int sdp_complete_message(sdp_message_t * remote_sdp, osip_message_t * msg);
+
+private:
+  void	alloc			(void);
+  void	dealloc			(void);
+  void 	noSupportedCodec(void);	
+
+  int sdp_analyse_attribute (sdp_message_t * sdp, sdp_media_t * med);
+	
+  ///////////////////////////
+  // Private member variables
+  ///////////////////////////
+  CodecDescriptorMap& _codecMap;
+  AudioCodec* _audiocodec;
+	
+  CALLID 	_id;
+  int 	_cid;		// call id
+  int 	_did;		// dialog id
+  int 	_tid;		// transaction id
+  bool	_standby; 	// wait for a cid and did when outgoing call is made
+  
+  int  	_status_code;
+  
+  char*	_reason_phrase;
+  char*	_textinfo;
+  char*	_remote_uri;
+  
+  char*	_remote_sdp_audio_ip;
+  int		_local_audio_port;
+  int  	_remote_sdp_audio_port;
+  int 	_local_sendrecv;           /* _SENDRECV, _SENDONLY, _RECVONLY */
+  int 	_remote_sendrecv;          /* _SENDRECV, _SENDONLY, _RECVONLY */
+
+  std::string _localIp;
+  std::string _name;   // set by incoming call
+  std::string _number; // set by incoming call
+
+  bool _reinvite;
+};
+
+#endif // __SIP_CALL_H__
diff --git a/src/sipvoiplink.cpp b/src/sipvoiplink.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..ef066a15dc2715dd73ad1c6b2c4eab3b754025a9
--- /dev/null
+++ b/src/sipvoiplink.cpp
@@ -0,0 +1,1665 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
+ *
+ *  Portions Copyright (C) 2002,2003   Aymeric Moizard <jack@atosc.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+#include <eXosip2/eXosip.h>
+#include <osip2/osip.h>
+#include <osipparser2/osip_const.h>
+
+#include "sipvoiplink.h"
+#include "global.h"
+#include "audio/codecDescriptor.h"
+#include "manager.h"
+#include "sipcall.h"
+#include "user_cfg.h"
+#include "eventthread.h"
+
+#define DEFAULT_SIP_PORT	5060
+#define RANDOM_SIP_PORT		rand() % 64000 + 1024
+#define	DEFAULT_LOCAL_PORT	10500
+#define	RANDOM_LOCAL_PORT	((rand() % 27250) + 5250)*2
+
+#define EXOSIP_ERROR_NO   0
+#define EXOSIP_ERROR_STD -1
+#define EXOSIP_ERROR_BUILDING -2
+
+#define VOICE_MSG			"Voice-Message"
+#define LENGTH_VOICE_MSG	15
+
+SipVoIPLink::SipVoIPLink() : VoIPLink()
+{
+  // default _audioRTP object initialization
+  _evThread = new EventThread(this);
+  _localPort = 0;
+  _nMsgVoicemail = 0;
+  _reg_id = EXOSIP_ERROR_STD;
+
+  _registrationSend = false;
+  _started = false;
+}
+
+SipVoIPLink::~SipVoIPLink(void) {
+  endSipCalls();
+  delete _evThread; _evThread = NULL;
+  if (_started) {
+    eXosip_quit();
+  }
+}
+
+// for voIPLink interface
+void
+SipVoIPLink::terminate(void) 
+{
+}
+
+bool
+SipVoIPLink::checkNetwork (void)
+{
+  // Set IP address
+  return getSipLocalIp();
+}
+
+bool
+SipVoIPLink::init(void)
+{
+  if (0 != eXosip_init()) {
+    _debug("Could not initialize eXosip\n");
+    return false;
+  }
+  _started = true;
+
+  srand (time(NULL));
+  // second parameter, NULL is "::" for ipv6 and "0.0.0.0" for ipv4, we can put INADDR_ANY
+  int i;
+  i = eXosip_listen_addr(IPPROTO_UDP, INADDR_ANY, DEFAULT_SIP_PORT, AF_INET, 0);
+  if (i != 0) {
+    i = eXosip_listen_addr(IPPROTO_UDP, INADDR_ANY, RANDOM_SIP_PORT, AF_INET, 0);
+    if (i != 0) {
+      _debug("Could not initialize transport layer\n");
+      return false;
+    } else {
+      _debug("VoIP Link listen on random port %d\n", RANDOM_SIP_PORT);
+    }
+  } else {
+   _debug("VoIP Link listen on port %d\n", DEFAULT_SIP_PORT);
+  }
+  // Set user agent
+  std::string tmp = std::string(PROGNAME_GLOBAL) + "/" + std::string(SFLPHONED_VERSION);
+  eXosip_set_user_agent(tmp.data());
+
+  // If use STUN server, firewall address setup
+  if (Manager::instance().useStun()) {
+    if (behindNat() != 1) {
+      return false;
+    }
+    // This method is used to replace contact address with the public address of your NAT
+    eXosip_masquerade_contact((Manager::instance().getFirewallAddress()).data(), Manager::instance().getFirewallPort());
+  }
+
+  if ( !checkNetwork() ) {
+    return false;
+  }
+  _debug("SIP VoIP Link: listen to SIP Events\n");
+  _evThread->start();
+  return true;
+}
+
+/**
+ * Subscibe to message-summary notify
+ * It allows eXosip to not send ' 481 Subcription Does Not Exist ' response
+ */
+void
+SipVoIPLink::subscribeMessageSummary()
+{
+  osip_message_t *subscribe;
+  const char *route= NULL;
+
+  // from/to
+  ManagerImpl& manager = Manager::instance();
+  std::string from = fromHeader(manager.getConfigString(SIGNALISATION, USER_PART), manager.getConfigString(SIGNALISATION, HOST_PART));
+
+  // to
+  std::string to;
+  to = manager.getConfigString(SIGNALISATION, PROXY);
+  if (!to.empty()) {
+    to = toHeader(manager.getConfigString(SIGNALISATION, USER_PART)) + "@" + to;
+  } else {
+    to = from;
+  }
+  
+
+  // like in http://www.faqs.org/rfcs/rfc3842.html
+  const char *event="message-summary";
+  int expires = 86400;
+
+  // return 0 if no error
+  // the first from is the to... but we send the same
+  eXosip_lock();
+  int error = eXosip_subscribe_build_initial_request(&subscribe, to.c_str(), from.c_str(), route, event, expires);
+  eXosip_unlock();
+
+  if (error == 0) {
+    // Accept: application/simple-message-summary
+    osip_message_set_header (subscribe, "Accept", "application/simple-message-summary");
+
+    _debug("Sending Message-summary subscription");
+    // return 0 if ok
+    eXosip_lock();
+    error = eXosip_subscribe_send_initial_request (subscribe);
+    eXosip_unlock();
+    _debug(" and return %d\n", error);
+  }
+}
+
+int
+SipVoIPLink::setRegister (void) 
+{
+  ManagerImpl& manager = Manager::instance();
+
+  if (_reg_id != EXOSIP_ERROR_STD) {
+    manager.displayError("Registration already sent. Try to unregister");
+    return EXOSIP_ERROR_STD;
+  }
+
+  // all this will be inside the profil associate with the voip link
+  std::string proxy = "sip:" + manager.getConfigString(SIGNALISATION, PROXY);
+  std::string hostname = "sip:" + manager.getConfigString(SIGNALISATION, HOST_PART);
+  std::string from = fromHeader(manager.getConfigString(SIGNALISATION, USER_PART), manager.getConfigString(SIGNALISATION, HOST_PART));
+
+  if (manager.getConfigString(SIGNALISATION, HOST_PART).empty()) {
+    manager.displayConfigError("Fill host part field");
+    return EXOSIP_ERROR_STD;
+  }
+  if (manager.getConfigString(SIGNALISATION, USER_PART).empty()) {
+    manager.displayConfigError("Fill user part field");
+    return EXOSIP_ERROR_STD;
+  }
+
+  _debug("REGISTER From: %s\n", from.data());
+  osip_message_t *reg = NULL;
+  eXosip_lock();
+  if (!manager.getConfigString(SIGNALISATION, PROXY).empty()) {
+    _reg_id = eXosip_register_build_initial_register ((char*)from.data(), 
+						      (char*)proxy.data(), NULL, EXPIRES_VALUE, &reg);
+  } else {
+    _reg_id = eXosip_register_build_initial_register ((char*)from.data(), 
+						      (char*)hostname.data(), NULL, EXPIRES_VALUE, &reg);
+  }
+  eXosip_unlock();
+  if (_reg_id < EXOSIP_ERROR_NO ) {
+    return EXOSIP_ERROR_STD;
+  }
+
+  if (setAuthentication() != EXOSIP_ERROR_NO) {
+    _debug("No authentication\n");
+    return EXOSIP_ERROR_STD;
+  }
+
+  osip_message_set_header (reg, "Event", "Registration");
+  osip_message_set_header (reg, "Allow-Events", "presence");
+
+  eXosip_lock();
+  int i = eXosip_register_send_register (_reg_id, reg);
+  if (i == -2) {
+    _debug("Cannot build registration, check the setup\n"); 
+    eXosip_unlock();
+    return EXOSIP_ERROR_STD;
+  }
+  if (i == -1) {
+    _debug("Registration sending failed\n");
+    eXosip_unlock();
+    return EXOSIP_ERROR_STD;
+  }
+  eXosip_unlock();
+
+  // subscribe to message one time?
+  // subscribeMessageSummary();
+  _registrationSend = true;
+  return i;
+}
+
+/**
+ * setUnregister 
+ * unregister if we already send the first registration
+ * @return -1 if there is an error
+ */
+int 
+SipVoIPLink::setUnregister (void)
+{
+  if ( _registrationSend ) {
+    int i = 0;
+    osip_message_t *reg = NULL;
+
+    eXosip_lock();
+
+    if (_reg_id > 0) {
+      i = eXosip_register_build_register (_reg_id, 0, &reg);
+    }
+    eXosip_unlock();
+    if (i < 0) {
+      return EXOSIP_ERROR_STD;
+    }
+
+    eXosip_lock();
+    _debug("< Sending REGISTER (expire=0)\n");
+    i = eXosip_register_send_register (_reg_id, reg);
+    if (i == EXOSIP_ERROR_BUILDING) {
+      _debug("  Cannot build registration (unregister), check the setup\n"); 
+      eXosip_unlock();
+      return EXOSIP_ERROR_STD;
+    }
+    if (i == EXOSIP_ERROR_STD) {
+      _debug("  Registration (unregister) Failed\n");
+    }
+    eXosip_unlock();
+    _reg_id = EXOSIP_ERROR_STD;
+    return i;
+  } else {
+    // no registration send before
+    return EXOSIP_ERROR_STD;
+  }
+}
+
+/**
+ * Get the Sip FROM url (add sip:, add @host, etc...)
+ */ 
+std::string
+SipVoIPLink::getSipFrom() {
+
+  // Form the From header field basis on configuration panel
+  std::string user = Manager::instance().getConfigString(SIGNALISATION, USER_PART);
+  std::string host = Manager::instance().getConfigString(SIGNALISATION, HOST_PART);
+  if ( host.empty() ) {
+    host = getLocalIpAddress();
+  }
+  return fromHeader(user, host);
+}
+
+/**
+ * Get the Sip TO url (add sip:, add @host, etc...)
+ */
+std::string
+SipVoIPLink::getSipTo(const std::string& to_url) {
+  // Form the From header field basis on configuration panel
+  bool isRegistered = (_reg_id < EXOSIP_ERROR_NO) ? false : true;
+
+  // add a @host if we are registered and there is no one inside the url
+  if (to_url.find("@") == std::string::npos && isRegistered) {
+    std::string host = Manager::instance().getConfigString(SIGNALISATION, HOST_PART);
+    if(!host.empty()) {
+      return toHeader(to_url + "@" + host);
+    }
+  }
+  return toHeader(to_url);
+}
+
+/**
+ * Get the sip proxy (add sip: if there is one) 
+ * @return empty string or <sip:proxy;lr> url
+ */
+std::string
+SipVoIPLink::getSipRoute() {
+  std::string proxy = Manager::instance().getConfigString(SIGNALISATION, PROXY);
+  if ( !proxy.empty() ) {
+    proxy = "<sip:" + proxy + ";lr>";
+  }
+  return proxy; // return empty
+}
+
+int
+SipVoIPLink::outgoingInvite (CALLID id, const std::string& to_url) 
+{
+  bool has_ip = checkNetwork();
+  std::string from  = getSipFrom();
+  std::string to    = getSipTo(to_url);
+  std::string route = getSipRoute();
+
+  _debug("            From: %s\n", from.data());
+  _debug("            To: %s\n", to.data());
+  _debug("            Route: %s\n", route.data());
+
+  // If no SIP proxy setting for direct call with only IP address
+  if (has_ip) {
+    if (startCall(id, from, to, "", route) <= 0) {
+      _debug("Warning SipVoIPLink: call not started\n");
+      return EXOSIP_ERROR_STD;
+    }
+  } else {
+    Manager::instance().displayErrorText(id, "No network found\n");
+    return EXOSIP_ERROR_STD;
+  }
+  return 0;
+}
+
+/**
+ * @return 0 is good, -1 is bad
+ */
+int
+SipVoIPLink::answer(CALLID id) 
+{
+  int i;
+  int port;
+  char tmpbuf[64];
+  bzero (tmpbuf, 64);
+  // Get  port   
+  snprintf (tmpbuf, 63, "%d", getSipCall(id)->getLocalAudioPort());
+
+  _debug("%10d: Answer call [cid = %d, did = %d]\n", id, getSipCall(id)->getCid(), getSipCall(id)->getDid());
+  port = getSipCall(id)->getLocalAudioPort();
+  _debug("            Local audio port: %d\n", port);
+
+  osip_message_t *answerMessage = NULL;
+  SipCall* ca = getSipCall(id);
+
+  // Send 180 RINGING
+  _debug("< Send 180 Ringing\n");
+  eXosip_lock ();
+  eXosip_call_send_answer(ca->getTid(), RINGING, NULL);
+  eXosip_unlock ();
+
+  // Send 200 OK
+  eXosip_lock();
+  i = eXosip_call_build_answer(ca->getTid(), OK, &answerMessage);
+  if (i != 0) {
+   _debug("< Send 400 Bad Request\n");
+    eXosip_call_send_answer (ca->getTid(), BAD_REQ, NULL);
+  } else {
+    // use exosip, bug locked
+    i = 0;
+    sdp_message_t *remote_sdp = eXosip_get_remote_sdp(ca->getDid());
+    if (remote_sdp!=NULL) {
+      i = ca->sdp_complete_message(remote_sdp, answerMessage);
+      if (i!=0) {
+        osip_message_free(answerMessage);
+      }
+      sdp_message_free (remote_sdp);
+    }
+    if (i != 0) {
+      _debug("< Send 415 Unsupported Media Type\n");
+      eXosip_call_send_answer (ca->getTid(), UNSUP_MEDIA_TYPE, NULL);
+    } else {
+      _debug("< Send 200 OK\n");
+      eXosip_call_send_answer (ca->getTid(), OK, answerMessage);
+    }
+  }
+  eXosip_unlock();
+
+  // Incoming call is answered, start the sound channel.
+  _debug("          Starting AudioRTP\n");
+  if (_audiortp.createNewSession (getSipCall(id)) < 0) {
+    _debug("FATAL: Unable to start sound (%s:%d)\n", __FILE__, __LINE__);
+    i = EXOSIP_ERROR_STD;
+  }
+  return i;
+}
+
+
+/**
+ * @return > 0 is good, -1 is bad
+ */
+int
+SipVoIPLink::hangup (CALLID id) 
+{
+  int i = 0;
+  SipCall* sipcall = getSipCall(id);
+  if (sipcall == NULL) { return EXOSIP_ERROR_STD; }
+  _debug("%10d: Hang up call [cid = %d, did = %d]\n", 
+    id, sipcall->getCid(), sipcall->getDid());	
+  // Release SIP stack.
+  eXosip_lock();
+  i = eXosip_call_terminate (sipcall->getCid(), sipcall->getDid());
+  eXosip_unlock();
+
+  // Release RTP channels
+  if (id == Manager::instance().getCurrentCallId()) {
+    _audiortp.closeRtpSession();
+  }
+
+  deleteSipCall(id);
+  return i;
+}
+
+int
+SipVoIPLink::cancel (CALLID id) 
+{
+  int i = 0;
+  SipCall* sipcall = getSipCall(id);
+  _debug("%10d: Cancel call [cid = %d]\n", id, sipcall->getCid());
+  // Release SIP stack.
+  eXosip_lock();
+  i = eXosip_call_terminate (sipcall->getCid(), -1);
+  eXosip_unlock();
+
+  deleteSipCall(id);
+  return i;
+}
+
+/*
+ * @return -1 = sipcall not present
+ */
+int
+SipVoIPLink::onhold (CALLID id) 
+{
+  osip_message_t *invite;
+  int i;
+  int did;
+
+  sdp_message_t *local_sdp = NULL;
+
+  SipCall *sipcall = getSipCall(id);
+  if ( sipcall == NULL ) { return EXOSIP_ERROR_STD; }
+
+  did = sipcall->getDid();
+
+  eXosip_lock ();
+  local_sdp = eXosip_get_local_sdp (did);
+  eXosip_unlock ();
+
+  if (local_sdp == NULL) {
+    return EXOSIP_ERROR_STD;
+  }
+
+  // Build INVITE_METHOD for put call on-hold
+  eXosip_lock ();
+  i = eXosip_call_build_request (did, INVITE_METHOD, &invite);
+  eXosip_unlock ();
+
+  if (i != 0) {
+    sdp_message_free(local_sdp);
+    return EXOSIP_ERROR_STD;
+  }
+
+  /* add sdp body */
+  {
+    char *tmp = NULL;
+
+    i = sdp_hold_call (local_sdp);
+    if (i != 0) {
+      sdp_message_free (local_sdp);
+      osip_message_free (invite);
+      return EXOSIP_ERROR_STD;
+    }
+    
+    i = sdp_message_to_str (local_sdp, &tmp);
+    sdp_message_free (local_sdp);
+    if (i != 0) {
+      osip_message_free (invite);
+      osip_free (tmp);
+      return EXOSIP_ERROR_STD;
+    }
+    osip_message_set_body (invite, tmp, strlen (tmp));
+    osip_free (tmp);
+    osip_message_set_content_type (invite, "application/sdp");
+  }
+  
+  // Send request
+  _audiortp.closeRtpSession();
+
+  eXosip_lock ();
+  i = eXosip_call_send_request (did, invite);
+  eXosip_unlock ();
+  
+  // Disable audio
+  return i;
+}
+
+/**
+ * @return 0 is good, -1 is bad
+ */
+int
+SipVoIPLink::offhold (CALLID id) 
+{
+  osip_message_t *invite;
+  int i;
+  int did;
+
+  sdp_message_t *local_sdp = NULL;
+
+  did = getSipCall(id)->getDid();
+  eXosip_lock ();
+  local_sdp = eXosip_get_local_sdp (did);
+  eXosip_unlock ();
+  if (local_sdp == NULL) {
+    return EXOSIP_ERROR_STD;
+  }
+
+  // Build INVITE_METHOD for put call off-hold
+  eXosip_lock ();
+  i = eXosip_call_build_request (did, INVITE_METHOD, &invite);
+  eXosip_unlock ();
+
+  if (i != 0) {
+    sdp_message_free(local_sdp);
+    return EXOSIP_ERROR_STD;
+  }
+
+  /* add sdp body */
+  {
+    char *tmp = NULL;
+    
+    i = sdp_off_hold_call (local_sdp);
+    if (i != 0) {
+      sdp_message_free (local_sdp);
+      osip_message_free (invite);
+      return EXOSIP_ERROR_STD;
+    }
+    
+    i = sdp_message_to_str (local_sdp, &tmp);
+    sdp_message_free (local_sdp);
+    if (i != 0) {
+      osip_message_free (invite);
+      osip_free (tmp);
+      return EXOSIP_ERROR_STD;
+    }
+    osip_message_set_body (invite, tmp, strlen (tmp));
+    osip_free (tmp);
+    osip_message_set_content_type (invite, "application/sdp");
+  }
+
+  // Send request
+  _debug("< Send off hold request\n");
+  eXosip_lock ();
+  i = eXosip_call_send_request (did, invite);
+  eXosip_unlock ();
+
+  // Enable audio
+  _debug("          Starting AudioRTP\n");
+  if (_audiortp.createNewSession (getSipCall(id)) < 0) {
+    _debug("FATAL: Unable to start sound (%s:%d)\n", __FILE__, __LINE__);
+    i = EXOSIP_ERROR_STD;
+  }
+  return i;
+}
+
+int
+SipVoIPLink::transfer (CALLID id, const std::string& to)
+{
+  osip_message_t *refer;
+  int i;
+  std::string tmp_to;
+  tmp_to = toHeader(to);
+  if (tmp_to.find("@") == std::string::npos) {
+    tmp_to = tmp_to + "@" + Manager::instance().getConfigString(SIGNALISATION,
+HOST_PART);
+  }
+
+  eXosip_lock();
+  // Build transfer request
+  i = eXosip_call_build_refer (getSipCall(id)->getDid(), (char*)tmp_to.data(),
+			       &refer);
+  if (i == 0) {
+    // Send transfer request
+    i = eXosip_call_send_request (getSipCall(id)->getDid(), refer);
+  }
+  eXosip_unlock();
+  return i;
+}
+
+int
+SipVoIPLink::refuse (CALLID id)
+{
+  int i;
+  char tmpbuf[64];
+  bzero (tmpbuf, 64);
+  // Get local port   
+  snprintf (tmpbuf, 63, "%d", getSipCall(id)->getLocalAudioPort());
+	
+  osip_message_t *answerMessage = NULL;
+  eXosip_lock();
+  // not BUSY.. where decline the invitation!
+  i = eXosip_call_build_answer (getSipCall(id)->getTid(), SIP_DECLINE, &answerMessage);
+  if (i == 0) {
+    i = eXosip_call_send_answer (getSipCall(id)->getTid(), SIP_DECLINE, answerMessage);
+  }
+  eXosip_unlock();
+  return i;
+}
+
+int
+SipVoIPLink::getEvent (void)
+{
+  // wait for 0 s, 50 ms
+  eXosip_event_t* event = eXosip_event_wait (0, 50);
+  eXosip_lock();
+  eXosip_automatic_action();
+  eXosip_unlock();
+
+  if (event == NULL) {
+    return EXOSIP_ERROR_STD;
+  }
+
+  SipCall* sipcall = NULL;
+  CALLID id = 0;
+  int returnValue = EXOSIP_ERROR_NO;
+
+  _debug("#############################################\n"
+         "            SipEvent #%03d %s\n"
+         "            #############################################\n",
+          event->type, event->textinfo);
+
+  switch (event->type) {
+    // IP-Phone user receives a new call
+  case EXOSIP_CALL_INVITE: //
+    _debug("> INVITE (receive)\n");
+    checkNetwork();
+
+    // Set local random port for incoming call
+    if (!Manager::instance().useStun()) {
+      setLocalPort(RANDOM_LOCAL_PORT);
+    } else {
+      // If there is a firewall
+      if (behindNat() != 0) {
+        setLocalPort(Manager::instance().getFirewallPort());
+      } else {
+        returnValue = EXOSIP_ERROR_STD;
+        break;
+      }
+    }
+
+    // Generate id
+    id = Manager::instance().generateNewCallId();
+    Manager::instance().pushBackNewCall(id, Incoming);
+    _debug("%10d: [cid = %d, did = %d]\n", id, event->cid, event->did);
+
+    // Associate an audio port with a call
+    sipcall = getSipCall(id);
+    sipcall->setLocalAudioPort(_localPort);
+    sipcall->setLocalIp(getLocalIpAddress());
+    _debug("            Local listening port: %d\n", _localPort);
+    _debug("            Local listening IP: %s\n", getLocalIpAddress().c_str());
+
+    if (sipcall->newIncomingCall(event) == 0 ) {
+      if (Manager::instance().incomingCall(id, sipcall->getName(), sipcall->getNumber()) == EXOSIP_ERROR_STD) {
+        Manager::instance().displayError("Incoming Call Failed");
+        deleteSipCall(id);
+      }
+    } else {
+      Manager::instance().peerHungupCall(id);
+      deleteSipCall(id);
+      Manager::instance().displayError("Incoming Call Failed");
+    }
+    break;
+
+  case EXOSIP_CALL_REINVITE:
+    _debug("> INVITE (reinvite)\n");
+    //eXosip_call_send_answer(event->tid, 403, NULL);
+    //488 as http://www.atosc.org/pipermail/public/osip/2005-June/005385.html
+
+    id = findCallId(event);
+    if (id != 0) {
+      sipcall = getSipCall(id);
+      if (sipcall != 0) {
+        _debug("%10d: Receive Reinvite [cid = %d, did = %d], localport=%d\n", id, event->cid, event->did,sipcall->getLocalAudioPort());
+
+        if ( id == Manager::instance().getCurrentCallId() ) {
+          Manager::instance().stopTone();
+          _audiortp.closeRtpSession();
+        }
+        sipcall->newReinviteCall(event);
+        // we should receive an ack after that...
+      }
+    } else {
+      _debug("< Send 488 Not Acceptable Here");
+      eXosip_lock();
+      eXosip_call_send_answer(event->tid, 488, NULL);
+      eXosip_unlock();
+    }
+    break;
+
+  case EXOSIP_CALL_PROCEEDING: // 8
+    // proceeding call...
+    break;
+
+  case EXOSIP_CALL_RINGING: // 9 peer call is ringing
+    id = findCallIdInitial(event);
+    _debug("%10d: Receive Call Ringing [cid = %d, did = %d]\n", id, event->cid, event->did);
+    if (id != 0) {
+      getSipCall(id)->ringingCall(event);
+      Manager::instance().peerRingingCall(id);
+    } else {
+      returnValue = -1;
+    }
+    break;
+
+  // The peer-user answers
+  case EXOSIP_CALL_ANSWERED: // 10
+  {
+    id = findCallIdInitial(event);
+    if ( id != 0) {
+      sipcall = getSipCall(id);
+      if ( sipcall != 0 ) {
+        _debug("%10d: Receive Call Answer [cid = %d, did = %d], localport=%d\n", id, event->cid, event->did, sipcall->getLocalAudioPort());
+
+        // Answer
+        if (Manager::instance().callCanBeAnswered(id)) {
+          sipcall->setStandBy(false);
+          if (sipcall->answeredCall(event) != -1) {
+            sipcall->answeredCall_without_hold(event);
+            Manager::instance().peerAnsweredCall(id);
+  
+            if(!Manager::instance().callIsOnHold(id) && Manager::instance().getCurrentCallId()==id) {
+              // Outgoing call is answered, start the sound channel.
+              _debug("            Starting AudioRTP\n");
+              if (_audiortp.createNewSession(sipcall) < 0) {
+                _debug("            FATAL: Unable to start sound (%s:%d)\n", 
+                __FILE__, __LINE__);
+                returnValue = -1;
+              }
+            }
+          }
+        } else {
+          // Answer to on/off hold to send ACK
+          _debug("            Answering call\n");
+          sipcall->answeredCall(event);
+        }
+      }
+    } else {
+      returnValue = -1;
+    }
+  }
+   break;
+  case EXOSIP_CALL_REDIRECTED: // 11
+    break;
+
+  case EXOSIP_CALL_ACK: // 15
+    id = findCallId(event); 
+    _debug("%10d: Receive ACK [cid = %d, did = %d]\n", id, event->cid, event->did);
+    if (id != 0 ) {
+      sipcall = getSipCall(id);
+      if(sipcall != 0 ) { 
+        sipcall->receivedAck(event);
+        if (sipcall->isReinvite()) {
+          sipcall->endReinvite();
+          if(!Manager::instance().callIsOnHold(id) && Manager::instance().getCurrentCallId()==id) {
+            _debug("            Starting AudioRTP\n");
+            _audiortp.createNewSession(sipcall);
+          } else {
+            _debug("            Didn't start RTP because it's on hold or it's not the current call id\n");
+          }
+        }
+      }
+    } else {
+      returnValue = -1;
+    }
+    break;
+
+    // The peer-user closed the phone call(we received BYE).
+  case EXOSIP_CALL_CLOSED: // 25
+    id = findCallId(event);
+    if (id==0) { id = findCallIdInitial(event); }
+    _debug("%10d: Receive BYE [cid = %d, did = %d]\n", id, event->cid, event->did);	
+    if (id != 0) {
+      if (Manager::instance().callCanBeClosed(id)) {
+         sipcall = getSipCall(id);
+         _audiortp.closeRtpSession();
+      }
+      Manager::instance().peerHungupCall(id);
+      deleteSipCall(id);
+    } else {
+      returnValue = -1;
+    }	
+    break;
+  case EXOSIP_CALL_RELEASED:
+    if (event) {
+      _debug("SIP call released: [cid = %d, did = %d]\n", event->cid, event->did);
+      id = findCallId(event);
+      if (id!=0) {
+        // not supposed to be execute on a current call...
+        Manager::instance().callFailure(id);
+        deleteSipCall(id);
+      }
+
+    }
+    break;
+  case EXOSIP_CALL_REQUESTFAILURE: //12
+
+    _debug("Request Failure, receive code %d\n", event->response->status_code);
+    // Handle 4XX errors
+    switch (event->response->status_code) {
+    case AUTH_REQUIRED: 
+      _debug("SIP Server ask required authentification: logging...\n");
+      setAuthentication();
+      eXosip_lock();
+      eXosip_automatic_action();
+      eXosip_unlock();
+      break;
+    case UNAUTHORIZED:
+      _debug("Request is unauthorized. SIP Server ask authentification: logging...\n");
+      setAuthentication();
+      break;
+
+    case BAD_REQ:
+    case FORBIDDEN:
+    case NOT_FOUND:
+    case NOT_ALLOWED:
+    case NOT_ACCEPTABLE:
+    case REQ_TIMEOUT:
+    case TEMP_UNAVAILABLE:
+    case ADDR_INCOMPLETE:
+    case NOT_ACCEPTABLE_HERE: // 488
+      // Display error on the screen phone
+      //Manager::instance().displayError(event->response->reason_phrase);
+      id = findCallId(event);
+      Manager::instance().displayErrorText(id, event->response->reason_phrase);
+      Manager::instance().callFailure(id);
+      deleteSipCall(id);
+    break;
+    case BUSY_HERE:
+      id = findCallId(event);
+      Manager::instance().displayErrorText(id, event->response->reason_phrase);
+      Manager::instance().callBusy(id);
+      deleteSipCall(id);
+      break;
+    case REQ_TERMINATED:
+      break;
+    default:
+      // sipphone.com send 478 Unresolveable destination (478/TM)
+      id = findCallId(event);
+      Manager::instance().displayErrorText(id, event->response->reason_phrase);
+      Manager::instance().callFailure(id);
+      deleteSipCall(id);
+      break;
+    }
+
+    break; 
+
+  case EXOSIP_CALL_SERVERFAILURE:
+    // Handle 5XX errors
+    switch (event->response->status_code) {
+    case SERVICE_UNAVAILABLE:
+      id = findCallId(event);
+      Manager::instance().callFailure(id);
+      break;
+    default:
+      break;
+    }
+    break;
+
+  case EXOSIP_CALL_GLOBALFAILURE:
+    // Handle 6XX errors
+    switch (event->response->status_code) {
+    case BUSY_EVERYWHERE:
+    case DECLINE:
+      id = findCallId(event);
+      Manager::instance().callFailure(id);
+      break;
+    default:
+      break;
+    }
+    break;
+
+  case EXOSIP_CALL_MESSAGE_NEW: // 18
+    if (0 == event->request) break;
+    if (MSG_IS_INFO(event->request)) {
+      _debug("Receive a call message request info\n");
+      osip_content_type_t* c_t = event->request->content_type;
+      if (c_t != 0 && c_t->type != 0 && c_t->subtype != 0 ) {
+        _debug("  Content Type of the message: %s/%s\n", c_t->type, c_t->subtype);
+        // application/dtmf-relay
+        if (strcmp(c_t->type, "application") == 0 && strcmp(c_t->subtype, "dtmf-relay") == 0) {
+          handleDtmfRelay(event);
+        }
+      }
+    }
+
+    osip_message_t *answerOKNewMessage;
+    eXosip_lock();
+    if ( 0 == eXosip_call_build_answer(event->tid, OK, &answerOKNewMessage)) {
+      _debug("< Sending 200 OK\n");
+      eXosip_call_send_answer(event->tid, OK, answerOKNewMessage);
+    } else {
+      _debug("Could not sent an OK message\n");
+    }
+    eXosip_unlock();
+    break;
+ 
+  case EXOSIP_REGISTRATION_SUCCESS: // 1
+    // Manager::instance().displayStatus(LOGGED_IN_STATUS);
+    Manager::instance().registrationSucceed();
+    break;
+
+  case EXOSIP_REGISTRATION_FAILURE: // 2
+    //Manager::instance().displayError("getEvent : Registration Failure");
+    Manager::instance().registrationFailed();
+    break;
+
+  case EXOSIP_MESSAGE_NEW: //27
+
+    if ( event->request == NULL) {
+      break; // do nothing
+    }
+    unsigned int k;
+				
+    if (MSG_IS_OPTIONS(event->request)) {
+      for (k = 0; k < _sipcallVector.size(); k++) {
+        if (_sipcallVector.at(k)->getCid() == event->cid) { 
+          break;
+        }
+      }
+
+      // TODO: Que faire si rien trouve??
+      eXosip_lock();
+      if (k == _sipcallVector.size()) {
+        /* answer 200 ok */
+        eXosip_options_send_answer (event->tid, OK, NULL);
+
+      } else if (_sipcallVector.at(k)->getCid() == event->cid) {
+        /* already answered! */
+      } else {
+        /* answer 486 ok */
+      	eXosip_options_send_answer (event->tid, BUSY_HERE, NULL);
+      }
+      eXosip_unlock();
+    } 
+
+    // Voice message 
+    else if (MSG_IS_NOTIFY(event->request)){
+      _debug("> NOTIFY Voice message\n");
+      int ii;
+      unsigned int pos;
+      unsigned int pos_slash;
+
+      osip_body_t *body = NULL;
+      // Get the message body
+      ii = osip_message_get_body(event->request, 0, &body);
+      if (ii != 0) {
+        _debug("  Cannot get body in a new EXOSIP_MESSAGE_NEW event\n");
+        returnValue = EXOSIP_ERROR_STD;
+        break;
+      }
+
+      // Analyse message body
+      if (!body || !body->body) {
+        returnValue = EXOSIP_ERROR_STD;
+        break;
+      }
+      std::string str(body->body);
+      pos = str.find(VOICE_MSG);
+
+      if (pos == std::string::npos) {
+	     // If the string is not found
+        returnValue = EXOSIP_ERROR_STD;
+        break;
+      } 
+
+      pos_slash = str.find ("/");
+      std::string nb_msg = str.substr(pos + LENGTH_VOICE_MSG, 
+      pos_slash - (pos + LENGTH_VOICE_MSG));
+
+      // Set the number of voice-message
+      setMsgVoicemail(atoi(nb_msg.data()));
+
+      if (getMsgVoicemail() != 0) {
+        // If there is at least one voice-message, start notification
+        Manager::instance().startVoiceMessageNotification(nb_msg);
+      } else {
+        // Stop notification when there is 0 voice message
+        Manager::instance().stopVoiceMessageNotification();
+      }
+    // http://www.jdrosen.net/papers/draft-ietf-simple-im-session-00.txt
+    } else if (MSG_IS_MESSAGE(event->request)) {
+      _debug("> MESSAGE received\n");
+      // osip_content_type_t* osip_message::content_type
+      osip_content_type_t* c_t = event->request->content_type;
+      if (c_t != 0 &&  c_t->type != 0 && c_t->subtype != 0 ) {
+        _debug("  Content Type of the message: %s/%s\n", c_t->type, c_t->subtype);
+
+        osip_body_t *body = NULL;
+        // Get the message body
+        if (0 == osip_message_get_body(event->request, 0, &body)) {
+          _debug("  Body length: %d\n", body->length);
+          if (body->body!=0 && 
+              strcmp(c_t->type,"text") == 0 && 
+              strcmp(c_t->subtype,"plain") == 0
+            ) {
+            _debug("  Text body: %s\n", body->body);
+            Manager::instance().incomingMessage(body->body);
+          }
+        }
+      }
+      osip_message_t *answerOK;
+      eXosip_lock();
+      if ( 0 == eXosip_message_build_answer(event->tid, OK, &answerOK)) {
+          _debug("< Sending 200 OK\n");
+          eXosip_message_send_answer(event->tid, OK, answerOK);
+      }
+      eXosip_unlock();
+    }
+    break;
+
+  case EXOSIP_MESSAGE_REQUESTFAILURE: // 31
+    // 405 Method Not Allowed
+    if (event->response != 0 && event->response->status_code == SIP_METHOD_NOT_ALLOWED) {
+//      setAllows(event);
+//      AllowList::iterator iter = _allowList.find(std::string("MESSAGE"));
+//      if (iter==_allowList.end()) {
+        Manager::instance().incomingMessage("Message are not allowed");
+//      }
+    }
+    break;
+
+  case EXOSIP_SUBSCRIPTION_ANSWERED: // 38
+    eXosip_lock();
+    eXosip_automatic_action();
+    eXosip_unlock();
+    break;
+
+  case EXOSIP_SUBSCRIPTION_REQUESTFAILURE: //40
+    break;
+
+  default:
+    returnValue = EXOSIP_ERROR_STD;
+    break;
+  }
+  eXosip_event_free(event);
+
+  return returnValue;
+}
+
+int
+SipVoIPLink::getLocalPort (void) 
+{
+  return _localPort;
+}
+
+void
+SipVoIPLink::setLocalPort (int port) 
+{
+  _localPort = port;
+}
+
+void
+SipVoIPLink::carryingDTMFdigits (CALLID id, char code) {
+  SipCall* sipcall = getSipCall(id);
+  if (sipcall == 0) { return; }
+
+  int duration = Manager::instance().getConfigInt(SIGNALISATION, PULSE_LENGTH);
+  osip_message_t *info;
+  const int body_len = 1000;
+  int i;
+
+  char *dtmf_body = new char[body_len];
+
+  eXosip_lock();
+  // Build info request
+  i = eXosip_call_build_info (getSipCall(id)->getDid(), &info);
+  if (i == 0) {
+    snprintf(dtmf_body, body_len - 1, "Signal=%c\r\nDuration=%d\r\n",
+	     code, duration);
+    osip_message_set_content_type (info, "application/dtmf-relay");
+    osip_message_set_body (info, dtmf_body, strlen (dtmf_body));
+    // Send info request
+    i = eXosip_call_send_request(sipcall->getDid(), info);
+  }
+  eXosip_unlock();
+	
+  delete[] dtmf_body; dtmf_body = NULL;
+}
+ 
+void
+SipVoIPLink::newOutgoingCall (CALLID id)
+{
+  SipCall* sipcall = new SipCall(id, Manager::instance().getCodecDescriptorMap());
+  if (sipcall != NULL) {
+    _sipcallVector.push_back(sipcall);
+    sipcall->setStandBy(true);
+  }
+}
+
+void
+SipVoIPLink::newIncomingCall (CALLID id)
+{
+  SipCall* sipcall = new SipCall(id, Manager::instance().getCodecDescriptorMap());
+  if (sipcall != NULL) {
+    _sipcallVector.push_back(sipcall);
+  }
+}
+
+void
+SipVoIPLink::deleteSipCall (CALLID id)
+{
+  std::vector< SipCall* >::iterator iter = _sipcallVector.begin();
+
+  while(iter != _sipcallVector.end()) {
+    if (*iter && (*iter)->getId() == id) {
+      delete *iter; *iter = NULL;
+      _sipcallVector.erase(iter);
+      return;
+    }
+    iter++;
+  }
+}
+
+void
+SipVoIPLink::endSipCalls()
+{
+  std::vector< SipCall* >::iterator iter = _sipcallVector.begin();
+  while(iter != _sipcallVector.end()) {
+    if ( *iter ) {
+
+      // Release SIP stack.
+      eXosip_lock();
+      eXosip_call_terminate ((*iter)->getCid(), (*iter)->getDid());
+      eXosip_unlock();
+
+      // Release RTP channels
+      _audiortp.closeRtpSession();
+      delete *iter; *iter = NULL;
+    }
+    iter++;
+  }
+  _sipcallVector.clear();
+}
+
+SipCall*
+SipVoIPLink::getSipCall (CALLID id)
+{
+  SipCall* sipcall = NULL;
+  for (unsigned int i = 0; i < _sipcallVector.size(); i++) {
+    sipcall = _sipcallVector.at(i);
+    if (sipcall && sipcall->getId() == id) {
+      return sipcall;
+    } 
+  }
+  return NULL;
+}
+
+AudioCodec*
+SipVoIPLink::getAudioCodec (CALLID id)
+{
+  SipCall* sipcall = getSipCall(id);
+  if (sipcall != NULL) {
+    return sipcall->getAudioCodec();
+  } else {
+    return NULL;
+  }
+}
+///////////////////////////////////////////////////////////////////////////////
+// Private functions
+///////////////////////////////////////////////////////////////////////////////
+int
+SipVoIPLink::sdp_hold_call (sdp_message_t * sdp)
+{
+  int pos;
+  int pos_media = -1;
+  char *rcvsnd;
+  int recv_send = -1;
+
+  pos = 0;
+  rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+  while (rcvsnd != NULL) {
+    if (rcvsnd != NULL && 0 == strcmp (rcvsnd, "sendonly")) {
+      recv_send = 0;
+    } else if (rcvsnd != NULL && (0 == strcmp (rcvsnd, "recvonly")
+				  || 0 == strcmp (rcvsnd, "sendrecv"))) {
+      recv_send = 0;
+      sprintf (rcvsnd, "sendonly");
+    }
+    pos++;
+    rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+  }
+
+  pos_media = 0;
+  while (!sdp_message_endof_media (sdp, pos_media)) {
+    pos = 0;
+    rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+    while (rcvsnd != NULL) {
+      if (rcvsnd != NULL && 0 == strcmp (rcvsnd, "sendonly")) {
+	recv_send = 0;
+      } else if (rcvsnd != NULL && (0 == strcmp (rcvsnd, "recvonly")
+				    || 0 == strcmp (rcvsnd, "sendrecv"))) {
+	recv_send = 0;
+	sprintf (rcvsnd, "sendonly");
+      }
+      pos++;
+      rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+    }
+    pos_media++;
+  }
+
+  if (recv_send == -1) {
+    /* we need to add a global attribute with a field set to "sendonly" */
+    sdp_message_a_attribute_add (sdp, -1, osip_strdup ("sendonly"), NULL);
+  }
+
+  return 0;
+}
+
+int
+SipVoIPLink::sdp_off_hold_call (sdp_message_t * sdp)
+{
+  int pos;
+  int pos_media = -1;
+  char *rcvsnd;
+
+  pos = 0;
+  rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+  while (rcvsnd != NULL) {
+    if (rcvsnd != NULL && (0 == strcmp (rcvsnd, "sendonly")
+			   || 0 == strcmp (rcvsnd, "recvonly"))) {
+      sprintf (rcvsnd, "sendrecv");
+    }
+    pos++;
+    rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+  }
+
+  pos_media = 0;
+  while (!sdp_message_endof_media (sdp, pos_media)) {
+    pos = 0;
+    rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+    while (rcvsnd != NULL) {
+      if (rcvsnd != NULL && (0 == strcmp (rcvsnd, "sendonly")
+			     || 0 == strcmp (rcvsnd, "recvonly"))) {
+	sprintf (rcvsnd, "sendrecv");
+      }
+      pos++;
+      rcvsnd = sdp_message_a_att_field_get (sdp, pos_media, pos);
+    }
+    pos_media++;
+  }
+
+  return 0;
+}
+
+int
+SipVoIPLink::behindNat (void)
+{
+  StunAddress4 stunSvrAddr;
+  stunSvrAddr.addr = 0;
+	
+  // Stun server
+  std::string svr = Manager::instance().getConfigString(SIGNALISATION, STUN_SERVER);
+	
+  // Convert char* to StunAddress4 structure
+  bool ret = stunParseServerName ((char*)svr.data(), stunSvrAddr);
+  if (!ret) {
+    _debug("SIP: Stun server address (%s) is not valid\n", svr.data());
+    return 0;
+  }
+	
+  // Firewall address
+  //_debug("STUN server: %s\n", svr.data());
+  Manager::instance().getStunInfo(stunSvrAddr);
+
+  return 1;
+}
+
+/**
+ * Get the local Ip by eXosip 
+ * only if the local ip address is to his default value: 127.0.0.1
+ * setLocalIpAdress
+ * @return false if not found
+ */
+bool
+SipVoIPLink::getSipLocalIp (void) 
+{
+  bool returnValue = true;
+  if (getLocalIpAddress() == "127.0.0.1") {
+    char* myIPAddress = new char[65];
+    if (eXosip_guess_localip(AF_INET, myIPAddress, 64) == -1) {
+      returnValue = false;
+    } else {
+      setLocalIpAddress(std::string(myIPAddress));
+      _debug("Checking network, setting local ip address to: %s\n", myIPAddress);
+    }
+    delete [] myIPAddress; myIPAddress = NULL;
+  }
+  return returnValue;
+}
+
+int
+SipVoIPLink::checkUrl (const std::string& url)
+{
+  int i;
+	
+  osip_from_t *to;
+  i = osip_from_init(&to);
+  if (i != 0) {
+    _debug("Warning: Cannot initialize\n");
+    return EXOSIP_ERROR_STD;
+  }
+  i = osip_from_parse(to, url.data());
+  if (i != 0) {
+    _debug("Warning: Cannot parse url\n");
+    return EXOSIP_ERROR_STD;
+  }
+
+  // Free memory
+  osip_from_free (to);
+  return 0;
+}
+
+int
+SipVoIPLink::setAuthentication (void) 
+{
+  ManagerImpl& manager = Manager::instance();
+  std::string login = manager.getConfigString(SIGNALISATION, AUTH_USER_NAME);
+  if (login.empty()) {
+    login = manager.getConfigString(SIGNALISATION, USER_PART);
+  }
+  std::string pass = manager.getConfigString(SIGNALISATION, PASSWORD);
+  if (pass.empty()) {
+    manager.displayConfigError("Fill password field");
+    return EXOSIP_ERROR_STD;
+  }
+  eXosip_lock();
+
+  int returnValue = eXosip_add_authentication_info(login.data(), login.data(), pass.data(), NULL, NULL);
+  eXosip_unlock();
+
+  return returnValue;
+}
+
+std::string
+SipVoIPLink::fromHeader (const std::string& user, const std::string& host) 
+{
+  std::string displayname = Manager::instance().getConfigString(SIGNALISATION,
+FULL_NAME);
+  return ("\"" + displayname + "\"" + " <sip:" + user + "@" + host + ">");
+}
+
+
+std::string
+SipVoIPLink::toHeader(const std::string& to) 
+{
+  if (to.find("sip:") == std::string::npos) {
+    return ("sip:" + to );
+  } else {
+    return to;
+  }
+}
+
+int
+SipVoIPLink::startCall(CALLID id, const std::string& from, const std::string& to, const std::string& subject, const std::string& route) 
+{
+  SipCall* sipcall = getSipCall(id);
+  if ( sipcall == NULL) {
+    return -1; // error, we can't find the sipcall
+  }
+  osip_message_t *invite;
+
+  if (checkUrl(from) != 0) {
+    Manager::instance().displayConfigError("Error in source address");
+    return -1;
+  }
+  if (checkUrl(to) != 0) {
+    Manager::instance().displayErrorText(id, "Error in destination address");
+    return -1;
+  }
+	
+  if (!Manager::instance().useStun()) {
+    // Set random port for outgoing call if no firewall
+    setLocalPort(RANDOM_LOCAL_PORT);
+    _debug("            Setting local port to random: %d\n",_localPort);
+  } else {
+    // If use Stun server
+    if (behindNat() != 0) {
+      setLocalPort(Manager::instance().getFirewallPort());
+      _debug("            Setting local port to firewall port: %d\n", _localPort);	
+    } else {
+      return -1;
+    }
+  }
+	
+  // Set local audio port for sipcall(id)
+  sipcall->setLocalAudioPort(_localPort);
+  sipcall->setLocalIp(getLocalIpAddress());
+
+  eXosip_lock();
+  int i = eXosip_call_build_initial_invite (&invite, (char*)to.data(),
+                                        (char*)from.data(),
+                                        (char*)route.data(),
+                                        (char*)subject.data());
+  
+  if (i != 0) {
+    eXosip_unlock();
+    return EXOSIP_ERROR_STD; // error when building the invite
+  }
+
+  std::ostringstream media_audio;
+  std::ostringstream rtpmap_attr;
+  int payload;
+  int nbChannel;
+
+  // Set rtpmap according to the supported codec order
+  CodecMap map = Manager::instance().getCodecDescriptorMap().getMap();
+  CodecMap::iterator iter = map.begin();
+
+  while(iter != map.end()) {
+    if (iter->second!=0 && iter->second->isActive()) {
+      payload = iter->first;
+      // add each payload in the list of payload
+      media_audio << payload << " ";
+
+      rtpmap_attr << "a=rtpmap: " << payload << " " << 
+      iter->second->getCodecName().data() << "/" << iter->second->getClockRate();
+
+      nbChannel = iter->second->getChannel();
+      if (nbChannel!=1) {
+        rtpmap_attr << "/" << nbChannel;
+      }
+      rtpmap_attr << "\r\n";
+    }
+    // go to next codec
+    iter++;
+  }
+
+  // http://www.antisip.com/documentation/eXosip2/group__howto1__initialize.html
+  // tell sip if we support SIP extension like 100rel
+  // osip_message_set_supported (invite, "100rel");
+
+  /* add sdp body */
+  {
+    char tmp[4096];
+    snprintf (tmp, 4096,
+              "v=0\r\n"
+              "o=SFLphone 0 0 IN IP4 %s\r\n"
+              "s=call\r\n"
+              "c=IN IP4 %s\r\n"
+              "t=0 0\r\n"
+              "m=audio %d RTP/AVP %s\r\n"
+	            "%s",
+              getLocalIpAddress().c_str(), getLocalIpAddress().c_str(), getLocalPort(), media_audio.str().c_str(), rtpmap_attr.str().c_str());
+    // media_audio should be one, two or three numbers?
+    osip_message_set_body (invite, tmp, strlen (tmp));
+    osip_message_set_content_type (invite, "application/sdp");
+    _debug("SDP send: %s", tmp);
+  }
+  
+  // this is the cid (call id from exosip)
+  _debug("%10d: Receive INVITE\n", id);
+  int cid = eXosip_call_send_initial_invite (invite);
+  _debug("            Local IP:port: %s:%d\n", getLocalIpAddress().c_str(), getLocalPort());
+
+  // Keep the cid in case of cancelling
+  sipcall->setCid(cid);
+
+  if (cid <= 0) {
+    eXosip_unlock();
+    return EXOSIP_ERROR_STD;
+  } else {
+    eXosip_call_set_reference (cid, NULL);
+  }
+  eXosip_unlock();
+
+  return cid; // this is the Cid
+}
+
+CALLID
+SipVoIPLink::findCallId (eXosip_event_t *e)
+{
+  for (unsigned int k = 0; k < _sipcallVector.size(); k++) {
+    SipCall* sipcall = _sipcallVector.at(k);
+    if (sipcall && sipcall->getCid() == e->cid &&
+        sipcall->getDid() == e->did) {
+      return sipcall->getId();
+    }
+  }
+  return 0;
+}
+
+/**
+ * This function is used when findCallId failed (return 0)
+ * ie: the dialog id change
+ *     can be use when anwsering a new call or 
+ *         when cancelling a call
+ */
+CALLID
+SipVoIPLink::findCallIdInitial (eXosip_event_t *e)
+{
+  for (unsigned int k = 0; k < _sipcallVector.size(); k++) {
+    SipCall* sipcall = _sipcallVector.at(k);
+    // the dialog id is not set when you do a new call
+    // so you can't check it when you want to retreive it
+    // for the first call anwser
+    if (sipcall && sipcall->getCid() == e->cid) {
+      return sipcall->getId();
+    }
+  }
+  return 0;
+}
+
+/**
+ * Handle an INFO with application/dtmf-relay content-type
+ * @param event eXosip Event
+ */
+bool
+SipVoIPLink::handleDtmfRelay(eXosip_event_t* event) {
+  bool returnValue = false;
+  osip_body_t *body = NULL;
+  // Get the message body
+  if (0 == osip_message_get_body(event->request, 0, &body) && body->body != 0 )   {
+    _debug("  Text body: %s\n", body->body);
+    std::string dtmfBody(body->body);
+    unsigned int posStart = 0;
+    unsigned int posEnd = 0;
+    std::string signal;
+    std::string duration;
+    // search for signal=and duration=
+    posStart = dtmfBody.find("Signal=");
+    if (posStart != std::string::npos) {
+      posStart += strlen("Signal=");
+      posEnd = dtmfBody.find("\n", posStart);
+      if (posEnd == std::string::npos) {
+        posEnd = dtmfBody.length();
+      }
+      signal = dtmfBody.substr(posStart, posEnd-posStart+1);
+      _debug("Signal value: %s\n", signal.c_str());
+      
+      if (!signal.empty()) {
+        unsigned int id = findCallId(event);
+        if (id !=0 && id == Manager::instance().getCurrentCallId()) {
+          Manager::instance().playDtmf(signal[0]);
+        }
+      }
+/*
+ // we receive the duration, but we use our configuration...
+
+      posStart = dtmfBody.find("Duration=");
+      if (posStart != std::string::npos) {
+        posStart += strlen("Duration=");
+        posEnd = dtmfBody.find("\n", posStart);
+        if (posEnd == std::string::npos) {
+            posEnd = dtmfBody.length();
+        }
+        duration = dtmfBody.substr(posStart, posEnd-posStart+1);
+        _debug("Duration value: %s\n", duration.c_str());
+        returnValue = true;
+      }
+*/
+    }
+  }
+  return returnValue;
+}
+
+// http://www.ietf.org/rfc/rfc3428.txt
+// The size of MESSAGE requests outside of a media session MUST NOT
+// exceed 1300 bytes, unless the UAC has positive knowledge that the
+// message will not traverse a congestion-unsafe link at any hop, or
+// that the message size is at least 200 bytes less than the lowest MTU
+// value found en route to the UAS.  
+bool
+SipVoIPLink::sendMessage(const std::string& to, const std::string& body) {
+  bool returnValue = false;
+
+  // fast return
+  if (body.empty()) {return returnValue; }
+
+  osip_message_t* message = 0;
+  const char* method = "MESSAGE";
+
+  std::string sipFrom = getSipFrom();
+  std::string sipTo   = getSipTo(to);
+  std::string sipRoute = getSipRoute();
+
+  if (checkUrl(sipFrom) != 0) {
+    Manager::instance().displayConfigError("Error in source address");
+    return returnValue;
+  }
+  if (checkUrl(sipTo) != 0) {
+    Manager::instance().displayError("Error in destination address");
+    return returnValue;
+  }
+
+  int eXosipError = EXOSIP_ERROR_STD;
+  eXosip_lock();
+  if ( sipRoute.empty() ) {
+    eXosipError = eXosip_message_build_request(&message, method, sipTo.c_str(), sipFrom.c_str(), NULL);
+  } else {
+    eXosipError = eXosip_message_build_request(&message, method, sipTo.c_str(), sipFrom.c_str(), sipRoute.c_str());
+  }
+
+  if (eXosipError == EXOSIP_ERROR_NO) {
+    // add body
+    // add message
+    // src: http://www.atosc.org/pipermail/public/osip/2005-October/006007.html
+    osip_message_set_expires(message, "120");
+    osip_message_set_body(message, body.c_str(), body.length());
+    osip_message_set_content_type(message, "text/plain");
+
+    eXosipError = eXosip_message_send_request(message);
+    if (eXosipError == EXOSIP_ERROR_NO) {
+      // correctly send the message
+      returnValue = true;
+    }
+  }
+  eXosip_unlock();
+  return returnValue;
+}
+
+bool
+SipVoIPLink::setAllows(eXosip_event_t *event) {
+  bool returnValue = false;
+
+  _allowList.clear();
+
+  if (event->response!=0 && event->response->allows!=0) {
+    int allowsSize = osip_list_size(event->response->allows);
+    if (allowsSize != 0) { returnValue = true;}
+    osip_allow_t *allows = 0;
+    for(int pos=0; pos<allowsSize; pos++) {
+      allows = (osip_allow_t*)osip_list_get(event->response->allows, pos);
+      if (allows!=0 && allows->value!=0) {
+        _allowList.push_back(std::string(allows->value));
+      }
+    }
+  }
+  return returnValue;
+}
diff --git a/src/sipvoiplink.h b/src/sipvoiplink.h
new file mode 100644
index 0000000000000000000000000000000000000000..2339a2f112676b6a572ae5c603be2ae09b50e364
--- /dev/null
+++ b/src/sipvoiplink.h
@@ -0,0 +1,233 @@
+/*
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
+ *
+ *	Portions Copyright (C) 2002,2003   Aymeric Moizard <jack@atosc.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You 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.
+ */
+
+#ifndef __SIP_VOIP_LINK_H__
+#define __SIP_VOIP_LINK_H__
+
+#include <vector>
+#include <map> // for allowed
+#include <eXosip2/eXosip.h>
+
+#include "voIPLink.h"
+#include "audio/audiortp.h"
+#include "call.h" // for CALLID
+
+#define EXPIRES_VALUE	180
+// To build request
+#define INVITE_METHOD	"INVITE"
+// 1XX responses
+#define DIALOG_ESTABLISHED 101
+#define RINGING			180
+// 2XX
+#define OK				200
+// 4XX Errors
+#define	BAD_REQ			400
+#define	UNAUTHORIZED	401
+#define	FORBIDDEN		403
+#define NOT_FOUND		404
+#define NOT_ALLOWED		405
+#define NOT_ACCEPTABLE	406
+#define AUTH_REQUIRED	407
+#define REQ_TIMEOUT		408
+#define UNSUP_MEDIA_TYPE	415
+#define TEMP_UNAVAILABLE 480
+#define	ADDR_INCOMPLETE	484
+#define	BUSY_HERE		486
+#define	REQ_TERMINATED	487
+#define NOT_ACCEPTABLE_HERE 488 // Not Acceptable Here
+// 5XX errors
+#define SERVICE_UNAVAILABLE	503
+// 6XX errors
+#define	BUSY_EVERYWHERE	600
+#define DECLINE			603
+
+class AudioCodec;
+class CodecDescriptor;
+class SipCall;
+class EventThread;
+
+typedef std::vector< CodecDescriptor* > CodecDescriptorVector;
+typedef std::list<std::string> AllowList;
+
+class SipVoIPLink : public VoIPLink {
+public:
+  SipVoIPLink();
+  virtual ~SipVoIPLink();
+	
+	virtual bool init (void);
+	virtual bool checkNetwork (void);
+	virtual void terminate (void);
+	virtual int setRegister (void);
+	virtual int setUnregister (void);
+	virtual int outgoingInvite (CALLID id, const std::string& to_url);	
+	virtual int answer (CALLID id);
+	virtual int hangup (CALLID id);
+	virtual int cancel (CALLID id);
+	virtual int onhold (CALLID id);
+	virtual int offhold (CALLID id);
+	virtual int transfer (CALLID id, const std::string& to);
+	virtual int refuse (CALLID id);	
+	virtual int getEvent (void);
+	virtual void carryingDTMFdigits (CALLID id, char code);
+	
+	/*
+	 * To handle the local port
+	 */
+	int	getLocalPort (void);
+	void setLocalPort (int);
+  bool getSipLocalIp (void);
+
+	/*
+	 * Add a new SipCall at the end of the SipCallVector with identifiant 'id'
+	 */
+	void newOutgoingCall(CALLID callid);
+	void newIncomingCall(CALLID callid);
+
+	/*
+	 * Erase the SipCall(id) from the SipCallVector
+	 */
+	void deleteSipCall(CALLID callid);
+	
+	/*
+	 * Return a pointer to the SipCall with identifiant 'id'
+	 */
+	SipCall* getSipCall(CALLID callid);
+
+	/*
+	 * Accessor to the audio codec of SipCall with identifiant 'id'
+	 */
+	AudioCodec* getAudioCodec(CALLID callid);
+
+// Handle voice-message
+	inline void setMsgVoicemail (int nMsg) { _nMsgVoicemail = nMsg; }
+	inline int getMsgVoicemail (void) { return _nMsgVoicemail; }
+
+  /**
+  * send text message
+  * the size of message should not exceed 1300 bytes
+  */
+  virtual bool sendMessage(const std::string& to, const std::string& body);
+	
+private:
+	/*
+	 * If you are behind a NAT, you have to use STUN server, specified in 
+	 * STUN configuration(you can change this one by default) to give you an 
+	 * public IP address and assign a port number.
+	 * 
+	 * Return 0 if an error occured and 1 if no error.
+	 */
+	int behindNat (void);
+
+	/*
+	 * Return -1 if an error occured and 0 if no error
+	 */
+	int checkUrl(const std::string& url);
+
+	/*
+	 * Allow the authentication when you want register
+   	 * Return -1 if an error occured and 0 if no error 
+	 */	 
+	int setAuthentication (void);
+
+	/*
+	 * Build a sip address from the user configuration
+	 * Example: "Display user name" <sip:user@host.com>
+	 * Return the result in a string
+	 */
+	std::string fromHeader (const std::string& user, const std::string& host);
+
+	/*
+	 * Build a sip address with the number that you want to call
+	 * Example: sip:124@domain.com
+	 * Return the result in a string
+	 */
+	std::string toHeader(const std::string& to);
+
+	/*
+	 * Beginning point to make outgoing call.
+	 * Check the 'from' and 'to' url.
+	 * Allocate local audio port.
+	 * Build SDP body.
+	 * Return -1 if an error occured and 0 if no error
+	 */
+	int startCall (CALLID id, const std::string& from, const std::string& to, const std::string& subject, const std::string& route);
+
+  std::string getSipFrom();
+  std::string getSipRoute();
+  std::string getSipTo(const std::string& to_url);
+
+
+
+	/*
+	 * Look for call with same cid/did 
+	 * Return the id of the found call
+	 */
+	CALLID findCallId (eXosip_event_t *e);
+  CALLID findCallIdInitial (eXosip_event_t *e);
+
+	/*
+	 * To build sdp when call is on-hold
+	 */
+	int sdp_hold_call (sdp_message_t * sdp);
+	
+	/*
+	 * To build sdp when call is off-hold
+	 */
+	int sdp_off_hold_call (sdp_message_t * sdp);
+
+  /**
+   * Subscribe to message summary
+   */
+	void subscribeMessageSummary();
+
+  /**
+   * End all sip call not deleted
+   */
+  void endSipCalls();
+
+  /**
+   * Handle DTMF Relay INFO Request
+   */
+  bool handleDtmfRelay(eXosip_event_t* event);
+
+  /**
+   * Get from a response event, all allowed request
+   */
+  bool setAllows(eXosip_event_t *event);
+
+	///////////////////////////
+	// Private member variables
+	///////////////////////////
+	EventThread 	*_evThread;
+	std::vector< SipCall * > _sipcallVector;
+  AllowList _allowList;
+
+	AudioRtp 		_audiortp;
+	int 			_localPort;
+	int 			_reg_id;
+	int 			_nMsgVoicemail;
+
+  bool _registrationSend; // unregistered 
+  bool _started; // eXosip_init and eXosip_start
+};
+
+#endif // __SIP_VOIP_LINK_H__
diff --git a/src/user_cfg.h b/src/user_cfg.h
new file mode 100644
index 0000000000000000000000000000000000000000..49aed13606a689df426bea6140d8ba4f07ee8352
--- /dev/null
+++ b/src/user_cfg.h
@@ -0,0 +1,104 @@
+/**
+ *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author: Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __USER_CFG_H__
+#define __USER_CFG_H__
+
+#include <stdlib.h>
+
+// Home directory
+#define HOMEDIR	(getenv ("HOME"))
+
+// TODO: change for a \ in Windows Environment
+#define DIR_SEPARATOR_CH '/'
+#define DIR_SEPARATOR_STR "/"
+
+// Main menu
+#define SIGNALISATION	"VoIPLink"
+#define AUDIO			"Audio"
+#define VIDEO			"Video"
+#define NETWORK			"Network"
+#define PREFERENCES		"Preferences"
+
+// Fields to fill
+#define VOIP_LINK_ID	"VoIPLink.index"
+#define SYMMETRIC     "VoIPLink.symmetric"
+
+#define FULL_NAME		"SIP.fullName"
+#define USER_PART		"SIP.userPart"
+#define AUTH_USER_NAME	"SIP.username"
+#define PASSWORD		"SIP.password"
+#define HOST_PART		"SIP.hostPart"
+#define PROXY			"SIP.proxy"
+#define AUTO_REGISTER	"SIP.autoregister"
+#define PLAY_TONES		"DTMF.playTones"
+#define PULSE_LENGTH	"DTMF.pulseLength"
+#define SEND_DTMF_AS	"DTMF.sendDTMFas"
+#define STUN_SERVER		"STUN.STUNserver"
+#define USE_STUN		"STUN.useStun"
+#define DRIVER_NAME		"Drivers.driverName"
+#define DRIVER_NAME_IN		"Drivers.driverNameIn"
+#define DRIVER_NAME_OUT		"Drivers.driverNameOut"
+#define NB_CODEC		"Codecs.nbCodec"
+#define CODEC1			"Codecs.codec1"
+#define CODEC2			"Codecs.codec2"
+#define CODEC3			"Codecs.codec3"
+#define RING_CHOICE		"Rings.ringChoice"
+
+
+// speakers and volume 0 to 100
+#define VOLUME_SPKR	"Volume.speakers"
+#define VOLUME_MICRO	"Volume.micro"
+#define SKIN_CHOICE		"Themes.skinChoice"
+#define CONFIRM_QUIT	"Options.confirmQuit"
+#define ZONE_TONE		"Options.zoneToneChoice"
+#define CHECKED_TRAY	"Options.checkedTray"
+#define VOICEMAIL_NUM	"Options.voicemailNumber"
+// zeroconfig module
+#define CONFIG_ZEROCONF "Zeroconf.enable"
+
+// Default values
+#define EMPTY_FIELD			""
+#define DFT_STUN_SERVER 	"stun.fwdnet.net:3478"
+
+#define	YES_STR              "1"
+#define	NO_STR               "0"
+#define DFT_PULSE_LENGTH_STR "250"
+#define SIP_INFO_STR         "0"
+#define DFT_DRIVER_STR       "0"
+#define DFT_NB_CODEC_STR     "3"
+// volume by default 100%
+#define DFT_VOL_SPKR_STR     "100"
+#define DFT_VOL_MICRO_STR    "100"
+
+
+#define DFT_CODEC			"G711u"
+#define DFT_RINGTONE 		"konga.ul"
+#define DFT_SKIN 			"metal"
+#define DFT_ZONE			"North America"
+#define DFT_VOICEMAIL 		"888"
+// zeroconfig default value
+#ifdef USE_ZEROCONF
+#define CONFIG_ZEROCONF_DEFAULT_STR "1"
+#else
+#define CONFIG_ZEROCONF_DEFAULT_STR "0"
+#endif
+
+#endif // __USER_CFG_H__
diff --git a/src/voIPLink.cpp b/src/voIPLink.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a5372cb98af2e90bc8127b5c5ece4fa534e7c475
--- /dev/null
+++ b/src/voIPLink.cpp
@@ -0,0 +1,94 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <string>
+
+#include "user_cfg.h"
+#include "voIPLink.h"
+#include "manager.h"
+
+VoIPLink::VoIPLink ()
+{
+	initConstructor();
+}
+
+VoIPLink::~VoIPLink (void) 
+{
+}
+
+void
+VoIPLink::setType (VoIPLinkType type) 
+{
+	_type = type;
+}
+
+VoIPLinkType
+VoIPLink::getType (void)
+{
+	return _type;
+}
+
+void 
+VoIPLink::setFullName (const std::string& fullname)
+{
+	_fullname = fullname;
+}
+
+std::string
+VoIPLink::getFullName (void)
+{
+	return _fullname;
+}
+
+void 
+VoIPLink::setHostName (const std::string& hostname)
+{
+	_hostname = hostname;
+}
+
+std::string
+VoIPLink::getHostName (void)
+{
+	return _hostname;
+} 
+
+void 
+VoIPLink::setLocalIpAddress (const std::string& ipAdress)
+{
+	_localIpAddress = ipAdress;
+}
+
+std::string 
+VoIPLink::getLocalIpAddress (void)
+{
+	return _localIpAddress;
+} 
+
+void
+VoIPLink::initConstructor(void)
+{
+	_type = Sip;
+  // TODO: should be inside the account
+	_fullname =
+Manager::instance().getConfigString(SIGNALISATION,FULL_NAME
+) ;
+	_hostname = Manager::instance().getConfigString(SIGNALISATION,HOST_PART);
+	_localIpAddress = "127.0.0.1"; // sipvoip require this value to check network
+}
diff --git a/src/voIPLink.h b/src/voIPLink.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6802e1b6da9e0b032c4643cc1923511e8de9b9e
--- /dev/null
+++ b/src/voIPLink.h
@@ -0,0 +1,79 @@
+/*
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
+ *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __VOIP_LINK_H__
+#define __VOIP_LINK_H__
+
+#include <string>
+#include "call.h"
+
+enum VoIPLinkType {
+	Sip = 0,
+	Iax
+};
+
+class AudioCodec;
+class Call;
+
+class VoIPLink {
+public:
+	VoIPLink ();
+	virtual ~VoIPLink (void);
+
+	// Pure virtual functions
+	virtual int getEvent (void) = 0;
+	virtual bool init (void) = 0;
+	virtual bool checkNetwork (void) = 0;
+	virtual void terminate (void) = 0;
+	virtual void newOutgoingCall (CALLID id) = 0;
+	virtual void newIncomingCall (CALLID id) = 0;
+	virtual int outgoingInvite (CALLID id, const std::string& to_url) = 0;
+	virtual int answer (CALLID id) = 0;
+	virtual int hangup (CALLID id) = 0;
+	virtual int cancel (CALLID id) = 0;
+	virtual int onhold (CALLID id) = 0;
+	virtual int offhold (CALLID id) = 0;
+	virtual int transfer (CALLID id, const std::string& to) = 0;
+	virtual int refuse (CALLID id) = 0;
+	virtual int setRegister (void) = 0;
+	virtual int setUnregister (void) = 0;
+	virtual void carryingDTMFdigits(CALLID id, char code) = 0;
+	virtual AudioCodec* getAudioCodec (CALLID id) = 0;
+  virtual bool sendMessage(const std::string& to, const std::string& body) = 0;
+
+	void setType (VoIPLinkType type);
+	VoIPLinkType getType (void);
+	void setFullName (const std::string& fullname);
+	std::string getFullName (void);
+	void setHostName (const std::string& hostname);
+	std::string getHostName (void);
+	void setLocalIpAddress (const std::string& ipAdress);
+  std::string getLocalIpAddress (void);
+
+private:
+	void initConstructor(void);
+	
+	VoIPLinkType _type;
+	std::string _fullname;
+	std::string _hostname;
+	std::string _localIpAddress;
+};
+
+#endif // __VOIP_LINK_H__
diff --git a/src/zeroconf/DNSQueryThread.cpp b/src/zeroconf/DNSQueryThread.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..738db77c9b4989d7fff0f0168b52afdb1d4610ca
--- /dev/null
+++ b/src/zeroconf/DNSQueryThread.cpp
@@ -0,0 +1,69 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "DNSQueryThread.h"
+#include "DNSService.h"
+
+/**
+ * Construct a DNSQueryThread and initialize the cancel to deferred
+ */
+DNSQueryThread::DNSQueryThread(DNSService *parent, const char *regtype) : ost::Thread() 
+{
+  _parent = parent;
+  _regtype = regtype;
+  _serviceRef = NULL;
+  setCancel(cancelDeferred);
+}
+
+/**
+ * Destruct a DNSQueryThread
+ */
+DNSQueryThread::~DNSQueryThread() 
+{
+  if (_serviceRef) {
+    DNSServiceRefDeallocate(_serviceRef);
+  }
+  terminate();
+  _parent = NULL;
+  _regtype = NULL;
+  _serviceRef = NULL;
+}
+
+/**
+ * Running loop
+ */
+void
+DNSQueryThread::run() {
+  DNSServiceErrorType theErr=0; // NULL;
+  DNSServiceFlags     resultFlags=0;
+    
+  theErr = DNSServiceBrowse(&_serviceRef,
+            resultFlags,
+            0,  // all interfaces
+            _regtype,
+            NULL,
+            DNSServiceAddServicesCallback,
+            (void*)_parent);
+
+  if (theErr == kDNSServiceErr_NoError) {
+    while(!testCancel()) {
+      DNSServiceProcessResult(_serviceRef); // blockage if none...
+    }
+  }
+}
diff --git a/src/zeroconf/DNSQueryThread.h b/src/zeroconf/DNSQueryThread.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d67d653e376233af221c6b56b4ce1767471a5c5
--- /dev/null
+++ b/src/zeroconf/DNSQueryThread.h
@@ -0,0 +1,40 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __DNSSD_DNSQUERYTHREAD_H__
+#define __DNSSD_DNSQUERYTHREAD_H__
+
+#include <cc++/thread.h>
+#include <dns_sd.h>
+
+class DNSService;
+class DNSQueryThread : public ost::Thread
+{
+public:
+  DNSQueryThread(DNSService *parent, const char *regtype);
+  ~DNSQueryThread();
+  virtual void run(); // looking for services
+  
+private:
+  DNSService    *_parent;    // parent service
+  DNSServiceRef _serviceRef; // service reference 
+  const char    *_regtype;   // service type and socket type (_sip._udp by example)
+};
+
+
+#endif // __DNSSD_DNSQUERYTHREAD_H__
diff --git a/src/zeroconf/DNSService.cpp b/src/zeroconf/DNSService.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f70e79efa625c1c21d026fa27d3f2cc4f50598ab
--- /dev/null
+++ b/src/zeroconf/DNSService.cpp
@@ -0,0 +1,237 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+ 
+ /**
+  * Inspired by http://braden.machacking.net/zerobrowse.cpp and
+  * http://developer.kde.org/documentation/library/3.4-api/dnssd/html/remoteservice_8cpp-source.html
+  */
+#include "DNSService.h"
+#include "DNSServiceTXTRecord.h"
+#include "DNSQueryThread.h"
+
+#include <cc++/thread.h>
+
+/**
+ * Simple Empty Constructor
+ */
+DNSService::DNSService()
+{
+  _start = false;
+  _regtypeList.push_back("_sip._udp");
+#ifdef USE_IAX2
+  _regtypeList.push_back("_iax._udp");
+#endif
+
+  // for the thread, the ifdef add a dynamic _regtypeList problem
+  for (std::list<std::string>::iterator iterThread=_regtypeList.begin();
+       iterThread!=_regtypeList.end();
+       iterThread++) {
+    _queryThread.push_back(new DNSQueryThread(this, (*iterThread).c_str()));
+  }
+}
+
+/**
+ * Simple Empty Destructor
+ */
+DNSService::~DNSService()
+{
+  int cntThread = _queryThread.size();
+  for (int iThread=0;iThread<cntThread;iThread++) {
+    delete _queryThread[iThread]; _queryThread[iThread] = NULL;
+  }
+}
+
+/**
+ * Look for zeroconf services and add them to _services
+ */
+void
+DNSService::startScanServices() 
+{
+  for (std::vector<DNSQueryThread *>::iterator iter = _queryThread.begin();iter!=_queryThread.end();iter++) {
+    (*iter)->start();
+  }
+  _start = true;
+}
+
+/**
+ * Add one service to the list of actual services
+ * @param service Service to add to the list
+ */
+void DNSService::addService(const std::string &service) 
+{
+  DNSServiceTXTRecord txtRecord;
+  _mutex.enterMutex();
+  _services[service] = txtRecord;
+  // we leave before the queryService since, each 
+  // thread will modify a DNSServiceTXTRecord of a difference services
+  _mutex.leaveMutex();
+  notify();
+  queryService(service);
+}
+
+/**
+ * Remove one service to the list of actual services
+ * @param service Service to remove to the list
+ */
+void DNSService::removeService(const std::string &service) 
+{
+  _mutex.enterMutex();
+  _services.erase(service);
+  _mutex.leaveMutex();
+  notify();
+}
+
+/**
+ * Return every services
+ */
+DNSServiceMap
+DNSService::getServices() 
+{
+  ost::MutexLock m(_mutex);
+  return _services;
+}
+
+
+/**
+ * Query a service and wait for the anwser
+ * the queryCallback will show the result
+ * @param service The service full adress
+ */
+void 
+DNSService::queryService(const std::string &service) 
+{
+  DNSServiceErrorType theErr=0;
+  DNSServiceRef       myServRef=0;
+  DNSServiceFlags     resultFlags=0;
+  
+  theErr = DNSServiceQueryRecord(&myServRef, 
+				 resultFlags, 
+				 0, 
+				 service.c_str(), 
+				 kDNSServiceType_TXT, 
+				 kDNSServiceClass_IN, 
+				 DNSServiceQueryRecordCallback, 
+				 (void*)this);
+  if (theErr == kDNSServiceErr_NoError) {
+    DNSServiceProcessResult(myServRef); // blockage...
+    DNSServiceRefDeallocate(myServRef);
+  }
+}
+
+/**
+ * Overloadding queryService
+ * @param service service name
+ * @param regtype registred type of service
+ * @param domain  domain (habitually local.)
+ */
+void 
+DNSService::queryService(const char *service, const char *regtype, const char *domain) 
+{
+  char serviceName[kDNSServiceMaxDomainName+1];
+  DNSServiceConstructFullName(serviceName, service, regtype, domain);
+  queryService(std::string(serviceName));
+}
+
+/**
+ * Add a txt record with the queryService callback answser data
+ * @param rdlen the length of the txt record data
+ * @param rdata txt record data
+ */
+void 
+DNSService::addTXTRecord(const char *fullname, uint16_t rdlen, const void *rdata) 
+{
+  char key[256];
+  
+  const char *value;
+  uint8_t valueLen; // 0 to 256 by type restriction
+  char valueTab[256];
+  
+  
+  uint16_t keyCount = TXTRecordGetCount(rdlen, rdata);
+  for (int iKey=0; iKey<keyCount; iKey++) {
+    TXTRecordGetItemAtIndex (rdlen, rdata, iKey, 256, key, &valueLen, (const void **)(&value));
+    if (value) {
+      bcopy(value, valueTab, valueLen);
+      valueTab[valueLen]='\0';
+      _mutex.enterMutex(); // extra-careful
+      _services[fullname].addKeyValue(key, valueTab);
+      _mutex.leaveMutex();
+    } else {
+      _mutex.enterMutex();
+      _services[fullname].removeKey(key);
+      _mutex.leaveMutex();
+    }
+  }
+
+  notify();
+}
+
+void 
+DNSServiceAddServicesCallback(DNSServiceRef,
+						DNSServiceFlags flags,
+						uint32_t,
+						DNSServiceErrorType errorCode,
+						const char *serviceName,
+						const char *replyType,
+						const char *replyDomain,
+						void *context)
+{
+  if (errorCode==kDNSServiceErr_NoError) {
+  
+    if (flags) {
+      DNSService *service = (DNSService*)context;
+      std::string tempService;
+      tempService = std::string(serviceName) + "." + std::string(replyType) + std::string(replyDomain);
+      if (flags&kDNSServiceFlagsAdd) {
+//        _debug("DNSServiceAddServicesCallback call addService\n");
+        service->addService(tempService);
+      } else {
+//        _debug("DNSServiceAddServicesCallback call removeService\n");
+        service->removeService(tempService);
+      }
+    }
+  } else {
+     // TODO: error handling
+  }
+}
+
+void 
+DNSServiceQueryRecordCallback(
+	DNSServiceRef,
+	DNSServiceFlags flags,
+	uint32_t,
+	DNSServiceErrorType errorCode,
+	const char *fullname,
+	uint16_t,
+	uint16_t,
+	uint16_t rdlen,
+	const void *rdata,
+	uint32_t,
+	void *context)
+{
+  if (errorCode==kDNSServiceErr_NoError) {
+    if (flags&kDNSServiceFlagsAdd) {
+//      _debug("DNSServiceQueryRecordCallback call addTXTRecord\n");
+      ((DNSService *)context)->addTXTRecord(fullname, rdlen, rdata);
+    } else {
+//      _debug("DNSServiceQueryRecordCallback call removeService\n");
+      ((DNSService *)context)->removeService(fullname);
+    }
+  }
+}
diff --git a/src/zeroconf/DNSService.h b/src/zeroconf/DNSService.h
new file mode 100644
index 0000000000000000000000000000000000000000..6df1d46582ae207752021b562e42c19e5a52d839
--- /dev/null
+++ b/src/zeroconf/DNSService.h
@@ -0,0 +1,92 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __DNSSD_DNSSERVICE_H__
+#define __DNSSD_DNSSERVICE_H__
+
+#include <string>
+#include <map>
+#include <list>
+#include <vector>
+
+#include <dns_sd.h>
+#include <cc++/thread.h>
+#include "../observer.h"
+
+class DNSQueryThread;
+class DNSServiceTXTRecord;
+
+typedef std::map<std::string, DNSServiceTXTRecord> DNSServiceMap;
+class DNSService : public Pattern::Subject
+{
+public:
+  DNSService();
+  ~DNSService();
+  
+  void startScanServices(); // looking for services
+  void addService(const std::string &service); // adding every services
+  void removeService(const std::string &service); // remove a service
+  DNSServiceMap getServices(); // get all DNS Service
+  void stop(); // after the browsing loop stop
+  
+  void queryService(const std::string &service); // query the TXT record of a service
+  void queryService(const char *service, const char *regtype, const char *domain);
+  void addTXTRecord(const char *fullname, uint16_t rdlen, const void *rdata);
+  //void removeTXTRecord(const char *fullname);
+
+  bool isStart() const { return _start; }
+
+private:
+  DNSServiceMap _services; //map
+
+  std::vector<DNSQueryThread *> _queryThread;
+  /**
+   * Mutex to protect access to _services on add/erase
+   */
+  ost::Mutex _mutex;
+  /**
+   * RegType List contains zeroconf services to register, like sip, iax2, ...
+   * It will be use to initialize the DNSQueryThread
+   */
+  std::list<std::string> _regtypeList;
+
+  bool _start;
+};
+
+void DNSServiceAddServicesCallback(DNSServiceRef sdRef,
+						DNSServiceFlags flags,
+						uint32_t interfaceIndex,
+						DNSServiceErrorType errorCode,
+						const char *serviceName,
+						const char *replyType,
+						const char *replyDomain,
+						void *context);
+
+void DNSServiceQueryRecordCallback(DNSServiceRef DNSServiceRef,
+	DNSServiceFlags flags,
+	uint32_t interfaceIndex,
+	DNSServiceErrorType errorCode,
+	const char *fullname,
+	uint16_t rrtype,
+	uint16_t rrclass,
+	uint16_t rdlen,
+	const void *rdata,
+	uint32_t ttl,
+	void *context);
+
+#endif // __DNSSD_DNSSERVICE_H__
diff --git a/src/zeroconf/DNSServiceTXTRecord.cpp b/src/zeroconf/DNSServiceTXTRecord.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e4c6fff35a6fbe21efc20fc8d150a84e79bbd79d
--- /dev/null
+++ b/src/zeroconf/DNSServiceTXTRecord.cpp
@@ -0,0 +1,76 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "DNSServiceTXTRecord.h"
+
+/**
+ * Simple constructor
+ */
+DNSServiceTXTRecord::DNSServiceTXTRecord() 
+{
+}
+ 
+/**
+ * Simple destructor
+ */
+DNSServiceTXTRecord::~DNSServiceTXTRecord() 
+{
+}
+
+/**
+ * add a pair of key/value inside the associative std::map
+ * @param key    unique key inside the std::map
+ * @param value  value associated to the key
+ */
+void 
+DNSServiceTXTRecord::addKeyValue(const std::string &key, const std::string &value) 
+{
+  _map[key] = value;
+}
+
+/**
+ * remove a key inside the map or do nothing if it doesn't exist
+ * @param key    unique key inside the std::map
+ */
+void 
+DNSServiceTXTRecord::removeKey(const std::string &key) 
+{
+  _map.erase(key);
+}
+
+/**
+ * get a value from a key
+ * @param key    unique key inside the std::map
+ * @return the value or empty
+ */
+const std::string &
+DNSServiceTXTRecord::getValue(const std::string &key) 
+{
+  return _map[key]; // return std::string("") if it's not there
+}
+
+/**
+ * get a value from a key
+ * @param key    unique key inside the std::map
+ * @return the value or empty
+ */
+const std::string &
+DNSServiceTXTRecord::getValue(const char* key) 
+{
+  return getValue(std::string(key));
+}
diff --git a/src/zeroconf/DNSServiceTXTRecord.h b/src/zeroconf/DNSServiceTXTRecord.h
new file mode 100644
index 0000000000000000000000000000000000000000..5c4b8ac1fa51e7ca597c0ba334b04822dabd4558
--- /dev/null
+++ b/src/zeroconf/DNSServiceTXTRecord.h
@@ -0,0 +1,43 @@
+/**
+ *  Copyright (C) 2005 Savoir-Faire Linux inc.
+ *  Author: Yan Morin <yan.morin@savoirfairelinux.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef __DNSSD_DNSSERVICETXTRECORD_H__
+#define __DNSSD_DNSSERVICETXTRECORD_H__
+
+#include <string>
+#include <map>
+
+typedef std::map<std::string, std::string> TXTRecordMap;
+class DNSServiceTXTRecord
+{
+public:
+  DNSServiceTXTRecord();
+  ~DNSServiceTXTRecord();
+  void addKeyValue(const std::string &key, const std::string &value);
+  void removeKey(const std::string &key);
+  const std::string &getValue(const std::string &key);
+  const std::string &getValue(const char *key);
+  inline void clear(void) { _map.clear(); };
+  inline int size(void) { return _map.size(); };
+  TXTRecordMap getTXTRecords() { return _map; }
+
+private:
+  TXTRecordMap _map;
+};
+
+#endif // __DNSSD_DNSSERVICETXTRECORD_H__
diff --git a/src/zeroconf/Makefile.am b/src/zeroconf/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..d2ed5b4e4a56d0330b7bad354ea7f2afec291086
--- /dev/null
+++ b/src/zeroconf/Makefile.am
@@ -0,0 +1,12 @@
+SUBDIRS = 
+
+noinst_LTLIBRARIES = libzeroconf.la
+
+libzeroconf_la_SOURCES = \
+	DNSQueryThread.cpp  DNSQueryThread.h \
+	DNSService.cpp  DNSService.h  \
+	DNSServiceTXTRecord.cpp  DNSServiceTXTRecord.h
+
+AM_CXXFLAGS = $(libccext2_CFLAGS)
+libzeroconf_la_LIBADD = $(LIB_DNSSD) 
+
diff --git a/tools/config.sh b/tools/config.sh
new file mode 100755
index 0000000000000000000000000000000000000000..23cccc4855c4d2d22f35721096bfee83fa164674
--- /dev/null
+++ b/tools/config.sh
@@ -0,0 +1,13 @@
+# prefix is without slash
+# default for redhat is /usr
+SFL_PREFIX=$HOME/sflphone
+SFL_INSTALL_USER=$USER # could be root too...
+LD_LIBRARY_PATH=$SFL_PREFIX/lib:$LD_LIBRARY_PATH
+
+SFL_FILE_CCPP2=http://easynews.dl.sourceforge.net/sourceforge/gnutelephony/commoncpp2-1.3.21.tar.gz
+SFL_FILE_CCRTP=ftp://ftp.gnu.org/pub/gnu/ccrtp/ccrtp-1.3.5.tar.gz
+SFL_FILE_LIBOSIP2=http://ftp.gnu.org/gnu/osip/libosip2-2.2.2.tar.gz
+SFL_FILE_LIBEXOSIP2=http://savannah.nongnu.org/download/exosip/libeXosip2-2.2.2.tar.gz
+SFL_FILE_PA_V19=http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz
+SFL_DIR_PA='portaudio'
+
diff --git a/tools/download.sh b/tools/download.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d64fd2f69fd6f0af7236a37a96d6c2033c851535
--- /dev/null
+++ b/tools/download.sh
@@ -0,0 +1,65 @@
+#!/bin/sh
+. ./config.sh
+
+download()
+{
+    filename=`basename $1`
+    echo -n "Checking for $filename..."
+    if [ ! -e $filename ]; then
+        echo -en "\nDownloading $filename..."
+        wget -q $1 -U "http://www.sflphone.org/" && echo -en " OK "
+    fi
+    echo ""
+}
+
+untar()
+{
+    filename=`basename $1`
+    if [ -z $2 ]; then
+        dirname=`basename $filename '.tar.gz'`
+    else
+        dirname=$2
+    fi
+    echo -n "Checking for directory $dirname"
+    if [ -e $filename -a ! -e $dirname ]; then
+        echo -en "\nExtracting..."
+        tar xzf $filename
+    fi
+    echo " OK"
+}
+backupdir()
+{
+    if [ -z $2 ]; then
+        dirname=`basename $1 '.tar.gz'`
+    else
+        dirname=$2
+    fi
+    echo -n "Checking for backup for $dirname"
+    if [ ! -e "$dirname.orig" ]; then
+        echo -en "\nCopying..."
+        cp -R $dirname "$dirname.orig"
+    fi
+    echo " OK"
+}
+configure() {
+	./configure --prefix=$PREFIX
+}
+
+prepare()
+{
+    if [ -z $1 ]; then
+	echo 'ERROR: prepare need a file URI not empty'
+    else
+        echo 'Preparation for' $1
+        download $1
+        untar $1 $2
+    #   backupdir $1 $2
+    fi
+}
+
+prepare $SFL_FILE_CCPP2 ''
+prepare $SFL_FILE_CCRTP ''
+prepare $SFL_FILE_LIBOSIP2 ''
+#prepare $SFL_FILE_LIBEXOSIP2 ''
+#prepare $SFL_FILE_PA_V19 $SFL_DIR_PA
+
diff --git a/tools/exampleConfigure.sh b/tools/exampleConfigure.sh
new file mode 100755
index 0000000000000000000000000000000000000000..caa8f82da705fa04e3be54ca3cbdffbe505796d0
--- /dev/null
+++ b/tools/exampleConfigure.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+SFL_PREFIX=$HOME/sflphone
+OSIP_PREFIX=$SFL_PREFIX
+
+export LD_LIBRARY_PATH=$SFL_PREFIX/lib
+export LDFLAGS="-L$SFL_PREFIX/lib"
+export CPPFLAGS="-I$SFL_PREFIX/include/cc++2 -I$SFL_PREFIX/include"
+export PKG_CONFIG_PATH=$SFL_PREFIX/lib/pkgconfig
+
+./configure --prefix=$SFL_PREFIX --enable-strict --with-osip=$OSIP_PREFIX || exit
+make || exit
+make install || exit
diff --git a/tools/install.sh b/tools/install.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d6c2b884bacc121cbb7cdf651d848c5c293571d5
--- /dev/null
+++ b/tools/install.sh
@@ -0,0 +1,56 @@
+. ./config.sh
+
+# configure, make and make install
+cmmi() {
+	dirname=
+	configparam=
+
+	if [ -z $2 ]; then
+		dirname=`basename $1 '.tar.gz'`
+	else
+		dirname=$2
+	fi
+
+	configok=0
+	cd $dirname
+	if [ ! -e Makefile ]; then
+		configok=2
+		echo "Configuring and installing: $dirname"
+		if [ ! -z $3 ]; then
+			configparam=$3
+		fi
+		./configure $configparam --prefix=$SFL_PREFIX || exit
+	else
+		echo "$dirname is already configure. Remove the Makefile to reinstall"
+	fi
+	if [ $configok -eq 0 ]; then
+		echo -en 'Do you want to make and make install the package? (y/n) '
+		read r
+		if [ "$r" = "y" ]; then
+			configok=2
+		fi
+	fi
+	if [ $configok -eq 2 ]; then
+		make || return 
+		echo "Enter you password to install the package as $USER (make install): "
+		if [ "$SFL_INSTALL_USER" = "$USER" ]; then
+			make install || exit
+		else
+			su $SFL_INSTALL_USER -c 'make install' || exit;
+		fi
+	fi
+	cd ..
+}
+
+
+cmmi $SFL_FILE_CCPP2 '' '--without-libxml2'
+echo "Settings CPPFLAGS to $CPPFLAGS"
+export CPPFLAGS="-I$SFL_PREFIX/include/cc++2"
+cmmi $SFL_FILE_CCRTP ''
+cmmi $SFL_FILE_LIBOSIP2 ''
+#cmmi $SFL_FILE_LIBEXOSIP2 '' --disable-josua
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$SFL_PREFIX/lib/pkgconfig
+#cmmi $SFL_FILE_PA_V19 $SFL_DIR_PA
+
+
+
diff --git a/tools/sflphone-bash/call b/tools/sflphone-bash/call
new file mode 100755
index 0000000000000000000000000000000000000000..d6b965e6d38ecca94b687cd7db99cadad4cbc3a0
--- /dev/null
+++ b/tools/sflphone-bash/call
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2005 Yan Morin <yan.morin@savoirfairelinux.com>
+##
+# Use the daemon to make a call (with netcat)
+# @author Yan Morin
+# example of use:
+#  ./call 124
+# kaddressbook (script-hooks phone):
+#  /usr/local/sflphone-bash/call "%N"
+##
+
+. ./global
+
+if [ -z $1 ]; then 
+  echo "You need a sip number to compose."
+  exit -1; 
+fi
+
+callid=`date +%s%N`
+telephonenumber=$1
+
+if [ -z `$pidof 'sflphoned'` ]; then
+  $SFLPHONED_PATH/sflphoned &
+  echo -n "waiting for sflphone activation: "
+  echo -n "."; sleep 1
+  echo -n "."; sleep 1
+  callstring="getevents all\n";
+  echo -en $callstring | $netcat localhost 3999
+  echo -n "."; sleep 1
+  echo -en "\n";
+fi
+
+callstring="call someone with $callid $telephonenumber\n"
+echo "Calling $telephonenumber..."
+
+echo -en $callstring | $netcat
+
diff --git a/tools/sflphone-bash/global b/tools/sflphone-bash/global
new file mode 100755
index 0000000000000000000000000000000000000000..34e6613325fad07631a0ae4b0805c2b8e787fcb2
--- /dev/null
+++ b/tools/sflphone-bash/global
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+netcat="/usr/bin/nc localhost 3999"
+pidof=/sbin/pidof
+SFLPHONED_PATH=/home/ymorin/sflphone/sflphoned/src
+
diff --git a/tools/sflphone-bash/hangupall b/tools/sflphone-bash/hangupall
new file mode 100755
index 0000000000000000000000000000000000000000..ff2260da1af93170c1e8efea870df0bd17606064
--- /dev/null
+++ b/tools/sflphone-bash/hangupall
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright (C) 2005 Yan Morin <yan.morin@savoirfairelinux.com>
+##
+# Use the daemon to hangup all calls (with netcat)
+# @author Yan Morin
+##
+
+. ./global
+
+if [ ! -z `$pidof 'sflphoned'` ]; then
+  callstring="hangupall calls\n"
+
+  echo "Hangup all calls..."
+
+  echo -en $callstring | $netcat
+
+else
+  echo "sflphoned is already stopped"
+fi
+
diff --git a/tools/sflphone-bash/stop b/tools/sflphone-bash/stop
new file mode 100755
index 0000000000000000000000000000000000000000..6f12d1b167757f9765e6930153a7f619bebfcda6
--- /dev/null
+++ b/tools/sflphone-bash/stop
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Copyright (C) 2005 Yan Morin <yan.morin@savoirfairelinux.com>
+##
+# Use the daemon to hangup all calls (with netcat)
+# @author Yan Morin
+##
+
+. ./global
+
+if [ ! -z `$pidof 'sflphoned'` ]; then
+  callstring="stop sflphone\n"
+
+  echo "Stopping sflphoned..."
+
+  echo -en $callstring | $netcat
+
+else
+  echo "sflphoned is already stopped"
+fi
+