Index: .hgignore
===================================================================
--- .hgignore	(revision 90)
+++ .hgignore	(revision 0)
@@ -1,9 +1,7 @@
 INSTALL
-MANIFEST
 Makefile.in
 aclocal.m4
 autom4te.cache
-compile
-configure$
+configure
 depcomp
 install-sh
@@ -12,7 +10,2 @@
 config.sub
 ltmain.sh
-m4/.*\.m4
-.*\.pyc
-build
-dist
-doc/html
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 79)
+++ Makefile.am	(revision 0)
@@ -1,13 +1,1 @@
-SUBDIRS=src test doc
-
-ACLOCAL_AMFLAGS = -I m4
-
-EXTRA_DIST=bootstrap.sh \
-        buildall.config         \
-        buildall.sh             \
-        buildallhosts.sh        \
-        buildmsi.bat            \
-        mkalldist.sh            \
-        mkccclientdist.sh       \
-        mkplugindist.sh         \
-        setup.py
+SUBDIRS=src
Index: otstrap.sh
===================================================================
--- bootstrap.sh	(revision 13)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#!/bin/sh
-
-set -e -u
-
-scriptdir=`dirname $0`
-
-cd "${scriptdir}"
-
-libtoolize
-aclocal -I m4 -I "${1}"
-automake -a
-autoconf
-
-"${scriptdir}/src/plugin/bootstrap.sh" "${1}"
Index: ildall.config
===================================================================
--- buildall.config	(revision 65)
+++ 	(revision )
@@ -1,10 +1,0 @@
-# Configuration file for buildall.sh
-#
-# It should set the variables below
-
-VSCPL_SOURCE_DIR="${HOME}/munka/vscpl"
-XPLCOMMON_SOURCE_DIR="${HOME}/munka/repules/xplcommon"
-
-XPSDK_DIR="${HOME}/local/opt/X-Plane/XPSDK"
-
-MAKEOPTS="-j3"
Index: ildall.sh
===================================================================
--- buildall.sh	(revision 77)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#!/bin/bash
-
-set -e -u
-
-# Script to build all components needed for the X-Plane Remote Access plugin.
-#
-# Usage: buildall.sh <configuration file> <destination directory> <host> [<C/C++ flags>]
-#
-# The C/C++ flags default to -O2
-
-scriptdir=`dirname $0`
-
-if test $# -lt 3; then
-    echo "Usage: buildall.sh <configuration file> <destination directory> <host> [<C/C++ flags>]"
-    exit 1
-fi
-
-config="${1}"
-dest="${2}"
-host="${3}"
-cflags="${4:-}"
-if test -z "${cflags}"; then
-    cflags="-O2"
-fi
-
-XPLRA_SOURCE_DIR=`cd "${scriptdir}"; pwd`
-
-if test -r "${config}"; then
-    . ${config}
-else
-    echo "Configuration file \"${config}\" not found"
-    exit 2
-fi
-
-echo "Building all into \"${dest}\" with host ${host} using C/C++ flags '${cflags}'"
-echo
-
-instdir="${dest}/install"
-vscpldir="${dest}/vscpl"
-xplcommondir="${dest}/xplcommon"
-xplradir="${dest}/xplra"
-
-libconfigopts=""
-case "${host}" in
-    x86_64-linux-gnu)
-        cflags="${cflags} -fPIC"
-        ;;
-    i686-linux-gnu)
-        cflags="${cflags} -m32 -fno-stack-protector"
-        ;;
-esac
-
-echo "Removing destination directory ${dest}"
-rm -rf "${dest}"
-echo
-
-build()
-{
-    local sourcedir="${1}"
-    local builddir="${2}"
-    local configopts="${3}"
-    local maketarget="${4}"
-
-    mkdir -p "${builddir}"
-    cd "${builddir}"
-    "${sourcedir}/configure" --prefix="${instdir}" --with-xpsdk="${XPSDK_DIR}" ${configopts} --host "${host}" CFLAGS="${cflags}" CXXFLAGS="${cflags}" PKG_CONFIG_PATH="${instdir}/lib/pkgconfig" > "configure.log" 2>&1
-    make ${MAKEOPTS} ${maketarget} > make.log 2>&1
-
-}
-
-echo "Building VSCPL"
-build "${VSCPL_SOURCE_DIR}" "${vscpldir}" "${libconfigopts}" install
-echo
-
-echo "Building XPLCOMMON"
-build "${XPLCOMMON_SOURCE_DIR}" "${xplcommondir}" "${libconfigopts}" install
-echo
-
-echo "Building XPLRA"
-build "${XPLRA_SOURCE_DIR}" "${xplradir}" "" install
-echo
-
-echo "Building successful"
Index: ildallhosts.sh
===================================================================
--- buildallhosts.sh	(revision 102)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#!/bin/bash
-
-set -e -u
-
-# Script to build all components needed for the X-Plane Remote Access plugin
-# for all supported hosts.
-#
-# Usage: buildallhosts.sh <configuration file> <destination directory> [<C/C++ flags>]
-#
-# The C/C++ flags default to -O2
-
-scriptdir=`dirname $0`
-
-if test $# -lt 2; then
-    echo "Usage: buildallhosts.sh <configuration file> <destination directory>  [<C/C++ flags>]"
-    exit 1
-fi
-
-config="${1}"
-dest="${2}"
-cflags="${3:-}"
-if test -z "${cflags}"; then
-    cflags="-O2"
-fi
-
-"${scriptdir}/buildall.sh" "${config}" "${dest}/xpl" x86_64-linux-gnu "${cflags}"
-#echo
-#echo
-#"${scriptdir}/buildall.sh" "${config}" "${dest}/xpl-32" i686-linux-gnu "${cflags}"
-#echo
-#echo
-#"${scriptdir}/buildall.sh" "${config}" "${dest}/xpl-win32" i686-w64-mingw32 "${cflags}"
-echo
-echo
-"${scriptdir}/buildall.sh" "${config}" "${dest}/xpl-win64" x86_64-w64-mingw32 "${cflags}"
Index: ildmsi.bat
===================================================================
--- buildmsi.bat	(revision 63)
+++ 	(revision )
@@ -1,2 +1,0 @@
-set PYTHONPATH=src\client\python
-python setup.py bdist_msi
Index: configure.ac
===================================================================
--- configure.ac	(revision 109)
+++ configure.ac	(revision 0)
@@ -1,8 +1,8 @@
-AC_INIT(xplra, 0.3, ivaradi@gmail.com)
-AM_INIT_AUTOMAKE([foreign no-exeext])
+AC_INIT(xplra, 0.1, ivaradi@gmail.com)
+AM_INIT_AUTOMAKE([foreign])
 
 LT_INIT
-AC_CONFIG_MACRO_DIR([m4])
 
+AM_PROG_AS
 AC_PROG_CC
 AC_PROG_CXX
@@ -10,24 +10,48 @@
 PKG_PROG_PKG_CONFIG
 
-AM_VSCPL_TARGET_API
+AC_CHECK_HEADERS([windows.h winsock2.h])
+
+test "$ac_cv_header_windows_h" = "yes" -a "$ac_cv_header_winsock2_h" = "yes"
+_target_win32=$?
+
+AM_CONDITIONAL([TARGET_API_WIN32], test $_target_win32 -eq 0)
+AM_CONDITIONAL([TARGET_API_POSIX], test $_target_win32 -ne 0)
+if test $_target_win32 -eq 0; then
+   AC_DEFINE([TARGET_API_WIN32], [1], [Define if the target is the Win32 API.])
+else
+   AC_DEFINE([TARGET_API_POSIX], [1], [Define if the target is the POSIX API.])
+fi
+
+AC_MSG_CHECKING([where to find the X-Plane Plugin SDK])
+AC_ARG_WITH(xpsdk,
+            AC_HELP_STRING([--with-xpsdk=DIR],
+                           [use the X-Plane Plugin SDK in DIR]),
+            [
+                if test -r $withval/CHeaders/XPLM/XPLMPlugin.h; then
+                    AC_MSG_RESULT([$withval])
+                    XPSDK_INCLUDES="-I$withval/CHeaders/XPLM -I$withval/CHeaders/Wrappers -I$withval/CHeaders/Widgets"
+                    if test $_target_win32 -eq 0; then
+                        XPSDK_LDFLAGS="-L$withval/Libraries/Win"
+                    else
+                        XPSDK_LDFLAGS=""
+                    fi
+                else
+                    AC_MSG_FAILURE([not found in $withval])
+                fi
+            ],
+            [
+                 AC_MSG_FAILURE([please, specify])
+            ])
 
 AC_SUBST(XPSDK_INCLUDES)
 AC_SUBST(XPSDK_LDFLAGS)
 
-AM_VSCPL
+PKG_CHECK_MODULES([LIBXPLCOMMON], [libxplcommon >= 0.1])
 
 AC_CONFIG_FILES([
         Makefile
         src/Makefile
-        src/client/Makefile
-        src/client/c/Makefile
-        src/client/c/hu/Makefile
-        src/client/c/hu/varadiistvan/Makefile
-        src/client/c/hu/varadiistvan/xplra/Makefile
-        test/Makefile
-        doc/Makefile
+        src/xplra/Makefile
 ])
 
-AC_CONFIG_SUBDIRS([src/plugin])
-
 AC_OUTPUT()
Index: c/Doxyfile
===================================================================
--- doc/Doxyfile	(revision 115)
+++ 	(revision )
@@ -1,1766 +1,0 @@
-# Doxyfile 1.8.1.2
-
-# 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
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING      = UTF-8
-
-# The PROJECT_NAME tag is a single word (or sequence of words) that should
-# identify the project. Note that if you do not use Doxywizard you need
-# to put quotes around the project name if it contains spaces.
-
-PROJECT_NAME           = "X-Plane Remote Access Plugin and Client Library"
-
-# 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         =
-
-# Using the PROJECT_BRIEF tag one can provide an optional one line description
-# for a project that appears at the top of each page and should give viewer
-# a quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF          =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is
-# included in the documentation. The maximum height of the logo should not
-# exceed 55 pixels and the maximum width should not exceed 200 pixels.
-# Doxygen will copy the logo to the output directory.
-
-PROJECT_LOGO           =
-
-# 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       =
-
-# 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:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE        = English
-
-# 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        = 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. 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 if your file system
-# 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 regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF      = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF           = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the 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 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                =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding
-# "class=itcl::class" will allow you to use the command class in the
-# itcl::class meaning.
-
-#TCL_SUBST              =
-
-# 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 OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN   = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL   = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this
-# tag. The format is ext=language, where ext is a file extension, and language
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING      =
-
-# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
-# comments according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you
-# can mix doxygen, HTML, and XML commands with Markdown formatting.
-# Disable only in case of backward compatibilities issues.
-
-MARKDOWN_SUPPORT       = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also makes the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT    = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT        = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT            = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT   = 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
-
-# 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
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
-# unions are shown inside the group in which they are included (e.g. using
-# @ingroup) instead of on a separate page (for HTML and Man pages) or
-# section (for LaTeX and RTF).
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
-# unions with only public data fields will be shown inline in the documentation
-# of the scope in which they are defined (i.e. file, namespace, or group
-# documentation), provided this scope is documented. If set to NO (the default),
-# structs, classes, and unions are shown on a separate page (for HTML and Man
-# pages) or section (for LaTeX and RTF).
-
-INLINE_SIMPLE_STRUCTS  = NO
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT   = NO
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-LOOKUP_CACHE_SIZE      = 0
-
-#---------------------------------------------------------------------------
-# 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        = YES
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation.
-
-EXTRACT_PACKAGE        = 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 this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespaces are hidden.
-
-EXTRACT_ANON_NSPACES   = 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 FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-# will list include files with double quotes in the documentation
-# rather than with sharp brackets.
-
-FORCE_LOCAL_INCLUDES   = NO
-
-# 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_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-# will sort the (brief and detailed) documentation of class members so that
-# constructors and destructors are listed first. If set to NO (the default)
-# the constructors will appear in the respective orders defined by
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES       = 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
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
-# do proper type resolution of all parameters of a function it will reject a
-# match between the prototype and the implementation of a member function even
-# if there is only one candidate or it is obvious which candidate to choose
-# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
-# will still accept a match between prototype and implementation in such cases.
-
-STRICT_PROTO_MATCHING  = 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 macro 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 macros 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
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES             = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES        = 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 program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER    =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option.
-# You can optionally specify a file name after the option, if omitted
-# DoxygenLayout.xml will be used as the name of the layout file.
-
-LAYOUT_FILE            =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files
-# containing the references data. This must be a list of .bib files. The
-# .bib extension is automatically appended if omitted. Using this command
-# requires the bibtex tool to be installed. See also
-# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
-# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
-# feature you need bibtex and perl available in the search path.
-
-CITE_BIB_FILES         =
-
-#---------------------------------------------------------------------------
-# 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               = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED   = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR      = YES
-
-# The WARN_NO_PARAMDOC option can be enabled 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                  = overview.dox ../src/plugin/src/xplra \
-                         ../src/client/c/hu/varadiistvan/xplra \
-                         ../src/client/python
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING         = UTF-8
-
-# 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++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
-# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
-# *.f90 *.f *.for *.vhd *.vhdl
-
-FILE_PATTERNS          = *.h *.cc *.py
-
-# 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 be
-# 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.
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE                =
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system 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 EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS        =
-
-# 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 or if
-# non of the patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS        =
-
-# 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
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
-# and it is also possible to disable source filtering for a specific pattern
-# using *.ext= (so without naming a filter). This option only has effect when
-# FILTER_SOURCE_FILES is enabled.
-
-FILTER_SOURCE_PATTERNS =
-
-#---------------------------------------------------------------------------
-# 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, C++ and Fortran comments will always remain visible.
-
-STRIP_CODE_COMMENTS    = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION    = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = 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     = 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    = 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. Note that when using a custom header you are responsible
-#  for the proper inclusion of any scripts and style sheets that doxygen
-# needs, which is dependent on the configuration options used.
-# It is advised to generate a default header using "doxygen -w html
-# header.html footer.html stylesheet.css YourConfigFile" and then modify
-# that header. Note that the header is subject to change so you typically
-# have to redo this when upgrading to a newer version of doxygen or when
-# changing the value of configuration settings such as GENERATE_TREEVIEW!
-
-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
-# style sheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET        =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that
-# the files will be copied as-is; there are no commands or markers available.
-
-HTML_EXTRA_FILES       =
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-# Doxygen will adjust the colors in the style sheet and background images
-# according to this color. Hue is specified as an angle on a colorwheel,
-# see http://en.wikipedia.org/wiki/Hue for more information.
-# For instance the value 0 represents red, 60 is yellow, 120 is green,
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-# The allowed range is 0 to 359.
-
-HTML_COLORSTYLE_HUE    = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-# the colors in the HTML output. For a value of 0 the output will use
-# grayscales only. A value of 255 will produce the most vivid colors.
-
-HTML_COLORSTYLE_SAT    = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-# the luminance component of the colors in the HTML output. Values below
-# 100 gradually make the output lighter, whereas values above 100 make
-# the output darker. The value divided by 100 is the actual gamma applied,
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-# and 100 does not change the gamma.
-
-HTML_COLORSTYLE_GAMMA  = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting
-# this to NO can help when comparing the output of multiple runs.
-
-HTML_TIMESTAMP         = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-
-HTML_DYNAMIC_SECTIONS  = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
-# entries shown in the various tree structured indices initially; the user
-# can expand and collapse entries dynamically later on. Doxygen will expand
-# the tree to such a level that at most the specified number of entries are
-# visible (unless a fully collapsed tree already exceeds this amount).
-# So setting the number of entries 1 will produce a full collapsed tree by
-# default. 0 is a special value representing an infinite number of entries
-# and will result in a full expanded tree by default.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-
-GENERATE_DOCSET        = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME        = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID       = org.doxygen.Project
-
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-
-DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-
-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-
-DOCSET_PUBLISHER_NAME  = Publisher
-
-# 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 compiled 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 CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING     =
-
-# 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
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-# that can be used as input for Qt's qhelpgenerator to generate a
-# Qt Compressed Help (.qch) of the generated HTML documentation.
-
-GENERATE_QHP           = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE               =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE          = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER     = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-# add. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME   =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-# Qt Help Project / Custom Filters</a>.
-
-QHP_CUST_FILTER_ATTRS  =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's
-# filter section matches.
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-# Qt Help Project / Filter Attributes</a>.
-
-QHP_SECT_FILTER_ATTRS  =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION           =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-#  will be generated, which together with the HTML files, form an Eclipse help
-# plugin. To install this plugin and make it available under the help contents
-# menu in Eclipse, the contents of the directory containing the HTML and XML
-# files needs to be copied into the plugins directory of eclipse. The name of
-# the directory within the plugins directory should be the same as
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-# the help appears.
-
-GENERATE_ECLIPSEHELP   = NO
-
-# A unique identifier for the eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have
-# this name.
-
-ECLIPSE_DOC_ID         = org.doxygen.Project
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
-# at top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it. Since the tabs have the same information as the
-# navigation tree you can set this option to NO if you already set
-# GENERATE_TREEVIEW to YES.
-
-DISABLE_INDEX          = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value 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 (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-# Since the tree basically has the same information as the tab index you
-# could consider to set DISABLE_INDEX to NO when enabling this option.
-
-GENERATE_TREEVIEW      = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
-# (range [0,1..20]) that doxygen will group on one line in the generated HTML
-# documentation. Note that a value of 0 will completely suppress the enum
-# values from appearing in the overview section.
-
-ENUM_VALUES_PER_LINE   = 4
-
-# 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
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-# links to external symbols imported via tag files in a separate window.
-
-EXT_LINKS_IN_WINDOW    = NO
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE       = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are
-# not supported properly for IE 6.0, but are supported on all modern browsers.
-# Note that when changing this option you need to delete any form_*.png files
-# in the HTML output before the changes have effect.
-
-FORMULA_TRANSPARENT    = YES
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
-# (see http://www.mathjax.org) which uses client side Javascript for the
-# rendering instead of using prerendered bitmaps. Use this if you do not
-# have LaTeX installed or if you want to formulas look prettier in the HTML
-# output. When enabled you may also need to install MathJax separately and
-# configure the path to it using the MATHJAX_RELPATH option.
-
-USE_MATHJAX            = NO
-
-# When MathJax is enabled you need to specify the location relative to the
-# HTML output directory using the MATHJAX_RELPATH option. The destination
-# directory should contain the MathJax.js script. For instance, if the mathjax
-# directory is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to
-# the MathJax Content Delivery Network so you can quickly see the result without
-# installing MathJax.
-# However, it is strongly recommended to install a local
-# copy of MathJax from http://www.mathjax.org before deployment.
-
-MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
-# names that should be enabled during MathJax rendering.
-
-MATHJAX_EXTENSIONS     =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-# for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-# (GENERATE_DOCSET) there is already a search function so this one should
-# typically be disabled. For large projects the javascript based search engine
-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-
-SEARCHENGINE           = YES
-
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a PHP enabled web server instead of at the web client
-# using Javascript. Doxygen will generate the search PHP script and index
-# file to put on the web server. The advantage of the server
-# based approach is that it scales better to large projects and allows
-# full text search. The disadvantages are that it is more difficult to setup
-# and does not have live searching capabilities.
-
-SERVER_BASED_SEARCH    = NO
-
-#---------------------------------------------------------------------------
-# 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.
-# Note that when enabling USE_PDFLATEX this option is only used for
-# generating bitmaps for formulas in the HTML output, but not in the
-# Makefile that is written to the output directory.
-
-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, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE             = a4
-
-# 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           =
-
-# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
-# the generated latex document. The footer should contain everything after
-# the last chapter. If it is left blank doxygen will generate a
-# standard footer. Notice: only use this tag if you know what you are doing!
-
-LATEX_FOOTER           =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS         = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX           = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE        = NO
-
-# 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
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-# source code with syntax highlighting in the LaTeX output.
-# Note that which sources are shown also depends on other settings
-# such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE      = NO
-
-# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
-# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
-# http://en.wikipedia.org/wiki/BibTeX for more info.
-
-LATEX_BIB_STYLE        = plain
-
-#---------------------------------------------------------------------------
-# 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 style sheet 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
-
-# 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_DEFINED tags.
-
-EXPAND_ONLY_PREDEF     = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# pointed to by INCLUDE_PATH will be searched when 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. 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 that
-# overrules the definition found in the source code.
-
-EXPAND_AS_DEFINED      =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all references to function-like macros
-# that are alone on a line, have an all uppercase name, and do not end with a
-# semicolon, because these 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. For each
-# tag file the location of the external documentation should be added. 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. 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 also works with HAVE_DOT disabled, but it is recommended to
-# install and use dot, since it yields more powerful graphs.
-
-CLASS_DIAGRAMS         = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-#MSCGEN_PATH            =
-
-# 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
-
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-# allowed to run in parallel. When set to 0 (the default) doxygen will
-# base this on the number of processors available in the system. You can set it
-# explicitly to a value larger than 0 to get control over the balance
-# between CPU load and processing speed.
-
-DOT_NUM_THREADS        = 0
-
-# By default doxygen will use the Helvetica font for all dot files that
-# doxygen generates. When you want a differently looking font you can specify
-# the font name using DOT_FONTNAME. You need to make sure dot is able to find
-# the font, which can be done by putting it in a standard location or by setting
-# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
-# directory containing the font.
-
-DOT_FONTNAME           = Helvetica
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE           = 10
-
-# By default doxygen will tell dot to use the Helvetica font.
-# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
-# set the path where dot can find it.
-
-DOT_FONTPATH           =
-
-# 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
-# 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 the UML_LOOK tag is enabled, the fields and methods are shown inside
-# the class node. If there are many fields or methods and many nodes the
-# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
-# threshold limits the number of items for each type to make the size more
-# managable. Set this to 0 for no limit. Note that the threshold may be
-# exceeded by 50% before the limit is enforced.
-
-UML_LIMIT_NUM_FIELDS   = 10
-
-# 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 options 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 CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller 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 caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH           = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will generate a graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY    = YES
-
-# If the DIRECTORY_GRAPH 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 svg, png, jpg, or gif.
-# If left blank png will be used. If you choose svg you need to set
-# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible in IE 9+ (other browsers do not have this requirement).
-
-DOT_IMAGE_FORMAT       = png
-
-# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
-# enable generation of interactive SVG images that allow zooming and panning.
-# Note that this requires a modern browser other than Internet Explorer.
-# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
-# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
-# visible. Older versions of IE do not have SVG support.
-
-INTERACTIVE_SVG        = NO
-
-# 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 MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the
-# \mscfile command).
-
-MSCFILE_DIRS           =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES    = 50
-
-# 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 the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH    = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. 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      = YES
-
-# 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
Index: c/Makefile.am
===================================================================
--- doc/Makefile.am	(revision 74)
+++ 	(revision )
@@ -1,1 +1,0 @@
-EXTRA_DIST=Doxyfile TracFooter.html TracHeader.html overview.dox
Index: c/TracFooter.html
===================================================================
--- doc/TracFooter.html	(revision 72)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: c/TracHeader.html
===================================================================
--- doc/TracHeader.html	(revision 72)
+++ 	(revision )
@@ -1,1 +1,0 @@
-
Index: c/overview.dox
===================================================================
--- doc/overview.dox	(revision 86)
+++ 	(revision )
@@ -1,835 +1,0 @@
-/*! \mainpage X-Plane Remote Access Plugin and Client Library Documentation
- *
- * \section intro Introduction
- *
- * The X-Plane Remote Access (XPLRA) plugin provides a gateway to external
- * applications to access some internals of X-Plane. This document
- * describes the plugin and its usage. It is assumed that the reader
- * is somewhat familiar with the X-Plane plugin SDK. The plugin
- * currently works on Linux and Windows, but porting to Mac should be
- * easy. If you would volunteer, let me know! :)
- *
- * The XPLRA plugin allows the extern applications to perform the
- * following:
- * - Get and set the values of datarefs either individually or in
- *   batch. Batches can also be pre-registered in case the same set of
- *   datarefs is to be queried or modified several times. This avoids
- *   having to send and resolve the dataref names every time.
- * - Query the versions of X-Plane, XPLM (the plugin manager) and
- *   XPLRA.
- * - Show a message in a window for the pilot for a specified amount
- *   of time.
- * - Register and then monitor hotkeys.
- *
- * Currently the plugin can be accessed locally, i.e. from the same
- * computer that runs X-Plane, but extending it with TCP/IP-based or
- * network access would not be difficult. While client libraries are
- * provided for \ref cppapi "C, C++" and \ref pythonapi "Python",
- * the communication protocol between clients and the plugin is open
- * and is \ref proto "described" in  this documentation. So you can
- * write your own client library, if you wish.
- */
-/*! \page proto Protocol
- *
- * On Linux a Unix stream socket is created with the name
- * \c /tmp/xplra-\<user name\>, where \c \<user name\> is the login
- * account name of the user running X-Plane. On Windows a named pipe
- * is created with the name \c \\\\\.\\pipe\\xplra. The usual methods
- * provided by the OS can be used to connect to these.
- *
- * The protocol is a binary protocol. The client initiates commands
- * which are executed by the plugin. Each command is a byte followed
- * by the arguments of the command. The plugin responds with a result
- * code, which is also a byte, which may be followed by the rest of
- * the reply, e.g. the data queried or a parameter to an error code.
- *
- * \section protodata Types of protocol data elements
- *
- * The protocol's basic data elements are: 8-, 16- and 32-bit signed
- * and unsigned integers, single and double precision floating point
- * values and strings. The endianness of the values is that of the
- * host operating system.
-
- * Strings are encoded as a variable-length length followed by as many
- * bytes making up the actual contents of the string. The
- * variable-length length consists of bytes whose most-significant bit
- * is 1, if there is another byte and 0 for the last byte. The first
- * byte contains the least significant 7 bits of the length, the
- * second byte contains bits 7-13, and so on. Some examples:
- * - 12 => 0x0c
- * - 123 => 0x7b
- * - 128 => 0x80 0x01
- * - 210 => 0xd2 0x01
- * - 7345 => 0xb1 0x39
- * - 90000 => 0x90 0xbf 0x05
- *
- * \section datatypes Data type codes
- *
- * Each dataref of X-Plane has a certain data type, and some datarefs
- * can represent their values in multiple data types. Because of this
- * ambiguity and the fact that users should know the data type anyway,
- * especially when using a strongly typed language, the type should be
- * sent with the dataref name in commands that refer to one or more
- * datarefs.
- *
- * Each data type is represented as an 8-bit unsigned integer, whose
- * possible values are given in the table below:
- *
- * Data type | Value | Constant name
- * --------- | ----: | -------------
- * 32-bit signed integer | 0x01 | \anchor TYPE_INT TYPE_INT
- * single-precision floating-point value | 0x02 | \anchor TYPE_FLOAT TYPE_FLOAT
- * double-precision floating-point value | 0x03 | \anchor TYPE_DOUBLE TYPE_DOUBLE
- * array of single-precision floating-point values | 0x11 | \anchor TYPE_FLOAT_ARRAY TYPE_FLOAT_ARRAY
- * array of 32-bit signed integers | 0x12 | \anchor TYPE_INT_ARRAY TYPE_INT_ARRAY
- * array of 8-bit unsigned integers (bytes) | 0x13 | \anchor TYPE_BYTE_ARRAY TYPE_BYTE_ARRAY
- *
- * The constant name is the name used in both client APIs to identify
- * the given type.
- *
- * The scalar data types are encoded as in the following table:
- *
- * Data type constant | Encoding
- * ------------------ | --------
- * \ref TYPE_INT | a 32-bit (4-byte) signed integer
- * \ref TYPE_FLOAT | a 32-bit (4-byte) IEEE 754 single-precision floating point value
- * \ref TYPE_DOUBLE | a 64-bit (8-byte) IEEE 754 double-precision floating point value
- *
- * The contents of an array is encoded as a sequence of values of the
- * items' type. It is usually preceded by a 32-bit signed integer
- * denoting the number of items and sometimes also by another 32-bit
- * signed integer denoting the offset into the array.
- *
- * \section resultcodes Result codes
- *
- * The first byte of the reply message to each command is a result
- * code. If the command could be executed properly, it is RESULT_OK
- * followed by the results of the command if any, otherwise it is
- * another code signifying some error. Most error codes are followed
- * by no further data, but \ref RESULT_UNKNOWN_DATAREF may be followed by
- * an index if a multi-dataref request is issued.
- *
- * The table summarizes the error codes:
- *
- * Meaning | Value | Constant name
- * ------- | ----- | -------------
- * Success, everything is OK | 0x00 | \anchor RESULT_OK RESULT_OK
- * Invalid command | 0x01 | \anchor RESULT_INVALID_COMMAND RESULT_INVALID_COMMAND
- * Unknown dataref | 0x02 | \anchor RESULT_UNKNOWN_DATAREF RESULT_UNKNOWN_DATAREF
- * Invalid data type | 0x03 | \anchor RESULT_INVALID_TYPE RESULT_INVALID_TYPE
- * Invalid length | 0x04 | \anchor RESULT_INVALID_LENGTH RESULT_INVALID_LENGTH
- * Invalid offset | 0x05 | \anchor RESULT_INVALID_OFFSET RESULT_INVALID_OFFSET
- * Invalid count | 0x06 | \anchor RESULT_INVALID_COUNT RESULT_INVALID_COUNT
- * Invalid ID | 0x07 | \anchor RESULT_INVALID_ID RESULT_INVALID_ID
- * Invalid duration | 0x08 | \anchor RESULT_INVALID_DURATION RESULT_INVALID_DURATION
- * Other error | 0xff | \anchor RESULT_OTHER_ERROR RESULT_OTHER_ERROR
- *
- * \section limits Limits
- *
- * Certain parameters have limits, which are summarized in the
- * following table:
- *
- * Description | Limit
- * ------- | -----
- * maximal number of array items | 2048
- * maximal number of datarefs in a multi-dataref operation | 1024
- * maximal duration of a message | 5 minutes
- * maximal number of hotkeys that can be registered | 128
- *
- * \section commands Commands
- *
- * This section describes the commands of the protocol with their
- * parameters and the possible replies. Each command is represented by
- * an 8-bit unsigned value, which is the first byte of the
- * message. The table below summarizes the commands with their command
- * byte and constant names:
- *
- * Description | Command byte | Constant Name
- * ----------- | -----------: | -------------
- * \ref command_get_single "Query the value of a single dataref" | 0x01 | \anchor COMMAND_GET_SINGLE COMMAND_GET_SINGLE
- * \ref command_set_single "Set the value of a single dataref" | 0x02 | \anchor COMMAND_SET_SINGLE COMMAND_SET_SINGLE
- * \ref command_get_multi "Query the values of multiple datarefs" | 0x03 | \anchor COMMAND_GET_MULTI COMMAND_GET_MULTI
- * \ref command_set_multi "Set the values of multiple datarefs" | 0x04 | \anchor COMMAND_SET_MULTI COMMAND_SET_MULTI
- * \ref command_register_get_multi "Register a multi-dataref query" | 0x11 | \anchor COMMAND_REGISTER_GET_MULTI COMMAND_REGISTER_GET_MULTI
- * \ref command_unregister_get_multi "Unregister a multi-dataref query" | 0x12 | \anchor COMMAND_UNREGISTER_GET_MULTI COMMAND_UNREGISTER_GET_MULTI
- * \ref command_execute_get_multi "Execute a registered multi-dataref query" | 0x13 | \anchor COMMAND_EXECUTE_GET_MULTI COMMAND_EXECUTE_GET_MULTI
- * \ref command_register_set_multi "Register a multi-dataref update request" | 0x21 | \anchor COMMAND_REGISTER_SET_MULTI COMMAND_REGISTER_SET_MULTI
- * \ref command_unregister_set_multi "Unregister a multi-dataref update request" | 0x22 | \anchor COMMAND_UNREGISTER_SET_MULTI COMMAND_UNREGISTER_SET_MULTI
- * \ref command_execute_set_multi "Execute a registered multi-dataref update request" | 0x23 | \anchor COMMAND_EXECUTE_SET_MULTI COMMAND_EXECUTE_SET_MULTI
- * \ref command_get_versions "Query the versions of X-Plane, XPLM and XPLRA" | 0x31 | \anchor COMMAND_GET_VERSIONS COMMAND_GET_VERSIONS
- * \ref command_reload_plugins "Reload the plugins in X-Plane" | 0x32 | \anchor COMMAND_RELOAD_PLUGINS COMMAND_RELOAD_PLUGINS
- * \ref command_save_situation "Save the current situation" | 0x33 | \anchor COMMAND_SAVE_SITUATION COMMAND_SAVE_SITUATION
- * \ref command_show_message "Show a message in X-Plane's window" | 0x41 | \anchor COMMAND_SHOW_MESSAGE COMMAND_SHOW_MESSAGE
- * \ref command_register_hotkeys "Register hotkeys to be listened to" | 0x51 | \anchor COMMAND_REGISTER_HOTKEYS COMMAND_REGISTER_HOTKEYS
- * \ref command_query_hotkeys "Query the sate of the registered hotkeys" | 0x52 | \anchor COMMAND_QUERY_HOTKEYS COMMAND_QUERY_HOTKEYS
- * \ref command_unregister_hotkeys "Unregister the previously registered hotkets" | 0x53 | \anchor COMMAND_UNREGISTER_HOTKEYS COMMAND_UNREGISTER_HOTKEYS
- *
- * \subsection command_get_single The GET_SINGLE command
- *
- * This command can be used to query the value of a single
- * dataref. Such a data can either be a scalar (integer, float or
- * double) or an array of floats, integers or bytes.
- *
- * The format of the command is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x01 (\ref COMMAND_GET_SINGLE)
- * dataref_query_info | information about the dataref to query
- *
- * \anchor dataref_query_info \c dataref_query_info has the following
- * format for scalar types:
- *
- * Type | Description
- * ---- | ------
- * string | the name of the dataref to query
- * byte | the type of the dataref, one of the \ref datatypes "TYPE_XXX" constants
- *
- * \c dataref_query_info has the following format for array types:
- *
- * Type | Description
- * ---- | ------
- * string | the name of the dataref to query
- * byte | the type of the dataref, one of the \ref datatypes "TYPE_XXX_ARRAY" constants
- * 32-bit signed integer | the number of items to query, -1 to query all items
- * 32-bit signed integer | the offset of the data within the array to query
- *
- * If the command is executed successfully, the reply has the
- * following format for scalar types:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * dataref_value | the value of the dataref
- *
- * \anchor dataref_value dataref_value is encoded as follows for scalar types:
- *
- * Type | Description
- * ---- | ------
- * scalar type | the value of the dataref
- *
- * dataref_value is encoded as follows for array types:
- *
- * Type | Description
- * ---- | ------
- * 32-bit signed integer | n=the number of items returned
- * n*type of the items | the data items themselves
- *
- * In case of an error:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_UNKNOWN_DATAREF | the dataref with the given name was not found
- * \ref RESULT_INVALID_TYPE | an unknown type code was given
- * \ref RESULT_INVALID_LENGTH | the length given for an array is too large
- * \ref RESULT_INVALID_OFFSET | the offset given for an array is negative
- *
- * \subsection command_set_single The SET_SINGLE command
- *
- * This command can be used to set the value of a single
- * dataref. Such a data can either be a scalar (integer, float or
- * double) or an array of floats, integers or bytes.
- *
- * The format of the command is the following for scalar values:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x02 (\ref COMMAND_SET_SINGLE)
- * dataref_update_info | information about the dataref to set and the value itself
- *
- * \anchor dataref_update_info \c dataref_update_info has the
- * following format for scalar values:
- *
- * Type | Description
- * ---- | ------
- * string | the name of the dataref to set
- * byte | the type of the dataref, one of the \ref datatypes "TYPE_XXX" constants
- * dataref's type | the value to set
- *
- * \c dataref_update_info has the following format for array values:
- *
- * Type | Description
- * ---- | ------
- * string | the name of the dataref to set
- * byte | the type of the dataref, one of the \ref datatypes "TYPE_XXX_ARRAY" constants
- * 32-bit signed integer | n=the number of items to set
- * 32-bit signed integer | the offset from which to set the values
- * n*type of the items | the actual values of the array
- *
- * If the command is executed successfully, the reply has the
- * following format for scalar types:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_UNKNOWN_DATAREF | the dataref with the given name was not found
- * \ref RESULT_INVALID_TYPE | an unknown type code was given
- * \ref RESULT_INVALID_LENGTH | the length given for an array is too large or not positive
- * \ref RESULT_INVALID_OFFSET | the offset given for an array is negative
- *
- * \subsection command_get_multi The GET_MULTI command
- *
- * This command can be used to query the values of several datarefs in
- * one call. It is encoded as follows:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x03 (\ref COMMAND_GET_MULTI)
- * 32-bit unsigned integer | n=the number of datarefs to query
- * n*\ref dataref_query_info | information about the datarefs to query.
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * n*\ref dataref_value | the values of the datarefs
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- * 32-bit unsigned integer | if the error code is \ref RESULT_UNKNOWN_DATAREF : the 0-based index of the first dataref that was not found
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_UNKNOWN_DATAREF | the dataref with the given name was not found
- * \ref RESULT_INVALID_TYPE | an unknown type code was given
- * \ref RESULT_INVALID_LENGTH | the length given for an array is too large
- * \ref RESULT_INVALID_OFFSET | the offset given for an array is negative
- * \ref RESULT_INVALID_COUNT | the number of datarefs was either 0 or too large
- *
- * \subsection command_set_multi The SET_MULTI command
- *
- * This command can be used to set the values of several datarefs in
- * one call. It is encoded as follows:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x04 (\ref COMMAND_SET_MULTI)
- * 32-bit unsigned integer | n=the number of datarefs to set
- * n*\ref dataref_update_info | information about the datarefs to set
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- * 32-bit unsigned integer | if the error code is \ref RESULT_UNKNOWN_DATAREF : the 0-based index of the first dataref that was not found
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_UNKNOWN_DATAREF | the dataref with the given name was not found
- * \ref RESULT_INVALID_TYPE | an unknown type code was given
- * \ref RESULT_INVALID_LENGTH | the length given for an array is too large or not positive
- * \ref RESULT_INVALID_OFFSET | the offset given for an array is negative
- * \ref RESULT_INVALID_COUNT | the number of datarefs was either 0 or too large
- *
- * \subsection command_register_get_multi The REGISTER_GET_MULTI command
- *
- * This command can be used to register a multi-dataref query. A
- * multi-dataref query is a list of datarefs that are queried
- * together. The query will be associated with an identifier that can
- * be used later to refer to the query when actually querying the
- * values or when unregistering it. The identifier is unique only for
- * the client connection and among the multi-dataref queries.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x11 (\ref COMMAND_REGISTER_GET_MULTI)
- * 32-bit unsigned integer | n=the number of datarefs to query
- * n*\ref dataref_query_info | information about the datarefs to query.
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * 32-bit unsigned integer | the identifier of the registered query
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_INVALID_TYPE | an unknown type code was given
- * \ref RESULT_INVALID_LENGTH | the length given for an array is too large
- * \ref RESULT_INVALID_OFFSET | the offset given for an array is negative
- * \ref RESULT_INVALID_COUNT | the number of datarefs was either 0 or too large
- *
- * \subsection command_unregister_get_multi The UNREGISTER_GET_MULTI command
- *
- * This command can be used to unregister a previously registered
- * multi-dataref query.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x12 (\ref COMMAND_UNREGISTER_GET_MULTI)
- * 32-bit unsigned integer | the identifier of the query to unregister
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_INVALID_ID | an identifier was given that is not associated with any registered query
- *
- * \subsection command_execute_get_multi The EXECUTE_GET_MULTI command
- *
- * This command can be used to execute a previously registered
- * multi-dataref query.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x13 (\ref COMMAND_EXECUTE_GET_MULTI)
- * 32-bit unsigned integer | the identifier of the query to execute
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * n*\ref dataref_value | the values of the datarefs, n is the number of them
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- * 32-bit unsigned integer | if the error code is \ref RESULT_UNKNOWN_DATAREF : the 0-based index of the first dataref that was not found
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_UNKNOWN_DATAREF | the dataref with the given name was not found
- * \ref RESULT_INVALID_ID | an identifier was given that is not associated with any registered query
- *
- * \subsection command_register_set_multi The REGISTER_SET_MULTI command
- *
- * This command can be used to register a multi-dataref update. A
- * multi-dataref update is a list of datarefs that are updated
- * together with values supplied for each update. The update will be
- * associated with an identifier that can be used later to refer to
- * the update when actually updating the values or when unregistering
- * it. The identifier is unique only for  the client connection and
- * among the multi-dataref updates.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x21 (\ref COMMAND_REGISTER_SET_MULTI)
- * 32-bit unsigned integer | n=the number of datarefs to query
- * n*\ref dataref_query_info | information about the datarefs to update (this \a is \ref dataref_query_info, because the format is the same, since we don't supply any values)
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * 32-bit unsigned integer | the identifier of the registered query
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_INVALID_TYPE | an unknown type code was given
- * \ref RESULT_INVALID_LENGTH | the length given for an array is too large or not positive
- * \ref RESULT_INVALID_OFFSET | the offset given for an array is negative
- * \ref RESULT_INVALID_COUNT | the number of datarefs was either 0 or too large
- *
- * \subsection command_unregister_set_multi The UNREGISTER_GET_MULTI command
- *
- * This command can be used to unregister a previously registered
- * multi-dataref update.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x22 (\ref COMMAND_UNREGISTER_SET_MULTI)
- * 32-bit unsigned integer | the identifier of the update to unregister
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_INVALID_ID | an identifier was given that is not associated with any registered update
- *
- * \subsection command_execute_set_multi The EXECUTE_SET_MULTI command
- *
- * This command can be used to execute a previously registered
- * multi-dataref update.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x23 (\ref COMMAND_EXECUTE_SET_MULTI)
- * 32-bit unsigned integer | the identifier of the update to execute
- * n*\ref dataref_value | the values
- *
- * In case of success, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- * 32-bit unsigned integer | if the error code is \ref RESULT_UNKNOWN_DATAREF : the 0-based index of the first dataref that was not found
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_UNKNOWN_DATAREF | the dataref with the given name was not found
- * \ref RESULT_INVALID_ID | an identifier was given that is not associated with any registered query
- *
- * \subsection command_get_versions The GET_VERSIONS command
- *
- * This command can be used to query the versions of X-Plane, XPLM and
- * XPLRA itself.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x31 (\ref COMMAND_GET_VERSIONS)
- *
- * The reply is encoded the following way (it shall never fail):
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * 32-bit signed integer | the version of X-Plane. For 10.20r1 it is 10201.
- * 32-bit signed integer | the version of XPLM. For 2.10 it is 210.
- * 32-bit signed integer | the version of XPLRA. For 0.1 it is 10.
- *
- * \subsection command_reload_plugins The RELOAD_PLUGINS command
- *
- * This command can be used to reload the plugins in X-Plane. This is
- * useful for debugging.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x32 (\ref COMMAND_RELOAD_PLUGINS)
- *
- * The reply is encoded the following way (it shall never fail):
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * \subsection command_save_situation The SAVE_SITUATION command
- *
- * This command can be used to save the current situation into a file.
- * It is available only on X-Plane 10 or later.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x33 (\ref COMMAND_SAVE_SITUATION)
- * string | the path of the file to save the situation into, relative to the X-Plane directory
- *
- * If successful, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply is the following (no error could be produced yet,
- * but it might fail).
- *
- * Type | Description
- * ---- | ------
- * byte | 0xff (\ref RESULT_OTHER_ERROR)
- *
- * \subsection command_get_versions The GET_VERSIONS command
- *
- * This command can be used to query the versions of X-Plane, XPLM and
- * XPLRA itself.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x31 (\ref COMMAND_GET_VERSIONS)
- *
- * The reply is encoded the following way (it shall never fail):
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * 32-bit signed integer | the version of X-Plane. For 10.20r1 it is 10201.
- * 32-bit signed integer | the version of XPLM. For 2.10 it is 210.
- * 32-bit signed integer | the version of XPLRA. For 0.1 it is 10.
- *
- * \subsection command_show_message The SHOW_MESSAGE command
- *
- * This command can be used to show a message in a window to the
- * user. The window is a single line window around the top 1/3rd of
- * the screen. It can be moved and resized by mouse actions. If a
- * message is being displayed when this command is issued, that
- * message will be replaced by the new one.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x41 (\ref COMMAND_SHOW_MESSAGE)
- * string | the message to show
- * float | the duration of the message in seconds
- *
- * If successful, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_INVALID_DURATION | the duration is too large
- *
- * \subsection command_register_hotkeys The REGISTER_HOTKEYS command
- *
- * This command can be used to register a set of hotkeys to be
- * monitored. If any other hotkeys have been registered by the current
- * client previously, they are forgotten.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x51 (\ref COMMAND_REGISTER_HOTKEYS)
- * 32-bit unsigned integer | n=the number of the hotkeys
- * n * 16-bit unsigned integer | the codes of the hotkeys
- *
- * The lower-byte of a hotkey code is the same as the X-Plane virtual
- * key code. The upper byte is a logical OR of zero or more modifiers:
- *
- * Value | Description | Constant name
- * --: | --- | ---
- * 0x0100 | Shift modifier | HOTKEY_MODIFIER_SHIFT
- * 0x0200 | Control modifier | HOTKEY_MODIFIER_CONTROL
- *
- * If successful, the reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- *
- * If an error was encountered, the reply has the following format:
- *
- * Type | Description
- * ---- | ------
- * byte | the error code
- *
- * The following error codes may be returned:
- *
- * Code | Meaning
- * ---- | -------
- * \ref RESULT_INVALID_LENGTH | too many hotkeys were given
- *
- * \subsection command_query_hotkeys The QUERY_HOTKEYS command
- *
- * This command can be used to query which hotkeys have been pressed
- * since the last query.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x52 (\ref COMMAND_QUERY_HOTKEYS)
- *
- * The reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- * 32-bit unsigned integer | n = the number of hotkeys registered
- * n * 8-bit unsigned integer | each byte is 0 or 1 depending whether the corresponding hotkeys was pressed or not. The value at index i corresponds to the hotkey code at index i in the array passed with \ref command_register_hotkeys "COMMAND_REGISTER_HOTKEYS"
- *
- * \subsection command_unregister_hotkeys The UNREGISTER_HOTKEYS command
- *
- * This command can be used to unregister a previously registered set
- * of hotkeys to be  monitored.
- *
- * Type | Description
- * ---- | ------
- * byte | 0x53 (\ref COMMAND_UNREGISTER_HOTKEYS)
- *
- * The reply is the following:
- *
- * Type | Description
- * ---- | ------
- * byte | 0x00 (\ref RESULT_OK)
- */
-/*! \page cppapi C/C++ Client API
- *
- * The C++ client API's central class is \ref
- * hu::varadiistvan::xplra::XPlane. To communicate with the XPLRA
- * plugin in X-Plane, create an instance of it. This, however, does
- * not establish the connection yet. To actually connect, call the
- * \ref hu::varadiistvan::xplra::XPlane::connect "connect" member
- * function. If the connection is established, it returns otherwise it
- * throws a \ref hu::varadiistvan::xplra::IOException.
- *
- * \c IOException is part of the exception hierarchy of the client
- * API. The hierarchy begins with \ref
- * hu::varadiistvan::xplra::Exception. The \c what function is
- * implemented for all exception classes, so you can always get a
- * string representation of the problem for logging or to display
- * it. \c IOException further makes available an error code, which is
- * the standard operating system-specific fault code of the I/O error
- * that occured.
- *
- * \ref hu::varadiistvan::xplra::ProtocolException is thrown for
- * errors returned by the plugin usually due to some incorrect
- * parameter. See also the \ref proto description for the meaning
- * and applicability of these error codes.
- *
- * The \c XPlane object can be reused in the sense, that after you
- * have made a connection, you can disconnect and then connect
- * again. This may be useful, if X-Plane crashes for some reason, and
- * you can then reconnect if the user has restarted it.
- *
- * The \ref hu::varadiistvan::xplra::XPlane::createMultiGetter
- * "createMultiGetter" function can be used to create a multi-dataref
- * query object. It returns an instance of
- * \ref hu::varadiistvan::xplra::MultiGetter "MultiGetter", which can
- * be used to store a number of datarefs and then execute a
- * multi-dataref query for those datarefs. Before execution, the query
- * can be \ref hu::varadiistvan::xplra::MultiBuffer::registerInXPlane
- * "registered" in the plugin, so that the client does not have to send
- * all the dataref information whenever the query is executed.
- *
- * The \c XPlane object knows about any multi-dataref query objects.
- * Therefore if you register such a multi-dataref query, and then the
- * connection breaks, and then you reconnect, the query will-be
- * re-registered too, i.e. you don't have to do it yourself.
- *
- * Similarly, the \ref hu::varadiistvan::xplra::XPlane::createMultiSetter
- * "createMultiSetter" function can be used to create a multi-dataref
- * update object. They are handled the same way by \c XPlane as the
- * query objects when it comes to registration and re-registration.
- *
- * The other functions of \c XPlane are mostly self-explanatory: they
- * perform the operations defined by the protocol. Several operations
- * have more than one corresponding functions with different
- * parameters for convenience.
- *
- * The \ref src/client/c/hu/varadiistvan/xplra/xplra.h "C API" is
- * a wrapper over the C++ one, so its logic is essentially the
- * same. To connect to X-Plane, call \ref xplra_connect. It returns a
- * non-negative handle, which can be used to refer to the connection
- * (i.e. the underlying \c XPlane object) in the other functions.
- *
- * In case of error, it, and most other functions of the C returns
- * -1. To check what the last error was, call \ref
- * xplra_get_last_error or \ref xplra_get_last_error_string.
- *
- * You can create multi-dataref buffers with C API as well with
- * \ref xplra_multi_create_getter and \ref
- * xplra_multi_create_setter. These return a buffer ID on success, and
- * you should use that buffer ID later on to manipulate the buffer.
- */
-/*! \page pythonapi Python Client API
- *
- * The Python client API is implemented as a single module. Its
- * central class is \ref xplra.XPlane. To communicate with the plugin
- * in X-Plane, create an instance of it and call its \ref
- * xplra.XPlane.connect "connect" function. This tries to establish
- * the connection, and throws the standard I/O exceptions if it fails.
- *
- * The class can be used to perform the various operations provided by
- * the plugin. In case of a failure and exception is thrown. If the
- * plugin signals an error, a \ref xplra.ProtocolException
- * "ProtocolException" is thrown with the error information provided
- * by the plugin. In other cases some standard exception is thrown,
- * which is mostly IOError if a communication error occurs.
- *
- * The \c XPlane object can be reused in the sense, that after you
- * have made a connection, you can disconnect and then connect
- * again. This may be useful, if X-Plane crashes for some reason, and
- * you can then reconnect if the user has restarted it.
- *
- * Objects to store information about multi-dataref queries can be
- * created by the \ref xplra.XPlane.createMultiGetter
- * "createMultiGetter" function. It returns an instance of \ref
- * xplra.MultiGetter, which can be used to store a number of datarefs
- * and then execute a multi-dataref query for those datarefs. Before
- * execution, the query can be \ref xplra.MultiBuffer.register
- * "registered" in the plugin, so that the client does not have to send
- * all the dataref information whenever the query is executed.
- *
- * The \c XPlane object knows about any multi-dataref query objects.
- * Therefore if you register such a multi-dataref query, and then the
- * connection breaks, and then you reconnect, the query will-be
- * re-registered too, i.e. you don't have to do it yourself.
- *
- * Similarly, the \ref xplra.XPlane.createMultiSetter
- * "createMultiSetter" function can be used to create a multi-dataref
- * update object. They are handled the same way by \c XPlane as the
- * query objects when it comes to registration and re-registration.
- *
- * The other functions of \c XPlane are mostly self-explanatory: they
- * perform the operations defined by the protocol.
- */
Index: sc/autosavesit.py
===================================================================
--- misc/autosavesit.py	(revision 97)
+++ 	(revision )
@@ -1,57 +1,0 @@
-#!/usr/bin/env python3
-#
-# Program to automatically save the situation at certain intervals
-
-from xplra import XPlane, ProtocolException
-
-import sys
-import os
-import time
-
-if __name__ == "__main__":
-    interval = float(sys.argv[1])
-    xplanePath = sys.argv[2]
-    name = sys.argv[3]
-
-    newName = name + ".new.sit"
-    savePath = "output/situations/" + newName
-
-    basePath = os.path.join(xplanePath, "Output", "situations", name)
-    path = basePath + ".sit"
-    newPath = basePath + ".new.sit"
-    oldPath = basePath + ".old.sit"
-
-    xplane = XPlane()
-
-    print("Connecting to X-Plane...")
-
-    while not xplane.isConnected:
-        try:
-            xplane.connect()
-        except:
-            print("Connection failed, sleeping...")
-            time.sleep(0.5)
-
-    print("Connected to X-Plane")
-
-    try:
-        while True:
-            try:
-                xplane.saveSituation(savePath)
-                try:
-                    if os.path.exists(path):
-                        os.rename(path, oldPath)
-                    os.rename(newPath, path)
-
-                    print("Situation saved at " + time.strftime("%H:%M:%S"))
-                except OSError as e:
-                    print("I/O error occured: " + str(e))
-            except ProtocolException as e:
-                print("Protocol error occured: " + str(e))
-            time.sleep(interval)
-    except Exception as e:
-        print("Connection failed: " + str(e))
-        try:
-            xplane.disconnect()
-        except:
-            pass
Index: sc/client.py
===================================================================
--- misc/client.py	(revision 97)
+++ 	(revision )
@@ -1,624 +1,0 @@
-#!/usr/bin/env python3
-
-import sys
-import cmd
-import struct
-import socket
-import os
-
-#------------------------------------------------------------------------------
-
-class CLI(cmd.Cmd):
-    """Simple command-line interface for the X-Plane Remote Access plugin."""
-    _types = { "i"  : 0x01,
-               "f"  : 0x02,
-               "d"  : 0x03,
-               "fa" : 0x11,
-               "ia" : 0x12,
-               "ba" : 0x13,
-               "s"  : 0x13 }
-
-    @staticmethod
-    def _splitArgs(args):
-        """Split the given argument string into a list of words."""
-        words = []
-        word = ""
-        inQuote = False
-        for c in args:
-            if c.isspace() and not inQuote:
-                if word:
-                    words.append(word)
-                    word = ""
-            elif c=="\"" and (not word or inQuote):
-                inQuote = not inQuote
-            else:
-                word += c
-        if word:
-            words.append(word)
-        return words
-
-    @staticmethod
-    def _parseGetSpec(words):
-        """Parse a data query specification from the given argument word lisst.
-
-        If there is some failure, it returns None.
-
-        Otherwise it returns a tuple of two items:
-        - the parsed data, which is a tuple of these items:
-          - the name of the dataref to query
-          - the type of the dataref to query (it is a valid type, checked by
-          the function)
-          - the length of the dataref to query
-          - the offset to query the dataref from
-
-        - the remainder of the argument list."""
-        if len(words)<2:
-            print("Missing parameters", file=sys.stderr)
-            return None
-
-        nextIndex = 2
-
-        name = words[0]
-        type = words[1]
-        if type not in CLI._types:
-            print("Invalid type", file=sys.stderr)
-            return None
-
-        length = None
-        offset = None
-        if type in ["ia", "fa", "ba", "s"]:
-            if len(words)<4:
-                print("Missing parameters", file=sys.stderr)
-                return None
-            length = int(words[2])
-            offset = int(words[3])
-            nextIndex = 4
-
-        return ((name, type, length, offset), words[nextIndex:])
-
-    @staticmethod
-    def _packLength(x):
-        """Pack the given integer as a variable-length value."""
-        s = bytes()
-        while True:
-            y = x&0x7f
-            x >>= 7
-            if x>0: y |= 0x80
-            s += struct.pack("B", y)
-            if x==0:
-                return s
-
-    @staticmethod
-    def _packString(s):
-        """Pack the given string."""
-        return CLI._packLength(len(s)) + bytes(s, "utf-8")
-
-    def __init__(self, stream):
-        """Construct the CLI."""
-        cmd.Cmd.__init__(self)
-
-        self._stream = stream
-        self._multiGets = {}
-        self._multiSets = {}
-
-        self.use_rawinput = True
-        self.intro = "\nX-Plane Remote Access plugin command prompt\n"
-        self.prompt = "XPLRA> "
-
-        self.daemon = True
-
-    def default(self, line):
-        """Handle uhandled commands"""
-        if line=="EOF":
-            print()
-            return True
-        else:
-            return super(CLI, self).default(line)
-
-    def do_get(self, args):
-        """Handle the 'get' command"""
-        words = self._splitArgs(args)
-        result = self._parseGetSpec(words)
-        if result is None:
-            return False
-
-        (name, type, length, offset) = result[0]
-
-        self._writeU8(0x01)
-        self._writeString(name)
-        self._writeU8(self._types[type])
-        if length is not None:
-            self._writeS32(length)
-            self._writeS32(offset)
-        self._flush()
-
-        result = self._readU8()
-        if result==0:
-            print(self._readValue(type))
-        else:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_set(self, args):
-        """Handle the 'set' command"""
-        words = self._splitArgs(args)
-        if len(words)<3:
-            print("Missing parameters", file=sys.stderr)
-            return False
-
-        name = words[0]
-
-        type = words[1]
-        if type not in self._types:
-            print("Invalid type", file=sys.stderr)
-            return False
-
-        value = words[2]
-
-        length = None
-        offset = None
-        if len(words)>4:
-            length = int(words[3])
-            offset = int(words[4])
-
-        self._writeU8(0x02)
-        self._writeString(name)
-        self._writeU8(self._types[type])
-        if length is not None:
-            self._writeS32(length)
-            self._writeS32(offset)
-        self._writeValue(type, value, length)
-
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_multiget(self, args):
-        """Handle the 'multiget' command"""
-        words = self._splitArgs(args)
-        specs = []
-        while words:
-            result = self._parseGetSpec(words)
-            if result is None:
-                return False
-            else:
-                specs.append(result[0])
-                words = result[1]
-
-        if not specs:
-            return False
-
-        self._writeU8(0x03)
-        self._writeU32(len(specs))
-        for (name, type, length, offset) in specs:
-            self._writeString(name)
-            self._writeU8(self._types[type])
-            if length is not None:
-                self._writeS32(length)
-                self._writeS32(offset)
-        self._flush()
-
-        result = self._readU8()
-        if result==0:
-            for (_, type, _, _) in specs:
-                value = self._readValue(type)
-                print(value)
-        elif result==0x02:
-            index = self._readU32()
-            print("Invalid dataref at #%d" % (index,), file=sys.stderr)
-        else:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_multiset(self, args):
-        """Handle the 'multiset' command"""
-        words = self._splitArgs(args)
-        specs = []
-        values = []
-        while words:
-            result = self._parseGetSpec(words)
-            if result is None:
-                return False
-            else:
-                words = result[1]
-                if not words:
-                    print("Missing argument", file=sys.stderr)
-                    return False
-                specs.append(result[0])
-                values.append(words[0])
-                words = words[1:]
-
-        if not specs:
-            return False
-
-        self._writeU8(0x04)
-        self._writeU32(len(specs))
-        for ((name, type, length, offset), value) in zip(specs, values):
-            self._writeString(name)
-            self._writeU8(self._types[type])
-            if length is not None:
-                self._writeS32(length)
-                self._writeS32(offset)
-            self._writeValue(type, value, length)
-        self._flush()
-
-        result = self._readU8()
-        if result==0x02:
-            index = self._readU32()
-            print("Invalid dataref at #%d" % (index,), file=sys.stderr)
-        elif result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_reg_multiget(self, args):
-        """Handle the 'reg_multiget' command"""
-        words = self._splitArgs(args)
-        specs = []
-        while words:
-            result = self._parseGetSpec(words)
-            if result is None:
-                return False
-            else:
-                specs.append(result[0])
-                words = result[1]
-
-        if not specs:
-            return False
-
-        self._writeU8(0x11)
-        self._writeU32(len(specs))
-        for (name, type, length, offset) in specs:
-            self._writeString(name)
-            self._writeU8(self._types[type])
-            if length is not None:
-                self._writeS32(length)
-                self._writeS32(offset)
-        self._flush()
-
-        result = self._readU8()
-        if result==0:
-            id = self._readU32()
-            self._multiGets[id] = \
-                [type for (name, type, length, offset) in specs]
-            print("ID:", id)
-        else:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_unreg_multiget(self, args):
-        """Handle the 'unreg_multiget' command"""
-        words = self._splitArgs(args)
-        if len(words)<1:
-            print("Missing parameter", file=sys.stderr)
-            return False
-
-        id = int(words[0])
-
-        self._writeU8(0x12)
-        self._writeU32(id)
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-        if id in self._multiGets:
-            del self._multiGets[id]
-
-    def do_exec_multiget(self, args):
-        """Handle the 'exec_multiget' command"""
-        words = self._splitArgs(args)
-        if len(words)<1:
-            print("Missing parameter", file=sys.stderr)
-            return False
-
-        id = int(words[0])
-        if id not in self._multiGets:
-            print("Invalid ID", file=sys.stderr)
-            return False
-
-        self._writeU8(0x13)
-        self._writeU32(id)
-        self._flush()
-
-        result = self._readU8()
-        if result==0:
-            for type in self._multiGets[id]:
-                value = self._readValue(type)
-                print(value)
-        elif result==0x02:
-            index = self._readU32()
-            print("Invalid dataref at #%d" % (index,), file=sys.stderr)
-        else:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_reg_multiset(self, args):
-        """Handle the 'reg_multiset' command"""
-        words = self._splitArgs(args)
-        specs = []
-        while words:
-            result = self._parseGetSpec(words)
-            if result is None:
-                return False
-            else:
-                specs.append(result[0])
-                words = result[1]
-
-        if not specs:
-            return False
-
-        self._writeU8(0x21)
-        self._writeU32(len(specs))
-        for (name, type, length, offset) in specs:
-            self._writeString(name)
-            self._writeU8(self._types[type])
-            if length is not None:
-                self._writeS32(length)
-                self._writeS32(offset)
-        self._flush()
-
-        result = self._readU8()
-        if result==0:
-            id = self._readU32()
-            self._multiSets[id] = \
-                [(type, length) for (name, type, length, offset) in specs]
-            print("ID:", id)
-        else:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_unreg_multiset(self, args):
-        """Handle the 'unreg_multiset' command"""
-        words = self._splitArgs(args)
-        if len(words)<1:
-            print("Missing parameter", file=sys.stderr)
-            return False
-
-        id = int(words[0])
-
-        self._writeU8(0x22)
-        self._writeU32(id)
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-        if id in self._multiSets:
-            del self._multiSets[id]
-
-    def do_exec_multiset(self, args):
-        """Handle the 'exec_multiget' command"""
-        words = self._splitArgs(args)
-        if len(words)<1:
-            print("Missing parameter", file=sys.stderr)
-            return False
-
-        id = int(words[0])
-        if id not in self._multiSets:
-            print("Invalid ID", file=sys.stderr)
-            return False
-
-        words = words[1:]
-        types = self._multiSets[id]
-        if len(words)<len(types):
-            print("Missing parameter", file=sys.stderr)
-            return False
-
-
-        self._writeU8(0x23)
-        self._writeU32(id)
-        for ((type, length), word) in zip(types, words):
-            self._writeValue(type, word, length)
-        self._flush()
-
-        result = self._readU8()
-        if result==0x02:
-            index = self._readU32()
-            print("Invalid dataref at #%d" % (index,), file=sys.stderr)
-        elif result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_show_message(self, args):
-        words = self._splitArgs(args)
-        if len(words)<2:
-            print("Missing parameters", file=sys.stderr)
-            return False
-
-        message = words[0]
-        duration = float(words[1])
-
-        self._writeU8(0x41)
-        self._writeString(message)
-        self._writeFloat(duration)
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_reload(self, args):
-        self._writeU8(0x32)
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_register_hotkeys(self, args):
-        words = self._splitArgs(args)
-        if not words:
-            print("Missing parameters", file=sys.stderr)
-            return False
-
-        self._writeU8(0x51)
-        self._writeU32(len(words))
-        for word in words:
-            self._writeU16(int(word, 16))
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_query_hotkeys(self, args):
-        self._writeU8(0x52)
-        self._flush()
-
-        result = self._readU8()
-        if result==0:
-            length = self._readU32()
-            values = []
-            for i in range(0, length):
-                values.append(self._readU8())
-            print(values)
-        else:
-            print("Error code:", result, file=sys.stderr)
-
-    def do_unregister_hotkeys(self, args):
-        self._writeU8(0x53)
-        self._flush()
-
-        result = self._readU8()
-        if result!=0:
-            print("Error code:", result, file=sys.stderr)
-
-    def _writeU8(self, x):
-        """Write the given value as an unsigned, 8-bit value."""
-        self._stream.write(struct.pack("B", x))
-
-    def _writeU16(self, x):
-        """Write the given value as an unsigned, 16-bit value."""
-        self._stream.write(struct.pack("H", x))
-
-    def _writeS32(self, x):
-        """Write the given value as a signed, 32-bit value."""
-        self._stream.write(struct.pack("i", x))
-
-    def _writeU32(self, x):
-        """Write the given value as an unsigned, 32-bit value."""
-        self._stream.write(struct.pack("I", x))
-
-    def _writeFloat(self, x):
-        """Write the given value as a single-precision floating point."""
-        self._stream.write(struct.pack("f", x))
-
-    def _writeDouble(self, x):
-        """Write the given value as a double-precision floating point."""
-        self._stream.write(struct.pack("d", x))
-
-    def _writeLength(self, length):
-        """Write the given value is a variable-length value into our stream."""
-        self._stream.write(self._packLength(length))
-
-    def _writeString(self, str):
-        """Write the given string into the stream."""
-        self._stream.write(self._packString(str))
-
-    def _flush(self):
-        """Flush our stream."""
-        self._stream.flush()
-
-    def _readU8(self):
-        """Read an unsigned, 8-bit value from the stream."""
-        (value,) = struct.unpack("B", self._stream.read(1))
-        return value
-
-    def _readS32(self):
-        """Read a signed, 32-bit value from the stream."""
-        (value,) = struct.unpack("i", self._stream.read(4))
-        return value
-
-    def _readU32(self):
-        """Read an unsigned, 32-bit value from the stream."""
-        (value,) = struct.unpack("I", self._stream.read(4))
-        return value
-
-    def _readFloat(self):
-        """Read a single-precision floating point value from the stream."""
-        (value,) = struct.unpack("f", self._stream.read(4))
-        return value
-
-    def _readDouble(self):
-        """Read a double-precision floating point value from the stream."""
-        (value,) = struct.unpack("d", self._stream.read(8))
-        return value
-
-    def _readLength(self):
-        """Read a variable-length value from our stream."""
-        length = 0
-        while True:
-            (x,) = struct.unpack("B", self._stream.read(1))
-            length <<= 7
-            length |= x&0x7f
-            if x&0x80==0:
-                return length
-
-    def _readString(self):
-        """Read a string from our stream."""
-        length = self._readLength()
-        return self._stream.read(length)
-
-    def _readValue(self, type):
-        """Read the value of the given type from the stream."""
-        if type=="i":
-            return self._readS32()
-        elif type=="f":
-            return self._readFloat()
-        elif type=="d":
-            return self._readDouble()
-        elif type in ["fa", "ia", "ba", "s"]:
-            length = self._readS32()
-            if length>8192:
-                print("Very big length:", length)
-                return None
-            elif length>0:
-                if type=="fa":
-                    return [self._readFloat() for i in range(0, length)]
-                elif type=="ia":
-                    return [self._readS32() for i in range(0, length)]
-                elif type=="ba" or type=="s":
-                    bytes = [self._readU8() for i in range(0, length)]
-                    if type=="ba":
-                        return bytes
-                    else:
-                        string = ""
-                        for b in bytes:
-                            if b==0: break
-                            string += chr(b)
-                        return string
-            elif length==0:
-                return []
-            else:
-                return None
-
-    def _writeValue(self, type, value, length = None):
-        """Write the given value of the given type to the stream."""
-        if type=="i":
-            self._writeS32(int(value))
-        elif type=="f":
-            self._writeFloat(float(value))
-        elif type=="d":
-            self._writeDouble(float(value))
-        elif type in ["fa", "ia", "ba", "s"]:
-            if type=="s":
-                values = [ord(c) for c in value]
-            else:
-                words = [word.strip() for word in value.split(",")]
-                values = [float(word) if type=="fa" else int(word)
-                          for word in words]
-            if len(values)<length:
-                values += [0.0 if type=="fa" else 0] * (length-len(values))
-            elif len(values)>length:
-                values = values[:length]
-            for value in values:
-                if type=="fa":
-                    self._writeFloat(value)
-                elif type=="ia":
-                    self._writeS32(value)
-                else:
-                    self._writeU8(value)
-
-#------------------------------------------------------------------------------
-
-if __name__ == "__main__":
-    s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-    s.connect("/tmp/xplra-" + os.environ["LOGNAME"])
-    CLI(s.makefile("rwb")).cmdloop()
Index: sc/test1.sh
===================================================================
--- misc/test1.sh	(revision 7)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#!/bin/sh
-
-scriptdir=`dirname $0`
-
-"${scriptdir}/client.py" <<EOF
-get sim/aircraft/engine/num_engines i
-get sim/aircraft/engine/acf_num_engines i
-get sim/aircraft/engine/acf_auto_featherEQ i
-get sim/aircraft/engine/acf_spooltime_jet f
-get sim/aircraft/engine/acf_spooltime_prop f
-get sim/flightmodel/position/latitude d
-get sim/flightmodel/position/longitude d
-get sim/aircraft/view/acf_descrip s -1 0
-get sim/aircraft/prop/acf_en_type ia -1 0
-get sim/aircraft/prop/acf_prop_dir fa -1 0
-EOF
Index: sc/test2.sh
===================================================================
--- misc/test2.sh	(revision 7)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-scriptdir=`dirname $0`
-
-"${scriptdir}/client.py" <<EOF
-set sim/aircraft/engine/acf_num_engines i 3
-get sim/aircraft/engine/acf_num_engines i
-set sim/aircraft/controls/acf_elev_up f 100.0
-get sim/aircraft/controls/acf_elev_up f
-set sim/aircraft/view/acf_tailnum s HA-VAI 40 0
-get sim/aircraft/view/acf_tailnum s -1 0
-EOF
Index: sc/test3.sh
===================================================================
--- misc/test3.sh	(revision 8)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-scriptdir=`dirname $0`
-
-"${scriptdir}/client.py" <<EOF
-reg_multiget sim/aircraft/engine/acf_num_engines i sim/aircraft/engine/acf_auto_featherEQ i sim/aircraft/engine/acf_spooltime_jet f sim/aircraft/engine/acf_spooltime_prop f sim/flightmodel/position/latitude d sim/flightmodel/position/longitude d sim/aircraft/view/acf_descrip s -1 0 sim/aircraft/prop/acf_en_type ia -1 0 sim/aircraft/prop/acf_prop_dir fa -1 0
-exec_multiget 2
-exec_multiget 1
-unreg_multiget 2
-unreg_multiget 1
-exec_multiget 1
-EOF
Index: sc/test4.sh
===================================================================
--- misc/test4.sh	(revision 9)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#!/bin/sh
-
-scriptdir=`dirname $0`
-
-"${scriptdir}/client.py" <<EOF
-reg_multiset sim/aircraft/engine/acf_num_engines i sim/aircraft/view/acf_tailnum s 40 0
-reg_multiget sim/aircraft/engine/acf_num_engines i sim/aircraft/view/acf_tailnum s -1 0
-exec_multiget 1
-exec_multiset 2 12 HA-VAR
-exec_multiset 1 12 HA-VAR
-exec_multiget 1
-unreg_multiset 2
-unreg_multiset 1
-exec_multiget 1
-unreg_multiget 1
-EOF
Index: sc/test5.sh
===================================================================
--- misc/test5.sh	(revision 10)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#!/bin/sh
-
-scriptdir=`dirname $0`
-
-"${scriptdir}/client.py" <<EOF
-multiget sim/aircraft/engine/acf_num_engines i sim/aircraft/view/acf_tailnum s -1 0
-multiset sim/aircraft/engine/acf_num_engines i 4 sim/aircraft/view/acf_tailnum s 40 0 HA-VAI
-multiget sim/aircraft/engine/acf_num_engines i sim/aircraft/view/acf_tailnum s -1 0
-multiset sim/aircraft/engine/acf_num_engines i 2 sim/aircraft/view/acf_tailnum s 40 0 HA-VAR
-multiget sim/aircraft/engine/acf_num_engines i sim/aircraft/view/acf_tailnum s -1 0
-EOF
Index: sc/xplra.py
===================================================================
--- misc/xplra.py	(revision 84)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../src/client/python/xplra.py
Index: alldist.sh
===================================================================
--- mkalldist.sh	(revision 118)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#!/bin/bash
-
-set -e -u
-
-# Script to create all the various distribution files into a given directory.
-#
-# Usage: mkccclientdist.sh <build config file> <destination directory>
-
-scriptdir=`dirname $0`
-scriptdir=`cd "${scriptdir}" && pwd`
-
-if test $# -lt 2; then
-    echo "Usage: mkalldist.sh <build config file> <destination directory>"
-    exit 1
-fi
-
-buildconfig="${1}"
-destdir="${2}"
-
-tmpdir=`mktemp -d`
-trap "rm -rf $tmpdir" EXIT
-
-rm -rf "${destdir}"
-mkdir -p "${destdir}"
-
-"${scriptdir}/buildallhosts.sh" "${buildconfig}" "${tmpdir}"
-
-for package in vscpl xplcommon xplra; do
-    make -C "${tmpdir}/xpl/${package}" dist
-    mv "${tmpdir}/xpl/${package}/"*.tar.gz "${destdir}"
-done
-
-"${scriptdir}/mkplugindist.sh" "${tmpdir}" "${destdir}"
-
-"${scriptdir}/mkccclientdist.sh" "${tmpdir}/xpl" linux-x86_64.tar.gz "${destdir}"
-"${scriptdir}/mkccclientdist.sh" "${tmpdir}/xpl-win64" win64.zip "${destdir}"
-
-cd "${scriptdir}"
-python3 setup.py sdist --formats zip -d "${destdir}"
Index: ccclientdist.sh
===================================================================
--- mkccclientdist.sh	(revision 79)
+++ 	(revision )
@@ -1,96 +1,0 @@
-#!/bin/bash
-
-set -e -u
-
-# Script to create the binary distributions from a build directory produced
-# by buildall.sh
-#
-# Usage: mkccclientdist.sh <build directory> <target suffix> [<destination directory>]
-
-scriptdir=`dirname $0`
-scriptdir=`cd "${scriptdir}" && pwd`
-
-if test $# -lt 2; then
-    echo "Usage: mkccclientdist.sh <build directory> <target suffix> [<destination directory>]"
-    exit 1
-fi
-
-builddir="${1}"
-installdir="${builddir}/install"
-targetsuffix="${2}"
-destdir="${3:-}"
-if test -z "${destdir}"; then
-    destdir=`pwd`
-fi
-
-tmpdir=`mktemp -d`
-trap "rm -rf $tmpdir" EXIT
-
-# mkdist <dll prefix> <includedir> <libprefix> <pcfile> <m4file>
-mkdist()
-{
-    local buildsubdir="${1}"
-    local dllprefix="${2}"
-    local includedir="${3}"
-    local libprefix="${4}"
-    local pcfile="${5:-}"
-    local m4file="${6:-}"
-
-    rm -rf "${tmpdir}"
-
-    if test -f "${installdir}/bin/${dllprefix}"*.dll; then
-        mkdir -p "${tmpdir}/bin"
-        cp -a "${installdir}/bin/${dllprefix}"*.dll "${tmpdir}/bin"
-    fi
-
-    local includeparentdir=`dirname "${includedir}"`
-
-    mkdir -p "${tmpdir}/include/${includeparentdir}"
-    cp -a "${installdir}/include/${includedir}" "${tmpdir}/include/${includeparentdir}"
-
-    if test "${pcfile}"; then
-        mkdir -p "${tmpdir}/lib/pkgconfig"
-    else
-        mkdir -p "${tmpdir}/lib"
-    fi
-    cp -a "${installdir}/lib/${libprefix}"* "${tmpdir}/lib"
-    if test "${pcfile}"; then
-        cp -a "${installdir}/lib/pkgconfig/${pcfile}.pc" "${tmpdir}/lib/pkgconfig"
-    fi
-
-    if test "${m4file}"; then
-        mkdir -p "${tmpdir}/share/aclocal"
-        cp -a "${installdir}/share/aclocal/${m4file}.m4" "${tmpdir}/share/aclocal"
-    fi
-
-    local version=`cat "${builddir}/${buildsubdir}/config.status" | grep 'S\["PACKAGE_VERSION"\]=' | sed 's:S\["PACKAGE_VERSION"]="\([^"]*\)":\1:'`
-    local targetfile="${destdir}/${buildsubdir}-${version}-${targetsuffix}"
-    rm -f "${targetfile}"
-
-    cd "${tmpdir}"
-
-    case "${targetfile}" in
-        *.zip)
-            zip -q -r "${targetfile}" *
-            ;;
-        *.tar.gz)
-            tar czf "${targetfile}" *
-            ;;
-        *.tar.bz2)
-            tar cjf "${targetfile}" *
-            ;;
-    esac
-}
-
-#---------------------------------------
-
-echo "Packing VSCPL"
-mkdist vscpl libvscpl hu/varadiistvan/scpl libvscpl vscpl vscpl
-
-echo "Packing XPLCOMMON"
-mkdist xplcommon libxplcommon hu/varadiistvan/xplcommon libxplcommon libxplcommon ""
-
-echo "Packing XPLRA"
-mkdist xplra libxplra hu/varadiistvan/xplra libxplra "" ""
-
-echo "Done."
Index: plugindist.sh
===================================================================
--- mkplugindist.sh	(revision 118)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#!/bin/bash
-
-set -e -u
-
-# Script to create the plugin distribution from an already built set of sources.
-#
-# Usage: mkplugindist.sh <build directory> [<destination directory>]
-#
-# <build directory> is the directory containing the build directories as
-# created by buildallhosts.sh.
-
-scriptdir=`dirname $0`
-scriptdir=`cd "${scriptdir}" && pwd`
-
-if test $# -lt 1; then
-    echo "Usage: mkplugindist.sh <build directory> [<destination directory>]"
-    exit 1
-fi
-
-destdir="${2:-}"
-if test -z "${destdir}"; then
-    destdir=`pwd`
-fi
-
-zipfile="${destdir}/xplra.zip"
-builddir="${1}"
-
-tmpdir=`mktemp -d`
-trap "rm -rf $tmpdir" EXIT
-
-xplradir="${tmpdir}/XPLRA"
-mkdir -p "${xplradir}/64"
-
-strip -g -o "${xplradir}/64/lin.xpl" "${builddir}/xpl/xplra/src/plugin/src/xplra/lin.xpl"
-x86_64-w64-mingw32-strip -o "${xplradir}/64/win.xpl" "${builddir}/xpl-win64/xplra/src/plugin/src/xplra/win.xpl.exe"
-
-cd "${tmpdir}"
-rm -f "${zipfile}"
-zip -r "${zipfile}" XPLRA
Index: tup.py
===================================================================
--- setup.py	(revision 116)
+++ 	(revision )
@@ -1,27 +1,0 @@
-# -*- coding: iso-8859-2 -*-
-
-from distutils.core import setup
-import sys
-import os
-
-scriptdir=os.path.abspath(os.path.dirname(sys.argv[0]))
-
-long_description="""Python client module for XPLRA
-
-XPLRA is the X-Plane Remote Access plugin that allows
-external applications to read and write X-Plane datarefs.
-
-This module is a client module for this plugin that can be
-used from Python programs."""
-
-setup(name = "xplra",
-      version = "0.3",
-      description = "Python client module for XPLRA",
-      long_description = long_description,
-      platforms = ["Win32"],
-      license = "Public Domain",
-      author = "István Váradi",
-      author_email = "ivaradi@gmail.com",
-      url = "http://xplane.varadiistvan.hu",
-      package_dir = { '' : 'src/client/python' },
-      py_modules = ["xplra"])
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 13)
+++ src/Makefile.am	(revision 0)
@@ -1,1 +1,1 @@
-SUBDIRS=plugin client
+SUBDIRS=xplra
Index: c/client/Makefile.am
===================================================================
--- src/client/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-SUBDIRS=c
Index: c/client/c/Makefile.am
===================================================================
--- src/client/c/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-SUBDIRS=hu
Index: c/client/c/hu/Makefile.am
===================================================================
--- src/client/c/hu/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-SUBDIRS=varadiistvan
Index: c/client/c/hu/varadiistvan/Makefile.am
===================================================================
--- src/client/c/hu/varadiistvan/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-SUBDIRS=xplra
Index: c/client/c/hu/varadiistvan/xplra/.copyright
===================================================================
--- src/client/c/hu/varadiistvan/xplra/.copyright	(revision 13)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/client/c/hu/varadiistvan/xplra/.namespace
===================================================================
--- src/client/c/hu/varadiistvan/xplra/.namespace	(revision 13)
+++ 	(revision )
@@ -1,3 +1,0 @@
-hu
-varadiistvan
-xplra
Index: c/client/c/hu/varadiistvan/xplra/.srcmessage
===================================================================
--- src/client/c/hu/varadiistvan/xplra/.srcmessage	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of XPLRA, a remote-access plugin for X-Plane
Index: c/client/c/hu/varadiistvan/xplra/Exception.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/Exception.cc	(revision 40)
+++ 	(revision )
@@ -1,114 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Exception.h"
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::Exception;
-using hu::varadiistvan::xplra::IOException;
-using hu::varadiistvan::xplra::ProtocolException;
-
-//------------------------------------------------------------------------------
-
-const char* Exception::what() const throw()
-{
-    return message.c_str();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-IOException::IOException(errorCode_t errorCode) throw() :
-    errorCode(errorCode)
-{
-    char buf[256];
-    snprintf(buf, sizeof(buf), "xplra::IOException: error code=%lu",
-             errorCode);
-    message = buf;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-ProtocolException::ProtocolException(errorCode_t errorCode, bool hasParameter,
-                                     long parameter) throw() :
-    errorCode(errorCode),
-    hasParameter(parameter),
-    parameter(parameter)
-{
-    switch (errorCode) {
-      case INVALID_COMMAND:
-        message = "xplra::ProtocolException: invalid command";
-        break;
-      case UNKNOWN_DATAREF:
-        message = "xplra::ProtocolException: unknown dataref";
-        if (hasParameter) {
-            char buf[32];
-            snprintf(buf, sizeof(buf), " (# %ld)", parameter);
-            message += buf;
-        }
-        break;
-      case INVALID_TYPE:
-        message = "xplra::ProtocolException: invalid type";
-        break;
-      case INVALID_LENGTH:
-        message = "xplra::ProtocolException: invalid length";
-        break;
-      case INVALID_OFFSET:
-        message = "xplra::ProtocolException: invalid offset";
-        break;
-      case INVALID_COUNT:
-        message = "xplra::ProtocolException: invalid count";
-        break;
-      case INVALID_ID:
-        message = "xplra::ProtocolException: invalid ID";
-        break;
-      case INVALID_DURATION:
-        message = "xplra::ProtocolException: invalid duration";
-        break;
-      case OTHER:
-        message = "xplra::ProtocolException: other error";
-        break;
-      default:
-        message = "xplra::ProtocolException: unknown error";
-        break;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/Exception.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/Exception.h	(revision 40)
+++ 	(revision )
@@ -1,312 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_XPLRA_EXCEPTION_H
-#define HU_VARADIISTVAN_XPLRA_EXCEPTION_H
-//------------------------------------------------------------------------------
-
-#include <exception>
-
-#include <string>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for exceptions that can be thrown by the client.
- */
-class Exception : public std::exception
-{
-protected:
-    /**
-     * The string representation of the error message.
-     */
-    std::string message;
-
-public:
-    /**
-     * Construct the exception with the given message.
-     */
-    Exception(const char* message) throw();
-
-protected:
-    /**
-     * Default constructor for children.
-     */
-    Exception() throw();
-
-public:
-    /**
-     * Destroy the exception
-     */
-    virtual ~Exception() throw();
-
-public:
-    /**
-     * Get a message.
-     */
-    virtual const char* what() const throw();
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * An I/O exception.
- */
-class IOException : public Exception
-{
-public:
-    /**
-     * Type for the error code.
-     */
-    typedef unsigned long errorCode_t;
-
-private:
-    /**
-     * The error code.
-     */
-    errorCode_t errorCode;
-
-public:
-    /**
-     * Construct the exception.
-     */
-    IOException(errorCode_t errorCode) throw();
-
-
-    /**
-     * Get the error code.
-     */
-    errorCode_t getErrorCode() const throw();
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * An exception arising from the invalid use of the protocol, e.g. an
- * invalid dataref.
- */
-class ProtocolException : public Exception
-{
-public:
-    /**
-     * Type for the error codes.
-     */
-    typedef enum {
-        /// Invalid command issued
-        INVALID_COMMAND = 1,
-
-        /// Unknown dataref
-        UNKNOWN_DATAREF = 2,
-
-        /// Invalid type
-        INVALID_TYPE = 3,
-
-        /// Invalid length
-        INVALID_LENGTH = 4,
-
-        /// Invalid offset
-        INVALID_OFFSET = 5,
-
-        /// Invalid count
-        INVALID_COUNT = 6,
-
-        /// Invalid ID
-        INVALID_ID = 7,
-
-        /// Invalid duration
-        INVALID_DURATION = 8,
-
-        /// Other error
-        OTHER = 255
-    } errorCode_t;
-
-private:
-    /**
-     * The error code.
-     */
-    errorCode_t errorCode;
-
-    /**
-     * Indicate if the parameter is valid.
-     */
-    bool hasParameter;
-
-    /**
-     * Parameter of the error.
-     */
-    long parameter;
-
-public:
-    /**
-     * Construct the exception.
-     */
-    ProtocolException(errorCode_t errorCode,
-                      bool hasParameter = false, long parameter = 0) throw();
-
-    /**
-     * Get the error code.
-     */
-    errorCode_t getErrorCode() const throw();
-
-    /**
-     * Get the value of the parameter and whether it is valid or not.
-     */
-    bool getParameter(long& param) const throw();
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * Exception to signify the fact the we are not connected to the
- * simulator.
- */
-class NotConnectedException : public Exception
-{
-public:
-    /**
-     * Construct the exception
-     */
-    NotConnectedException() throw();
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * Exception thrown when we want to get or set a dataref in a
- * MultiBuffer into or from a value of the wrong type.
- */
-class TypeMismatchException : public Exception
-{
-public:
-    /**
-     * Construct the exception
-     */
-    TypeMismatchException() throw();
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * Exception thrown when we want to get or set a dataref with an
- * invalid ID.
- */
-class InvalidIDException : public Exception
-{
-public:
-    /**
-     * Construct the exception
-     */
-    InvalidIDException() throw();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Exception::Exception(const char* message) throw() :
-    message(message)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Exception::Exception() throw()
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Exception::~Exception() throw()
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline IOException::errorCode_t IOException::getErrorCode() const throw()
-{
-    return errorCode;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline ProtocolException::errorCode_t
-ProtocolException::getErrorCode() const throw()
-{
-    return errorCode;
-}
-
-//------------------------------------------------------------------------------
-
-inline bool ProtocolException::getParameter(long& param) const throw()
-{
-    if (hasParameter) param = parameter;
-    return hasParameter;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline NotConnectedException::NotConnectedException() throw() :
-    Exception("xplra::NotConnectedException: not connected to the simulator")
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline TypeMismatchException::TypeMismatchException() throw() :
-    Exception("xplra::TypeMismatchException")
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline InvalidIDException::InvalidIDException() throw() :
-    Exception("xplra::InvalidIDException")
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::xplra */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_XPLRA_EXCEPTION_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/Makefile.am
===================================================================
--- src/client/c/hu/varadiistvan/xplra/Makefile.am	(revision 21)
+++ 	(revision )
@@ -1,26 +1,0 @@
-AM_CXXFLAGS=$(VSCPL_CFLAGS) -I$(top_srcdir)/src/plugin/src
-
-lib_LTLIBRARIES=libxplra.la
-
-libxplra_la_SOURCES=\
-        Exception.cc    \
-        XPlane.cc       \
-        MultiBuffer.cc  \
-        MultiGetter.cc  \
-        MultiSetter.cc  \
-        xplra.cc
-
-libxplra_la_LIBADD=$(VSCPL_LIBS)
-
-if TARGET_API_WIN32
-libxplra_la_LDFLAGS=-no-undefined
-endif
-
-include_xplradir=$(includedir)/hu/varadiistvan/xplra
-include_xplra_HEADERS=\
-        Exception.h     \
-        XPlane.h        \
-        MultiBuffer.h   \
-        MultiGetter.h   \
-        MultiSetter.h   \
-        xplra.h
Index: c/client/c/hu/varadiistvan/xplra/MultiBuffer.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiBuffer.cc	(revision 107)
+++ 	(revision )
@@ -1,621 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "MultiBuffer.h"
-
-#include "XPlane.h"
-
-#include <xplra/Protocol.h>
-
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <cstring>
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::MultiBuffer;
-
-using xplra::Protocol;
-
-using std::vector;
-using std::string;
-using std::min;
-
-//------------------------------------------------------------------------------
-
-inline MultiBuffer::DataRef::DataRef(const string& name, uint8_t type,
-                                     const DataRef* previous,
-                                     size_t length, size_t offset) noexcept :
-    name(name),
-    type(type),
-    length(length),
-    offset(offset),
-    dataOffset(0)
-{
-    if (previous!=0) {
-        size_t alignment = getAlignment();
-        dataOffset = previous->dataOffset + previous->getSize();
-        dataOffset += alignment - 1;
-        dataOffset &= ~(alignment-1);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t MultiBuffer::DataRef::getSize() const noexcept
-{
-    switch (type) {
-      case Protocol::TYPE_INT:
-        return sizeof(int32_t);
-      case Protocol::TYPE_FLOAT:
-        return sizeof(float);
-      case Protocol::TYPE_DOUBLE:
-        return sizeof(double);
-      case Protocol::TYPE_FLOAT_ARRAY:
-        return sizeof(float) * length;
-      case Protocol::TYPE_INT_ARRAY:
-        return sizeof(int32_t) * length;
-      case Protocol::TYPE_BYTE_ARRAY:
-        return sizeof(uint8_t) * length;
-      default:
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t MultiBuffer::DataRef::getAlignment() const noexcept
-{
-    switch (type) {
-      case Protocol::TYPE_INT:
-      case Protocol::TYPE_INT_ARRAY:
-        return sizeof(int32_t);
-      case Protocol::TYPE_FLOAT:
-      case Protocol::TYPE_FLOAT_ARRAY:
-        return sizeof(float);
-      case Protocol::TYPE_DOUBLE:
-        return sizeof(double);
-      case Protocol::TYPE_BYTE_ARRAY:
-      default:
-        return sizeof(uint8_t);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool MultiBuffer::DataRef::isArray() const noexcept
-{
-    return
-        type==Protocol::TYPE_FLOAT_ARRAY ||
-        type==Protocol::TYPE_INT_ARRAY ||
-        type==Protocol::TYPE_BYTE_ARRAY;
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t
-MultiBuffer::DataRef::getCopyLength(size_t userLength, size_t userOffset)
-    const noexcept
-{
-    size_t maxLength =
-        (userOffset>length) ? 0 : (length - userOffset);
-    return (userLength==0) ? maxLength : min(userLength, maxLength);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void MultiBuffer::unfinalize() noexcept
-{
-    delete data; data = 0;
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::forgetRegistration() noexcept
-{
-    registeredID = -1;
-}
-
-//------------------------------------------------------------------------------
-
-inline const MultiBuffer::DataRef* MultiBuffer::getLastDataRef() const noexcept
-{
-    return dataRefs.empty() ? 0 : &(dataRefs.back());
-}
-
-//------------------------------------------------------------------------------
-
-inline const MultiBuffer::DataRef& MultiBuffer::getDataRef(size_t id, uint8_t type) const
-{
-    if (id>=dataRefs.size()) throw InvalidIDException();
-    const DataRef& dataRef = dataRefs[id];
-    if (dataRef.type!=type) throw TypeMismatchException();
-    return dataRef;
-}
-
-//------------------------------------------------------------------------------
-
-inline void* MultiBuffer::getData(size_t id, uint8_t type)
-{
-    const DataRef& dataRef = getDataRef(id, type);
-    finalize();
-    return data + dataRef.dataOffset;
-}
-
-//------------------------------------------------------------------------------
-
-inline const void* MultiBuffer::getData(size_t id, uint8_t type) const
-{
-    const DataRef& dataRef = getDataRef(id, type);
-    finalize();
-    return data + dataRef.dataOffset;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, uint8_t type> size_t
-inline MultiBuffer::setArray(size_t id, const T* value,
-                             size_t length, size_t offset)
-{
-    const DataRef& dataRef = getDataRef(id, type);
-    finalize();
-
-    size_t toCopy = dataRef.getCopyLength(length, offset);
-
-    if (toCopy>0) {
-        memcpy( data + dataRef.dataOffset + offset * sizeof(T),
-                value, toCopy * sizeof(T) );
-    }
-
-    return toCopy;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, uint8_t type>
-inline size_t MultiBuffer::getArray(size_t id, T* value,
-                                    size_t length, size_t offset) const
-{
-    const DataRef& dataRef = getDataRef(id, type);
-    finalize();
-
-    size_t toCopy = dataRef.getCopyLength(length, offset);
-
-    if (toCopy>0) {
-        memcpy( value, data + dataRef.dataOffset + offset * sizeof(T),
-                toCopy * sizeof(T) );
-    }
-
-    return toCopy;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, uint8_t type>
-inline const T* MultiBuffer::getArray(size_t id, size_t offset) const
-{
-    const DataRef& dataRef = getDataRef(id, type);
-    finalize();
-    return (offset<dataRef.length) ?
-        reinterpret_cast<const T*>(data + dataRef.dataOffset +
-                                   offset * sizeof(T)) : 0;
-}
-
-//------------------------------------------------------------------------------
-
-MultiBuffer::MultiBuffer(XPlane& xplane, uint8_t registerCommand,
-                         uint8_t unregisterCommand) noexcept :
-    data(0),
-    xplane(xplane),
-    registerCommand(registerCommand),
-    unregisterCommand(unregisterCommand),
-    registeredID(-1)
-{
-}
-
-//------------------------------------------------------------------------------
-
-MultiBuffer::~MultiBuffer() noexcept
-{
-    unregisterSafelyFromXPlane();
-    delete[] data;
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::addInt(const std::string& name) noexcept
-{
-    unfinalize();
-    dataRefs.push_back(DataRef(name, Protocol::TYPE_INT, getLastDataRef()));
-    return dataRefs.size() - 1;
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::addFloat(const std::string& name) noexcept
-{
-    unfinalize();
-    dataRefs.push_back(DataRef(name, Protocol::TYPE_FLOAT, getLastDataRef()));
-    return dataRefs.size() - 1;
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::addDouble(const std::string& name) noexcept
-{
-    unfinalize();
-    dataRefs.push_back(DataRef(name, Protocol::TYPE_DOUBLE, getLastDataRef()));
-    return dataRefs.size() - 1;
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::addFloatArray(const std::string& name, size_t length,
-                                  size_t offset) noexcept
-{
-    unfinalize();
-    dataRefs.push_back(DataRef(name, Protocol::TYPE_FLOAT_ARRAY,
-                               getLastDataRef(), length, offset));
-    return dataRefs.size() - 1;
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::addIntArray(const std::string& name, size_t length,
-                                size_t offset) noexcept
-{
-    unfinalize();
-    dataRefs.push_back(DataRef(name, Protocol::TYPE_INT_ARRAY,
-                               getLastDataRef(), length, offset));
-    return dataRefs.size() - 1;
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::addByteArray(const std::string& name, size_t length,
-                                 size_t offset) noexcept
-{
-    unfinalize();
-    dataRefs.push_back(DataRef(name, Protocol::TYPE_BYTE_ARRAY,
-                               getLastDataRef(), length, offset));
-    return dataRefs.size() - 1;
-}
-
-//------------------------------------------------------------------------------
-
-bool MultiBuffer::finalize() const
-{
-    if (data==0 && !dataRefs.empty()) {
-        const DataRef* lastDataRef = getLastDataRef();
-        size_t dataSize = lastDataRef->dataOffset + lastDataRef->getSize();
-        data = new unsigned char[dataSize];
-        memset(data, 0, dataSize);
-        return true;
-    } else {
-        return data!=0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::registerInXPlane()
-{
-    if (finalize() && registeredID<0) {
-        xplane.checkStream();
-
-        writeSpec(registerCommand);
-
-        uint32_t id = xplane.stream->readU32();
-        xplane.checkStream();
-
-        registeredID = static_cast<int>(id);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::unregisterFromXPlane()
-{
-    if (registeredID>=0) {
-        xplane.stream->writeU8(unregisterCommand);
-        xplane.stream->writeU32(static_cast<uint32_t>(registeredID));
-        xplane.stream->flush();
-        xplane.checkResult();
-        registeredID = -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-bool MultiBuffer::unregisterSafelyFromXPlane() noexcept
-{
-    try {
-        unregisterFromXPlane();
-        return true;
-    } catch(...) {
-        registeredID = -1;
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::execute()
-{
-    if (data==0 && registeredID>=0) {
-        unregisterFromXPlane();
-        registerInXPlane();
-    } else {
-        finalize();
-    }
-
-    if (registeredID>=0) {
-        doExecute();
-    } else {
-        doExecuteUnregistered();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::setInt(size_t id, int value)
-{
-    *reinterpret_cast<int32_t*>(getData(id, Protocol::TYPE_INT)) = value;
-}
-
-//------------------------------------------------------------------------------
-
-int MultiBuffer::getInt(size_t id) const
-{
-    return *reinterpret_cast<const int32_t*>(getData(id, Protocol::TYPE_INT));
-}
-
-//------------------------------------------------------------------------------
-
-const int32_t& MultiBuffer::getIntRef(size_t id) const
-{
-    return *reinterpret_cast<const int32_t*>(getData(id, Protocol::TYPE_INT));
-}
-
-//------------------------------------------------------------------------------
-
-int32_t& MultiBuffer::getIntRef(size_t id)
-{
-    return *reinterpret_cast<int32_t*>(getData(id, Protocol::TYPE_INT));
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::setFloat(size_t id, float value)
-{
-    *reinterpret_cast<float*>(getData(id, Protocol::TYPE_FLOAT)) = value;
-}
-
-//------------------------------------------------------------------------------
-
-float MultiBuffer::getFloat(size_t id) const
-{
-    return *reinterpret_cast<const float*>(getData(id, Protocol::TYPE_FLOAT));
-}
-
-//------------------------------------------------------------------------------
-
-const float& MultiBuffer::getFloatRef(size_t id) const
-{
-    return *reinterpret_cast<const float*>(getData(id, Protocol::TYPE_FLOAT));
-}
-
-//------------------------------------------------------------------------------
-
-float& MultiBuffer::getFloatRef(size_t id)
-{
-    return *reinterpret_cast<float*>(getData(id, Protocol::TYPE_FLOAT));
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::setDouble(size_t id, double value)
-{
-    *reinterpret_cast<double*>(getData(id, Protocol::TYPE_DOUBLE)) = value;
-}
-
-//------------------------------------------------------------------------------
-
-double MultiBuffer::getDouble(size_t id) const
-{
-    return *reinterpret_cast<const double*>(getData(id, Protocol::TYPE_DOUBLE));
-}
-
-//------------------------------------------------------------------------------
-
-const double& MultiBuffer::getDoubleRef(size_t id) const
-{
-    return *reinterpret_cast<const double*>(getData(id, Protocol::TYPE_DOUBLE));
-}
-
-//------------------------------------------------------------------------------
-
-double& MultiBuffer::getDoubleRef(size_t id)
-{
-    return *reinterpret_cast<double*>(getData(id, Protocol::TYPE_DOUBLE));
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::setFloatArray(size_t id, const float* value,
-                                  size_t length, size_t offset)
-{
-    return setArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, value, length, offset);
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::getFloatArray(size_t id, float* value,
-                                  size_t length, size_t offset) const
-{
-    return getArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, value, length, offset);
-}
-
-//------------------------------------------------------------------------------
-
-const float* MultiBuffer::getFloatArray(size_t id, size_t offset) const
-{
-    return getArray<float, Protocol::TYPE_FLOAT_ARRAY>(id, offset);
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::setIntArray(size_t id, const int32_t* value,
-                                size_t length, size_t offset)
-
-{
-    return setArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, value, length, offset);
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::getIntArray(size_t id, int32_t* value,
-                                size_t length, size_t offset) const
-{
-    return getArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, value, length, offset);
-}
-
-//------------------------------------------------------------------------------
-
-const int32_t* MultiBuffer::getIntArray(size_t id, size_t offset) const
-{
-    return getArray<int32_t, Protocol::TYPE_INT_ARRAY>(id, offset);
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::setByteArray(size_t id, const uint8_t* value,
-                                size_t length, size_t offset)
-{
-    return setArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, value, length, offset);
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::getByteArray(size_t id, uint8_t* value,
-                                size_t length, size_t offset) const
-{
-    return getArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, value, length, offset);
-}
-
-//------------------------------------------------------------------------------
-
-const uint8_t* MultiBuffer::getByteArray(size_t id, size_t offset) const
-{
-    return getArray<uint8_t, Protocol::TYPE_BYTE_ARRAY>(id, offset);
-}
-
-//------------------------------------------------------------------------------
-
-size_t MultiBuffer::setString(size_t id, const string& value,
-                              size_t offset)
-{
-    return setByteArray(id, reinterpret_cast<const uint8_t*>(value.c_str()),
-                        value.length(), offset);
-}
-
-//------------------------------------------------------------------------------
-
-string MultiBuffer::getString(size_t id, size_t offset) const
-{
-    const DataRef& dataRef = getDataRef(id, Protocol::TYPE_BYTE_ARRAY);
-    finalize();
-
-    size_t toCopy = dataRef.getCopyLength(0, offset);
-    const uint8_t* str = data + dataRef.dataOffset + offset;
-
-    size_t length = 0;
-    if (toCopy!=0) {
-        while(length<toCopy && str[length]!=0) ++length;
-    }
-
-    return string(reinterpret_cast<const char*>(str), length);
-}
-
-//------------------------------------------------------------------------------
-
-const char* MultiBuffer::getStringPtr(size_t id, size_t offset) const
-{
-    return reinterpret_cast<const char*>(getByteArray(id, offset));
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::writeSpec(uint8_t command) const
-{
-    xplane.stream->writeU8(command);
-    xplane.stream->writeU32(dataRefs.size());
-
-    for(vector<DataRef>::const_iterator i = dataRefs.begin();
-        i!=dataRefs.end(); ++i)
-    {
-        const DataRef& dataRef = *i;
-        xplane.stream->writeString(dataRef.name);
-        xplane.stream->writeU8(dataRef.type);
-        if (dataRef.isArray()) {
-            xplane.stream->writeS32(dataRef.length);
-            xplane.stream->writeS32(dataRef.offset);
-        }
-    }
-
-    xplane.stream->flush();
-    xplane.checkResult(true);
-}
-
-//------------------------------------------------------------------------------
-
-void MultiBuffer::reregisterInXPlane()
-{
-    if (registeredID>=0) {
-        int origRegisteredID = registeredID;
-        try {
-            registeredID = -1;
-            registerInXPlane();
-        } catch(...) {
-            registeredID = origRegisteredID;
-            throw;
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/MultiBuffer.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiBuffer.h	(revision 107)
+++ 	(revision )
@@ -1,575 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_XPLRA_MULTIBUFFER_H
-#define HU_VARADIISTVAN_XPLRA_MULTIBUFFER_H
-//------------------------------------------------------------------------------
-
-#include "Exception.h"
-
-#include <string>
-#include <vector>
-
-#include <inttypes.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class XPlane;
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for the multi-get and multi-set handlers. It contains
- * the meta-data of the datarefs as well as a buffer for storing the
- * data.
- */
-class MultiBuffer
-{
-protected:
-    /**
-     * Information about a dataref.
-     */
-    class DataRef
-    {
-    public:
-        /**
-         * The name.
-         */
-        std::string name;
-
-        /**
-         * The type (the protocol constant).
-         */
-        uint8_t type;
-
-        /**
-         * The length in case of array types.
-         */
-        size_t length;
-
-        /**
-         * The offset in case of array types.
-         */
-        size_t offset;
-
-        /**
-         * The offset within the data buffer.
-         */
-        size_t dataOffset;
-
-        /**
-         * Construct the dataref with the given data.
-         */
-        DataRef(const std::string& name, uint8_t type,
-                const DataRef* previous = 0,
-                size_t length = 0, size_t offset = 0) noexcept;
-
-        /**
-         * Get the size of the data represented by this object.
-         */
-        size_t getSize() const noexcept;
-
-        /**
-         * Get the alignment requirement of the data represented by
-         * this dataref.
-         */
-        size_t getAlignment() const noexcept;
-
-        /**
-         * Determine if the dataref is an array.
-         */
-        bool isArray() const noexcept;
-
-        /**
-         * Get the length of the data the can be copied for the given
-         * user parameters.
-         */
-        size_t getCopyLength(size_t userLength, size_t userOffset) const noexcept;
-    };
-
-    /**
-     * The datarefs.
-     */
-    std::vector<DataRef> dataRefs;
-
-    /**
-     * The data buffer.
-     */
-    mutable unsigned char* data;
-
-    /**
-     * The XPlane object this buffer belongs to.
-     */
-    XPlane& xplane;
-
-    /**
-     * The command to use for registering the buffer.
-     */
-    uint8_t registerCommand;
-
-    /**
-     * The command to unregister the buffer.
-     */
-    uint8_t unregisterCommand;
-
-    /**
-     * The ID with which this buffer is registered in the plugin. If
-     * negative, the buffer is not registerd yet.
-     */
-    int registeredID;
-
-protected:
-    /**
-     * Construct an empty buffer for the given XPlane instance.
-     */
-    MultiBuffer(XPlane& xplane, uint8_t registerCommand,
-                uint8_t unregisterCommand) noexcept;
-
-    /**
-     * Destroy the buffer. If it is registered, an attempt will be
-     * made to unregister it.
-     */
-    virtual ~MultiBuffer() noexcept;
-
-public:
-    /**
-     * Get the X-Plane object this buffer belongs to.
-     */
-    XPlane& getXPlane() const noexcept;
-
-    /**
-     * Add an integer dataref.
-     *
-     * @return the ID of the dataref, that can be used later to set or
-     * get the value.
-     */
-    size_t addInt(const std::string& name) noexcept;
-
-    /**
-     * Add a float dataref.
-     *
-     * @return the ID of the dataref, that can be used later to set or
-     * get the value.
-     */
-    size_t addFloat(const std::string& name) noexcept;
-
-    /**
-     * Add a double dataref.
-     *
-     * @return the ID of the dataref, that can be used later to set or
-     * get the value.
-     */
-    size_t addDouble(const std::string& name) noexcept;
-
-    /**
-     * Add a float array dataref.
-     *
-     * @return the ID of the dataref, that can be used later to set or
-     * get the value.
-     */
-    size_t addFloatArray(const std::string& name, size_t length,
-                         size_t offset = 0) noexcept;
-
-    /**
-     * Add an integer array dataref.
-     *
-     * @return the ID of the dataref, that can be used later to set or
-     * get the value.
-     */
-    size_t addIntArray(const std::string& name, size_t length,
-                       size_t offset = 0) noexcept;
-
-    /**
-     * Add a byte array dataref.
-     *
-     * @return the ID of the dataref, that can be used later to set or
-     * get the value.
-     */
-    size_t addByteArray(const std::string& name, size_t length,
-                        size_t offset = 0) noexcept;
-
-    /**
-     * Finalize the buffer, if not finalized yet.
-     *
-     * @return if there is any data in it
-     */
-    bool finalize() const;
-
-    /**
-     * Register this buffer in X-Plane the for either getting or
-     * setting, depending on the actual subclass. It will be finalized
-     * too.
-     */
-    void registerInXPlane();
-
-    /**
-     * Unregister this buffer from X-Plane.
-     */
-    void unregisterFromXPlane();
-
-    /**
-     * Unregister this buffer from X-Plane safely, i.e. without
-     * throwing any exceptions. If unregistration fails, the
-     * registered ID will be cleared anyway.
-     *
-     * @return whether unregistration succeeded.
-     */
-    bool unregisterSafelyFromXPlane() noexcept;
-
-    /**
-     * Execute the buffer by either reading or writing it. If the
-     * buffer is not finalized, it will be finalized. If it is not
-     * finalized, but registered, the registration will be cleared,
-     * and it will be re-registered after finalizing.
-     */
-    void execute();
-
-    /**
-     * Set the value of an integer dataref with the given ID.
-     */
-    void setInt(size_t id, int value);
-
-    /**
-     * Get the value of an integer dataref with the given ID.
-     */
-    int getInt(size_t id) const;
-
-    /**
-     * Get a reference to the integer dataref with the given ID
-     */
-    const int32_t& getIntRef(size_t id) const;
-
-    /**
-     * Get a reference to the integer dataref with the given ID
-     */
-    int32_t& getIntRef(size_t id);
-
-    /**
-     * Set the value of a float dataref with the given ID.
-     */
-    void setFloat(size_t id, float value);
-
-    /**
-     * Get the value of a float dataref with the given ID.
-     */
-    float getFloat(size_t id) const;
-
-    /**
-     * Get a reference to the float dataref with the given ID
-     */
-    const float& getFloatRef(size_t id) const;
-
-    /**
-     * Get a reference to the integer dataref with the given ID
-     */
-    float& getFloatRef(size_t id);
-
-    /**
-     * Set the value of a double dataref with the given ID.
-     */
-    void setDouble(size_t id, double value);
-
-    /**
-     * Get the value of a double dataref with the given ID.
-     */
-    double getDouble(size_t id) const;
-
-    /**
-     * Get a reference to the double dataref with the given ID
-     */
-    const double& getDoubleRef(size_t id) const;
-
-    /**
-     * Get a reference to the double dataref with the given ID
-     */
-    double& getDoubleRef(size_t id);
-
-    /**
-     * Set the value of the float array dataref with the given ID.
-     *
-     * @param id the ID of the float array dataref
-     * @param value the source buffer
-     * @param length the amount of data, i.e. you can set only a part
-     * of the data in the buffer. If 0, it is assumed to be the length
-     * of the data in the buffer minus the offset (see below).
-     *
-     * @param offset the offset within the buffer to set the data from
-     *
-     * @return the number of data items set
-     */
-    size_t setFloatArray(size_t id, const float* value,
-                         size_t length = 0, size_t offset = 0);
-
-    /**
-     * Get the value of the float array dataref with the given ID
-     *
-     * @param id the ID of the float array dataref
-     * @param value the destination buffer
-     * @param length the size of the buffer. If 0, it is assumed to be
-     * the length of the data in the buffer minus the offset (see
-     * below).
-     *
-     * @param offset the offset within the buffer to get the data from
-     *
-     * @return the number of data items retrieved.
-     */
-    size_t getFloatArray(size_t id, float* value,
-                         size_t length = 0, size_t offset = 0) const;
-
-    /**
-     * Get the array of floating point values as a directly readable
-     * buffer.
-     *
-     * @param id the ID of the float array dataref
-     * @param offset the offset within the buffer. If it is not less
-     * than the length of the buffer, 0 is returned.
-     */
-    const float* getFloatArray(size_t id, size_t offset = 0) const;
-
-    /**
-     * Set the value of the integer array dataref with the given ID.
-     *
-     * @param id the ID of the integer array dataref
-     * @param value the source buffer
-     * @param length the amount of data, i.e. you can set only a part
-     * of the data in the buffer. If 0, it is assumed to be the length
-     * of the data in the buffer minus the offset (see below).
-     *
-     * @param offset the offset within the buffer to set the data from
-     *
-     * @return the number of data items set
-     */
-    size_t setIntArray(size_t id, const int32_t* value,
-                       size_t length = 0, size_t offset = 0);
-
-    /**
-     * Get the value of the integer array dataref with the given ID
-     *
-     * @param id the ID of the integer array dataref
-     * @param value the destination buffer
-     * @param length the size of the buffer. If 0, it is assumed to be
-     * the length of the data in the buffer minus the offset (see
-     * below).
-     *
-     * @param offset the offset within the buffer to get the data from
-     *
-     * @return the number of data items retrieved.
-     */
-    size_t getIntArray(size_t id, int32_t* value,
-                       size_t length = 0, size_t offset = 0) const;
-
-    /**
-     * Get the array of integer values as a directly readable buffer.
-     *
-     * @param id the ID of the float array dataref
-     * @param offset the offset within the buffer. If it is not less
-     * than the length of the buffer, 0 is returned.
-     */
-    const int32_t* getIntArray(size_t id, size_t offset = 0) const;
-
-    /**
-     * Set the value of the byte array dataref with the given ID.
-     *
-     * @param id the ID of the byte array dataref
-     * @param value the source buffer
-     * @param length the amount of data, i.e. you can set only a part
-     * of the data in the buffer. If 0, it is assumed to be the length
-     * of the data in the buffer minus the offset (see below).
-     *
-     * @param offset the offset within the buffer to set the data from
-     *
-     * @return the number of data items set
-     */
-    size_t setByteArray(size_t id, const uint8_t* value,
-                        size_t length = 0, size_t offset = 0);
-
-    /**
-     * Get the value of the byte array dataref with the given ID
-     *
-     * @param id the ID of the byte array dataref
-     * @param value the destination buffer
-     * @param length the size of the buffer. If 0, it is assumed to be
-     * the length of the data in the buffer minus the offset (see
-     * below).
-     *
-     * @param offset the offset within the buffer to get the data from
-     *
-     * @return the number of data items retrieved.
-     */
-    size_t getByteArray(size_t id, uint8_t* value,
-                        size_t length = 0, size_t offset = 0) const;
-
-    /**
-     * Get the array of byte values as a directly readable buffer.
-     *
-     * @param id the ID of the byte array dataref
-     * @param offset the offset within the buffer. If it is not less
-     * than the length of the buffer, 0 is returned.
-     */
-    const uint8_t* getByteArray(size_t id, size_t offset = 0) const;
-
-
-    /**
-     * Set the value of the byte array dataref with the given ID
-     * from the given string. If the string contains less characters
-     * than the array's length, the rest will be filled with 0s.
-     *
-     * @return the number of bytes set
-     */
-    size_t setString(size_t id, const std::string& value,
-                     size_t offset = 0);
-
-    /**
-     * Get the value of the byte array dataref with the given ID as
-     * a string.
-     */
-    std::string getString(size_t id, size_t offset = 0) const;
-    
-    /**
-     * Get a string pointer to the value of the byte array dataref
-     * with the given ID.
-     */
-    const char* getStringPtr(size_t id, size_t offset = 0) const;
-
-protected:
-    /**
-     * Perform the main part of the execution if the buffer is
-     * registered.
-     */
-    virtual void doExecute() = 0;
-
-    /**
-     * Perform the main part of the execution if the buffer is
-     * not registered.
-     */
-    virtual void doExecuteUnregistered() = 0;
-
-    /**
-     * Write the data specification with the given command. It also
-     * checks the result
-     */
-    void writeSpec(uint8_t command) const;
-
-    /**
-     * Re-register the buffer in X-Plane, if it has been registered
-     * earlier.
-     *
-     * it has not been registered, nothing is done. Otherwise the
-     * buffer gets registered, and the old ID is forgotten. This
-     * function is meant to be used by the XPlane object when it
-     * creates a new connection. If the registration fails, the
-     * original ID is restored, so that this function could be called
-     * again
-     */
-    void reregisterInXPlane();
-
-private:
-    /**
-     * Unfinalize the buffer, if it is finalized.
-     */
-    void unfinalize() noexcept;
-
-    /**
-     * Forget the registration of this buffer. This is called from the
-     * destructor of the XPlane object, since that closes the
-     * connection anyway, so there is no need to unregister the
-     * multi-buffers.
-     */
-    void forgetRegistration() noexcept;
-
-    /**
-     * Get the last dataref, or 0 if there are not datarefs yet.
-     */
-    const DataRef* getLastDataRef() const noexcept;
-
-    /**
-     * Get the dataref with the given ID if it is of the given
-     * type. Otherwise throw an exception.
-     */
-    const DataRef& getDataRef(size_t id, uint8_t type) const;
-
-    /**
-     * Get the data area belonging to the given dataref it is of the
-     * given type. If the buffer is not finalized yet, it will be.
-     */
-    void* getData(size_t id, uint8_t type);
-
-    /**
-     * Get the data area belonging to the given dataref it is of the
-     * given type. If the buffer is not finalized yet, it will be.
-     */
-    const void* getData(size_t id, uint8_t type) const;
-
-    /**
-     * Template function for setting an array of a certain type.
-     */
-    template <typename T, uint8_t type> size_t
-    setArray(size_t id, const T* value, size_t length, size_t offset);
-
-    /**
-     * Template function for getting the elements of an array of a
-     * certain type.
-     */
-    template <typename T, uint8_t type> size_t
-    getArray(size_t id, T* value, size_t length, size_t offset) const;
-
-    /**
-     * Template function for getting the elements of an array of a
-     * certain type.
-     */
-    template <typename T, uint8_t type> const T*
-    getArray(size_t id, size_t offset) const;
-
-    friend class XPlane;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline XPlane& MultiBuffer::getXPlane() const noexcept
-{
-    return xplane;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::xplra */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_XPLRA_MULTIBUFFER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/MultiGetter.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiGetter.cc	(revision 107)
+++ 	(revision )
@@ -1,133 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "MultiGetter.h"
-
-#include "XPlane.h"
-
-#include <xplra/Protocol.h>
-
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::MultiGetter;
-
-using xplra::Protocol;
-
-using std::vector;
-using std::min;
-
-//------------------------------------------------------------------------------
-
-MultiGetter::MultiGetter(XPlane& xplane) noexcept :
-    MultiBuffer(xplane, Protocol::COMMAND_REGISTER_GET_MULTI,
-                Protocol::COMMAND_UNREGISTER_GET_MULTI)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline void MultiGetter::read(const DataRef& dataRef)
-{
-    switch (dataRef.type) {
-      case Protocol::TYPE_INT:
-        *reinterpret_cast<int32_t*>(data + dataRef.dataOffset) =
-            xplane.stream->readS32();
-        break;
-      case Protocol::TYPE_FLOAT:
-        *reinterpret_cast<float*>(data + dataRef.dataOffset) =
-            xplane.stream->readFloat();
-        break;
-      case Protocol::TYPE_DOUBLE:
-        *reinterpret_cast<double*>(data + dataRef.dataOffset) =
-            xplane.stream->readDouble();
-        break;
-      case Protocol::TYPE_FLOAT_ARRAY:
-      case Protocol::TYPE_INT_ARRAY:
-      case Protocol::TYPE_BYTE_ARRAY:
-      {
-          size_t length = xplane.stream->readS32();
-          xplane.checkStream();
-          length = min(length, dataRef.length);
-          size_t elementSize =
-              (dataRef.type==Protocol::TYPE_FLOAT_ARRAY) ? sizeof(float) :
-              ((dataRef.type==Protocol::TYPE_INT_ARRAY) ?
-               sizeof(int32_t) : sizeof(uint8_t));
-          xplane.stream->read(data + dataRef.dataOffset, length * elementSize);
-      }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiGetter::doExecute()
-{
-    xplane.checkStream();
-    xplane.stream->writeU8(Protocol::COMMAND_EXECUTE_GET_MULTI);
-    xplane.stream->writeU32(registeredID);
-    xplane.stream->flush();
-    xplane.checkResult(true);
-
-    readValues();
-}
-
-
-//------------------------------------------------------------------------------
-
-void MultiGetter::doExecuteUnregistered()
-{
-    writeSpec(Protocol::COMMAND_GET_MULTI);
-
-    readValues();
-}
-
-//------------------------------------------------------------------------------
-
-void MultiGetter::readValues()
-{
-    for(vector<DataRef>::const_iterator i = dataRefs.begin();
-        i!=dataRefs.end(); ++i)
-    {
-        xplane.checkStream();
-        const DataRef& dataRef = *i;
-        read(dataRef);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/MultiGetter.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiGetter.h	(revision 107)
+++ 	(revision )
@@ -1,89 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_XPLRA_MULTIGETTER_H
-#define HU_VARADIISTVAN_XPLRA_MULTIGETTER_H
-//------------------------------------------------------------------------------
-
-#include "MultiBuffer.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A multi-dataref buffer used to query those data.
- */
-class MultiGetter : public MultiBuffer
-{
-private:
-    /**
-     * Construct the object for the given XPlane instance.
-     */
-    MultiGetter(XPlane& xplane) noexcept;
-
-protected:
-    /**
-     * @see MultiBuffer::doExecute
-     */
-    virtual void doExecute();
-
-    /**
-     * @see MultiBuffer::doExecuteUnregistered
-     */
-    virtual void doExecuteUnregistered();
-
-private:
-    /**
-     * Read the value of the given dataref from the stream into the
-     * buffer.
-     */
-    void read(const DataRef& dataRef);
-
-    /**
-     * Read all the values.
-     */
-    void readValues();
-
-    friend class XPlane;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::xplra */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_XPLRA_MULTIGETTER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/MultiSetter.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiSetter.cc	(revision 107)
+++ 	(revision )
@@ -1,132 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "MultiSetter.h"
-
-#include "XPlane.h"
-
-#include <xplra/Protocol.h>
-
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::MultiSetter;
-
-using xplra::Protocol;
-
-using std::vector;
-using std::min;
-
-//------------------------------------------------------------------------------
-
-MultiSetter::MultiSetter(XPlane& xplane) noexcept :
-    MultiBuffer(xplane, Protocol::COMMAND_REGISTER_SET_MULTI,
-                Protocol::COMMAND_UNREGISTER_SET_MULTI)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline void MultiSetter::write(const DataRef& dataRef) const
-{
-    switch (dataRef.type) {
-      case Protocol::TYPE_INT:
-        xplane.stream->writeS32(*reinterpret_cast<const int32_t*>
-                                (data + dataRef.dataOffset));
-        break;
-      case Protocol::TYPE_FLOAT:
-        xplane.stream->writeFloat(*reinterpret_cast<const float*>
-                                (data + dataRef.dataOffset));
-        break;
-      case Protocol::TYPE_DOUBLE:
-        xplane.stream->writeDouble(*reinterpret_cast<const double*>
-                                   (data + dataRef.dataOffset));
-        break;
-      case Protocol::TYPE_FLOAT_ARRAY:
-      case Protocol::TYPE_INT_ARRAY:
-      case Protocol::TYPE_BYTE_ARRAY:
-      {
-          size_t elementSize =
-              (dataRef.type==Protocol::TYPE_FLOAT_ARRAY) ? sizeof(float) :
-              ((dataRef.type==Protocol::TYPE_INT_ARRAY) ?
-               sizeof(int32_t) : sizeof(uint8_t));
-          xplane.stream->write(data + dataRef.dataOffset,
-                               dataRef.length * elementSize);
-      }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiSetter::doExecute()
-{
-    xplane.checkStream();
-    xplane.stream->writeU8(Protocol::COMMAND_EXECUTE_SET_MULTI);
-    xplane.stream->writeU32(registeredID);
-    for(vector<DataRef>::const_iterator i = dataRefs.begin();
-        i!=dataRefs.end(); ++i)
-    {
-        const DataRef& dataRef = *i;
-        write(dataRef);
-    }
-    xplane.stream->flush();
-    xplane.checkResult(true);
-}
-
-//------------------------------------------------------------------------------
-
-void MultiSetter::doExecuteUnregistered()
-{
-    xplane.stream->writeU8(Protocol::COMMAND_SET_MULTI);
-    xplane.stream->writeU32(dataRefs.size());
-    for(vector<DataRef>::const_iterator i = dataRefs.begin();
-        i!=dataRefs.end(); ++i)
-    {
-        const DataRef& dataRef = *i;
-        xplane.stream->writeString(dataRef.name);
-        xplane.stream->writeU8(dataRef.type);
-        if (dataRef.isArray()) {
-            xplane.stream->writeS32(dataRef.length);
-            xplane.stream->writeS32(dataRef.offset);
-        }
-        write(dataRef);
-    }
-    xplane.stream->flush();
-    xplane.checkResult(true);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/MultiSetter.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/MultiSetter.h	(revision 107)
+++ 	(revision )
@@ -1,84 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_XPLRA_MULTISETTER_H
-#define HU_VARADIISTVAN_XPLRA_MULTISETTER_H
-//------------------------------------------------------------------------------
-
-#include "MultiBuffer.h"
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A multi-dataref buffer used to set those data.
- */
-class MultiSetter : public MultiBuffer
-{
-private:
-    /**
-     * Construct the object for the given XPlane instance.
-     */
-    MultiSetter(XPlane& xplane) noexcept;
-
-protected:
-    /**
-     * @see MultiBuffer::doExecute
-     */
-    virtual void doExecute();
-
-    /**
-     * @see MultiBuffer::doExecuteUnregistered
-     */
-    virtual void doExecuteUnregistered();
-
-private:
-    /**
-     * Write the value of the given dataref from the buffer into the
-     * stream.
-     */
-    void write(const DataRef& dataRef) const;
-
-    friend class XPlane;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::xplra */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_XPLRA_MULTISETTER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/XPlane.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/XPlane.cc	(revision 110)
+++ 	(revision )
@@ -1,590 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "XPlane.h"
-
-#include "MultiGetter.h"
-#include "MultiSetter.h"
-
-#include <hu/varadiistvan/scpl/io/LocalClientSocket.h>
-#include <hu/varadiistvan/scpl/io/TCPClientSocket.h>
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <xplra/Protocol.h>
-
-#include <memory>
-
-#ifndef _WIN32
-#include <signal.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::MultiGetter;
-using hu::varadiistvan::xplra::MultiSetter;
-
-using hu::varadiistvan::scpl::io::LocalClientSocket;
-using hu::varadiistvan::scpl::io::TCPClientSocket;
-using hu::varadiistvan::scpl::io::DataStream;
-
-using xplra::Protocol;
-
-using std::unique_ptr;
-using std::string;
-using std::min;
-
-//------------------------------------------------------------------------------
-
-const unsigned short XPlane::defaultTCPPort;
-
-//------------------------------------------------------------------------------
-
-template <class ClientSocket>
-void XPlane::connect(std::unique_ptr<ClientSocket> clientSocket)
-{
-    auto& connector = clientSocket->getConnector();
-
-    while (!connector.connect()) {
-        if (connector.failed()) {
-            throw IOException(connector.getErrorCode());
-        }
-        waiter.wait();
-        if (waiter.failed()) {
-            throw IOException(waiter.getErrorCode());
-        }
-    }
-
-#ifndef _WIN32
-    signal(SIGPIPE, SIG_IGN);
-#endif
-
-    socket = clientSocket.release();
-    stream = new DataStream(*socket);
-
-    for(multiBuffers_t::iterator i = multiBuffers.begin();
-        i!=multiBuffers.end(); ++i)
-    {
-        MultiBuffer* buffer = *i;
-        buffer->reregisterInXPlane();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::checkStream()
-{
-    if (stream==0) {
-        throw NotConnectedException();
-    } else if (stream->failed()) {
-        throw IOException(stream->getErrorCode());
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::checkResult(uint8_t result, bool hasParameter, long parameter)   
-{
-    switch(result) {
-      case Protocol::RESULT_OK:
-        return;
-      case Protocol::RESULT_INVALID_COMMAND:
-        throw ProtocolException(ProtocolException::INVALID_COMMAND,
-                                hasParameter, parameter);
-      case Protocol::RESULT_UNKNOWN_DATAREF:
-        throw ProtocolException(ProtocolException::UNKNOWN_DATAREF,
-                                hasParameter, parameter);
-      case Protocol::RESULT_INVALID_TYPE:
-        throw ProtocolException(ProtocolException::INVALID_TYPE,
-                                hasParameter, parameter);
-      case Protocol::RESULT_INVALID_LENGTH:
-        throw ProtocolException(ProtocolException::INVALID_LENGTH,
-                                hasParameter, parameter);
-      case Protocol::RESULT_INVALID_OFFSET:
-        throw ProtocolException(ProtocolException::INVALID_OFFSET,
-                                hasParameter, parameter);
-      case Protocol::RESULT_INVALID_COUNT:
-        throw ProtocolException(ProtocolException::INVALID_COUNT,
-                                hasParameter, parameter);
-      case Protocol::RESULT_INVALID_ID:
-        throw ProtocolException(ProtocolException::INVALID_ID,
-                                hasParameter, parameter);
-      case Protocol::RESULT_INVALID_DURATION:
-        throw ProtocolException(ProtocolException::INVALID_DURATION,
-                                hasParameter, parameter);
-      case Protocol::RESULT_OTHER_ERROR:
-      default:
-        throw ProtocolException(ProtocolException::OTHER,
-                                hasParameter, parameter);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::checkResult(bool multi)
-{
-    uint8_t result = stream->readU8();
-    bool hasParameter = false;
-    long parameter = 0;
-    if (multi) {
-        if (result==Protocol::RESULT_UNKNOWN_DATAREF) {
-            parameter = stream->readU32();
-            hasParameter = true;
-        }
-    }
-    checkStream();
-    checkResult(result, hasParameter, parameter);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-XPlane::~XPlane() noexcept
-{
-    disconnect();
-    for(multiBuffers_t::iterator i = multiBuffers.begin();
-        i!=multiBuffers.end(); ++i)
-    {
-        MultiBuffer* buffer = *i;
-        buffer->forgetRegistration();
-        delete buffer;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::connect()
-{
-    if (socket!=0) return;
-
-    unique_ptr<LocalClientSocket> clientSocket(new LocalClientSocket("xplra",
-                                                                     &waiter));
-    connect(std::move(clientSocket));
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::connectTCP(const std::string& address, unsigned short port)
-{
-    if (socket!=0) return;
-
-    unique_ptr<TCPClientSocket> clientSocket(new TCPClientSocket(address.c_str(),
-                                                                 port,
-                                                                 &waiter));
-    connect(std::move(clientSocket));
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::disconnect() noexcept
-{
-    if (socket==0) return;
-
-    delete stream; stream = 0;
-    delete socket; socket = 0;
-}
-
-//------------------------------------------------------------------------------
-
-MultiGetter& XPlane::createMultiGetter() noexcept
-{
-    MultiGetter* getter = new MultiGetter(*this);
-    multiBuffers.insert(getter);
-    return *getter;
-}
-
-//------------------------------------------------------------------------------
-
-MultiSetter& XPlane::createMultiSetter() noexcept
-{
-    MultiSetter* setter = new MultiSetter(*this);
-    multiBuffers.insert(setter);
-    return *setter;
-}
-
-//------------------------------------------------------------------------------
-
-bool XPlane::destroyMultiBuffer(MultiBuffer& buffer)
-{
-    multiBuffers_t::iterator i = multiBuffers.find(&buffer);
-    if (i==multiBuffers.end()) return false;
-
-    multiBuffers.erase(i);
-    delete &buffer;
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion)   
-{
-    stream->writeU8(Protocol::COMMAND_GET_VERSIONS);
-    stream->flush();
-    checkResult();
-
-    xplaneVersion = stream->readS32();
-    xplmVersion = stream->readS32();
-    xplraVersion = stream->readS32();
-
-    checkStream();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::reloadPlugins()
-{
-    stream->writeU8(Protocol::COMMAND_RELOAD_PLUGINS);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::saveSituation(const char* path)
-{
-    stream->writeU8(Protocol::COMMAND_SAVE_SITUATION);
-    stream->writeString(path);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::getScalar(const char* name, uint8_t type)
-{
-    checkStream();
-
-    stream->writeU8(Protocol::COMMAND_GET_SINGLE);
-    stream->writeString(name, strlen(name));
-    stream->writeU8(type);
-    if (!stream->flush()) checkStream();
-
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-int XPlane::getInt(const char* name)
-{
-    getScalar(name, Protocol::TYPE_INT);
-
-    int value = stream->readS32();
-    checkStream();
-    return value;
-}
-
-//------------------------------------------------------------------------------
-
-float XPlane::getFloat(const char* name)
-{
-    getScalar(name, Protocol::TYPE_FLOAT);
-
-    float value = stream->readFloat();
-    checkStream();
-    return value;
-}
-
-//------------------------------------------------------------------------------
-
-double XPlane::getDouble(const char* name)
-{
-    getScalar(name, Protocol::TYPE_DOUBLE);
-
-    double value = stream->readDouble();
-    checkStream();
-    return value;
-}
-
-//------------------------------------------------------------------------------
-
-size_t XPlane::getArray(const char* name, uint8_t type,
-                        ssize_t length, size_t offset)
-{
-    checkStream();
-
-    stream->writeU8(Protocol::COMMAND_GET_SINGLE);
-    stream->writeString(name, strlen(name));
-    stream->writeU8(type);
-    stream->writeS32(static_cast<int32_t>(length));
-    stream->writeS32(static_cast<int32_t>(offset));
-    if (!stream->flush()) checkStream();
-
-    uint8_t result = stream->readU8();
-    length = stream->readS32();
-    checkStream();
-    checkResult(result);
-
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-size_t XPlane::getFloatArray(const char* name, float* dest,
-                             size_t length, size_t offset)
-{
-    length = getArray(name, Protocol::TYPE_FLOAT_ARRAY, length, offset);
-
-    if (!stream->read(dest, length*sizeof(float))) checkStream();
-
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-float* XPlane::getFloatArray(const char* name, size_t& length,
-                             size_t offset)
-{
-    length = getArray(name, Protocol::TYPE_FLOAT_ARRAY, -1, offset);
-
-    unique_ptr<float[]> data(new float[length]);
-    if (!stream->read(data.get(), length*sizeof(float))) checkStream();
-    return data.release();
-}
-
-//------------------------------------------------------------------------------
-
-size_t XPlane::getIntArray(const char* name, int32_t* dest,
-                           size_t length, size_t offset)
-{
-    length = getArray(name, Protocol::TYPE_INT_ARRAY, length, offset);
-
-    if (!stream->read(dest, length*sizeof(int32_t))) checkStream();
-
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-int32_t* XPlane::getIntArray(const char* name, size_t& length,
-                             size_t offset)
-{
-    length = getArray(name, Protocol::TYPE_INT_ARRAY, -1, offset);
-
-    unique_ptr<int32_t[]> data(new int32_t[length]);
-    if (!stream->read(data.get(), length*sizeof(int32_t))) checkStream();
-    return data.release();
-}
-
-//------------------------------------------------------------------------------
-
-size_t XPlane::getByteArray(const char* name, uint8_t* dest,
-                            size_t length, size_t offset)
-{
-    length = getArray(name, Protocol::TYPE_BYTE_ARRAY, length, offset);
-
-    if (!stream->read(dest, length*sizeof(uint8_t))) checkStream();
-
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-uint8_t* XPlane::getByteArray(const char* name, size_t& length,
-                              size_t offset)
-{
-    length = getArray(name, Protocol::TYPE_BYTE_ARRAY, -1, offset);
-
-    unique_ptr<uint8_t[]> data(new uint8_t[length]);
-    if (!stream->read(data.get(), length*sizeof(uint8_t))) checkStream();
-    return data.release();
-}
-
-//------------------------------------------------------------------------------
-
-string XPlane::getString(const char* name, size_t offset)
-{
-    size_t length = 0;
-    unique_ptr<uint8_t[]> data(getByteArray(name, length, offset));
-    return string(reinterpret_cast<char*>(data.get()));
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setScalar(const char* name, uint8_t type)
-{
-    stream->writeU8(Protocol::COMMAND_SET_SINGLE);
-    stream->writeString(name, strlen(name));
-    stream->writeU8(type);
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setInt(const char* name, int value)
-{
-    setScalar(name, Protocol::TYPE_INT);
-    stream->writeS32(value);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setFloat(const char* name, float value)
-{
-    setScalar(name, Protocol::TYPE_FLOAT);
-    stream->writeFloat(value);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setDouble(const char* name, double value)
-{
-    setScalar(name, Protocol::TYPE_DOUBLE);
-    stream->writeDouble(value);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setArray(const char* name, uint8_t type, size_t length,
-                      size_t offset)
-{
-    stream->writeU8(Protocol::COMMAND_SET_SINGLE);
-    stream->writeString(name, strlen(name));
-    stream->writeU8(type);
-    stream->writeS32(static_cast<int32_t>(length));
-    stream->writeS32(static_cast<int32_t>(offset));
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setFloatArray(const char* name, const float* values, size_t length,
-                           size_t offset)
-{
-    setArray(name, Protocol::TYPE_FLOAT_ARRAY, length, offset);
-    stream->write(values, length*sizeof(*values));
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setIntArray(const char* name, const int32_t* values, size_t length,
-                         size_t offset)
-{
-    setArray(name, Protocol::TYPE_INT_ARRAY, length, offset);
-    stream->write(values, length*sizeof(*values));
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setByteArray(const char* name, const uint8_t* values, size_t length,
-                          size_t offset)
-{
-    setArray(name, Protocol::TYPE_BYTE_ARRAY, length, offset);
-    stream->write(values, length*sizeof(*values));
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::setString(const char* name, const char* value, size_t length,
-                       size_t offset)
-{
-    size_t valueLength = strlen(value);
-    if ((valueLength+1)>=length) {
-        setByteArray(name, reinterpret_cast<const uint8_t*>(value),
-                     length, offset);
-    } else {
-        unique_ptr<uint8_t[]> buffer(new uint8_t[length]);
-        memcpy(buffer.get(), value, valueLength);
-        memset(buffer.get() + valueLength, 0, length - valueLength);
-        setByteArray(name, buffer.get(), length, offset);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::showMessage(const char* message, float duration)
-{
-    stream->writeU8(Protocol::COMMAND_SHOW_MESSAGE);
-    stream->writeString(message);
-    stream->writeFloat(duration);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::registerHotkeys(const uint16_t* codes, size_t length)
-   
-{
-    stream->writeU8(Protocol::COMMAND_REGISTER_HOTKEYS);
-    stream->writeU32(length);
-    stream->write(codes, sizeof(uint16_t)*length);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::queryHotkeys(uint8_t* states, size_t length)
-{
-    stream->writeU8(Protocol::COMMAND_QUERY_HOTKEYS);
-    stream->flush();
-    checkResult();
-
-    size_t count = stream->readU32();
-    checkStream();
-    stream->read(states, min(length, count));
-    if (length<count) {
-        while(length<count) {
-            stream->readU8();
-            ++length;
-        }
-    } else if (length>count) {
-        memset(states + count, 0, length - count);
-    }
-    checkStream();
-}
-
-//------------------------------------------------------------------------------
-
-void XPlane::unregisterHotkeys()
-{
-    stream->writeU8(Protocol::COMMAND_UNREGISTER_HOTKEYS);
-    stream->flush();
-    checkResult();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/XPlane.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/XPlane.h	(revision 110)
+++ 	(revision )
@@ -1,417 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef HU_VARADIISTVAN_XPLRA_XPLANE_H
-#define HU_VARADIISTVAN_XPLRA_XPLANE_H
-//-----------------------------------------------------------------------------
-
-#include "Exception.h"
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-
-#include <set>
-#include <memory>
-
-#include <inttypes.h>
-
-//-----------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-class BufferedStream;
-class DataStream;
-
-} /* namespace hu::varadiistvan::scpl::io */ } /* namespace hu::varadiistvan::scpl */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class MultiBuffer;
-class MultiGetter;
-class MultiSetter;
-
-//------------------------------------------------------------------------------
-
-/**
- * The main class to access X-Plane.
- *
- * The calls are synchronous and not thread-safe.
- */
-class XPlane
-{
-private:
-    /**
-     * The default TCP port.
-     */
-    static const unsigned short defaultTCPPort = 0x5852;
-
-    /**
-     * Type for the set of multi-dataref buffers.
-     */
-    typedef std::set<MultiBuffer*> multiBuffers_t;
-
-    /**
-     * The waiter to use.
-     */
-    scpl::io::Waiter waiter;
-
-    /**
-     * The client socket as a stream, over which we are communicating with X-Plane.
-     */
-    scpl::io::BufferedStream* socket;
-
-    /**
-     * The data stream to handle the data conversions.
-     */
-    scpl::io::DataStream* stream;
-
-    /**
-     * The buffers created by this object.
-     */
-    multiBuffers_t multiBuffers;
-
-public:
-    /**
-     * Construct the object. It will not be connected to the simulator
-     * yet.
-     */
-    XPlane() noexcept;
-
-    /**
-     * Destroy the object. If connected, the connection will be
-     * closed. It destroys all existing buffers, so their references
-     * become invalid.
-     */
-    ~XPlane() noexcept;
-
-    /**
-     * Connect to the simulator locally.
-     */
-    void connect();
-
-    /**
-     * Connect to the simulator on TCP to the given address.
-     */
-    void connectTCP(const std::string& address,
-                    unsigned short port = defaultTCPPort);
-
-    /**
-     * Check if we are connected to the simulator.
-     */
-    bool isConnected() const noexcept;
-
-    /**
-     * Disconnect from the simulator.
-     */
-    void disconnect() noexcept;
-
-    /**
-     * Create a new getter of multiple datarefs and return a reference
-     * to it.
-     */
-    MultiGetter& createMultiGetter() noexcept;
-
-    /**
-     * Create a new setter of multiple datarefs and return a reference
-     * to it.
-     */
-    MultiSetter& createMultiSetter() noexcept;
-
-    /**
-     * Destroy the given getter or setter of multiple datarefs. As the
-     * buffer is unregistered, if it has been registered previously,
-     * and  unregistration may fail, this function might throw an
-     * exception.
-     *
-     * @return if the buffer was found and could be destroyed
-     */
-    bool destroyMultiBuffer(MultiBuffer& buffer);
-
-    /**
-     * Get the versions of X-Plane, XPLM and the XPLRA plugin.
-     */
-    void getVersions(int& xplaneVersion, int& xplmVersion, int& xplraVersion);
-
-    /**
-     * Reload the plugins loaded in X-Plane. After this the connection
-     * fails.
-     */
-    void reloadPlugins();
-
-    /**
-     * Save the current situation into the file with the given path,
-     * which is relative to the directory of X-Plane.
-     */
-    void saveSituation(const char* path);
-
-    /**
-     * Get the integer value of the dataref with the given name.
-     */
-    int getInt(const char* name);
-
-    /**
-     * Get a float value.
-     */
-    float getFloat(const char* name);
-
-    /**
-     * Get a double value.
-     */
-    double getDouble(const char* name);
-
-    /**
-     * Get a possibly partial array of floats.
-     *
-     * @param name the name of the dataref
-     * @param dest the destination buffer
-     * @param length the length of the destination buffer
-     * @param offset the offset from which to get the array
-     *
-     * @return the number of values acquired actually
-     */
-    size_t getFloatArray(const char* name, float* dest,
-                         size_t length, size_t offset = 0);
-
-    /**
-     * Get a possibly partial array of floats. The result array will
-     * be created with a length needed to hold the returned value.
-     *
-     * @param name the name of the dataref
-     * @param length will contain the number of floats read
-     * @param offset the offset from which to get the array
-     */
-    float* getFloatArray(const char* name, size_t& length,
-                         size_t offset = 0);
-
-    /**
-     * Get a possibly partial array of integers.
-     *
-     * @param name the name of the dataref
-     * @param dest the destination buffer
-     * @param length the length of the destination buffer
-     * @param offset the offset from which to get the array
-     *
-     * @return the number of values acquired actually
-     */
-    size_t getIntArray(const char* name, int32_t* dest,
-                       size_t length, size_t offset = 0);
-
-    /**
-     * Get a possibly partial array of integers. The result array will
-     * be created with a length needed to hold the returned value.
-     *
-     * @param name the name of the dataref
-     * @param length will contain the number of integers read
-     * @param offset the offset from which to get the array
-     */
-    int32_t* getIntArray(const char* name, size_t& length,
-                         size_t offset = 0);
-
-    /**
-     * Get a possibly partial array of bytes.
-     *
-     * @param name the name of the dataref
-     * @param dest the destination buffer
-     * @param length the length of the destination buffer
-     * @param offset the offset from which to get the array
-     *
-     * @return the number of values acquired actually
-     */
-    size_t getByteArray(const char* name, uint8_t* dest,
-                        size_t length, size_t offset = 0);
-
-    /**
-     * Get a possibly partial array of bytes. The result array will
-     * be created with a length needed to hold the returned value.
-     *
-     * @param name the name of the dataref
-     * @param length will contain the number of bytes read on return
-     * @param offset the offset from which to get the array
-     */
-    uint8_t* getByteArray(const char* name, size_t& length,
-                          size_t offset = 0);
-
-    /**
-     * Get a string. A string is a byte array.
-     */
-    std::string getString(const char* name, size_t offset = 0);
-
-    /**
-     * Set the given dataref to the given integer value.
-     */
-    void setInt(const char* name, int value);
-
-    /**
-     * Set the given dataref to the given float value.
-     */
-    void setFloat(const char* name, float value);
-
-    /**
-     * Set the given dataref to the given double value.
-     */
-    void setDouble(const char* name, double value);
-
-    /**
-     * Set the given float array to values in the given buffer.
-     */
-    void setFloatArray(const char* name, const float* values, size_t length,
-                       size_t offset = 0);
-
-    /**
-     * Set the given integer array to values in the given buffer.
-     */
-    void setIntArray(const char* name, const int32_t* values, size_t length,
-                     size_t offset = 0);
-
-    /**
-     * Set the given byte array to values in the given buffer.
-     */
-    void setByteArray(const char* name, const uint8_t* values, size_t length,
-                      size_t offset = 0);
-
-    /**
-     * Set the given string to the given value. Since strings are byte
-     * arrays, and the bytes after the string should be zeroed, the
-     * length must be given. The string will be converted to a byte
-     * array of the given length, padded with 0s.
-     */
-    void setString(const char* name, const char* value, size_t length,
-                   size_t offset = 0);
-
-    /**
-     * Show a textual message for a certain duration.
-     */
-    void showMessage(const char* message, float duration);
-
-    /**
-     * Register the given hotkey codes for listening. If there is an
-     * existing set of hotkeys registered, those will be overwritten.
-     */
-    void registerHotkeys(const uint16_t* codes, size_t length);
-
-    /**
-     * Query the registered hotkeys whether they were pressed.
-     */
-    void queryHotkeys(uint8_t* states, size_t length);
-
-    /**
-     * Unregister the hotkeys.
-     */
-    void unregisterHotkeys();
-
-private:
-    /**
-     * Check if we have a stream and if it has not failed.
-     */
-    void checkStream();
-
-    /**
-     * Check the given protocol result. If it signifies an error,
-     * throw a ProtocolException with the correct error code.
-     */
-    void checkResult(uint8_t result, bool hasParameter = false,
-                     long parameter = 0);
-
-    /**
-     * Read and check the result.  If it signifies an error,
-     * throw a ProtocolException with the correct error code. If there
-     * is some problem with the stream, an IOException is thrown.
-     */
-    void checkResult(bool multi = false);
-
-    /**
-     * Issue the command to get a single, scalar value. The result is
-     * also checked, but the value should be read by the caller.
-     */
-    void getScalar(const char* name, uint8_t type);
-
-    /**
-     * Issue the command to get an array of values of the given
-     * type. It checks the result and retrieves the number of value
-     * items available.
-     *
-     * @return the number of value items available
-     */
-    size_t getArray(const char* name, uint8_t type,
-                    ssize_t length, size_t offset);
-
-
-    /**
-     * Issue the command to set a scalar value of the given type.
-     */
-    void setScalar(const char* name, uint8_t type);
-
-    /**
-     * Issue the command to set an array value of the given type.
-     */
-    void setArray(const char* name, uint8_t type, size_t length,
-                  size_t offset);
-
-    /**
-     * Connect with the given socket.
-     */
-    template <class ClientSocket>
-    void connect(std::unique_ptr<ClientSocket> clientSocket);
-
-    friend class MultiBuffer;
-    friend class MultiGetter;
-    friend class MultiSetter;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline XPlane::XPlane() noexcept :
-    socket(0),
-    stream(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline bool XPlane::isConnected() const noexcept
-{
-    return socket!=0;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace hu::varadiistvan::xplra */ } /* namespace hu::varadiistvan */ } /* namespace hu */
-
-//------------------------------------------------------------------------------
-#endif // HU_VARADIISTVAN_XPLRA_XPLANE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/xplra.cc
===================================================================
--- src/client/c/hu/varadiistvan/xplra/xplra.cc	(revision 111)
+++ 	(revision )
@@ -1,1458 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "xplra.h"
-
-#include "XPlane.h"
-#include "MultiGetter.h"
-#include "MultiSetter.h"
-#include "Exception.h"
-
-#include <vector>
-#include <memory>
-
-#include <cstdio>
-#include <cassert>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::MultiBuffer;
-using hu::varadiistvan::xplra::MultiGetter;
-using hu::varadiistvan::xplra::MultiSetter;
-using hu::varadiistvan::xplra::Exception;
-using hu::varadiistvan::xplra::IOException;
-using hu::varadiistvan::xplra::ProtocolException;
-using hu::varadiistvan::xplra::NotConnectedException;
-using hu::varadiistvan::xplra::TypeMismatchException;
-using hu::varadiistvan::xplra::InvalidIDException;
-
-using std::exception;
-using std::string;
-using std::vector;
-using std::set;
-using std::unique_ptr;
-
-//------------------------------------------------------------------------------
-
-namespace {
-
-//------------------------------------------------------------------------------
-
-/**
- * Template for handling slots.
- */
-template <class Value>
-struct Slot
-{
-private:
-    /**
-     * The slots.
-     */
-    static std::vector< Slot<Value> > slots;
-
-    /**
-     * The index of the first free slot.
-     */
-    static int firstFree;
-
-public:
-    /**
-     * Add a new value.
-     *
-     * @return the ID of the new value
-     */
-    static int addValue(Value value) noexcept;
-
-    /**
-     * Get the value with the given ID.
-     */
-    static Value getValue(int valueID) noexcept;
-
-    /**
-     * Clear the value with the given ID.
-     */
-    static void clearValue(int valueID) noexcept;
-
-private:
-    /**
-     * Indicate if the slot contains a valid value or not.
-     */
-    bool valid;
-
-    union {
-        // The value, if the slot contains a value
-        Value value;
-
-        // The index of the next free slot
-        int nextFreeIndex;
-    };
-
-    /**
-     * Construct a slot with the given value
-     */
-    Slot(Value value) noexcept;
-
-    /**
-     * Set the value and return the former next free index. It
-     * should be called for a slot with no value.
-     */
-    int setValue(Value value) noexcept;
-
-    /**
-     * Get the value if this slot contains a value. Otherwise 0 is
-     * returned (converted to value).
-     */
-    Value getValue() const noexcept;
-
-    /**
-     * Clear the value and set the given next free index.
-     */
-    void clear(int nextFreeIndex) noexcept;
-};
-
-//------------------------------------------------------------------------------
-
-template <class Value> vector< Slot<Value> > Slot<Value>::slots;
-
-//------------------------------------------------------------------------------
-
-template <class Value> int Slot<Value>::firstFree = -1;
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-inline Slot<Value>::Slot(Value value) noexcept :
-    valid(true)
-{
-    this->value = value;
-}
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-inline int Slot<Value>::setValue(Value value) noexcept
-{
-    assert(!valid);
-    int nextFreeIndex = this->nextFreeIndex;
-    this->value = value;
-    valid = true;
-    return nextFreeIndex;
-}
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-inline Value Slot<Value>::getValue() const noexcept
-{
-    return valid ? value : static_cast<Value>(0);
-}
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-inline void Slot<Value>::clear(int nextFreeIndex) noexcept
-{
-    assert(valid);
-    valid = false;
-    this->nextFreeIndex = nextFreeIndex;
-}
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-int Slot<Value>::addValue(Value value) noexcept
-{
-    int id = firstFree;
-    if (id<0) {
-        id = slots.size();
-        slots.push_back(Slot<Value>(value));
-    } else {
-        Slot& slot = slots[id];
-        firstFree = slot.setValue(value);
-    }
-
-    return id;
-}
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-Value Slot<Value>::getValue(int valueID) noexcept
-{
-    size_t index = static_cast<size_t>(valueID);
-    return (index<slots.size()) ?
-        slots[index].getValue() : static_cast<Value>(0);
-}
-
-//------------------------------------------------------------------------------
-
-template <class Value>
-void Slot<Value>::clearValue(int valueID) noexcept
-{
-    size_t index = static_cast<size_t>(valueID);
-    if (index<slots.size()) {
-        slots[index].clear(firstFree);
-        firstFree = index;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-typedef Slot<MultiBuffer*> MultiBufferSlot;
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Information about a connection.
- */
-class Connection : public XPlane
-{
-private:
-    /**
-     * Type for the set of multi-dataref buffers belonging to this connection.
-     */
-    typedef std::set<int> multiBufferIDs_t;
-
-public:
-    /**
-     * Get the connection for the given multi-dataref buffer.
-     */
-    static Connection& get(const MultiBuffer& buffer) noexcept;
-
-private:
-    /**
-     * The last error code.
-     */
-    int lastErrorCode;
-
-    /**
-     * The last error subcode.
-     */
-    unsigned long lastErrorSubCode;
-
-    /**
-     * The string of the last error
-     */
-    std::string lastErrorString;
-
-    /**
-     * The set of multi-dataref buffers belonging to this connection.
-     */
-    multiBufferIDs_t multiBufferIDs;
-
-public:
-    /**
-     * Construct the connection
-     */
-    Connection() noexcept;
-
-    /**
-     * Destroy the connection.
-     */
-    ~Connection() noexcept;
-
-    /**
-     * Handle the currently pending exception.
-     */
-    void handleException() noexcept;
-
-    /**
-     * Get the last error code.
-     */
-    int getLastError(unsigned long* lastErrorSubCode) const noexcept;
-
-    /**
-     * Get the string representation of the last error code.
-     */
-    const char* getLastErrorString() const noexcept;
-
-    /**
-     * Clear the last error code.
-     */
-    void clearLastError() noexcept;
-
-    /**
-     * Create a multi-dataref getter object and register it in a slot.
-     *
-     * @return the ID of the new getter.
-     */
-    int createMultiGetter() noexcept;
-
-    /**
-     * Create a multi-dataref setter object and register it in a slot.
-     *
-     * @return the ID of the new setter.
-     */
-    int createMultiSetter() noexcept;
-
-    /**
-     * Destroy the multi-dataref buffer with the given ID.
-     *
-     * @param bufferID the ID of the buffer. It should be a valid ID,
-     * that belongs to this connection.
-     *
-     * @return whether the buffer was found and could be destroyed.
-     */
-    bool destroyMultiBuffer(int bufferID);
-};
-
-//------------------------------------------------------------------------------
-
-inline Connection& Connection::get(const MultiBuffer& buffer) noexcept
-{
-    return static_cast<Connection&>(buffer.getXPlane());
-}
-
-//------------------------------------------------------------------------------
-
-inline Connection::Connection() noexcept :
-    lastErrorCode(0),
-    lastErrorSubCode(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-Connection::~Connection() noexcept
-{
-    for(multiBufferIDs_t::iterator i = multiBufferIDs.begin();
-        i!=multiBufferIDs.end(); ++i)
-    {
-        MultiBufferSlot::clearValue(*i);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void Connection::handleException() noexcept
-{
-    try {
-        throw;
-    } catch(const IOException& e) {
-        lastErrorCode = ERROR_IO;
-        lastErrorSubCode = e.getErrorCode();
-        lastErrorString = e.what();
-    } catch(const ProtocolException& e) {
-        lastErrorCode = ERROR_PROTOCOL;
-        lastErrorSubCode = static_cast<unsigned long>(e.getErrorCode());
-        lastErrorString = e.what();
-    } catch(const NotConnectedException& e) {
-        lastErrorCode = ERROR_NOT_CONNECTED;
-        lastErrorSubCode = 0;
-        lastErrorString = e.what();
-    } catch(const TypeMismatchException& e) {
-        lastErrorCode = ERROR_TYPE_MISMATCH;
-        lastErrorSubCode = 0;
-        lastErrorString = e.what();
-    } catch(const InvalidIDException& e) {
-        lastErrorCode = ERROR_INVALID_ID;
-        lastErrorSubCode = 0;
-        lastErrorString = e.what();
-    } catch(const exception& e) {
-        lastErrorCode = ERROR_OTHER;
-        lastErrorSubCode = 0;
-        lastErrorString = e.what();
-    } catch(...) {
-        lastErrorCode = ERROR_OTHER;
-        lastErrorSubCode = 0;
-        lastErrorString = "<Exception of an unknown type>";
-    }
-}
-
-//------------------------------------------------------------------------------
-
-inline int Connection::getLastError(unsigned long* lastErrorSubCode)
-    const noexcept
-{
-    if (lastErrorSubCode!=0) *lastErrorSubCode = this->lastErrorSubCode;
-    return lastErrorCode;
-}
-
-//------------------------------------------------------------------------------
-
-inline const char* Connection::getLastErrorString() const noexcept
-{
-    return (lastErrorCode==ERROR_NONE) ? 0 : lastErrorString.c_str();
-}
-
-//------------------------------------------------------------------------------
-
-inline void Connection::clearLastError() noexcept
-{
-    lastErrorCode = ERROR_NONE;
-    lastErrorSubCode = 0;
-    lastErrorString.clear();
-}
-
-//------------------------------------------------------------------------------
-
-inline int Connection::createMultiGetter() noexcept
-{
-    MultiGetter& getter = XPlane::createMultiGetter();
-    return MultiBufferSlot::addValue(&getter);
-}
-
-//------------------------------------------------------------------------------
-
-inline int Connection::createMultiSetter() noexcept
-{
-    MultiSetter& setter = XPlane::createMultiSetter();
-    return MultiBufferSlot::addValue(&setter);
-}
-
-//------------------------------------------------------------------------------
-
-bool Connection::destroyMultiBuffer(int bufferID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return false;
-
-    if (XPlane::destroyMultiBuffer(*buffer)) {
-        multiBufferIDs.erase(bufferID);
-        MultiBufferSlot::clearValue(bufferID);
-        return true;
-    } else {
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Slot for connections.
- */
-typedef Slot<Connection*> ConnectionSlot;
-
-//------------------------------------------------------------------------------
-
-} /* anonymous namespace */
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_get_last_error(int connectionID, unsigned long* subCode)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    return (connection==0) ? -1 : connection->getLastError(subCode);
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" const char* xplra_get_last_error_string(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    return (connection==0) ? 0 : connection->getLastErrorString();
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" void xplra_clear_last_error(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection!=0) connection->clearLastError();
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_connect()
-{
-    try {
-        unique_ptr<Connection> connection(new Connection());
-        connection->connect();
-        return ConnectionSlot::addValue(connection.release());
-    } catch(...) {
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_connect_tcp(const char* address)
-{
-    try {
-        unique_ptr<Connection> connection(new Connection());
-        connection->connectTCP(address);
-        return ConnectionSlot::addValue(connection.release());
-    } catch(...) {
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_connect_tcp_port(const char* address, unsigned short port)
-{
-    try {
-        unique_ptr<Connection> connection(new Connection());
-        connection->connectTCP(address, port);
-        return ConnectionSlot::addValue(connection.release());
-    } catch(...) {
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_get_versions(int connectionID,
-                                  int* xplaneVersion, int* xplmVersion,
-                                  int* xplraVersion)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        connection->getVersions(*xplaneVersion, *xplmVersion, *xplraVersion);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_reload_plugins(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        connection->reloadPlugins();
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_save_situation(int connectionID, const char* path)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        connection->saveSituation(path);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_get_int(int* value, int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        *value = connection->getInt(name);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_get_float(float* value, int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        *value = connection->getFloat(name);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_get_double(double* value,
-                                int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        *value = connection->getDouble(name);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" ssize_t xplra_get_float_array(float* dest, size_t length, size_t offset,
-                                         int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        return connection->getFloatArray(name, dest, length, offset);
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" float* xplra_get_float_array_new(size_t* length, size_t offset,
-                                            int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        return connection->getFloatArray(name, *length, offset);
-    } catch (...) {
-        connection->handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" ssize_t xplra_get_int_array(int32_t* dest, size_t length, size_t offset,
-                                       int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        return connection->getIntArray(name, dest, length, offset);
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int32_t* xplra_get_int_array_new(size_t* length, size_t offset,
-                                            int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        return connection->getIntArray(name, *length, offset);
-    } catch (...) {
-        connection->handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" ssize_t xplra_get_byte_array(void* dest, size_t length, size_t offset,
-                                        int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-    try {
-        return connection->getByteArray(name, reinterpret_cast<uint8_t*>(dest),
-                                        length, offset);
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" uint8_t* xplra_get_byte_array_new(size_t* length, size_t offset,
-                                             int connectionID, const char* name)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        return connection->getByteArray(name, *length, offset);
-    } catch (...) {
-        connection->handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_set_int(int connectionID, const char* name, int value)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setInt(name, value);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_set_float(int connectionID, const char* name, float value)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setFloat(name, value);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_set_double(int connectionID, const char* name,
-                                double value)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setDouble(name, value);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_set_float_array(int connectionID, const char* name,
-                                     const float* values,
-                                     size_t length, size_t offset)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setFloatArray(name, values, length, offset);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_set_int_array(int connectionID, const char* name,
-                                   const int32_t* values,
-                                   size_t length, size_t offset)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setIntArray(name, values, length, offset);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_set_byte_array(int connectionID, const char* name,
-                                    const void* values,
-                                    size_t length, size_t offset)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setByteArray(name, reinterpret_cast<const uint8_t*>(values),
-                                 length, offset);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_set_string(int connectionID, const char* name,
-                                const char* value,
-                                size_t length, size_t offset)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return 0;
-    try {
-        connection->setString(name, value, length, offset);
-        return 0;
-    } catch (...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_multi_create_getter(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    return (connection==0) ? -1 : connection->createMultiGetter();
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_multi_create_setter(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    return (connection==0) ? -1 : connection->createMultiSetter();
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" size_t xplra_multi_add_int(int bufferID, const char* name)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ? INVALID_DATAREF_ID : buffer->addInt(name);
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" size_t xplra_multi_add_float(int bufferID, const char* name)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ? INVALID_DATAREF_ID : buffer->addFloat(name);
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" size_t xplra_multi_add_double(int bufferID, const char* name)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ? INVALID_DATAREF_ID : buffer->addDouble(name);
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" size_t xplra_multi_add_float_array(int bufferID, const char* name,
-                                              size_t length, size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ?
-        INVALID_DATAREF_ID : buffer->addFloatArray(name, length, offset);
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" size_t xplra_multi_add_int_array(int bufferID, const char* name,
-                                            size_t length, size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ?
-        INVALID_DATAREF_ID : buffer->addIntArray(name, length, offset);
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" size_t xplra_multi_add_byte_array(int bufferID, const char* name,
-                                             size_t length, size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ?
-        INVALID_DATAREF_ID : buffer->addByteArray(name, length, offset);
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_multi_finalize(int bufferID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ? -1 : (buffer->finalize() ? 1 : 0);
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_multi_register(int bufferID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        buffer->registerInXPlane();
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_multi_unregister(int bufferID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        buffer->unregisterFromXPlane();
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_multi_unregister_safely(int bufferID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    return (buffer==0) ? -1 : (buffer->unregisterSafelyFromXPlane() ? 1 : 0);
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_multi_execute(int bufferID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        buffer->execute();
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_multi_set_int(int bufferID, size_t datarefID, int value)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        buffer->setInt(datarefID, value);
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_multi_get_int(int* dest, int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        *dest = buffer->getInt(datarefID);
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const int32_t* xplra_multi_get_int_const_ptr(int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return &(buffer->getIntRef(datarefID));
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-int32_t* xplra_multi_get_int_ptr(int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return &(buffer->getIntRef(datarefID));
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C"
-int xplra_multi_set_float(int bufferID, size_t datarefID, float value)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        buffer->setFloat(datarefID, value);
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-int xplra_multi_get_float(float* dest, int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        *dest = buffer->getFloat(datarefID);
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const float* xplra_multi_get_float_const_ptr(int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return &(buffer->getFloatRef(datarefID));
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-float* xplra_multi_get_float_ptr(int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return &(buffer->getFloatRef(datarefID));
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C"
-int xplra_multi_set_double(int bufferID, size_t datarefID, double value)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        buffer->setDouble(datarefID, value);
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-int xplra_multi_get_double(double* dest, int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        *dest = buffer->getDouble(datarefID);
-        return 0;
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const double* xplra_multi_get_double_const_ptr(int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return &(buffer->getDoubleRef(datarefID));
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-double* xplra_multi_get_double_ptr(int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return &(buffer->getDoubleRef(datarefID));
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C"
-ssize_t xplra_multi_set_float_array(int bufferID, size_t datarefID,
-                                    const float* value, size_t length,
-                                    size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->setFloatArray(datarefID, value, length, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-ssize_t xplra_multi_get_float_array(float* value,
-                                    size_t length, size_t offset,
-                                    int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->getFloatArray(datarefID, value, length, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const float* xplra_multi_get_float_array_ptr(int bufferID, size_t datarefID,
-                                             size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return buffer->getFloatArray(datarefID, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C"
-ssize_t xplra_multi_set_int_array(int bufferID, size_t datarefID,
-                                  const int32_t* value, size_t length,
-                                  size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->setIntArray(datarefID, value, length, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-ssize_t xplra_multi_get_int_array(int32_t* value,
-                                  size_t length, size_t offset,
-                                  int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->getIntArray(datarefID, value, length, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const int32_t* xplra_multi_get_int_array_ptr(int bufferID, size_t datarefID,
-                                             size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return buffer->getIntArray(datarefID, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C"
-ssize_t xplra_multi_set_byte_array(int bufferID, size_t datarefID,
-                                   const void* value, size_t length,
-                                   size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->setByteArray(datarefID,
-                                    reinterpret_cast<const uint8_t*>(value),
-                                    length, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-ssize_t xplra_multi_get_byte_array(void* value,
-                                   size_t length, size_t offset,
-                                   int bufferID, size_t datarefID)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->getByteArray(datarefID,
-                                    reinterpret_cast<uint8_t*>(value),
-                                    length, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const uint8_t* xplra_multi_get_byte_array_ptr(int bufferID, size_t datarefID,
-                                              size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return buffer->getByteArray(datarefID, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" ssize_t xplra_multi_set_string(int bufferID, size_t datarefID,
-                                          const char* value, size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return -1;
-    try {
-        return buffer->setString(datarefID, value, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C"
-const char* xplra_multi_get_string_ptr(int bufferID, size_t datarefID,
-                                       size_t offset)
-{
-    MultiBuffer* buffer = MultiBufferSlot::getValue(bufferID);
-    if (buffer==0) return 0;
-    try {
-        return buffer->getStringPtr(datarefID, offset);
-    } catch (...) {
-        Connection::get(*buffer).handleException();
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_multi_destroy_buffer(int connectionID, int bufferID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    try {
-        return connection->destroyMultiBuffer(bufferID) ? 0 : -1;
-    } catch(...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_show_message(int connectionID,
-                                  const char* message, float duration)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    try {
-        connection->showMessage(message, duration);
-        return 0;
-    } catch(...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_register_hotkeys(int connectionID,
-                                      const uint16_t* codes, size_t length)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    try {
-        connection->registerHotkeys(codes, length);
-        return 0;
-    } catch(...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_query_hotkeys(int connectionID,
-                                   uint8_t* states, size_t length)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    try {
-        connection->queryHotkeys(states, length);
-        return 0;
-    } catch(...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-/*----------------------------------------------------------------------------*/
-
-extern "C" int xplra_unregister_hotkeys(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    try {
-        connection->unregisterHotkeys();
-        return 0;
-    } catch(...) {
-        connection->handleException();
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_disconnect(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    connection->disconnect();
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_reconnect(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    try {
-        connection->connect();
-        return 0;
-    } catch(...) {
-        return -1;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-extern "C" int xplra_destroy(int connectionID)
-{
-    Connection* connection = ConnectionSlot::getValue(connectionID);
-    if (connection==0) return -1;
-
-    ConnectionSlot::clearValue(connectionID);
-    delete connection;
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/client/c/hu/varadiistvan/xplra/xplra.h
===================================================================
--- src/client/c/hu/varadiistvan/xplra/xplra.h	(revision 111)
+++ 	(revision )
@@ -1,904 +1,0 @@
-/* Copyright (c) 2013 by István Váradi
- *
- * This file is part of XPLRA, a remote-access plugin for X-Plane
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those
- * of the authors and should not be interpreted as representing official policies,
- * either expressed or implied, of the FreeBSD Project.
- */
-
-#ifndef HU_VARADIISTVAN_XPLRA_XPLRA_H
-#define HU_VARADIISTVAN_XPLRA_XPLRA_H
-/*----------------------------------------------------------------------------*/
-
-/** @file */
-
-/*----------------------------------------------------------------------------*/
-
-#include <stdlib.h>
-#include <inttypes.h>
-
-/*----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*----------------------------------------------------------------------------*/
-
-/** No error occured */
-#define ERROR_NONE 0
-
-/**
- * An I/O error has occured. The subcode is the errno value on Linux, or the
- * Windows error code.
- */
-#define ERROR_IO 1
-
-/**
- * A protocol error has occured. The subcode is one of the
- * ERROR_PROTOCOL_XXX values.
- */
-#define ERROR_PROTOCOL 2
-
-/** Invalid command was passed to the plugin */
-#define ERROR_PROTOCOL_INVALID_COMMAND = 1
-
-/** An unknown dataref was specified */
-#define ERROR_PROTOCOL_UNKNOWN_DATAREF = 2
-
-/** An invalid type was specified */
-#define ERROR_PROTOCOL_INVALID_TYPE = 3
-
-/** An invalid length was specified */
-#define ERROR_PROTOCOL_INVALID_LENGTH = 4
-
-/** An invalid offset was specified */
-#define ERROR_PROTOCOL_INVALID_OFFSET = 5
-
-/** An invalid count was specified */
-#define ERROR_PROTOCOL_INVALID_COUNT = 6
-
-/** An invalid ID was specified */
-#define ERROR_PROTOCOL_INVALID_ID = 7
-
-/** An invalid duration was specified */
-#define ERROR_PROTOCOL_INVALID_DURATION = 8
-
-/** Other protocol error  */
-#define ERROR_PROTOCOL_OTHER = 255
-
-/** A function requiring a connection is called without a connection */
-#define ERROR_NOT_CONNECTED 3
-
-/** A type-specific function was called for a dataref of a different type */
-#define ERROR_TYPE_MISMATCH 4
-
-/** An invalid ID was passed to a function */
-#define ERROR_INVALID_ID 5
-
-/** Some other error */
-#define ERROR_OTHER 255
-
-/*----------------------------------------------------------------------------*/
-
-/** Hotkey modifier: Shift */
-#define HOTKEY_MODIFIER_SHIFT 0x01
-
-/** Hotkey modifier: Control */
-#define HOTKEY_MODIFIER_CONTROL 0x02
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * This ID is returned by multi-dataref buffer functions when the
- * buffer is not found, this the dataref cannot be assigned an ID
- */
-#define INVALID_DATAREF_ID ((size_t)-1)
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the last error code with the subcode.
- *
- * @return the last error code, or -1 if the given connection ID is invalid.
- */
-int xplra_get_last_error(int connectionID, unsigned long* subCode);
-
-/**
- * Get a string representation of the last error.
- *
- * @return the string representation of the last error, or 0 if there
- * was no last error, or the connection ID is invalid.
- */
-const char* xplra_get_last_error_string(int connectionID);
-
-/**
- * Clear the last error.
- */
-void xplra_clear_last_error(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Connect to the simulator locally.
- *
- * @return an ID for the created connection, or -1 on error.
- */
-int xplra_connect();
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Connect to the simulator via TCP using the default port.
- *
- * @return an ID for the created connection, or -1 on error.
- */
-int xplra_connect_tcp(const char* address);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Connect to the simulator via TCP using the given port.
- *
- * @return an ID for the created connection, or -1 on error.
- */
-int xplra_connect_tcp_port(const char* address, unsigned short port);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the versions of X-Plane, the XPLM library and XPLRA
- */
-int xplra_get_versions(int connectionID,
-                       int* xplaneVersion, int* xplmVersion,
-                       int* xplraVersion);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Reload the plugins in X-Plane. After this the connection fails.
- */
-int xplra_reload_plugins(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Save the current situation into the file with the given path
- * relative to X-Plane's directory.
- */
-int xplra_save_situation(int connectionID, const char* path);
-
-/*----------------------------------------------------------------------------*/
-/* Single dataref support                                                     */
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an integer value from the simulator.
- *
- * @return 0 on success, -1 on error
- */
-int xplra_get_int(int* value, int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a float value from the simulator.
- *
- * @return 0 on success, -1 on error
- */
-int xplra_get_float(float* value, int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a double value from the simulator.
- *
- * @return 0 on success, -1 on error
- */
-int xplra_get_double(double* value, int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an array of floats into a buffer.
- *
- * @param dest the array into which to get the data
- * @param length the length of the destination buffer
- * @param offset the offset from which to query the array
- * @param connectionID the ID of the connection to use
- * @param name the name of the dataref
- *
- * @return the actual number of elements returned in case of success,
- * -1 on error
- */
-ssize_t xplra_get_float_array(float* dest, size_t length, size_t offset,
-                              int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an array of floats into a newly allocated buffer.
- *
- * @param length pointer to a variable containing the length to
- * query. On return it will be set to the actual length, which can be
- * less than or equal to the input value.
- * @param offset the offset from which to query the array
- * @param connectionID the ID of the connection to use
- * @param name the name of the dataref
- *
- * @return the new array on success, 0 on error
- */
-float* xplra_get_float_array_new(size_t* length, size_t offset,
-                                 int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an array of integers into a buffer.
- *
- * @param dest the array into which to get the data
- * @param length the length of the destination buffer
- * @param offset the offset from which to query the array
- * @param connectionID the ID of the connection to use
- * @param name the name of the dataref
- *
- * @return the actual number of elements returned in case of success,
- * -1 on error
- */
-ssize_t xplra_get_int_array(int32_t* dest, size_t length, size_t offset,
-                            int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an array of integers into a newly allocated buffer.
- *
- * @param length pointer to a variable containing the length to
- * query. On return it will be set to the actual length, which can be
- * less than or equal to the input value.
- * @param offset the offset from which to query the array
- * @param connectionID the ID of the connection to use
- * @param name the name of the dataref
- *
- * @return the new array on success, 0 on error
- */
-int32_t* xplra_get_int_array_new(size_t* length, size_t offset,
-                                 int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an array of bytes into a buffer.
- *
- * @param dest the array into which to get the data
- * @param length the length of the destination buffer
- * @param offset the offset from which to query the array
- * @param connectionID the ID of the connection to use
- * @param name the name of the dataref
- *
- * @return the actual number of elements returned in case of success,
- * -1 on error
- */
-ssize_t xplra_get_byte_array(void* dest, size_t length, size_t offset,
-                             int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get an array of bytes into a newly allocated buffer.
- *
- * @param length pointer to a variable containing the length to
- * query. On return it will be set to the actual length, which can be
- * less than or equal to the input value.
- * @param offset the offset from which to query the array
- * @param connectionID the ID of the connection to use
- * @param name the name of the dataref
- *
- * @return the new array on success, 0 on error
- */
-uint8_t* xplra_get_byte_array_new(size_t* length, size_t offset,
-                                  int connectionID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the integer dataref with the given name to the given value.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_int(int connectionID, const char* name, int value);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the float dataref with the given name to the given value.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_float(int connectionID, const char* name, float value);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the double dataref with the given name to the given value.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_double(int connectionID, const char* name, double value);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the array of float values with the given name from the given
- * buffer.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_float_array(int connectionID, const char* name,
-                          const float* values, size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the array of integer values with the given name from the given
- * buffer.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_int_array(int connectionID, const char* name,
-                        const int32_t* values, size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the array of byte values with the given name from the given
- * buffer.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_byte_array(int connectionID, const char* name,
-                         const void* values, size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the array of byte values with the given name from the given
- * string. The string will be padded with 0 if it has a length less
- * than the given length.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_set_string(int connectionID, const char* name,
-                     const char* value, size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-/* Multi-dataref support                                                      */
-/*----------------------------------------------------------------------------*/
-
-/**
- * Create a multi-dataref getter for the given connection.
- *
- * @return the ID of the new getter, or -1 on error
- */
-int xplra_multi_create_getter(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Create a multi-dataref setter for the given connection.
- *
- * @return the ID of the new setter, or -1 on error
- */
-int xplra_multi_create_setter(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Add an integer dataref to a multi-dataref buffer.
- *
- * @return the ID of the dataref that can be used later. If the buffer
- * ID is invalid, INVALID_DATAREF_ID is returned.
- */
-size_t xplra_multi_add_int(int bufferID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Add a float dataref to a multi-dataref buffer.
- *
- * @return the ID of the dataref that can be used later. If the buffer
- * ID is invalid, INVALID_DATAREF_ID is returned.
- */
-size_t xplra_multi_add_float(int bufferID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Add a double dataref to a multi-dataref buffer.
- *
- * @return the ID of the dataref that can be used later. If the buffer
- * ID is invalid, INVALID_DATAREF_ID is returned.
- */
-size_t xplra_multi_add_double(int bufferID, const char* name);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Add a float array dataref to a multi-dataref buffer.
- *
- * @return the ID of the dataref that can be used later. If the buffer
- * ID is invalid, INVALID_DATAREF_ID is returned.
- */
-size_t xplra_multi_add_float_array(int bufferID, const char* name,
-                                   size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Add an integer array dataref to a multi-dataref buffer.
- *
- * @return the ID of the dataref that can be used later. If the buffer
- * ID is invalid, INVALID_DATAREF_ID is returned.
- */
-size_t xplra_multi_add_int_array(int bufferID, const char* name,
-                                 size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Add a byte array dataref to a multi-dataref buffer.
- *
- * @return the ID of the dataref that can be used later. If the buffer
- * ID is invalid, INVALID_DATAREF_ID is returned.
- */
-size_t xplra_multi_add_byte_array(int bufferID, const char* name,
-                                  size_t length, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Finalize the given buffer, if not finalized yet.
- *
- * @return -1 on error (if the buffer ID is invalid), 0 if there is no
- * data in the buffer, 1 if there is data in it.
- */
-int xplra_multi_finalize(int bufferID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Register the buffer with the given ID in X-Plane. If needed, it
- * will be finalized too.
- *
- * @return 0 on success, -1 on error
- */
-int xplra_multi_register(int bufferID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Unregister the buffer with the given ID from X-Plane.
- *
- * @return 0 on success, -1 on error
- */
-int xplra_multi_unregister(int bufferID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Unregister the buffer with the given ID from X-Plane safely,
- * i.e. the registration ID will be cleared anyway to support re-registration.
- *
- * @return -1 if the buffer ID is invalid, 0 if the unregistration
- * call failed, 1 if it was successful.
- */
-int xplra_multi_unregister_safely(int bufferID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Execute the buffer with the given ID. If the buffer is not
- * finalized, it will be finalized. If it is not finalized, but
- * registered, the registration will be cleared, and it will be
- * re-registered after finalizing.
- *
- * @return 0 on success, -1 on error
- */
-int xplra_multi_execute(int bufferID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the value of an integer dataref with the given ID.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_set_int(int bufferID, size_t datarefID, int value);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the value of an integer dataref with the given ID.
- *
- * @param dest pointer to the variable that will receive the value
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_get_int(int* dest, int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a const pointer to the integer dataref with the given ID
- *
- * @return the pointer or success, 0 on error.
- */
-const int32_t* xplra_multi_get_int_const_ptr(int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer to the integer dataref with the given ID
- *
- * @return the pointer or success, 0 on error.
- */
-int32_t* xplra_multi_get_int_ptr(int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the value of a float dataref with the given ID.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_set_float(int bufferID, size_t datarefID, float value);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the value of a float dataref with the given ID.
- *
- * @param dest pointer to the variable that will receive the value
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_get_float(float* dest, int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a const pointer to the float dataref with the given ID
- *
- * @return the pointer or success, 0 on error.
- */
-const float* xplra_multi_get_float_const_ptr(int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer to the float dataref with the given ID
- *
- * @return the pointer or success, 0 on error.
- */
-float* xplra_multi_get_float_ptr(int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the value of a double dataref with the given ID.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_set_double(int bufferID, size_t datarefID, double value);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the value of a double dataref with the given ID.
- *
- * @param dest pointer to the variable that will receive the value
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_get_double(double* dest, int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a const pointer to the double dataref with the given ID
- *
- * @return the pointer or success, 0 on error.
- */
-const double* xplra_multi_get_double_const_ptr(int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer to the double dataref with the given ID
- *
- * @return the pointer or success, 0 on error.
- */
-double* xplra_multi_get_double_ptr(int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the contents of the float array dataref with the given ID.
- *
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be set
- * @param value the array to set
- * @param length the amount of data. If 0, it is assumed to be the
- * length of the data in the buffer minus the offset.
- * @param offset the offset within the buffer to set the data from
- *
- * @return the number of data items set, or -1 on error.
- */
-ssize_t xplra_multi_set_float_array(int bufferID, size_t datarefID,
-                                    const float* value, size_t length,
-                                    size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the contents of the float array with the given ID.
- *
- * @param value the destination buffer
- * @param length the amount of data. If 0, it is assumed to be the
- * length of the data in the buffer minus the offset.
- * @param offset the offset within the buffer to get the data from
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- *
- * @return the number of data items retrieved, or -1 on error.
- */
-ssize_t xplra_multi_get_float_array(float* value,
-                                    size_t length, size_t offset,
-                                    int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer to the float array with the given ID.
- *
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- * @param offset the offset within the buffer.
- *
- * @return the pointer on success, 0 on error.
- */
-const float* xplra_multi_get_float_array_ptr(int bufferID, size_t datarefID,
-                                             size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the contents of the integer array dataref with the given ID.
- *
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be set
- * @param value the array to set
- * @param length the amount of data. If 0, it is assumed to be the
- * length of the data in the buffer minus the offset.
- * @param offset the offset within the buffer to set the data from
- *
- * @return the number of data items set, or -1 on error.
- */
-ssize_t xplra_multi_set_int_array(int bufferID, size_t datarefID,
-                                  const int32_t* value, size_t length,
-                                  size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the contents of the integer array with the given ID.
- *
- * @param value the destination buffer
- * @param length the amount of data. If 0, it is assumed to be the
- * length of the data in the buffer minus the offset.
- * @param offset the offset within the buffer to get the data from
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- *
- * @return the number of data items retrieved, or -1 on error.
- */
-ssize_t xplra_multi_get_int_array(int32_t* value,
-                                  size_t length, size_t offset,
-                                  int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer to the integer array with the given ID.
- *
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- * @param offset the offset within the buffer.
- *
- * @return the pointer on success, 0 on error.
- */
-const int32_t* xplra_multi_get_int_array_ptr(int bufferID, size_t datarefID,
-                                             size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the contents of the byte array dataref with the given ID.
- *
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be set
- * @param value the array to set
- * @param length the amount of data. If 0, it is assumed to be the
- * length of the data in the buffer minus the offset.
- * @param offset the offset within the buffer to set the data from
- *
- * @return the number of data items set, or -1 on error.
- */
-ssize_t xplra_multi_set_byte_array(int bufferID, size_t datarefID,
-                                   const void* value, size_t length,
-                                   size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get the contents of the byte array with the given ID.
- *
- * @param value the destination buffer
- * @param length the amount of data. If 0, it is assumed to be the
- * length of the data in the buffer minus the offset.
- * @param offset the offset within the buffer to get the data from
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- *
- * @return the number of data items retrieved, or -1 on error.
- */
-ssize_t xplra_multi_get_byte_array(void* value,
-                                   size_t length, size_t offset,
-                                   int bufferID, size_t datarefID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer to the byte array with the given ID.
- *
- * @param bufferID the ID of the buffer to use
- * @param datarefID the ID of the dataref whose value is to be retrieved
- * @param offset the offset within the buffer.
- *
- * @return the pointer on success, 0 on error.
- */
-const uint8_t* xplra_multi_get_byte_array_ptr(int bufferID, size_t datarefID,
-                                              size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Set the value of the byte array with the given ID from the given
- * string. If the string is shorter than the array, the rest will be
- * filled with 0s.
- *
- * @return the number of bytes set, or -1 on error
- */
-ssize_t xplra_multi_set_string(int bufferID, size_t datarefID,
-                               const char* value, size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Get a pointer as a string pointer to the byte array with the given
- * ID.
- *
- * @return the pointer on success, 0 on error.
- */
-const char* xplra_multi_get_string_ptr(int bufferID, size_t datarefID,
-                                       size_t offset);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Destroy a multi-dataref buffer for the given connection.
- *
- * @param connectionID the ID of the connection for which the buffer
- * has been created.
- * @param bufferID the ID of the buffer to destroy
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_multi_destroy_buffer(int connectionID, int bufferID);
-
-/*----------------------------------------------------------------------------*/
-/*----------------------------------------------------------------------------*/
-
-/**
- * Show a message in the simulator window for the given duration.
- */
-int xplra_show_message(int connectionID, const char* message, float duration);
-
-/*----------------------------------------------------------------------------*/
-/*----------------------------------------------------------------------------*/
-
-/**
- * Register the given hotkey codes for listening. If there is an
- * existing set of hotkeys registered, those will be overwritten.
- */
-int xplra_register_hotkeys(int connectionID,
-                           const uint16_t* codes, size_t length);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Query the registered hotkeys whether they were pressed.
- */
-int xplra_query_hotkeys(int connectionID, uint8_t* states, size_t length);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Unregister the hotkeys.
- */
-int xplra_unregister_hotkeys(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-/*----------------------------------------------------------------------------*/
-
-/**
- * Disconnect the connection with the given ID.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_disconnect(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Reconnect the connection with the given ID. If it is already
- * connected, nothing happens.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_reconnect(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-/**
- * Destroy the connection with the given ID.
- *
- * @return 0 on success, -1 on error.
- */
-int xplra_destroy(int connectionID);
-
-/*----------------------------------------------------------------------------*/
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-/*----------------------------------------------------------------------------*/
-#endif // HU_VARADIISTVAN_XPLRA_XPLRA_H
Index: c/client/python/xplra.py
===================================================================
--- src/client/python/xplra.py	(revision 108)
+++ 	(revision )
@@ -1,994 +1,0 @@
-# X-Plane Remote Access client module
-#-------------------------------------------------------------------------------
-
-import os
-import struct
-import array
-import sys
-
-isPy3 = sys.version_info[0] >= 3
-
-#-------------------------------------------------------------------------------
-
-## @package xplra
-#
-# Python client module for the X-Plane Remote Access plugin
-
-#-------------------------------------------------------------------------------
-
-## Protocol command: query the value of a single dataref
-COMMAND_GET_SINGLE = 0x01
-
-## Protocol command: set the value of a single dataref
-COMMAND_SET_SINGLE = 0x02
-
-## Protocol command: query the value of several datarefs
-COMMAND_GET_MULTI = 0x03
-
-## Protocol command: set the value of several datarefs
-COMMAND_SET_MULTI = 0x04
-
-## Protocol command: register a multi-dataref getter
-COMMAND_REGISTER_GET_MULTI = 0x11
-
-## Protocol command: unregister a multi-dataref getter
-COMMAND_UNREGISTER_GET_MULTI = 0x12
-
-## Protocol command: execute a registered multi-dataref getter
-COMMAND_EXECUTE_GET_MULTI = 0x13
-
-## Protocol command: register a multi-dataref setter
-COMMAND_REGISTER_SET_MULTI = 0x21
-
-## Protocol command: unregister a multi-dataref setter
-COMMAND_UNREGISTER_SET_MULTI = 0x22
-
-## Protocol command: execute a registered multi-dataref setter
-COMMAND_EXECUTE_SET_MULTI = 0x23
-
-## Protocol command: get the versions of X-Plane, XPLM and XPLRA
-COMMAND_GET_VERSIONS = 0x31
-
-## Protocol command: reload all plugins
-COMMAND_RELOAD_PLUGINS = 0x32
-
-## Protocol command: save the current situation into a file
-COMMAND_SAVE_SITUATION = 0x33
-
-## Protocol command: show a message to the pilot
-COMMAND_SHOW_MESSAGE = 0x41
-
-## Protocol command: register hotkeys
-COMMAND_REGISTER_HOTKEYS = 0x51
-
-## Protocol command: query the status of registered hotkeys
-COMMAND_QUERY_HOTKEYS = 0x52
-
-## Protocol command: unregister hotkeys
-COMMAND_UNREGISTER_HOTKEYS = 0x53
-
-## Protocol type constant: integer
-TYPE_INT = 0x01
-
-## Protocol type constant: single-precision floating point
-TYPE_FLOAT = 0x02
-
-## Protocol type constant: double-precision floating point
-TYPE_DOUBLE = 0x03
-
-## Protocol type constant: array of single-precision floating point values
-TYPE_FLOAT_ARRAY = 0x11
-
-## Protocol type constant: array of integers
-TYPE_INT_ARRAY = 0x12
-
-## Protocol type constant: array of bytes
-TYPE_BYTE_ARRAY = 0x13
-
-## Protocol result: OK
-RESULT_OK = 0x00
-
-## Protocol result: an invalid command was sent
-RESULT_INVALID_COMMAND = 0x01
-
-## Protocol result: an unknown dataref was attempted to query or set
-RESULT_UNKNOWN_DATAREF = 0x02
-
-## Protocol result: invalid type
-RESULT_INVALID_TYPE = 0x03
-
-## Protocol result: invalid length
-RESULT_INVALID_LENGTH = 0x04
-
-## Protocol result: invalid offset
-RESULT_INVALID_OFFSET = 0x05
-
-## Protocol result: invalid count
-RESULT_INVALID_COUNT = 0x06
-
-## Protocol result: invalid ID
-RESULT_INVALID_ID = 0x07
-
-## Protocol result: invalid duration
-RESULT_INVALID_DURATION = 0x08
-
-## Protocol result: other error
-RESULT_OTHER_ERROR = 0xff
-
-## Hotkey modifier: Shift
-HOTKEY_MODIFIER_SHIFT = 0x0100
-
-## Hotkey modifier: Control
-HOTKEY_MODIFIER_CONTROL = 0x0200
-
-#-------------------------------------------------------------------------------
-
-## The default TCP port ("XR")
-DEFAULT_TCP_PORT = 0x5852;
-
-#-------------------------------------------------------------------------------
-
-class ProtocolException(Exception):
-    """Exception to signify protocol errors."""
-
-    ## mapping from result codes to their string representation
-    _message = { RESULT_INVALID_COMMAND : "invalid command",
-                 RESULT_UNKNOWN_DATAREF : "unknown dataref",
-                 RESULT_INVALID_TYPE : "invalid type",
-                 RESULT_INVALID_LENGTH : "invalid length",
-                 RESULT_INVALID_OFFSET : "invalid offset",
-                 RESULT_INVALID_COUNT : "invalid count",
-                 RESULT_INVALID_ID : "invalid ID",
-                 RESULT_INVALID_DURATION : "invalid duration",
-                 RESULT_OTHER_ERROR : "other error" }
-
-    ## @var resultCode
-    # the result code, one of the RESULT_XXX constants
-    ## @var parameter
-    # an optional parameter for the result
-
-    @staticmethod
-    def getMessage(resultCode):
-        """Get the message for the given result code."""
-        if resultCode in ProtocolException._message:
-            return ProtocolException._message[resultCode]
-        else:
-            return "unknown error code " + repr(resultCode)
-
-    def __init__(self, resultCode, parameter = None):
-        """Construct the exception."""
-        message = "xplra.ProtocolException: " + self.getMessage(resultCode)
-        if parameter is not None:
-            if resultCode==RESULT_UNKNOWN_DATAREF:
-                message += " (# %d)" % (parameter,)
-
-        super(ProtocolException, self).__init__(message)
-        self.resultCode = resultCode
-        self.parameter = parameter
-
-#-------------------------------------------------------------------------------
-
-if os.name=="nt":
-    import win32file
-    import io
-
-    class Win32NamedPipe(io.RawIOBase):
-        """A stream object to represent a Win32 named pipe."""
-        ## @var _handle
-        # the Windows file handle for the pipe
-
-        def __init__(self, name):
-            """Construct the pipe with the given name."""
-            self._handle = win32file.CreateFile(name,
-                                                win32file.GENERIC_READ |
-                                                win32file.GENERIC_WRITE,
-                                                0, None,
-                                                win32file.OPEN_EXISTING, 0, None)
-
-        def close(self):
-            """Close the pipe, if not closed already."""
-            if self._handle is not None:
-                win32file.CloseHandle(self._handle)
-                self._handle = None
-
-        @property
-        def closed(self):
-            """Determine if the pipe is closed or not."""
-            return self._handle is None
-
-        def fileno(self):
-            """Get the file number, which is impossible."""
-            raise IOError("Win32NamedPipe.fileno: not supported")
-
-        def flush(self):
-            """Flush the stream."""
-            pass
-
-        def isatty(self):
-            """Determine if the stream is a terminal, which it is not."""
-            return False
-
-        def read(self, n = -1):
-            """Read at most the given number of bytes from the stream."""
-            if n==-1:
-                return self.readall()
-            else:
-                (error, data) = win32file.ReadFile(self._handle, n)
-                return data
-
-        def readable(self):
-            """Determine if the stream is readable, which it is."""
-            return self._handle is not None
-
-        def readall(self):
-            """Read all bytes from the stream, which is not supported."""
-            raise IOError("Win32NamedPipe.readall: not supported")
-
-        def readinto(self, buffer):
-            """Read into the given buffer."""
-            (error, data) = win32file.ReadFile(self._handle, len(buffer))
-            length = len(data)
-            buffer[:length] = data
-            return length
-
-        def readline(self, limit = -1):
-            """Read a line, which is currently not supported."""
-            raise IOError("Win32NamedPipe.readline: not supported")
-
-        def readlines(self, hint = -1):
-            """Read lines, which is currently not supported."""
-            raise IOError("Win32NamedPipe.readlines: not supported")
-
-        def seek(self, offset, whence = io.SEEK_SET):
-            """Seek in the stream, which is not supported."""
-            raise IOError("Win32NamedPipe.seek: not supported")
-
-        def seekable(self):
-            """Determine if the stream is seekable, which it is not."""
-            return False
-
-        def tell(self):
-            """Get the current position, which is not supported."""
-            raise IOError("Win32NamedPipe.tell: not supported")
-
-        def truncate(self, size = None):
-            """Truncate the stream, which is not supported."""
-            raise IOError("Win32NamedPipe.truncate: not supported")
-
-        def writable(self):
-            """Determine if the stream is writable, which it is."""
-            return self._handle is not None
-
-        def write(self, buffer):
-            """Write the given buffer into the stream."""
-            (error, written) = win32file.WriteFile(self._handle, buffer.tobytes())
-            return written
-
-        def writelines(self, lines):
-            """Write the given lines, which is not supported."""
-            raise IOError("Win32NamedPipe.writelines: not supported")
-
-#-------------------------------------------------------------------------------
-
-class XPlane(object):
-    """The main class representing the connection to X-Plane."""
-
-    ## @var _stream
-    # the data stream used to communicate with the plugin
-    ## @var _multiBuffers
-    # the list of multi-dataref buffers belonging to this object
-
-    @staticmethod
-    def _packLength(x):
-        """Pack the given integer as a variable-length value."""
-        s = bytes() if isPy3 else ""
-        while True:
-            y = x&0x7f
-            x >>= 7
-            if x>0: y |= 0x80
-            s += struct.pack("B", y)
-            if x==0:
-                return s
-
-    @staticmethod
-    def _packString(s):
-        """Pack the given string."""
-        return XPlane._packLength(len(s)) + (bytes(s, "utf-8") if isPy3 else s)
-
-    def __init__(self):
-        """Construct the object."""
-        self._stream = None
-        self._multiBuffers = []
-
-    def connect(self, address = None):
-        """Try to connect to X-Plane."""
-        if self._stream is not None:
-            return
-
-        if address:
-            if address.startswith("tcp:"):
-                address = address[4:]
-                colonIndex = address.find(":")
-                if (colonIndex<=0):
-                    port = DEFAULT_TCP_PORT
-                else:
-                    port = int(address[colonIndex+1:])
-                    address = address[:colonIndex]
-
-                import socket
-                s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-                print("Connecting to TCP address '%s':%d" %
-                      (address, port))
-                s.connect((address, port))
-                self._stream = s.makefile("rwb")
-            elif address!="local":
-                raise ValueError("Invalid address: " + address)
-
-        if self._stream is None:
-            if os.name=="nt":
-                pipe = Win32NamedPipe(r'\\.\pipe\\xplra')
-                self._stream = io.BufferedRWPair(pipe, pipe)
-            else:
-                import socket
-                s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-                s.connect("/tmp/xplra-" + os.environ["LOGNAME"])
-                self._stream = s.makefile("rwb")
-
-        for multiBuffer in self._multiBuffers:
-            multiBuffer._reregister()
-
-    @property
-    def isConnected(self):
-        """Determine if we are connected to the simulator."""
-        return self._stream is not None
-
-    def createMultiGetter(self):
-        """Create a new multi-dataref getter for this X-Plane object."""
-        multiGetter = MultiGetter(self)
-        self._multiBuffers.append(multiGetter)
-        return multiGetter
-
-    def createMultiSetter(self):
-        """Create a new multi-dataref setter for this X-Plane object."""
-        multiSetter = MultiSetter(self)
-        self._multiBuffers.append(multiSetter)
-        return multiSetter
-
-    def destroyMultiBuffer(self, multiBuffer):
-        """Destroy the given multi-dataref buffer.
-
-        It actually removes it from the list of multiple buffers and
-        unregisters it safely.
-
-        Returns the result of the safe unregistration if the buffer was found,
-        None otherwise.
-        """
-        if multiBuffer in self._multiBuffers:
-            self._multiBuffers.remove(multiBuffer)
-            return multiBuffer.unregisterSafely()
-        else:
-            return None
-
-    def getVersions(self):
-        """Get the versions of X-Plane, XPLM and XPLRA as a tuple."""
-        self._writeU8(COMMAND_GET_VERSIONS)
-        self._flush()
-        self._checkResult()
-        return (self._readS32(), self._readS32(), self._readS32())
-
-    def reloadPlugins(self):
-        """Reload the plugins in X-Plane.
-
-        After this, this connection becomes invalid."""
-        self._writeU8(COMMAND_RELOAD_PLUGINS)
-        self._flush()
-        self._checkResult();
-
-    def saveSituation(self, path):
-        """Save the current situation into the given path."""
-        self._writeU8(COMMAND_SAVE_SITUATION)
-        self._writeString(path)
-        self._flush()
-        self._checkResult();
-
-    def getInt(self, name):
-        """Get the value of the integer dataref with the given name."""
-        return self._getSingle(name, TYPE_INT)
-
-    def getFloat(self, name):
-        """Get the value of the float dataref with the given name."""
-        return self._getSingle(name, TYPE_FLOAT)
-
-    def getDouble(self, name):
-        """Get the value of the double dataref with the given name."""
-        return self._getSingle(name, TYPE_DOUBLE)
-
-    def getFloatArray(self, name, length = -1, offset = 0):
-        """Get the value of the float array dataref with the given name."""
-        return self._getSingle(name, TYPE_FLOAT_ARRAY, length, offset)
-
-    def getIntArray(self, name, length = -1, offset = 0):
-        """Get the value of the integer array dataref with the given name."""
-        return self._getSingle(name, TYPE_INT_ARRAY, length, offset)
-
-    def getByteArray(self, name, length = -1, offset = 0):
-        """Get the value of the byte array dataref with the given name."""
-        return self._getSingle(name, TYPE_BYTE_ARRAY, length, offset)
-
-    def getString(self, name, offset = 0):
-        """Get the value of the byte array dataref with the given name as a
-        string."""
-        s = ""
-        for b in self.getByteArray(name, offset = offset):
-            if b==0: break
-            s += chr(b)
-        return s
-
-    def setInt(self, name, value):
-        """Set the value of the integer dataref with the given name."""
-        self._setSingle(name, TYPE_INT, value)
-
-    def setFloat(self, name, value):
-        """Set the value of the float dataref with the given name."""
-        self._setSingle(name, TYPE_FLOAT, value)
-
-    def setDouble(self, name, value):
-        """Set the value of the double dataref with the given name."""
-        self._setSingle(name, TYPE_DOUBLE, value)
-
-    def setFloatArray(self, name, value, offset = 0):
-        """Set the value of the float array dataref with the given name."""
-        self._setSingle(name, TYPE_FLOAT_ARRAY, value, offset = offset)
-
-    def setIntArray(self, name, value, offset = 0):
-        """Set the value of the integer array dataref with the given name."""
-        self._setSingle(name, TYPE_INT_ARRAY, value, offset = offset)
-
-    def setByteArray(self, name, value, offset = 0):
-        """Set the value of the byte array dataref with the given name."""
-        self._setSingle(name, TYPE_BYTE_ARRAY, value, offset = offset)
-
-    def setString(self, name, value, length, offset = 0):
-        """Set the value of the byte array dataref with the given name from a
-        string.
-
-        The string will be padded with 0's so that its length is the given
-        one."""
-        value = [ord(c) for c in value[:length]]
-        value += [0] * (length - len(value))
-        self.setByteArray(name, value, offset)
-
-    def showMessage(self, message, duration):
-        """Show a message in the simulator window for the given duration.
-
-        The duration is a floating-point number denoting seconds."""
-        self._writeU8(COMMAND_SHOW_MESSAGE)
-        self._writeString(message)
-        self._writeFloat(duration)
-        self._flush()
-        self._checkResult()
-
-    def registerHotkeys(self, hotkeyCodes):
-        """Register the given hotkey codes for watching."""
-        self._writeU8(COMMAND_REGISTER_HOTKEYS)
-        self._writeU32(len(hotkeyCodes))
-        for hotkeyCode in hotkeyCodes:
-            self._writeU16(hotkeyCode)
-        self._flush()
-        self._checkResult()
-
-    def queryHotkeys(self):
-        """Query the state of the hotkeys registered previously"""
-        self._writeU8(COMMAND_QUERY_HOTKEYS)
-        self._flush()
-        self._checkResult()
-
-        length = self._readU32()
-        states = []
-        for i in range(0, length):
-            states.append(self._readU8()!=0)
-
-        return states
-
-    def unregisterHotkeys(self):
-        """Unregister the previously registered hotkeys."""
-        self._writeU8(COMMAND_UNREGISTER_HOTKEYS)
-        self._flush()
-        self._checkResult()
-
-    def disconnect(self):
-        """Disconnect from X-Plane."""
-        if self._stream is not None:
-            try:
-                self._stream.close()
-            finally:
-                self._stream = None
-
-    def _checkResult(self, resultCode = None, parameter = None, multi = False):
-        """Check the given result code.
-
-        If it is None, it will be read first.
-
-        If it is not RESULT_OK, a ProtocolException is thrown."""
-
-        if resultCode is None:
-            resultCode = self._readU8()
-            if multi and resultCode==RESULT_UNKNOWN_DATAREF:
-                parameter = self._readU32()
-
-        if resultCode!=RESULT_OK:
-            raise ProtocolException(resultCode, parameter)
-
-    def _getSingle(self, name, type, length = None, offset = None):
-        """Get the single value of the given name and type."""
-        self._writeU8(COMMAND_GET_SINGLE)
-        self._writeString(name)
-        self._writeU8(type)
-        if length is not None and offset is not None:
-            self._writeS32(length)
-            self._writeS32(offset)
-
-        self._flush()
-        self._checkResult()
-        return self._readValue(type)
-
-    def _readValue(self, type):
-        """Read the value of the given type from the stream."""
-        if type==TYPE_INT:
-            return self._readS32()
-        elif type==TYPE_FLOAT:
-            return self._readFloat()
-        elif type==TYPE_DOUBLE:
-            return self._readDouble()
-        else:
-            length = self._readS32()
-            arr = None
-            elementSize = 4
-            if type==TYPE_FLOAT_ARRAY:
-                arr = array.array("f")
-            elif type==TYPE_INT_ARRAY:
-                arr = array.array("i")
-            elif type==TYPE_BYTE_ARRAY:
-                arr = array.array("B")
-                elementSize = 1
-            if arr is not None and length>0:
-                arr.frombytes(self._stream.read(length*elementSize))
-            return None if arr is None else arr.tolist()
-
-    def _setSingle(self, name, type, value, offset = None):
-        """Set the single value of the given name and type."""
-        self._writeU8(COMMAND_SET_SINGLE)
-        self._writeString(name)
-        self._writeU8(type)
-        if offset is not None:
-            self._writeS32(len(value))
-            self._writeS32(offset)
-
-        self._writeValue(type, value)
-        self._flush()
-        self._checkResult()
-
-    def _writeValue(self, type, value):
-        """Write a value of the given type."""
-        if type==TYPE_INT:
-            self._writeS32(int(value))
-        elif type==TYPE_FLOAT:
-            self._writeFloat(float(value))
-        elif type==TYPE_DOUBLE:
-            self._writeDouble(float(value))
-        else:
-            arr = None
-            if type==TYPE_FLOAT_ARRAY:
-                arr = array.array("f")
-            elif type==TYPE_INT_ARRAY:
-                arr = array.array("i")
-            elif type==TYPE_BYTE_ARRAY:
-                arr = array.array("B")
-            arr.fromlist(value)
-            self._stream.write(arr.tostring())
-
-    def _writeU8(self, x):
-        """Write the given value as an unsigned, 8-bit value."""
-        self._stream.write(struct.pack("B", x))
-
-    def _writeU16(self, x):
-        """Write the given value as an unsigned, 16-bit value."""
-        self._stream.write(struct.pack("H", x))
-
-    def _writeS32(self, x):
-        """Write the given value as a signed, 32-bit value."""
-        self._stream.write(struct.pack("i", x))
-
-    def _writeU32(self, x):
-        """Write the given value as an unsigned, 32-bit value."""
-        self._stream.write(struct.pack("I", x))
-
-    def _writeFloat(self, x):
-        """Write the given value as a single-precision floating point."""
-        self._stream.write(struct.pack("f", x))
-
-    def _writeDouble(self, x):
-        """Write the given value as a double-precision floating point."""
-        self._stream.write(struct.pack("d", x))
-
-    def _writeLength(self, length):
-        """Write the given value is a variable-length value into our stream."""
-        self._stream.write(self._packLength(length))
-
-    def _writeString(self, str):
-        """Write the given string into the stream."""
-        self._stream.write(self._packString(str))
-
-    def _flush(self):
-        """Flush our stream."""
-        self._stream.flush()
-
-    def _readU8(self):
-        """Read an unsigned, 8-bit value from the stream."""
-        (value,) = struct.unpack("B", self._stream.read(1))
-        return value
-
-    def _readS32(self):
-        """Read a signed, 32-bit value from the stream."""
-        (value,) = struct.unpack("i", self._stream.read(4))
-        return value
-
-    def _readU32(self):
-        """Read an unsigned, 32-bit value from the stream."""
-        (value,) = struct.unpack("I", self._stream.read(4))
-        return value
-
-    def _readFloat(self):
-        """Read a single-precision floating point value from the stream."""
-        (value,) = struct.unpack("f", self._stream.read(4))
-        return value
-
-    def _readDouble(self):
-        """Read a double-precision floating point value from the stream."""
-        (value,) = struct.unpack("d", self._stream.read(8))
-        return value
-
-    def _readLength(self):
-        """Read a variable-length value from our stream."""
-        length = 0
-        while True:
-            (x,) = struct.unpack("B", self._stream.read(1))
-            length <<= 7
-            length |= x&0x7f
-            if x&0x80==0:
-                return length
-
-    def _readString(self):
-        """Read a string from our stream."""
-        length = self._readLength()
-        return self._stream.read(length)
-
-#-------------------------------------------------------------------------------
-
-class MultiBuffer(object):
-    """Buffer for querying or setting multi-dataref values."""
-
-    ## @var _xplane
-    # the \ref XPlane object this buffer belongs to
-
-    ## @var _registerCommand
-    # the command used to perform the registration of this buffer
-    # (\ref COMMAND_REGISTER_GET_MULTI or \ref COMMAND_REGISTER_SET_MULTI)
-
-    ## @var _unregisterCommand
-    # the command used to perform the registration of this buffer
-    # (\ref COMMAND_UNREGISTER_GET_MULTI or \ref COMMAND_UNREGISTER_SET_MULTI)
-
-    ## @var _dataRefs
-    # the datarefs belonging to the buffer
-
-    ## @var _values
-    # the value of the datarefs before setting or after querying
-
-    ## @var _registeredID
-    # the ID with which the buffer is registered in X-Plane
-
-    @staticmethod
-    def _getDefault(type, length):
-        """Get the default value for the given type."""
-        if type==TYPE_INT:
-            return 0
-        elif type==TYPE_FLOAT:
-            return float(0.0)
-        elif type==TYPE_DOUBLE:
-            return 0.0
-        elif length<=0:
-            return []
-        elif type==TYPE_FLOAT_ARRAY:
-            return [float(0.0)] * length
-        elif type==TYPE_INT_ARRAY or type==TYPE_BYTE_ARRAY:
-            return [0] * length
-
-    def __init__(self, xplane, registerCommand, unregisterCommand):
-        """Construct the buffer for the given XPlane instance and with the
-        given register/unregister command values."""
-        self._xplane = xplane
-        self._registerCommand = registerCommand
-        self._unregisterCommand = unregisterCommand
-
-        self._dataRefs = []
-        self._values = None
-
-        self._registeredID = None
-
-    @property
-    def values(self):
-        """Query the values as a list."""
-        if self._values is None:
-            self.finalize()
-        return self._values
-
-    def addInt(self, name):
-        """Add an integer to the buffer with the given name
-
-        Returns an ID (or index) of the dataref."""
-        return self._add(name, TYPE_INT)
-
-    def addFloat(self, name):
-        """Add a float to the buffer with the given name
-
-        Returns an ID (or index) of the dataref."""
-        return self._add(name, TYPE_FLOAT)
-
-    def addDouble(self, name):
-        """Add a double to the buffer with the given name
-
-        Returns an ID (or index) of the dataref."""
-        return self._add(name, TYPE_DOUBLE)
-
-    def addFloatArray(self, name, length = -1, offset = 0):
-        """Add a floating point array to the buffer with the given name.
-
-        Returns an ID (or index) of the dataref."""
-        return self._add(name, TYPE_FLOAT_ARRAY, length, offset)
-
-    def addIntArray(self, name, length = -1, offset = 0):
-        """Add an integer array to the buffer with the given name.
-
-        Returns an ID (or index) of the dataref."""
-        return self._add(name, TYPE_INT_ARRAY, length, offset)
-
-    def addByteArray(self, name, length = -1, offset = 0):
-        """Add a byte array to the buffer with the given name.
-
-        Returns an ID (or index) of the dataref."""
-        return self._add(name, TYPE_BYTE_ARRAY, length, offset)
-
-    def finalize(self):
-        """Finalize the buffer, if not finalized yet.
-
-        It initializes the array of values with some defaults.
-
-        Returns whether there is any data in the buffer."""
-        if self._values is None:
-            self._values = [self._getDefault(type, length)
-                            for (_, type, length, _) in self._dataRefs]
-        return self._values!=[]
-
-    def register(self):
-        """Register the buffer in X-Plane."""
-        if self.finalize() and self._registeredID is None:
-            self._writeSpec(self._registerCommand)
-            self._registeredID = self._xplane._readU32()
-
-    def unregister(self):
-        """Unregister the buffer from X-Plane."""
-        if self._registeredID is not None:
-            self._xplane._writeU8(self._unregisterCommand)
-            self._xplane._writeU32(self._registeredID)
-            self._xplane._flush()
-            self._xplane._checkResult()
-            self._registeredID = None
-
-    def unregisterSafely(self):
-        """Unregister the buffer from X-Plane, ignoring exceptions.
-
-        Returns True if the unregistration succeeded, False otherwise.
-        """
-        try:
-            self.unregister()
-            return True
-        except:
-            return False
-        finally:
-            self._registeredID = None
-
-    def execute(self):
-        """Perform the querying or the setting of the values.
-
-        It first checks if the buffer is finalized. If not, it will be
-        finalized. However, if it is not finalized but also registered, it will
-        first be unregistered and the re-registered after finalizing."""
-        if self._values is None and self._registeredID is not None:
-            self.unregister()
-            self.register()
-        else:
-            self.finalize()
-
-        if self._registeredID is None:
-            self._executeUnregistered()
-        else:
-            self._executeRegistered()
-
-    def getString(self, id):
-        """Get the value of the dataref with the given ID as a string.
-
-        The dataref should be of type byte array."""
-        if self._dataRefs[id][1]!=TYPE_BYTE_ARRAY:
-            raise TypeError("xplra.MultiBuffer.getString: only byte arrays can be converted to strings")
-        if self._values is None:
-            self.finalize()
-        s = ""
-        for c in self._values[id]:
-            if c==0: break
-            s += chr(c)
-        return s
-
-    def _reregister(self):
-        """Re-register the buffer in X-Plane, if it has been registered earlier
-
-        If it has not been registered, nothing is done. Otherwise the buffer
-        gets registered, and the old ID is forgotten. This function is meant to
-        be used by the XPlane object when it creates a new connection. If the
-        registration fails, the original ID is restored, so the _reregister()
-        could be called again
-        """
-        if self._registeredID is not None:
-            origRegisteredID = self._registeredID
-            try:
-                self._registeredID = None
-                self.register()
-            except:
-                self._registeredID = origRegisteredID
-                raise
-
-    def _add(self, name, type, length = None, offset = None):
-        """Add a scalar to the buffer with the given name and type"""
-        index = len(self._dataRefs)
-        self._values = None
-        self._dataRefs.append( (name, type, length, offset) )
-        return index
-
-    def _writeSpec(self, command):
-        """Write the specification preceded by the given command and check for
-        the result.
-
-        The specification is basically the list of the datarefs."""
-        self._xplane._writeU8(command)
-        self._xplane._writeU32(len(self._dataRefs))
-
-        for (name, type, length, offset) in self._dataRefs:
-            self._xplane._writeString(name)
-            self._xplane._writeU8(type)
-            if length is not None and offset is not None:
-                self._xplane._writeS32(length)
-                self._xplane._writeS32(offset)
-
-        self._xplane._flush()
-        self._xplane._checkResult(multi = True)
-
-    def __len__(self):
-        """Get the number of value items in the buffer."""
-        if self._values is None:
-            self.finalize()
-        return len(self._values)
-
-    def __getitem__(self, id):
-        """Get the item with the given ID."""
-        if self._values is None:
-            self.finalize()
-        return self._values[id]
-
-    def __setitem__(self, id, value):
-        """Set the item with the given ID."""
-        if self._values is None:
-            self.finalize()
-        type = self._dataRefs[id][1]
-        length = self._dataRefs[id][2]
-        if type==TYPE_INT:
-            self._values[id] = int(value)
-        elif type==TYPE_FLOAT or type==TYPE_DOUBLE:
-            self._values[id] = float(value)
-        elif type==TYPE_FLOAT_ARRAY:
-            if len(value)!=length:
-                raise ValueError("xplra.MultiBuffer: expected a list of length %d" % (length,))
-            self._values[id] = [float(x) for x in value]
-        elif type==TYPE_INT_ARRAY:
-            if len(value)!=length:
-                raise ValueError("xplra.MultiBuffer: expected a list of length %d" % (length,))
-            self._values[id] = [int(x) for x in value]
-        elif type==TYPE_BYTE_ARRAY:
-            if isinstance(value, str):
-                lst = [ord(x) for x in value[:length]]
-                if len(lst)<length:
-                    lst += [0] * (length-len(lst))
-                self._values[id] = lst
-            else:
-                if len(value)!=length:
-                    raise ValueError("xplra.MultiBuffer: expected a list of length %d" % (length,))
-                self._values[id] = [int(x) for x in value]
-
-    def __iter__(self):
-        """Get an iterator over the values of this buffer."""
-        if self._values is None:
-            self.finalize()
-        return iter(self._values)
-
-
-#-------------------------------------------------------------------------------
-
-class MultiGetter(MultiBuffer):
-    """Multi-dataref buffer for querying."""
-    def __init__(self, xplane):
-        """Construct the getter."""
-        super(MultiGetter, self).__init__(xplane,
-                                          COMMAND_REGISTER_GET_MULTI,
-                                          COMMAND_UNREGISTER_GET_MULTI)
-
-    def _executeRegistered(self):
-        """Execute the query if the buffer is registered."""
-        self._xplane._writeU8(COMMAND_EXECUTE_GET_MULTI)
-        self._xplane._writeU32(self._registeredID)
-        self._xplane._flush()
-
-        self._xplane._checkResult(multi = True)
-
-        self._readValues()
-
-    def _executeUnregistered(self):
-        """Execute the query if the buffer is not registered."""
-        self._writeSpec(COMMAND_GET_MULTI)
-        self._readValues()
-
-    def _readValues(self):
-        """Read the values into the values array."""
-        for i in range(0, len(self._dataRefs)):
-            self._values[i] = self._xplane._readValue(self._dataRefs[i][1])
-
-#-------------------------------------------------------------------------------
-
-class MultiSetter(MultiBuffer):
-    """Multi-dataref buffer for setting."""
-    def __init__(self, xplane):
-        """Construct the getter."""
-        super(MultiSetter, self).__init__(xplane,
-                                          COMMAND_REGISTER_SET_MULTI,
-                                          COMMAND_UNREGISTER_SET_MULTI)
-
-    def _executeRegistered(self):
-        """Execute the query if the buffer is registered."""
-        self._xplane._writeU8(COMMAND_EXECUTE_SET_MULTI)
-        self._xplane._writeU32(self._registeredID)
-        for i in range(0, len(self._dataRefs)):
-            self._xplane._writeValue(self._dataRefs[i][1], self._values[i])
-        self._xplane._flush()
-
-        self._xplane._checkResult(multi = True)
-
-    def _executeUnregistered(self):
-        """Execute the query if the buffer is not registered."""
-        self._xplane._writeU8(COMMAND_SET_MULTI)
-
-        numDataRefs = len(self._dataRefs)
-        self._xplane._writeU32(numDataRefs)
-
-        for i in range(0, numDataRefs):
-            (name, type, length, offset) = self._dataRefs[i]
-            value = self._values[i]
-
-            self._xplane._writeString(name)
-            self._xplane._writeU8(type)
-            if length is not None and offset is not None:
-                self._xplane._writeS32(len(value))
-                self._xplane._writeS32(offset)
-            self._xplane._writeValue(type, value)
-
-        self._xplane._flush()
-        self._xplane._checkResult(multi = True)
-
-#-------------------------------------------------------------------------------
Index: c/plugin/Makefile.am
===================================================================
--- src/plugin/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-SUBDIRS=src
Index: c/plugin/bootstrap.sh
===================================================================
--- src/plugin/bootstrap.sh	(revision 13)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-set -e -u
-
-scriptdir=`dirname $0`
-
-cd "${scriptdir}"
-
-#libtoolize
-aclocal -I $1
-automake -a
-autoconf
Index: c/plugin/configure.ac
===================================================================
--- src/plugin/configure.ac	(revision 85)
+++ 	(revision )
@@ -1,50 +1,0 @@
-AC_INIT(xplra-plugin, 0.1, ivaradi@gmail.com)
-AM_INIT_AUTOMAKE([foreign no-exeext])
-
-AC_PROG_CC
-AC_PROG_CXX
-
-PKG_PROG_PKG_CONFIG
-
-AM_VSCPL_TARGET_API
-
-AC_MSG_CHECKING([where to find the X-Plane Plugin SDK])
-AC_ARG_WITH(xpsdk,
-            AC_HELP_STRING([--with-xpsdk=DIR],
-                           [use the X-Plane Plugin SDK in DIR]),
-            [
-                if test -r $withval/CHeaders/XPLM/XPLMPlugin.h; then
-                    AC_MSG_RESULT([$withval])
-                    XPSDK_INCLUDES="-I$withval/CHeaders/XPLM -I$withval/CHeaders/Wrappers -I$withval/CHeaders/Widgets"
-                    if test $_target_win32 -eq 0; then
-                        XPSDK_LDFLAGS="-L$withval/Libraries/Win"
-                    else
-                        XPSDK_LDFLAGS=""
-                    fi
-                else
-                    AC_MSG_FAILURE([not found in $withval])
-                fi
-            ],
-            [
-                 AC_MSG_FAILURE([please, specify])
-            ])
-
-AC_ARG_ENABLE(xplane9,
-              AC_HELP_STRING([--enable-xplane9],
-                             [compile the plugin for X-Plane 9]),
-              [AM_CONDITIONAL([XPLANE_9], test "$enableval" = "yes")],
-              [AM_CONDITIONAL([XPLANE_9], false)])
-
-AC_SUBST(XPSDK_INCLUDES)
-AC_SUBST(XPSDK_LDFLAGS)
-
-AM_VSCPL
-PKG_CHECK_MODULES([LIBXPLCOMMON], [libxplcommon >= 0.1])
-
-AC_CONFIG_FILES([
-        Makefile
-        src/Makefile
-        src/xplra/Makefile
-])
-
-AC_OUTPUT()
Index: c/plugin/src/Makefile.am
===================================================================
--- src/plugin/src/Makefile.am	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-SUBDIRS=xplra
Index: c/plugin/src/xplra/.copyright
===================================================================
--- src/plugin/src/xplra/.copyright	(revision 13)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: c/plugin/src/xplra/.namespace
===================================================================
--- src/plugin/src/xplra/.namespace	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-xplra
Index: c/plugin/src/xplra/.srcmessage
===================================================================
--- src/plugin/src/xplra/.srcmessage	(revision 13)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of XPLRA, a remote-access plugin for X-Plane
Index: c/plugin/src/xplra/DataRefTask.cc
===================================================================
--- src/plugin/src/xplra/DataRefTask.cc	(revision 13)
+++ 	(revision )
@@ -1,61 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "DataRefTask.h"
-
-#include "hu/varadiistvan/xplcommon/Util.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::DataRefTask;
-
-using hu::varadiistvan::xplcommon::Util;
-
-//------------------------------------------------------------------------------
-
-void DataRefTask::perform()
-{
-    if (dataRef==0) {
-        // Util::debug("DataRefTask::perform: name='%s'\n", name.c_str());
-        dataRef = XPLMFindDataRef(name.c_str());
-        // Util::debug("DataRefTask::perform: dataRef=%p\n", dataRef);
-    }
-    if (dataRef!=0) {
-        process();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/DataRefTask.h
===================================================================
--- src/plugin/src/xplra/DataRefTask.h	(revision 13)
+++ 	(revision )
@@ -1,155 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_DATAREFTASK_H
-#define XPLRA_DATAREFTASK_H
-//------------------------------------------------------------------------------
-
-#include "Task.h"
-
-#include <XPLMDataAccess.h>
-
-#include <string>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A task that works with some dataref. This base class
- * performs the mapping from dataref name to dataref value. The actual
- * operation is performed by the subclasses.
- */
-class DataRefTask : public Task
-{
-private:
-    /**
-     * The name of the dataref.
-     */
-    std::string name;
-
-    /**
-     * The dataref.
-     */
-    XPLMDataRef dataRef;
-
-protected:
-    /**
-     * Construct the dataref task for the dataref with the given name.
-     */
-    DataRefTask(const std::string& name);
-
-    /**
-     * Construct the dataref task for the given dataref.
-     */
-    DataRefTask(XPLMDataRef dataRef);
-
-public:
-    /**
-     * Determine if the task is valid, which is so, if the dataref is
-     * not 0.
-     */
-    bool isValid() const;
-
-    /**
-     * Get the name of the dataref.
-     */
-    const std::string& getName() const;
-
-    /**
-     * Get the dataref.
-     */
-    XPLMDataRef getDataRef() const;
-
-protected:
-    /**
-     * Perform the task. If the dataref is not valid yet, it will be
-     * queried. If the query is successful, the process() function is
-     * called.
-     */
-    virtual void perform();
-
-    /**
-     * Process the dataref. When this function is called, the dataref
-     * is valid.
-     */
-    virtual void process() = 0;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline DataRefTask::DataRefTask(const std::string& name) :
-    name(name),
-    dataRef(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline DataRefTask::DataRefTask(XPLMDataRef dataRef) :
-    dataRef(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline bool DataRefTask::isValid() const
-{
-    return dataRef!=0;
-}
-
-//------------------------------------------------------------------------------
-
-inline const std::string& DataRefTask::getName() const
-{
-    return name;
-}
-
-//------------------------------------------------------------------------------
-
-inline XPLMDataRef DataRefTask::getDataRef() const
-{
-    return dataRef;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_DATAREFTASK_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/GetDataRefTask.cc
===================================================================
--- src/plugin/src/xplra/GetDataRefTask.cc	(revision 13)
+++ 	(revision )
@@ -1,125 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "GetDataRefTask.h"
-#include "Protocol.h"
-
-#include "hu/varadiistvan/xplcommon/Util.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::GetDataRefTask;
-using xplra::GetIntDataRefTask;
-using xplra::GetFloatDataRefTask;
-using xplra::GetDoubleDataRefTask;
-
-using hu::varadiistvan::scpl::io::DataStream;
-using hu::varadiistvan::xplcommon::Util;
-
-using std::string;
-
-//------------------------------------------------------------------------------
-
-GetDataRefTask* GetDataRefTask::create(uint8_t& result, DataStream& stream)
-{
-    result = Protocol::RESULT_OK;
-
-    string name = stream.readString();
-    uint8_t type = stream.readU8();
-    if (!stream) return 0;
-
-    // Util::debug("hu.varadiistvan.xplra.GetDataRefTask::execute: name='%s', type=0x%02x\n",
-    //             name.c_str(), type);
-
-    if (type==Protocol::TYPE_INT) {
-        return new GetIntDataRefTask(name);
-    } else if (type==Protocol::TYPE_FLOAT) {
-        return new GetFloatDataRefTask(name);
-    } else if (type==Protocol::TYPE_DOUBLE) {
-        return new GetDoubleDataRefTask(name);
-    } else if (type==Protocol::TYPE_FLOAT_ARRAY ||
-               type==Protocol::TYPE_INT_ARRAY ||
-               type==Protocol::TYPE_BYTE_ARRAY)
-    {
-        int length = stream.readS32();
-        int offset = stream.readS32();
-        if (!stream) return 0;
-
-        if (length>Protocol::MAX_LENGTH) {
-            result = Protocol::RESULT_INVALID_LENGTH;
-            return 0;
-        }
-        if (offset<0) {
-            result = Protocol::RESULT_INVALID_OFFSET;
-            return 0;
-        }
-
-        if (type==Protocol::TYPE_FLOAT_ARRAY) {
-            return new GetFloatArrayDataRefTask(name, length, offset);
-        } else if (type==Protocol::TYPE_INT_ARRAY) {
-            return new GetIntArrayDataRefTask(name, length, offset);
-        } else {
-            return new GetByteArrayDataRefTask(name, length, offset);
-        }
-    } else {
-        result = Protocol::RESULT_INVALID_TYPE;
-        return 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-void GetIntDataRefTask::writeValue(DataStream& stream)
-{
-    stream.writeS32(getValue());
-}
-
-//------------------------------------------------------------------------------
-
-void GetFloatDataRefTask::writeValue(DataStream& stream)
-{
-    stream.writeFloat(getValue());
-}
-
-//------------------------------------------------------------------------------
-
-void GetDoubleDataRefTask::writeValue(DataStream& stream)
-{
-    stream.writeDouble(getValue());
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/GetDataRefTask.h
===================================================================
--- src/plugin/src/xplra/GetDataRefTask.h	(revision 66)
+++ 	(revision )
@@ -1,739 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_GETDATAREFTASK_H
-#define XPLRA_GETDATAREFTASK_H
-//------------------------------------------------------------------------------
-
-#include "DataRefTask.h"
-
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for tasks that query the value of some dataref.
- */
-class GetDataRefTask : public DataRefTask
-{
-public:
-    /**
-     * Read a dataref query specification and create the appropriate
-     * GetDataRefTask instance.
-     *
-     * @return the new instance, or 0 on error. In that case the given
-     * result reference variable will be filled with the error code,
-     * unless the stream failed, in which case it remains RESULT_OK.
-     */
-    static GetDataRefTask* create(uint8_t& result,
-                                  hu::varadiistvan::scpl::io::DataStream& stream);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    GetDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    GetDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Write the value into the given stream.
-     */
-    virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream) = 0;
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for dataref querying tasks that query some scalar value.
- *
- * ConcreteClass is the actual child class. It should have a function
- * called queryData, which wraps the corresponding function in XPLM.
- */
-template <typename T, class ConcreteClass>
-class GetScalarDataRefTask : public GetDataRefTask
-{
-private:
-    /**
-     * The value retrieved.
-     */
-    T value;
-
-public:
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    GetScalarDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    GetScalarDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Get the value
-     */
-    T getValue() const;
-
-protected:
-    /**
-     * Perform the actual operation.
-     */
-    virtual void process();
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref task which retrieves the value of an integer.
- */
-class GetIntDataRefTask :
-        public GetScalarDataRefTask<int, GetIntDataRefTask>
-{
-public:
-    /**
-     * Query the value from XPLM
-     */
-    static int queryData(XPLMDataRef dataRef);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    GetIntDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    GetIntDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Write the value into the given stream.
-     */
-    virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref task which retrieves the value of a single-precision
- * floating point data.
- */
-class GetFloatDataRefTask :
-        public GetScalarDataRefTask<float, GetFloatDataRefTask>
-{
-public:
-    /**
-     * Query the value from XPLM
-     */
-    static float queryData(XPLMDataRef dataRef);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    GetFloatDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    GetFloatDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Write the value into the given stream.
-     */
-    virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref task which retrieves the value of a double-precision
- * floating point data.
- */
-class GetDoubleDataRefTask :
-        public GetScalarDataRefTask<double, GetDoubleDataRefTask>
-{
-public:
-    /**
-     * Query the value from XPLM
-     */
-    static double queryData(XPLMDataRef dataRef);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    GetDoubleDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    GetDoubleDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Write the value into the given stream.
-     */
-    virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Base class for dataref querying tasks that query some array.
- *
- * ConcreteClass is the actual child class. It should have a function
- * called queryData, which wraps the corresponding function in XPLM.
- */
-template <typename T, class ConcreteClass>
-class GetArrayDataRefTask : public GetDataRefTask
-{
-private:
-    /**
-     * The maximal number of data items returned.
-     */
-    int maxCount;
-
-    /**
-     * The offset within the dataref's value to start the query from.
-     */
-    int offset;
-
-    /**
-     * The data.
-     */
-    T* data;
-
-    /**
-     * The actual length of the data retrieved.
-     */
-    int length;
-
-protected:
-    /**
-     * Construct the task for the dataref with the given name.
-     *
-     * @param name the name of the dataref
-     * @param maxCount the maximal number of items to retrieve. If <0,
-     * the function will perform an extra query to retrieve the size of
-     * of the dataref's data, which it will store in the task, so
-     * later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetArrayDataRefTask(const std::string& name,
-                        int maxCount = -1, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref
-     *
-     * @param dataRef the dataref
-     * @param maxCount the maximal number of items to retrieve. If <0,
-     * the function will perform an extra query to retrieve the size
-     * of the dataref's data, which it will store in the task, so
-     * later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetArrayDataRefTask(XPLMDataRef dataRef,
-                        int maxCount = -1, int offset = 0);
-
-public:
-    /**
-     * Destroy the object.
-     */
-    virtual ~GetArrayDataRefTask();
-
-    /**
-     * Get the data.
-     */
-    const T* getData() const;
-
-    /**
-     * Get the length of the data.
-     */
-    int getLength() const;
-
-protected:
-    /**
-     * Process the dataref by querying its value.
-     */
-    virtual void process();
-
-    /**
-     * Write the value into the given stream.
-     */
-    virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref task which retrieves the value of a float array.
- */
-class GetFloatArrayDataRefTask :
-        public GetArrayDataRefTask<float, GetFloatArrayDataRefTask>
-{
-public:
-    /**
-     * Get the data via XPLM
-     */
-    static int queryData(XPLMDataRef dataRef, float* dest,
-                         int offset, int count);
-
-public:
-    /**
-     * Construct the task for the dataref with the given name.
-     *
-     * @param name the name of the dataref
-     * @param maxCount the maximal number of data items to
-     * retrieve. If <0, the function will perform an extra query to
-     * retrieve the size of the dataref's data, which it will store in
-     * the task, so later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetFloatArrayDataRefTask(const std::string& name,
-                            int maxCount = -1, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref
-     *
-     * @param dataRef the dataref
-     * @param maxCount the maximal number of data items to
-     * retrieve. If <0, the function will perform an extra query to
-     * retrieve the size of the dataref's data, which it will store in
-     * the task, so later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetFloatArrayDataRefTask(XPLMDataRef dataRef,
-                             int maxCount = -1, int offset = 0);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref task which retrieves the value of an integer array.
- */
-class GetIntArrayDataRefTask :
-        public GetArrayDataRefTask<int, GetIntArrayDataRefTask>
-{
-public:
-    /**
-     * Get the data via XPLM
-     */
-    static int queryData(XPLMDataRef dataRef, int* dest,
-                         int offset, int count);
-
-public:
-    /**
-     * Construct the task for the dataref with the given name.
-     *
-     * @param name the name of the dataref
-     * @param maxCount the maximal number of data items to
-     * retrieve. If <0, the function will perform an extra query to
-     * retrieve the size of the dataref's data, which it will store in
-     * the task, so later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetIntArrayDataRefTask(const std::string& name,
-                           int maxCount = -1, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref
-     *
-     * @param dataRef the dataref
-     * @param maxCount the maximal number of data items to
-     * retrieve. If <0, the function will perform an extra query to
-     * retrieve the size of the dataref's data, which it will store in
-     * the task, so later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetIntArrayDataRefTask(XPLMDataRef dataRef,
-                           int maxCount = -1, int offset = 0);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref task which retrieves the value of a byte array.
- */
-class GetByteArrayDataRefTask :
-        public GetArrayDataRefTask<unsigned char, GetByteArrayDataRefTask>
-{
-public:
-    /**
-     * Get the data via XPLM
-     */
-    static int queryData(XPLMDataRef dataRef, void* dest,
-                         int offset, int count);
-
-public:
-    /**
-     * Construct the task for the dataref with the given name.
-     *
-     * @param name the name of the dataref
-     * @param maxBytes the maximal number of bytes to retrieve. If <0,
-     * the function will perform an extra query to retrieve the size
-     * of the dataref's data, which it will store in the task, so
-     * later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetByteArrayDataRefTask(const std::string& name,
-                            int maxBytes = -1, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref
-     *
-     * @param dataRef the dataref
-     * @param maxBytes the maximal number of bytes to retrieve. If <0,
-     * the function will perform an extra query to retrieve the size
-     * of the dataref's data, which it will store in the task, so
-     * later on it can be reused.
-     * @param offset the offset from which to query the array
-     */
-    GetByteArrayDataRefTask(XPLMDataRef dataRef,
-                            int maxBytes = -1, int offset = 0);
-};
-
-//------------------------------------------------------------------------------
-// Template definitions
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline GetScalarDataRefTask<T, ConcreteClass>::
-GetScalarDataRefTask(const std::string& name) :
-    GetDataRefTask(name),
-    value(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline GetScalarDataRefTask<T, ConcreteClass>::
-GetScalarDataRefTask(XPLMDataRef dataRef) :
-    GetDataRefTask(dataRef),
-    value(0)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline T GetScalarDataRefTask<T, ConcreteClass>::getValue() const
-{
-    return value;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-void GetScalarDataRefTask<T, ConcreteClass>::process()
-{
-    value = ConcreteClass::queryData(getDataRef());
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline GetArrayDataRefTask<T, ConcreteClass>::
-GetArrayDataRefTask(const std::string& name, int maxCount, int offset) :
-    GetDataRefTask(name),
-    maxCount(maxCount),
-    offset(offset),
-    data( (maxCount>0) ? new T[maxCount] : 0 ),
-    length(-1)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline GetArrayDataRefTask<T, ConcreteClass>::
-GetArrayDataRefTask(XPLMDataRef dataRef, int maxCount, int offset) :
-    GetDataRefTask(dataRef),
-    maxCount(maxCount),
-    offset(offset),
-    data( (maxCount>0) ? new T[maxCount] : 0),
-    length(-1)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline GetArrayDataRefTask<T, ConcreteClass>::~GetArrayDataRefTask()
-{
-    delete [] data;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline const T* GetArrayDataRefTask<T, ConcreteClass>::getData() const
-{
-    return data;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline int GetArrayDataRefTask<T, ConcreteClass>::getLength() const
-{
-    return length;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-void GetArrayDataRefTask<T, ConcreteClass>::process()
-{
-    if (maxCount<0) {
-        maxCount = ConcreteClass::queryData(getDataRef(), 0, 0, 0);
-
-        if (maxCount>0) {
-            maxCount -= offset;
-        }
-
-        if (maxCount>0) {
-            data = new T[maxCount];
-        } else {
-            maxCount = 0;
-        }
-    }
-
-    // Util::debug("GetByteArrayDataRefTask::process: dataRef=%p, maxBytes=%d, data=%p, offset\n",
-    //             getDataRef(), maxBytes, data, offset);
-    if (maxCount>0) {
-        length = ConcreteClass::queryData(getDataRef(), data, offset, maxCount);
-    } else {
-        length = maxCount;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-void GetArrayDataRefTask<T, ConcreteClass>::
-writeValue(hu::varadiistvan::scpl::io::DataStream& stream)
-{
-    stream.writeS32(length);
-    if (length>0) {
-        stream.write(data, length * sizeof(T));
-    }
-}
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline GetDataRefTask::GetDataRefTask(const std::string& name) :
-    DataRefTask(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline GetDataRefTask::GetDataRefTask(XPLMDataRef dataRef) :
-    DataRefTask(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int GetIntDataRefTask::queryData(XPLMDataRef dataRef)
-{
-    return XPLMGetDatai(dataRef);
-}
-
-//------------------------------------------------------------------------------
-
-inline GetIntDataRefTask::GetIntDataRefTask(const std::string& name) :
-    GetScalarDataRefTask<int, GetIntDataRefTask>(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline GetIntDataRefTask::GetIntDataRefTask(XPLMDataRef dataRef) :
-    GetScalarDataRefTask<int, GetIntDataRefTask>(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline float GetFloatDataRefTask::queryData(XPLMDataRef dataRef)
-{
-    return XPLMGetDataf(dataRef);
-}
-
-//------------------------------------------------------------------------------
-
-inline GetFloatDataRefTask::GetFloatDataRefTask(const std::string& name) :
-    GetScalarDataRefTask<float, GetFloatDataRefTask>(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline GetFloatDataRefTask::GetFloatDataRefTask(XPLMDataRef dataRef) :
-    GetScalarDataRefTask<float, GetFloatDataRefTask>(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline double GetDoubleDataRefTask::queryData(XPLMDataRef dataRef)
-{
-    return XPLMGetDatad(dataRef);
-}
-
-//------------------------------------------------------------------------------
-
-inline GetDoubleDataRefTask::GetDoubleDataRefTask(const std::string& name) :
-    GetScalarDataRefTask<double, GetDoubleDataRefTask>(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline GetDoubleDataRefTask::GetDoubleDataRefTask(XPLMDataRef dataRef) :
-    GetScalarDataRefTask<double, GetDoubleDataRefTask>(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int GetFloatArrayDataRefTask::queryData(XPLMDataRef dataRef, float* dest,
-                                               int offset, int count)
-{
-    return XPLMGetDatavf(dataRef, dest, offset, count);
-}
-
-//------------------------------------------------------------------------------
-
-inline
-GetFloatArrayDataRefTask::GetFloatArrayDataRefTask(const std::string& name,
-                                                   int maxCount, int offset) :
-    GetArrayDataRefTask<float, GetFloatArrayDataRefTask>(name, maxCount, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline
-GetFloatArrayDataRefTask::GetFloatArrayDataRefTask(XPLMDataRef dataRef,
-                                                 int maxCount, int offset) :
-    GetArrayDataRefTask<float, GetFloatArrayDataRefTask>(dataRef,
-                                                         maxCount, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int GetIntArrayDataRefTask::queryData(XPLMDataRef dataRef, int* dest,
-                                             int offset, int count)
-{
-    return XPLMGetDatavi(dataRef, dest, offset, count);
-}
-
-//------------------------------------------------------------------------------
-
-inline
-GetIntArrayDataRefTask::GetIntArrayDataRefTask(const std::string& name,
-                                                   int maxCount, int offset) :
-    GetArrayDataRefTask<int, GetIntArrayDataRefTask>(name, maxCount, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline
-GetIntArrayDataRefTask::GetIntArrayDataRefTask(XPLMDataRef dataRef,
-                                               int maxCount, int offset) :
-    GetArrayDataRefTask<int, GetIntArrayDataRefTask>(dataRef,
-                                                     maxCount, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int GetByteArrayDataRefTask::queryData(XPLMDataRef dataRef, void* dest,
-                                              int offset, int count)
-{
-    return XPLMGetDatab(dataRef, dest, offset, count);
-}
-
-//------------------------------------------------------------------------------
-
-inline
-GetByteArrayDataRefTask::GetByteArrayDataRefTask(const std::string& name,
-                                                 int maxBytes, int offset) :
-    GetArrayDataRefTask<unsigned char, GetByteArrayDataRefTask>(name, maxBytes,
-                                                                offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline
-GetByteArrayDataRefTask::GetByteArrayDataRefTask(XPLMDataRef dataRef,
-                                                 int maxBytes, int offset) :
-    GetArrayDataRefTask<unsigned char, GetByteArrayDataRefTask>(dataRef,
-                                                                maxBytes,
-                                                                offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_GETDATAREFTASK_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/GetMultiDataRefRequest.cc
===================================================================
--- src/plugin/src/xplra/GetMultiDataRefRequest.cc	(revision 13)
+++ 	(revision )
@@ -1,96 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "GetMultiDataRefRequest.h"
-
-#include "Protocol.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::GetMultiDataRefRequest;
-
-using hu::varadiistvan::scpl::io::DataStream;
-using hu::varadiistvan::xplcommon::Util;
-
-//------------------------------------------------------------------------------
-
-GetMultiDataRefRequest::GetMultiDataRefRequest(uint8_t& result,
-                                               DataStream& stream)
-{
-    result = Protocol::RESULT_OK;
-
-    uint32_t numTasks = stream.readU32();
-    if (!stream) return;
-    if (numTasks==0 || numTasks>Protocol::MAX_MULTI_COUNT) {
-        result = Protocol::RESULT_INVALID_COUNT;
-        return;
-    }
-
-    for(size_t i = 0;
-        i<numTasks && result==Protocol::RESULT_OK && stream; ++i)
-    {
-        GetDataRefTask* task = GetDataRefTask::create(result, stream);
-        if (task!=0) addTask(task);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void GetMultiDataRefRequest::writeResult(DataStream& stream) const
-{
-    // Util::debug("hu.varadiistvan.xplra.GetMultiDataRefRequest[%p]::writeResult\n", this);
-    size_t numTasks = getNumTasks();
-    for(size_t i = 0; i<numTasks; ++i) {
-        GetDataRefTask* task = getTask(i);
-        // Util::debug("hu.varadiistvan.xplra.GetMultiDataRefRequest[%p]::writeResult: task[%zu]: %d @ %p\n",
-        //             this, i, task->isValid(), task);
-        if (!task->isValid()) {
-            stream.writeU8(Protocol::RESULT_UNKNOWN_DATAREF);
-            stream.writeU32(i);
-            return;
-        }
-    }
-
-    stream.writeU8(Protocol::RESULT_OK);
-    for(size_t i = 0; i<numTasks; ++i) {
-        GetDataRefTask* task = getTask(i);
-        task->writeValue(stream);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/GetMultiDataRefRequest.h
===================================================================
--- src/plugin/src/xplra/GetMultiDataRefRequest.h	(revision 13)
+++ 	(revision )
@@ -1,78 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_GETMULTIDATAREFREQUEST_H
-#define XPLRA_GETMULTIDATAREFREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "MultiTaskRequest.h"
-#include "GetDataRefTask.h"
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A request containing several dataref query tasks.
- */
-class GetMultiDataRefRequest : public MultiTaskRequestTemplate<GetDataRefTask>
-{
-public:
-    /**
-     * Construct the request by reading the given number of task
-     * specifications from the given stream.
-     */
-    GetMultiDataRefRequest(uint8_t& result, hu::varadiistvan::scpl::io::DataStream& stream);
-
-    /**
-     * Write the result of an execution.
-     *
-     * If there is at least one invalid dataref, the result will be
-     * RESULT_UNKNOWN_DATAREF followed by a 32-bit unsigned value with
-     * the index of the first unknown dataref.
-     *
-     * Otherwise the result is RESULT_OK, followed by the values of
-     * the datarefs queried.
-     */
-    void writeResult(hu::varadiistvan::scpl::io::DataStream& stream) const;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_GETMULTIDATAREFREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Globals.cc
===================================================================
--- src/plugin/src/xplra/Globals.cc	(revision 44)
+++ 	(revision )
@@ -1,54 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Globals.h"
-
-#include <XPLMUtilities.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::Globals;
-
-//------------------------------------------------------------------------------
-
-Globals::Globals() :
-    menu(messageWindow)
-{
-    XPLMHostApplicationID hostID = 0;
-    XPLMGetVersions(&xplaneVersion, &xplmVersion, &hostID);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Globals.h
===================================================================
--- src/plugin/src/xplra/Globals.h	(revision 45)
+++ 	(revision )
@@ -1,132 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_GLOBALS_H
-#define XPLRA_GLOBALS_H
-//------------------------------------------------------------------------------
-
-#include "MessageWindow.h"
-#include "Menu.h"
-#include "HotkeyHandler.h"
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class containing the globals for the enabled instance of the
- * plugin.
- */
-class Globals
-{
-private:
-    /**
-     * The version of X-Plane.
-     */
-    int xplaneVersion;
-
-    /**
-     * The version of the XPLM library.
-     */
-    int xplmVersion;
-
-    /**
-     * The message window.
-     */
-    MessageWindow messageWindow;
-
-    /**
-     * The menu.
-     */
-    Menu menu;
-
-    /**
-     * The hotkey handler.
-     */
-    HotkeyHandler hotkeyHandler;
-
-public:
-    /**
-     * Construct the globals.
-     */
-    Globals();
-
-    /**
-     * Get the versions.
-     */
-    void getVersions(int& xplaneV, int& xplmV) const;
-
-    /**
-     * Get the message window.
-     */
-    MessageWindow& getMessageWindow();
-
-    /**
-     * Get the hotkey handler.
-     */
-    HotkeyHandler& getHotkeyHandler();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline void Globals::getVersions(int& xplaneV, int& xplmV) const
-{
-    xplaneV = xplaneVersion;
-    xplmV = xplmVersion;
-}
-
-//------------------------------------------------------------------------------
-
-inline MessageWindow& Globals::getMessageWindow()
-{
-    return messageWindow;
-}
-
-//------------------------------------------------------------------------------
-
-inline HotkeyHandler& Globals::getHotkeyHandler()
-{
-    return hotkeyHandler;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_GLOBALS_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/HotkeyHandler.cc
===================================================================
--- src/plugin/src/xplra/HotkeyHandler.cc	(revision 46)
+++ 	(revision )
@@ -1,166 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "HotkeyHandler.h"
-
-#include "Protocol.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <XPLMDisplay.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::HotkeyHandler;
-
-using hu::varadiistvan::xplcommon::Util;
-
-using hu::varadiistvan::scpl::io::DataStream;
-
-//------------------------------------------------------------------------------
-
-HotkeyHandler::Hotkeys::Hotkeys(size_t numHotkeys, DataStream& stream) :
-    numHotkeys(numHotkeys),
-    hotkeys(new uint16_t[numHotkeys]),
-    pressed(0)
-{
-    if (stream.read(hotkeys, sizeof(uint16_t)*numHotkeys)) {
-        pressed = new uint8_t[numHotkeys];
-        memset(pressed, 0, sizeof(uint8_t)*numHotkeys);
-    } else {
-        delete hotkeys; hotkeys = 0;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-HotkeyHandler::Hotkeys::~Hotkeys()
-{
-    delete [] pressed;
-    delete [] hotkeys;
-}
-
-//------------------------------------------------------------------------------
-
-bool HotkeyHandler::Hotkeys::handleKey(uint16_t code)
-{
-    for(size_t i = 0; i<numHotkeys; ++i) {
-        if (hotkeys[i]==code) {
-            pressed[i] = 1;
-            return true;
-        }
-    }
-    return false;
-}
-
-//------------------------------------------------------------------------------
-
-void HotkeyHandler::Hotkeys::writePressed(DataStream& stream)
-{
-    uint8_t pressed1[numHotkeys];
-
-    for(size_t i = 0; i<numHotkeys; ++i) {
-        pressed1[i] = __sync_val_compare_and_swap(pressed + i, 1, 0);
-    }
-
-    stream.writeU32(numHotkeys);
-    stream.write(pressed1, sizeof(pressed1));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int HotkeyHandler::keyCallback(char c, XPLMKeyFlags flags, char virtualKey,
-                               void* refCon)
-{
-    HotkeyHandler* hotkeyHandler = reinterpret_cast<HotkeyHandler*>(refCon);
-    return hotkeyHandler->handleKey(c, flags, virtualKey) ? 0 : 1;
-}
-
-//------------------------------------------------------------------------------
-
-HotkeyHandler::HotkeyHandler()
-{
-    XPLMRegisterKeySniffer(&keyCallback, 0, this);
-}
-
-//------------------------------------------------------------------------------
-
-void HotkeyHandler::registerHotkeys(Hotkeys* hotkeys)
-{
-    mutex.lock();
-    hotkeySets.push_back(hotkeys);
-    mutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-
-void HotkeyHandler::unregisterHotkeys(Hotkeys* hotkeys)
-{
-    mutex.lock();
-    hotkeySets.remove(hotkeys);
-    mutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-
-bool HotkeyHandler::handleKey(char /*c*/, XPLMKeyFlags flags, char virtualKey)
-{
-    if ( (flags&xplm_DownFlag)==0 ) return false;
-
-    uint16_t code = static_cast<uint16_t>(virtualKey);
-    if ( (flags&xplm_ShiftFlag)!=0 ) code |= Protocol::HOTKEY_MODIFIER_SHIFT;
-    if ( (flags&xplm_ControlFlag)!=0 ) code |= Protocol::HOTKEY_MODIFIER_CONTROL;
-
-    bool handled = false;
-
-    mutex.lock();
-    for(hotkeySets_t::iterator i = hotkeySets.begin(); i!=hotkeySets.end();
-        ++i)
-    {
-        Hotkeys* hotkeys = *i;
-        if (hotkeys->handleKey(code)) {
-            handled = true;
-        }
-    }
-    mutex.unlock();
-
-    return handled;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/HotkeyHandler.h
===================================================================
--- src/plugin/src/xplra/HotkeyHandler.h	(revision 45)
+++ 	(revision )
@@ -1,185 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_HOTKEYHANDLER_H
-#define XPLRA_HOTKEYHANDLER_H
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Mutex.h>
-
-#include <XPLMDefs.h>
-
-#include <list>
-
-#include <inttypes.h>
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace scpl { namespace io {
-
-class DataStream;
-
-} } } }
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * The handler for hotkeys.
- */
-class HotkeyHandler
-{
-public:
-    /**
-     * A set of hotkeys for a client.
-     */
-    class Hotkeys
-    {
-    private:
-        /**
-         * The number of hotkeys.
-         */
-        size_t numHotkeys;
-
-        /**
-         * The hotkey codes.
-         */
-        uint16_t* hotkeys;
-
-        /**
-         * The array of indicators whether the hotkey at the given
-         * index in the array of codes has been pressed.
-         */
-        uint8_t* pressed;
-
-    public:
-        /**
-         * Construct the set of hotkeys by reading the data from the
-         * given data stream.
-         */
-        Hotkeys(size_t numHotkeys, hu::varadiistvan::scpl::io::DataStream& stream);
-
-        /**
-         * Destroy the set of hotkeys.
-         */
-        ~Hotkeys();
-
-        /**
-         * Determine if this hotkey set is valid.
-         */
-        bool isValid() const;
-
-        /**
-         * Handle the hotkey with the given code. If it matches any of
-         * the codes registered, the corresponding value in the
-         * pressed array will be set atomically.
-         *
-         * @return whether the hotkey was handled or not.
-         */
-        bool handleKey(uint16_t code);
-
-        /**
-         * Write the pressed indicators into the given stream. It also
-         * clears the indicators.
-         */
-        void writePressed(hu::varadiistvan::scpl::io::DataStream& stream);
-    };
-
-    friend class Hotkeys;
-
-private:
-    /**
-     * Type for the the list of hotkey sets.
-     */
-    typedef std::list<Hotkeys*> hotkeySets_t;
-
-    /**
-     * The callback function receiving the keypresses.
-     */
-    static int keyCallback(char c, XPLMKeyFlags flags, char virtualKey,
-                           void* refCon);
-
-    /**
-     * Mutex to protect some common data structures.
-     */
-    hu::varadiistvan::scpl::Mutex mutex;
-
-    /**
-     * The list of hotkey sets.
-     */
-    hotkeySets_t hotkeySets;
-
-public:
-    /**
-     * Construct the hotkey handler.
-     */
-    HotkeyHandler();
-
-    /**
-     * Register the given set of hotkeys.
-     */
-    void registerHotkeys(Hotkeys* hotkeys);
-
-    /**
-     * Unregister the given set of hotkeys.
-     */
-    void unregisterHotkeys(Hotkeys* hotkeys);
-
-protected:
-    /**
-     * Handle the given hotkey code.
-     *
-     * @return true if the hotkey was handled, false otherwise.
-     */
-    bool handleKey(char c, XPLMKeyFlags flags, char virtualKey);
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline bool HotkeyHandler::Hotkeys::isValid() const
-{
-    return hotkeys!=0;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_HOTKEYHANDLER_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/ListenThread.cc
===================================================================
--- src/plugin/src/xplra/ListenThread.cc	(revision 104)
+++ 	(revision )
@@ -1,91 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ListenThread.h"
-
-#include "ServerThread.h"
-
-#include <hu/varadiistvan/scpl/io/LocalServerSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalAcceptor.h>
-#include <hu/varadiistvan/scpl/io/TCPServerSocket.h>
-#include <hu/varadiistvan/scpl/io/TCPAcceptor.h>
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::ListenThread;
-
-using hu::varadiistvan::scpl::io::LocalServerSocket;
-using hu::varadiistvan::scpl::io::LocalAcceptor;
-using hu::varadiistvan::scpl::io::TCPServerSocket;
-using hu::varadiistvan::scpl::io::TCPAcceptor;
-using hu::varadiistvan::xplcommon::Util;
-
-//------------------------------------------------------------------------------
-
-void ListenThread::run()
-{
-    Util::debug("xplra::ListenThread::run: started\n");
-
-    LocalServerSocket localSocket("xplra", &waiter);
-    LocalAcceptor& localAcceptor = localSocket.getAcceptor();
-
-    TCPServerSocket tcpSocket(defaultTCPPort, &waiter);
-    TCPAcceptor& tcpAcceptor = tcpSocket.getAcceptor();
-
-    while(!quitEvent.check() && !quitEvent.failed() &&
-          !localAcceptor.failed() && !tcpAcceptor.failed()) {
-        while (localAcceptor.accept()) {
-            ServerThread* serverThread = new ServerThread(*this,
-                                                          requestQueue,
-                                                          localAcceptor);
-            serverThread->start();
-        }
-        while (tcpAcceptor.accept()) {
-            ServerThread* serverThread = new ServerThread(*this,
-                                                          requestQueue,
-                                                          tcpAcceptor);
-            serverThread->start();
-        }
-        waiter.wait();
-    }
-
-    ServerThread::quitAll();
-
-    Util::debug("xplra::ListenThread::run: quitting\n");
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/ListenThread.h
===================================================================
--- src/plugin/src/xplra/ListenThread.h	(revision 104)
+++ 	(revision )
@@ -1,144 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_LISTENTHREAD_H
-#define XPLRA_LISTENTHREAD_H
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include "RequestQueue.h"
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/WaitableEvent.h>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class Globals;
-
-//------------------------------------------------------------------------------
-
-/**
- * The thread that listens to incoming connections and starts the
- * client serving threads.
- *
- * This is a detached thread, to allow it to quit automatically.
- */
-class ListenThread : public hu::varadiistvan::scpl::Thread
-{
-public:
-    /**
-     * The default TCP port number ("XR")
-     */
-    static const unsigned short defaultTCPPort = 0x5852;
-
-private:
-    /**
-     * The global objects.
-     */
-    Globals& globals;
-
-    /**
-     * The waiter used in the thread.
-     */
-    hu::varadiistvan::scpl::io::Waiter waiter;
-
-    /**
-     * The event that can be fired to notify the thread that it should
-     * quit.
-     */
-    hu::varadiistvan::scpl::io::WaitableEvent quitEvent;
-
-    /**
-     * The queue for the requests.
-     */
-    RequestQueue requestQueue;
-
-public:
-    /**
-     * Construct the thread.
-     */
-    ListenThread(Globals& globals);
-
-    /**
-     * Get the globals
-     */
-    Globals& getGlobals();
-
-    /**
-     * Notify the thread to quit.
-     */
-    void quit();
-
-    /**
-     * Perform the thread's operation.
-     */
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline ListenThread::ListenThread(Globals& globals) :
-    globals(globals),
-    quitEvent(&waiter)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Globals& ListenThread::getGlobals()
-{
-    return globals;
-}
-
-//------------------------------------------------------------------------------
-
-inline void ListenThread::quit()
-{
-    requestQueue.disable();
-    quitEvent.fire();
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_LISTENTHREAD_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Makefile.am
===================================================================
--- src/plugin/src/xplra/Makefile.am	(revision 104)
+++ 	(revision )
@@ -1,83 +1,0 @@
-AM_CPPFLAGS=@XPSDK_INCLUDES@
-
-AM_CXXFLAGS=$(VSCPL_CFLAGS) $(LIBXPLCOMMON_CFLAGS)
-
-if XPLANE_9
-XPLMDEFINES=-DXPLM100
-else
-XPLMDEFINES=-DXPLM200 -DXPLM210
-endif
-
-AM_CPPFLAGS+=$(XPLMDEFINES)
-
-SRCS= \
-	plugin.cc			\
-	ListenThread.cc			\
-	RequestQueue.cc			\
-	ServerThread.cc			\
-	TaskRequest.cc			\
-	DataRefTask.cc			\
-	GetDataRefTask.cc		\
-	SetDataRefTask.cc		\
-	MultiTaskRequest.cc		\
-	GetMultiDataRefRequest.cc	\
-	SetMultiDataRefRequest.cc	\
-	ReloadPluginsRequest.cc		\
-	Globals.cc			\
-	MessageWindow.cc		\
-	MessageRequest.cc		\
-	Menu.cc				\
-	HotkeyHandler.cc
-
-if !XPLANE_9
-SRCS+=SaveSituationRequest.cc
-endif
-
-noinst_HEADERS= \
-	ListenThread.h			\
-	Request.h			\
-	RequestQueue.h			\
-	Protocol.h			\
-	ServerThread.h			\
-	Task.h				\
-	TaskRequest.h			\
-	DataRefTask.h			\
-	GetDataRefTask.h		\
-	SetDataRefTask.h		\
-	MultiTaskRequest.h		\
-	GetMultiDataRefRequest.h	\
-	SetMultiDataRefRequest.h	\
-	ReloadPluginsRequest.h		\
-	SaveSituationRequest.h		\
-	Globals.h			\
-	MessageWindow.h			\
-	MessageRequest.h		\
-	Menu.h				\
-	HotkeyHandler.h
-
-if TARGET_API_POSIX
-AM_CPPFLAGS+=-DLIN
-AM_CXXFLAGS+=-fPIC -fno-stack-protector
-AM_LDFLAGS=-shared -rdynamic -nodefaultlibs -undefined_warning -Wl,-version-script=$(srcdir)/version.ldscript -Wl,-Bstatic
-noinst_PROGRAMS=lin.xpl
-lin_xpl_SOURCES=$(SRCS)
-lin_xpl_LDADD=$(VSCPL_LIBS) $(LIBXPLCOMMON_LIBS)
-endif
-
-if TARGET_API_WIN32
-AM_CPPFLAGS+=-DIBM
-AM_LDFLAGS=-shared -Wl,--enable-auto-image-base -static -static-libgcc -static-libstdc++
-
-noinst_PROGRAMS=win.xpl
-win_xpl_SOURCES=$(SRCS)
-
-win_xpl_LDADD=$(LIBXPLCOMMON_LIBS) $(VSCPL_LIBS) -lws2_32
-win_xpl_LDADD+=@XPSDK_LDFLAGS@
-if TARGET_API_WIN64
-win_xpl_LDADD+=-lXPLM_64
-else
-win_xpl_LDADD+=-lXPLM
-endif
-endif
-
-EXTRA_DIST=version.ldscript
Index: c/plugin/src/xplra/Menu.cc
===================================================================
--- src/plugin/src/xplra/Menu.cc	(revision 47)
+++ 	(revision )
@@ -1,96 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "Menu.h"
-
-#include "MessageWindow.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::Menu;
-
-//------------------------------------------------------------------------------
-
-void* const Menu::showMessageAreaRef = reinterpret_cast<void*>(1);
-
-void* const Menu::resetMessageAreaRef = reinterpret_cast<void*>(2);
-
-//------------------------------------------------------------------------------
-
-void Menu::menuHandlerCallback(void* menuRef, void* itemRef)
-{
-    Menu* menu = reinterpret_cast<Menu*>(menuRef);
-    menu->handleMenu(itemRef);
-}
-
-//------------------------------------------------------------------------------
-
-Menu::Menu(MessageWindow& messageWindow) :
-    messageWindow(messageWindow),
-    menuID(0),
-    showMessageAreaIndex(-1)
-{
-    XPLMMenuID pluginsMenuID = XPLMFindPluginsMenu();
-
-    int menuIndex = XPLMAppendMenuItem(pluginsMenuID, "Remote Access", 0, 1);
-    menuID = XPLMCreateMenu("Remote Access", pluginsMenuID, menuIndex,
-                            &menuHandlerCallback, this);
-    showMessageAreaIndex = XPLMAppendMenuItem(menuID, "Show message area",
-                                              showMessageAreaRef, 1);
-    XPLMCheckMenuItem(menuID, showMessageAreaIndex, xplm_Menu_Unchecked);
-    XPLMAppendMenuItem(menuID, "Reset message area", resetMessageAreaRef, 1);
-}
-
-//------------------------------------------------------------------------------
-
-void Menu::handleMenu(void* itemRef)
-{
-    if (itemRef==showMessageAreaRef) {
-        XPLMMenuCheck checked = xplm_Menu_NoCheck;
-        XPLMCheckMenuItemState(menuID, showMessageAreaIndex, &checked);
-        if (checked==xplm_Menu_Unchecked) {
-            XPLMCheckMenuItem(menuID, showMessageAreaIndex, xplm_Menu_Checked);
-            messageWindow.show();
-        } else if (checked==xplm_Menu_Checked) {
-            XPLMCheckMenuItem(menuID, showMessageAreaIndex, xplm_Menu_Unchecked);
-            messageWindow.hide();
-        }
-    } else if (itemRef==resetMessageAreaRef) {
-        messageWindow.reset();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Menu.h
===================================================================
--- src/plugin/src/xplra/Menu.h	(revision 47)
+++ 	(revision )
@@ -1,106 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_MENU_H
-#define XPLRA_MENU_H
-//------------------------------------------------------------------------------
-
-#include <XPLMMenus.h>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class MessageWindow;
-
-//------------------------------------------------------------------------------
-
-/**
- * The menu handler.
- */
-class Menu
-{
-private:
-    /**
-     * The menu handler callback.
-     */
-    static void menuHandlerCallback(void* menuRef, void* itemRef);
-
-    /**
-     * Item reference for the show message area menu item.
-     */
-    static void* const showMessageAreaRef;
-
-    /**
-     * Item reference for the show message area menu item.
-     */
-    static void* const resetMessageAreaRef;
-
-    /**
-     * Reference to the message window.
-     */
-    MessageWindow& messageWindow;
-
-    /**
-     * The menu ID.
-     */
-    XPLMMenuID menuID;
-
-    /**
-     * The index of the "Show Message Area" menu item.
-     */
-    int showMessageAreaIndex;
-
-public:
-    /**
-     * Construct the menu. It creates the menu for the plugin under
-     * the Plugins menu
-     */
-    Menu(MessageWindow& messageWindow);
-
-protected:
-    /**
-     * Handle the menu clicks.
-     */
-    void handleMenu(void* itemRef);
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_MENU_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/MessageRequest.cc
===================================================================
--- src/plugin/src/xplra/MessageRequest.cc	(revision 38)
+++ 	(revision )
@@ -1,52 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "MessageRequest.h"
-
-#include "MessageWindow.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::MessageRequest;
-
-//------------------------------------------------------------------------------
-
-void MessageRequest::execute()
-{
-    messageWindow.setNewMessage(message, duration);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/MessageRequest.h
===================================================================
--- src/plugin/src/xplra/MessageRequest.h	(revision 38)
+++ 	(revision )
@@ -1,106 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_MESSAGEREQUEST_H
-#define XPLRA_MESSAGEREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "Request.h"
-
-#include <string>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class MessageWindow;
-
-//------------------------------------------------------------------------------
-
-/**
- * A request that sets up a new message to be displayed in the message window.
- */
-class MessageRequest : public Request
-{
-private:
-    /**
-     * The message window to use.
-     */
-    MessageWindow& messageWindow;
-
-    /**
-     * The message.
-     */
-    std::string message;
-
-    /**
-     * The duration.
-     */
-    float duration;
-
-public:
-    /**
-     * Construct the request.
-     */
-    MessageRequest(MessageWindow& messageWindow,
-                   const std::string& message, float duration);
-
-protected:
-    /**
-     * Execute the request by
-     */
-    virtual void execute();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline MessageRequest::MessageRequest(MessageWindow& messageWindow,
-                                      const std::string& message,
-                                      float duration) :
-    messageWindow(messageWindow),
-    message(message),
-    duration(duration)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_MESSAGEREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/MessageWindow.cc
===================================================================
--- src/plugin/src/xplra/MessageWindow.cc	(revision 51)
+++ 	(revision )
@@ -1,315 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "MessageWindow.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-#include <XPLMProcessing.h>
-#include <XPLMGraphics.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::MessageWindow;
-
-using hu::varadiistvan::xplcommon::Util;
-
-using std::string;
-using std::min;
-using std::max;
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::drawWindowCallback(XPLMWindowID /*windowID*/, void* refCon)
-{
-    MessageWindow* messageWindow = reinterpret_cast<MessageWindow*>(refCon);
-    messageWindow->drawWindow();
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::handleKeyCallback(XPLMWindowID /*windowID*/, char key,
-                                      XPLMKeyFlags flags, char virtualKey,
-                                      void* refCon, int losingFocus)
-{
-    MessageWindow* messageWindow = reinterpret_cast<MessageWindow*>(refCon);
-    messageWindow->handleKey(key, flags, virtualKey, losingFocus!=0);
-}
-
-//------------------------------------------------------------------------------
-
-int MessageWindow::handleMouseClickCallback(XPLMWindowID /*windowID*/,
-                                            int x, int y,
-                                            XPLMMouseStatus mouse, void* refCon)
-{
-    MessageWindow* messageWindow = reinterpret_cast<MessageWindow*>(refCon);
-    return messageWindow->handleMouseClick(x, y, mouse) ? 1 : 0;
-}
-
-//------------------------------------------------------------------------------
-
-MessageWindow::MessageWindow() :
-    maxMessageLength(0),
-    showForced(false),
-    showTime(0.0),
-    hideTime(0.0),
-    clickedX(-1),
-    clickedY(-1),
-    clickedLeft(-1),
-    clickedTop(-1),
-    clickedRight(-1),
-    clickedBottom(-1),
-    duration(0.0)
-{
-    widthDataRef = XPLMFindDataRef("sim/graphics/view/window_width");
-    heightDataRef = XPLMFindDataRef("sim/graphics/view/window_height");
-
-    int digitsOnly = 0;
-    XPLMGetFontDimensions(xplmFont_Basic, &fontWidth, &fontHeight, &digitsOnly);
-
-    Util::debug("hu.varadiistvan.xplra.MessageWindow: fontWidth=%d, fontHeight=%d\n",
-                fontWidth, fontHeight);
-
-    resetLocation();
-
-    windowID = XPLMCreateWindow(left, top, right, bottom, 0,
-                                &drawWindowCallback,
-                                &handleKeyCallback,
-                                &handleMouseClickCallback, this);
-}
-
-//------------------------------------------------------------------------------
-
-MessageWindow::~MessageWindow()
-{
-    XPLMSetWindowIsVisible(windowID, 0);
-    XPLMDestroyWindow(windowID);
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::show()
-{
-    showForced = true;
-    XPLMSetWindowIsVisible(windowID, 1);
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::hide()
-{
-    showForced = false;
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::reset()
-{
-    resetLocation();
-    XPLMSetWindowGeometry(windowID, left, top, right, bottom);
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::drawWindow()
-{
-    static float colour[3] = { 0.2, 1.0, 0.65 };
-
-    float now = XPLMGetElapsedTime();
-
-    float d = getNewMessage(displayedMessage);
-    if (d>0.0) {
-        showTime = now;
-        hideTime = now + d;
-    }
-
-    if (now>=hideTime) hideTime = 0.0;
-
-    if (hideTime==0.0 && !showForced) {
-        XPLMSetWindowIsVisible(windowID, 0);
-    } else {
-        XPLMDrawTranslucentDarkBox(left, top, right, bottom);
-        if (hideTime!=0.0) {
-            size_t offset = 0;
-            if  (displayedMessage.size()>maxMessageLength &&
-                 now > (showTime + scrollTimeout) )
-            {
-                offset = (now - showTime - scrollTimeout) /
-                    scrollInterval;
-                offset = min(offset,
-                             displayedMessage.size() - maxMessageLength);
-            }
-
-            string dm(displayedMessage, offset, maxMessageLength);
-
-            XPLMDrawString(colour,
-                           left + horizontalMarginSize,
-                           bottom + verticalMarginSize + baseLineSize,
-                           const_cast<char*>(dm.c_str()), 0,
-                           xplmFont_Basic);
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::handleKey(char key, XPLMKeyFlags flags, char virtualKey,
-                              bool losingFocus)
-{
-    Util::debug("hu.varadiistvan.xplra.MessageWindow.handleKey: key=0x%02d (%c), flags=0x%04x, virtualKey=0x%02d (%c), losingFocus=%d\n",
-                key, key, flags, virtualKey, virtualKey, losingFocus);
-}
-
-//------------------------------------------------------------------------------
-
-bool MessageWindow::handleMouseClick(int x, int y, XPLMMouseStatus mouse)
-{
-    if (mouse==xplm_MouseDown) {
-        if (x <= (left + resizeArea) ) {
-            mouseMode = MOUSE_RESIZE_LEFT;
-        } else if (x > (right-resizeArea) ) {
-            mouseMode = MOUSE_RESIZE_RIGHT;
-        } else {
-            mouseMode = MOUSE_MOVE;
-        }
-        clickedX = x;
-        clickedY = y;
-        clickedLeft = left;
-        clickedTop = top;
-        clickedRight = right;
-        clickedBottom = bottom;
-    } else if (mouse==xplm_MouseDrag) {
-        int xDiff = x - clickedX;
-
-        if (mouseMode==MOUSE_MOVE) {
-            int newLeft = clickedLeft + xDiff;
-            int newRight = clickedRight + xDiff;
-
-            int screenWidth = XPLMGetDatai(widthDataRef);
-            if (newLeft>=0 && newRight<screenWidth) {
-                left = newLeft;
-                right = newRight;
-            }
-
-            int yDiff = y - clickedY;
-            int newTop = clickedTop + yDiff;
-            int newBottom = clickedBottom + yDiff;
-
-            int screenHeight = XPLMGetDatai(heightDataRef);
-            if (newTop<screenHeight && newBottom>=0) {
-                top = newTop;
-                bottom = newBottom;
-            }
-        } else if (mouseMode==MOUSE_RESIZE_LEFT) {
-            int newLeft = clickedLeft + xDiff;
-            if (newLeft>=0 && (right-newLeft)>=minimalWidth) {
-                left = newLeft;
-                recalculateMaxMessageLength();
-            }
-        } else if (mouseMode==MOUSE_RESIZE_RIGHT) {
-            int newRight = clickedRight + xDiff;
-            int screenWidth = XPLMGetDatai(widthDataRef);
-            if (newRight<screenWidth && (newRight-left)>=minimalWidth) {
-                right = newRight;
-                recalculateMaxMessageLength();
-            }
-        }
-
-        XPLMSetWindowGeometry(windowID, left, top, right, bottom);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-float MessageWindow::getNewMessage(std::string& dest)
-{
-    mutex.lock();
-
-    float d = duration;
-    if (d>0.0) {
-        dest = message;
-
-        message.clear();
-        duration = 0.0;
-    }
-
-    mutex.unlock();
-
-    return d;
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::setNewMessage(const std::string& msg, float d)
-{
-    mutex.lock();
-    message = msg;
-    duration = d;
-    mutex.unlock();
-
-    XPLMSetWindowIsVisible(windowID, 1);
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::resetLocation()
-{
-    int screenWidth = XPLMGetDatai(widthDataRef);
-    int screenHeight = XPLMGetDatai(heightDataRef);
-
-    // Util::debug("hu.varadiistvan.xplra.MessageWindow: screenWidth=%d, screenHeight=%d\n",
-    //             screenWidth, screenHeight);
-
-    left = 50;
-    right = screenWidth - left;
-
-    top = screenHeight * 9 / 10;
-    bottom = top - fontHeight - 2*verticalMarginSize;
-
-    recalculateMaxMessageLength();
-}
-
-//------------------------------------------------------------------------------
-
-void MessageWindow::recalculateMaxMessageLength()
-{
-    maxMessageLength = (right + 1 - left) - 2 * horizontalMarginSize;
-    maxMessageLength /= fontWidth;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/MessageWindow.h
===================================================================
--- src/plugin/src/xplra/MessageWindow.h	(revision 92)
+++ 	(revision )
@@ -1,325 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_MESSAGEWINDOW_H
-#define XPLRA_MESSAGEWINDOW_H
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Mutex.h>
-
-#include <string>
-
-#include <XPLMDataAccess.h>
-#include <XPLMDisplay.h>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Class to handle the activities related to the message window.
- */
-class MessageWindow
-{
-private:
-    /**
-     * Window drawing callback.
-     */
-    static void drawWindowCallback(XPLMWindowID windowID, void* refCon);
-
-    /**
-     * Handle the keypresses.
-     */
-    static void handleKeyCallback(XPLMWindowID windowID, char key,
-                                  XPLMKeyFlags flags, char virtualKey,
-                                  void* refCon, int losingFocus);
-
-    /**
-     * Handle the mouse clicks.
-     */
-    static int handleMouseClickCallback(XPLMWindowID windowID, int x, int y,
-                                        XPLMMouseStatus mouse, void* refCon);
-
-
-    /**
-     * The minimal width of the message area.
-     */
-    static const int minimalWidth = 150;
-
-    /**
-     * The size of the resize sensitivity area.
-     */
-    static const int resizeArea = 50;
-
-    /**
-     * The size of the margins at each side of the window.
-     */
-    static const int horizontalMarginSize = 25;
-
-    /**
-     * The size of the margins at the top and the bottom of the window.
-     */
-    static const int verticalMarginSize = 5;
-
-    /**
-     * The size for the baseline above the bottom of the letters.
-     */
-    static const int baseLineSize = 2;
-
-    /**
-     * The amount of time in seconds after which the message is
-     * started to be scrolled, if it should be scrolled.
-     */
-    static constexpr float scrollTimeout = 1.0;
-
-    /**
-     * The amount of time in seconds between each character step.
-     */
-    static constexpr float scrollInterval = 0.1;
-
-private:
-    /**
-     * The dataref containing the width of the program's window.
-     */
-    XPLMDataRef widthDataRef;
-
-    /**
-     * The dataref containing the height of the program's window.
-     */
-    XPLMDataRef heightDataRef;
-
-    /**
-     * The width of one character of the font.
-     */
-    int fontWidth;
-
-    /**
-     * The height of one character of the font.
-     */
-    int fontHeight;
-
-    /**
-     * The window ID.
-     */
-    XPLMWindowID windowID;
-
-    /**
-     * The X-coordinate of the left side of the window.
-     */
-    int left;
-
-    /**
-     * The Y-coordinate of the top of the window.
-     */
-    int top;
-
-    /**
-     * The X-coordinate of the right side of the window.
-     */
-    int right;
-
-    /**
-     * The Y-coordinate of the bottom of the window.
-     */
-    int bottom;
-
-    /**
-     * The maximal message length.
-     */
-    size_t maxMessageLength;
-
-    /**
-     * Indicate if the message window should be shown
-     */
-    bool showForced;
-
-    /**
-     * The currently displayed message.
-     */
-    std::string displayedMessage;
-
-    /**
-     * The time the current message was shown.
-     */
-    float showTime;
-
-    /**
-     * The time to hide the current message. If not positive, no
-     * message is currently shown.
-     */
-    float hideTime;
-
-    /**
-     * The mouse mode
-     */
-    enum {
-        // Move the message area
-        MOUSE_MOVE,
-
-        // Resize the message area from the left
-        MOUSE_RESIZE_LEFT,
-
-        // Resize the message area from the right.
-        MOUSE_RESIZE_RIGHT
-    } mouseMode;
-
-    /**
-     * The X-coordinate where the window was clicked.
-     */
-    int clickedX;
-
-    /**
-     * The Y-coordinate where the window was clicked.
-     */
-    int clickedY;
-
-    /**
-     * The left coordinate of the window when it was clicked.
-     */
-    int clickedLeft;
-
-    /**
-     * The top coordinate of the window when it was clicked.
-     */
-    int clickedTop;
-
-    /**
-     * The right coordinate of the window when it was clicked.
-     */
-    int clickedRight;
-
-    /**
-     * The bottom coordinate of the window when it was clicked.
-     */
-    int clickedBottom;
-
-    /**
-     * The mutex protecting some of the data structures that are used
-     * from both the simulator loop and the server thread.
-     */
-    hu::varadiistvan::scpl::Mutex mutex;
-
-    /**
-     * The message to show.
-     */
-    std::string message;
-
-    /**
-     * The number of seconds for which the message should be shown. If
-     * positive, there is a new message.
-     */
-    float duration;
-
-public:
-    /**
-     * Construct the message window. It creates the X-Plane window and
-     * registers the callback functions. The window is hidden
-     * initially.
-     */
-    MessageWindow();
-
-    /**
-     * Destroy the message window. It destroys the X-Plane window.
-     */
-    ~MessageWindow();
-
-    /**
-     * Force showing the message window.
-     */
-    void show();
-
-    /**
-     * Hide the message window if it does not have to display an
-     * actual message.
-     */
-    void hide();
-
-    /**
-     * Reset the location of the message window.
-     */
-    void reset();
-
-private:
-    /**
-     * Called from the window drawing callback.
-     */
-    void drawWindow();
-
-    /**
-     * Called from the key handling callback.
-     */
-    void handleKey(char key, XPLMKeyFlags flags, char virtualKey,
-                   bool losingFocus);
-
-    /**
-     * Called from the mouse click handling callback.
-     *
-     * @return true if the click is consumed, false otherwise.
-     */
-    bool handleMouseClick(int x, int y, XPLMMouseStatus mouse);
-
-    /**
-     * Get the new message, if any.
-     *
-     * @return the duration of the message, or 0.0 if there is no new
-     * message. The message will be cleared.
-     */
-    float getNewMessage(std::string& dest);
-
-    /**
-     * Set the new message, if any.
-     */
-    void setNewMessage(const std::string& msg, float d);
-
-    /**
-     * Reset the location of the message window.
-     */
-    void resetLocation();
-
-    /**
-     * Recalculate the maximal message length.
-     */
-    void recalculateMaxMessageLength();
-
-    friend class MessageRequest;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_MESSAGEWINDOW_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/MultiTaskRequest.cc
===================================================================
--- src/plugin/src/xplra/MultiTaskRequest.cc	(revision 13)
+++ 	(revision )
@@ -1,70 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "MultiTaskRequest.h"
-
-#include "Task.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::MultiTaskRequest;
-
-using hu::varadiistvan::xplcommon::Util;
-
-//------------------------------------------------------------------------------
-
-MultiTaskRequest::~MultiTaskRequest()
-{
-    for(tasks_t::iterator i = tasks.begin(); i!=tasks.end(); ++i) {
-        delete *i;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void MultiTaskRequest::execute()
-{
-    // Util::debug("hu.varadiistvan.xplra.MultiTaskRequest[%p]::execute\n", this);
-    for(tasks_t::iterator i = tasks.begin(); i!=tasks.end(); ++i) {
-        // Util::debug("hu.varadiistvan.xplra.MultiTaskRequest[%p]::execute: task=%p\n",
-        //             this, *i);
-        (*i)->perform();
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/MultiTaskRequest.h
===================================================================
--- src/plugin/src/xplra/MultiTaskRequest.h	(revision 13)
+++ 	(revision )
@@ -1,170 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_MULTITASKREQUEST_H
-#define XPLRA_MULTITASKREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "Request.h"
-
-#include <vector>
-
-#include <cstdlib>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class Task;
-
-//------------------------------------------------------------------------------
-
-/**
- * A request containing several tasks which it performs one-by-one
- * when executing the request. It owns the tasks, which get deleted
- * when the request object is deleted.
- */
-class MultiTaskRequest : public Request
-{
-private:
-    /**
-     * Type for the vector of the tasks.
-     */
-    typedef std::vector<Task*> tasks_t;
-
-    /**
-     * The tasks.
-     */
-    tasks_t tasks;
-
-public:
-    /**
-     * Destroy the request by deleting the tasks.
-     */
-    virtual ~MultiTaskRequest();
-
-    /**
-     * Add a task to the request.
-     */
-    void addTask(Task* task);
-
-    /**
-     * Get the number of tasks.
-     */
-    size_t getNumTasks() const;
-
-    /**
-     * Get the task at the given index.
-     */
-    Task* getTask(size_t index) const;
-
-protected:
-    /**
-     * Perform the tasks one-by-one.
-     */
-    virtual void execute();
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A templated version of MultiTaskRequest, which accepts and returns
- * tasks of a given type only.
- */
-template <class TaskClass>
-class MultiTaskRequestTemplate : public MultiTaskRequest
-{
-public:
-    /**
-     * Add the given task.
-     */
-    void addTask(TaskClass* task);
-
-    /**
-     * Get the task at the given index.
-     */
-    TaskClass* getTask(size_t index) const;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline void MultiTaskRequest::addTask(Task* task)
-{
-    tasks.push_back(task);
-}
-
-//------------------------------------------------------------------------------
-
-inline size_t MultiTaskRequest::getNumTasks() const
-{
-    return tasks.size();
-}
-
-//------------------------------------------------------------------------------
-
-inline Task* MultiTaskRequest::getTask(size_t index) const
-{
-    return tasks[index];
-}
-
-//------------------------------------------------------------------------------
-// Template definitions
-//------------------------------------------------------------------------------
-
-template <class TaskClass>
-inline void MultiTaskRequestTemplate<TaskClass>::addTask(TaskClass* task)
-{
-    MultiTaskRequest::addTask(task);
-}
-
-//------------------------------------------------------------------------------
-
-template <class TaskClass>
-inline TaskClass*
-MultiTaskRequestTemplate<TaskClass>::getTask(size_t index) const
-{
-    return static_cast<TaskClass*>(MultiTaskRequest::getTask(index));
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_MULTITASKREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Protocol.h
===================================================================
--- src/plugin/src/xplra/Protocol.h	(revision 113)
+++ 	(revision )
@@ -1,291 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_PROTOCOL_H
-#define XPLRA_PROTOCOL_H
-//------------------------------------------------------------------------------
-
-#include <cstdlib>
-#include <inttypes.h>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Constants and helpers for the protocol.
- */
-class Protocol
-{
-public:
-    /**
-     * Command: get the value of a single dataref.
-     */
-    static const uint8_t COMMAND_GET_SINGLE = 0x01;
-
-    /**
-     * Command: set the value of a single dataref.
-     */
-    static const uint8_t COMMAND_SET_SINGLE = 0x02;
-
-    /**
-     * Command: get the value of a multiple datarefs.
-     */
-    static const uint8_t COMMAND_GET_MULTI = 0x03;
-
-    /**
-     * Command: set the value of a multiple datarefs.
-     */
-    static const uint8_t COMMAND_SET_MULTI = 0x04;
-
-    /**
-     * Command: register a multiple-data query request
-     */
-    static const uint8_t COMMAND_REGISTER_GET_MULTI = 0x11;
-
-    /**
-     * Command: unregister a multiple-data query request
-     */
-    static const uint8_t COMMAND_UNREGISTER_GET_MULTI = 0x12;
-
-    /**
-     * Command: execute a registered multiple-data query request
-     */
-    static const uint8_t COMMAND_EXECUTE_GET_MULTI = 0x13;
-
-    /**
-     * Command: register a multiple-data update request
-     */
-    static const uint8_t COMMAND_REGISTER_SET_MULTI = 0x21;
-
-    /**
-     * Command: unregister a multiple-data update request
-     */
-    static const uint8_t COMMAND_UNREGISTER_SET_MULTI = 0x22;
-
-    /**
-     * Command: execute a registered multiple-data update request
-     */
-    static const uint8_t COMMAND_EXECUTE_SET_MULTI = 0x23;
-
-    /**
-     * Command: get the versions of the simulator
-     */
-    static const uint8_t COMMAND_GET_VERSIONS = 0x31;
-
-    /**
-     * Command: reload the plugins
-     */
-    static const uint8_t COMMAND_RELOAD_PLUGINS = 0x32;
-
-    /**
-     * Command: save the current situation.
-     *
-     * Followed by a string containing the path of the file to save
-     * relative to the X-System directory.
-     */
-    static const uint8_t COMMAND_SAVE_SITUATION = 0x33;
-
-    /**
-     * Command: show a message in the message window.
-     */
-    static const uint8_t COMMAND_SHOW_MESSAGE = 0x41;
-
-    /**
-     * Command: register a set of hotkeys for the client. Old hotkeys,
-     * if any, are forgotten.
-     *
-     * The command is followed by the following data:
-     * - The number of the hotkeys defined (U32).
-     * - The code of the hotkeys (U16*number of the hotkeys).
-     *   The lower byte is the same as the X-Plane virtual key code
-     *   (the same as the ASCII code for numbers and upper-case letters),
-     *   the upper one is a logical OR of the HOTKEY_MODIFIER_XXX
-     *   codes.
-     *
-     * The reply consists of a result code only. It may fail with an
-     * invalid length code if the number of hotkeys is too large.
-     */
-    static const uint8_t COMMAND_REGISTER_HOTKEYS = 0x51;
-
-    /**
-     * Command: query the hotkeys.
-     *
-     * The reply consists of a result code, followed by the following
-     * data, if the result code is RESULT_OK:
-     * - The number of hotkeys defined (U32).
-     * - An array of U8 values each being 0 or 1 depending on whether
-     *   the corresponding hotkey has been pressed since the last
-     *   query (or the registration, whichever is later). The value at
-     *   index i corresponds to the hotkey code at index i in the
-     *   array passed with COMMAND_REGISTER_HOTKEYS.
-     *
-     * If not hotkey has been registered, the number of hotkeys is
-     * returned as 0.
-     */
-    static const uint8_t COMMAND_QUERY_HOTKEYS = 0x52;
-
-    /**
-     * Command: unregister the previously registered hotkeys.
-     *
-     * The reply is a result code.
-     */
-    static const uint8_t COMMAND_UNREGISTER_HOTKEYS = 0x53;
-
-    /**
-     * Data type: int
-     */
-    static const uint8_t TYPE_INT = 0x01;
-
-    /**
-     * Data type: float
-     */
-    static const uint8_t TYPE_FLOAT = 0x02;
-
-    /**
-     * Data type: double
-     */
-    static const uint8_t TYPE_DOUBLE = 0x03;
-
-    /**
-     * Data type: float array
-     */
-    static const uint8_t TYPE_FLOAT_ARRAY = 0x11;
-
-    /**
-     * Data type: int array
-     */
-    static const uint8_t TYPE_INT_ARRAY = 0x12;
-
-    /**
-     * Data type: byte array
-     */
-    static const uint8_t TYPE_BYTE_ARRAY = 0x13;
-
-    /**
-     * Result code: no error, everything is OK.
-     */
-    static const uint8_t RESULT_OK = 0x00;
-
-    /**
-     * Result code: invalid command
-     */
-    static const uint8_t RESULT_INVALID_COMMAND = 0x01;
-
-    /**
-     * Result code: unknown dataref
-     */
-    static const uint8_t RESULT_UNKNOWN_DATAREF = 0x02;
-
-    /**
-     * Result code: invalid type
-     */
-    static const uint8_t RESULT_INVALID_TYPE = 0x03;
-
-    /**
-     * Result code: invalid length
-     */
-    static const uint8_t RESULT_INVALID_LENGTH = 0x04;
-
-    /**
-     * Result code: invalid offset
-     */
-    static const uint8_t RESULT_INVALID_OFFSET = 0x05;
-
-    /**
-     * Result code: invalid count
-     */
-    static const uint8_t RESULT_INVALID_COUNT = 0x06;
-
-    /**
-     * Result code: invalid ID
-     */
-    static const uint8_t RESULT_INVALID_ID = 0x07;
-
-    /**
-     * Result code: invalid duration
-     */
-    static const uint8_t RESULT_INVALID_DURATION = 0x08;
-
-    /**
-     * Result code: other error
-     */
-    static const uint8_t RESULT_OTHER_ERROR = 0xff;
-
-    /**
-     * Hotkey modifier: shift
-     */
-    static const uint16_t HOTKEY_MODIFIER_SHIFT = 0x0100;
-
-    /**
-     * Hotkey modifier: control
-     */
-    static const uint16_t HOTKEY_MODIFIER_CONTROL = 0x0200;
-
-    /**
-     * The maximal length we accept (in order to protect ourselves).
-     */
-    static const int MAX_LENGTH = 2048;
-
-    /**
-     * The maximal count of requests in a multiple-data query or
-     * update.
-     */
-    static const size_t MAX_MULTI_COUNT = 1024;
-
-    /**
-     * The maximal message duration
-     */
-    static constexpr float MAX_MESSAGE_DURATION = 5*60;
-
-    /**
-     * The maximal number of hotkeys that can be registered for a
-     * client.
-     */
-    static const size_t MAX_HOTKEY_COUNT = 128;
-
-    /**
-     * The version of the plugin.
-     */
-    static const int version = 30;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_PROTOCOL_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/ReloadPluginsRequest.cc
===================================================================
--- src/plugin/src/xplra/ReloadPluginsRequest.cc	(revision 39)
+++ 	(revision )
@@ -1,52 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ReloadPluginsRequest.h"
-
-#include <XPLMPlugin.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::ReloadPluginsRequest;
-
-//------------------------------------------------------------------------------
-
-void ReloadPluginsRequest::execute()
-{
-    XPLMReloadPlugins();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/ReloadPluginsRequest.h
===================================================================
--- src/plugin/src/xplra/ReloadPluginsRequest.h	(revision 39)
+++ 	(revision )
@@ -1,64 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_RELOADPLUGINSREQUEST_H
-#define XPLRA_RELOADPLUGINSREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "Request.h"
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A request that simply reloads all plugins.
- */
-class ReloadPluginsRequest : public Request
-{
-protected:
-    /**
-     * Execute the request.
-     */
-    virtual void execute();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_RELOADPLUGINSREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Request.h
===================================================================
--- src/plugin/src/xplra/Request.h	(revision 13)
+++ 	(revision )
@@ -1,95 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_REQUEST_H
-#define XPLRA_REQUEST_H
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for requests. A request is something that is executed in
- * the flight loop.
- */
-class Request
-{
-private:
-    /**
-     * Indicate that the request is completed.
-     */
-    volatile bool completed;
-
-public:
-    /**
-     * Construct the request.
-     */
-    Request();
-
-    /**
-     * Virtual destructor.
-     */
-    virtual ~Request();
-
-protected:
-    /**
-     * Execute the request. Make this very fast!
-     */
-    virtual void execute() = 0;
-
-    friend class RequestQueue;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Request::Request() :
-    completed(false)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline Request::~Request()
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_REQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/RequestQueue.cc
===================================================================
--- src/plugin/src/xplra/RequestQueue.cc	(revision 13)
+++ 	(revision )
@@ -1,156 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "RequestQueue.h"
-
-#include "Request.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::RequestQueue;
-
-using hu::varadiistvan::xplcommon::Util;
-
-//------------------------------------------------------------------------------
-
-float RequestQueue::flightLoop(float /*inElapsedSinceLastCall*/,
-                               float /*inElapsedTimeSinceLastFlightLoop*/,
-                               int /*inCounter*/, void* inRefCon)
-{
-    RequestQueue* requestQueue = reinterpret_cast<RequestQueue*>(inRefCon);
-    requestQueue->run();
-#if USE_SCHEDULE_FLIGHTLOOP
-    return 0.0;
-#else
-    return flightLoopInterval;
-#endif
-}
-
-//------------------------------------------------------------------------------
-
-RequestQueue::RequestQueue() :
-    enabled(true)
-{
-#if USE_SCHEDULE_FLIGHTLOOP
-    XPLMCreateFlightLoop_t createFL;
-
-    createFL.structSize = sizeof(createFL);
-    createFL.phase = xplm_FlightLoop_Phase_AfterFlightModel;
-    createFL.callbackFunc = &flightLoop;
-    createFL.refcon = this;
-
-    flightLoopID = XPLMCreateFlightLoop(&createFL);
-#else
-    XPLMRegisterFlightLoopCallback(&flightLoop, flightLoopInterval, this);
-#endif
-}
-
-//------------------------------------------------------------------------------
-
-bool RequestQueue::execute(Request* request)
-{
-    mutex.lock();
-    if (!enabled) {
-        mutex.unlock();
-        return false;
-    }
-
-    request->completed = false;
-    requests.push_back(request);
-
-#if USE_SCHEDULE_FLIGHTLOOP
-    if (requests.size()==1) {
-        XPLMScheduleFlightLoop(flightLoopID, -2.0, true);
-    }
-#endif
-
-    while(enabled && !request->completed) {
-        requestsDone.wait(mutex);
-    }
-
-    bool result = request->completed;
-
-    mutex.unlock();
-
-    return result;
-}
-
-//------------------------------------------------------------------------------
-
-void RequestQueue::disable()
-{
-    mutex.lock();
-    enabled = false;
-    mutex.unlock();
-    requestsDone.broadcast();
-#if USE_SCHEDULE_FLIGHTLOOP
-    XPLMDestroyFlightLoop(flightLoopID);
-#else
-    XPLMUnregisterFlightLoopCallback(&flightLoop, this);
-#endif
-}
-
-//------------------------------------------------------------------------------
-
-void RequestQueue::run()
-{
-    requests_t queuedRequests;
-
-    mutex.lock();
-    requests.swap(queuedRequests);
-    mutex.unlock();
-
-    if (queuedRequests.empty()) return;
-
-    for(requests_t::const_iterator i = queuedRequests.begin();
-        i!=queuedRequests.end(); ++i)
-    {
-        (*i)->execute();
-    }
-
-    mutex.lock();
-    for(requests_t::const_iterator i = queuedRequests.begin();
-        i!=queuedRequests.end(); ++i)
-    {
-        (*i)->completed = true;
-    }
-    mutex.unlock();
-    requestsDone.broadcast();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/RequestQueue.h
===================================================================
--- src/plugin/src/xplra/RequestQueue.h	(revision 92)
+++ 	(revision )
@@ -1,168 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_REQUESTQUEUE_H
-#define XPLRA_REQUESTQUEUE_H
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/scpl/Mutex.h>
-#include <hu/varadiistvan/scpl/CondVar.h>
-
-#include <XPLMProcessing.h>
-
-#include <vector>
-
-//------------------------------------------------------------------------------
-
-// Define to 1, if the new XPLMScheduleFlightLoop function should be
-// used to schedule the flight loop only on-demand
-#define USE_SCHEDULE_FLIGHTLOOP 0
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class Request;
-
-//------------------------------------------------------------------------------
-
-/**
- * The queue of the requests. Client serving threads can add requests
- * to the queue. The queue provides a flight loop callback, which it
- * automatically schedules if a request is added to it, unless we are
- * already disabled.
- *
- * An instance of the queue should be created in the plugin enable
- * callback. The disable callback should disable the queue, so that it
- * will not accept any further requests.
- */
-class RequestQueue
-{
-private:
-    /**
-     * Type for the collection of the queued requests.
-     */
-    typedef std::vector<Request*> requests_t;
-
-#if !USE_SCHEDULE_FLIGHTLOOP
-    /**
-     * The interval of the flight loop.
-     */
-    static constexpr float flightLoopInterval = 0.1;
-#endif
-
-    /**
-     * The flight loop function.
-     */
-    static float flightLoop(float inElapsedSinceLastCall,
-                            float inElapsedTimeSinceLastFlightLoop,
-                            int inCounter, void* inRefCon);
-
-#if USE_SCHEDULE_FLIGHTLOOP
-    /**
-     * The ID of the flight loop running the queue.
-     */
-    XPLMFlightLoopID flightLoopID;
-#endif
-
-    /**
-     * The mutex protecting the queue.
-     */
-    hu::varadiistvan::scpl::Mutex mutex;
-
-    /**
-     * A conditional variable to notify the threads waiting for their
-     * request to be executed.
-     */
-    hu::varadiistvan::scpl::CondVar requestsDone;
-
-    /**
-     * Indicate if the queue is enabled or not.
-     */
-    volatile bool enabled;
-
-    /**
-     * The vector of the queued requests.
-     */
-    requests_t requests;
-
-public:
-    /**
-     * Construct the queue. It creates the flight loop, so it should
-     * be called from a plugin callback.
-     */
-    RequestQueue();
-
-    /**
-     * Execute the given request. It will be enqueued, and then this
-     * function will wait until the request is executed or the request
-     * queue is disabled.
-     *
-     * If the queue is already disabled when calling this function, it
-     * returns immediately with false.
-     *
-     * @return if the request was executed
-     */
-    bool execute(Request* request);
-
-    /**
-     * Disable the queue. It sets the flag indicating that the queue
-     * is disabled, and wakes up all waiters waiting on the
-     * conditional variable. It should be called from a plugin
-     * callback, as it also destroys the flight loop.
-     */
-    void disable();
-
-private:
-    /**
-     * Run the queue.
-     *
-     * It locks the mutex, swaps the vector of requests with an empty
-     * one, unlocks the mutex and runs the requests one by one. When
-     * all requests are executed, it wakes up all waiters waiting on
-     * the conditional variable.
-     *
-     * It is called from the flight loop function.
-     */
-    void run();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_REQUESTQUEUE_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/SaveSituationRequest.cc
===================================================================
--- src/plugin/src/xplra/SaveSituationRequest.cc	(revision 81)
+++ 	(revision )
@@ -1,61 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "SaveSituationRequest.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-#include <XPLMUtilities.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::SaveSituationRequest;
-
-using hu::varadiistvan::xplcommon::Util;
-
-//------------------------------------------------------------------------------
-
-void SaveSituationRequest::execute()
-{
-    int result = XPLMSaveDataFile(xplm_DataFile_Situation,
-                                  path.c_str());
-    success = result==1;
-    if (!success) {
-        Util::debug("xplra::SaveSituationRequest::execute: result=%d\n", result);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/SaveSituationRequest.h
===================================================================
--- src/plugin/src/xplra/SaveSituationRequest.h	(revision 81)
+++ 	(revision )
@@ -1,105 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_SAVESITUATIONREQUEST_H
-#define XPLRA_SAVESITUATIONREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "Request.h"
-
-#include <string>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A request that saves the current situation into a file.
- */
-class SaveSituationRequest : public Request
-{
-private:
-    /**
-     * The path to save the situation into.
-     */
-    std::string path;
-
-    /**
-     * Indicate the success.
-     */
-    bool success;
-
-public:
-    /**
-     * Construct the request.
-     */
-    SaveSituationRequest(const std::string& path);
-
-    /**
-     * Get the result.
-     */
-    bool getSuccess() const;
-
-protected:
-    /**
-     * Execute the request.
-     */
-    virtual void execute();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline SaveSituationRequest::SaveSituationRequest(const std::string& path) :
-    path(path),
-    success(false)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline bool SaveSituationRequest::getSuccess() const
-{
-    return success;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_SAVESITUATIONREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/ServerThread.cc
===================================================================
--- src/plugin/src/xplra/ServerThread.cc	(revision 104)
+++ 	(revision )
@@ -1,547 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ServerThread.h"
-
-#include "ListenThread.h"
-#include "RequestQueue.h"
-#include "Protocol.h"
-#include "GetDataRefTask.h"
-#include "SetDataRefTask.h"
-#include "TaskRequest.h"
-#include "GetMultiDataRefRequest.h"
-#include "SetMultiDataRefRequest.h"
-#include "ReloadPluginsRequest.h"
-#ifdef XPLM200
-#include "SaveSituationRequest.h"
-#endif
-#include "MessageRequest.h"
-#include "Globals.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-
-#include <cstdio>
-
-//------------------------------------------------------------------------------
-
-using xplra::ServerThread;
-
-using hu::varadiistvan::scpl::io::BufferedStreamAcceptor;
-using hu::varadiistvan::scpl::Mutex;
-using hu::varadiistvan::xplcommon::Util;
-
-using std::string;
-
-//------------------------------------------------------------------------------
-
-Mutex ServerThread::instancesMutex;
-
-ServerThread::instances_t ServerThread::instances;
-
-//------------------------------------------------------------------------------
-
-void ServerThread::quitAll()
-{
-    instancesMutex.lock();
-    for(instances_t::iterator i = instances.begin(); i!=instances.end(); ++i) {
-        ServerThread* thread = *i;
-        thread->quit();
-        thread->join();
-        delete thread;
-    }
-    instances.clear();
-    instancesMutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-
-inline bool ServerThread::destroyHotkeys()
-{
-    if (hotkeys!=0) {
-        listenThread.getGlobals().getHotkeyHandler().unregisterHotkeys(hotkeys);
-        delete hotkeys; hotkeys = 0;
-        return true;
-    } else {
-        return false;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-ServerThread::ServerThread(ListenThread& listenThread,
-                           RequestQueue& requestQueue,
-                           BufferedStreamAcceptor& acceptor) :
-    listenThread(listenThread),
-    requestQueue(requestQueue),
-    bufferedStream(acceptor.getAcceptedBufferedStream(&waiter)),
-    stream(*bufferedStream),
-    nextGetMultiRequestID(1),
-    nextSetMultiRequestID(1),
-    hotkeys(0)
-{
-    instancesMutex.lock();
-    instances.insert(this);
-    instancesMutex.unlock();
-}
-
-//------------------------------------------------------------------------------
-
-ServerThread::~ServerThread()
-{
-    delete bufferedStream;
-
-    for(getMultiRequests_t::iterator i = getMultiRequests.begin();
-        i!=getMultiRequests.end(); ++i)
-    {
-        delete i->second;
-    }
-
-    for(setMultiRequests_t::iterator i = setMultiRequests.begin();
-        i!=setMultiRequests.end(); ++i)
-    {
-        delete i->second;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::quit()
-{
-    stream.interrupt();
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    Util::debug("hu.varadiistvan.xplra.ServerThread[%p]::run\n", this);
-    while(stream) {
-        uint8_t command = stream.readU8();
-        if (!stream) continue;
-
-        // Util::debug("hu.varadiistvan.xplra.ServerThread[%p]::run: command=0x%02x\n",
-        //             this, command);
-
-        if (command==Protocol::COMMAND_GET_SINGLE) {
-            if (!handleGetSingle()) break;
-        } else if (command==Protocol::COMMAND_SET_SINGLE) {
-            if (!handleSetSingle()) break;
-        } else if (command==Protocol::COMMAND_GET_MULTI) {
-            if (!handleGetMulti()) break;
-        } else if (command==Protocol::COMMAND_SET_MULTI) {
-            if (!handleSetMulti()) break;
-        } else if (command==Protocol::COMMAND_REGISTER_GET_MULTI) {
-            if (!handleRegisterGetMulti()) break;
-        } else if (command==Protocol::COMMAND_UNREGISTER_GET_MULTI) {
-            if (!handleUnregisterGetMulti()) break;
-        } else if (command==Protocol::COMMAND_EXECUTE_GET_MULTI) {
-            if (!handleExecuteGetMulti()) break;
-        } else if (command==Protocol::COMMAND_REGISTER_SET_MULTI) {
-            if (!handleRegisterSetMulti()) break;
-        } else if (command==Protocol::COMMAND_UNREGISTER_SET_MULTI) {
-            if (!handleUnregisterSetMulti()) break;
-        } else if (command==Protocol::COMMAND_EXECUTE_SET_MULTI) {
-            if (!handleExecuteSetMulti()) break;
-        } else if (command==Protocol::COMMAND_GET_VERSIONS) {
-            if (!handleGetVersions()) break;
-        } else if (command==Protocol::COMMAND_RELOAD_PLUGINS) {
-            if (!handleReloadPlugins()) break;
-#ifdef XPLM200
-        } else if (command==Protocol::COMMAND_SAVE_SITUATION) {
-            if (!handleSaveSituation()) break;
-#endif
-        } else if (command==Protocol::COMMAND_SHOW_MESSAGE) {
-            if (!handleShowMessage()) break;
-        } else if (command==Protocol::COMMAND_REGISTER_HOTKEYS) {
-            if (!handleRegisterHotkeys()) break;
-        } else if (command==Protocol::COMMAND_QUERY_HOTKEYS) {
-            if (!handleQueryHotkeys()) break;
-        } else if (command==Protocol::COMMAND_UNREGISTER_HOTKEYS) {
-            if (!handleUnregisterHotkeys()) break;
-        } else {
-            stream.writeU8(Protocol::RESULT_INVALID_COMMAND);
-        }
-        stream.flush();
-    }
-
-    destroyHotkeys();
-
-    Util::debug("hu.varadiistvan.xplra.ServerThread[%p]::run: quitting\n", this);
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleGetSingle()
-{
-    uint8_t result = Protocol::RESULT_OK;
-    GetDataRefTask* task = GetDataRefTask::create(result, stream);
-
-    if (!stream) {
-        return false;
-    } else if (task==0) {
-        stream.writeU8(result);
-        return true;
-    }
-
-    TaskRequest request(task);
-    if (!requestQueue.execute(&request)) return false;
-
-    if (task->isValid()) {
-        stream.writeU8(Protocol::RESULT_OK);
-        task->writeValue(stream);
-    } else {
-        stream.writeU8(Protocol::RESULT_UNKNOWN_DATAREF);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleSetSingle()
-{
-    uint8_t result = Protocol::RESULT_OK;
-    SetDataRefTask* task = SetDataRefTask::create(result, stream);
-
-    if (!stream) {
-        return false;
-    } else if (task==0) {
-        stream.writeU8(result);
-        return true;
-    }
-
-    task->readValue(stream);
-    if (!stream) {
-        delete task;
-        return false;
-    }
-
-    TaskRequest request(task);
-    if (!requestQueue.execute(&request)) return false;
-
-    stream.writeU8(task->isValid() ? Protocol::RESULT_OK :
-                   Protocol::RESULT_UNKNOWN_DATAREF);
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleGetMulti()
-{
-    uint8_t result = Protocol::RESULT_OK;
-    GetMultiDataRefRequest* request =
-        new GetMultiDataRefRequest(result, stream);
-    if (result!=Protocol::RESULT_OK || !stream) {
-        delete request;
-        stream.writeU8(result);
-        return stream;
-    }
-
-    bool isOK = requestQueue.execute(request);
-
-    if (isOK) {
-        request->writeResult(stream);
-    }
-
-    delete request;
-
-    return isOK;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleSetMulti()
-{
-    uint8_t result = Protocol::RESULT_OK;
-    SetMultiDataRefRequest* request =
-        new SetMultiDataRefRequest(result, stream, true);
-    if (result!=Protocol::RESULT_OK || !stream) {
-        delete request;
-        stream.writeU8(result);
-        return stream;
-    }
-
-    bool isOK = requestQueue.execute(request);
-
-    if (isOK) {
-        request->writeResult(stream);
-    }
-
-    delete request;
-
-    return isOK;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleRegisterGetMulti()
-{
-    uint8_t result = Protocol::RESULT_OK;
-    GetMultiDataRefRequest* request =
-        new GetMultiDataRefRequest(result, stream);
-    if (result!=Protocol::RESULT_OK || !stream) {
-        delete request;
-        stream.writeU8(result);
-        return stream;
-    }
-
-    size_t id = nextGetMultiRequestID++;
-    getMultiRequests[id] = request;
-
-    stream.writeU8(Protocol::RESULT_OK);
-    stream.writeU32(id);
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleUnregisterGetMulti()
-{
-    uint32_t id = stream.readU32();
-    if (!stream) return false;
-
-    getMultiRequests_t::iterator i = getMultiRequests.find(id);
-    if (i==getMultiRequests.end()) {
-        stream.writeU8(Protocol::RESULT_INVALID_ID);
-    } else {
-        GetMultiDataRefRequest* request = i->second;
-        getMultiRequests.erase(i);
-        delete request;
-        stream.writeU8(Protocol::RESULT_OK);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleExecuteGetMulti()
-{
-    uint32_t id = stream.readU32();
-    if (!stream) return false;
-
-    getMultiRequests_t::iterator i = getMultiRequests.find(id);
-    if (i==getMultiRequests.end()) {
-        stream.writeU8(Protocol::RESULT_INVALID_ID);
-    } else {
-        GetMultiDataRefRequest* request = i->second;
-        if (!requestQueue.execute(request)) return false;
-        request->writeResult(stream);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleRegisterSetMulti()
-{
-    uint8_t result = Protocol::RESULT_OK;
-    SetMultiDataRefRequest* request =
-        new SetMultiDataRefRequest(result, stream, false);
-    if (result!=Protocol::RESULT_OK || !stream) {
-        delete request;
-        stream.writeU8(result);
-        return stream;
-    }
-
-    size_t id = nextSetMultiRequestID++;
-    setMultiRequests[id] = request;
-
-    stream.writeU8(Protocol::RESULT_OK);
-    stream.writeU32(id);
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleUnregisterSetMulti()
-{
-    uint32_t id = stream.readU32();
-    if (!stream) return false;
-
-    setMultiRequests_t::iterator i = setMultiRequests.find(id);
-    if (i==setMultiRequests.end()) {
-        stream.writeU8(Protocol::RESULT_INVALID_ID);
-    } else {
-        SetMultiDataRefRequest* request = i->second;
-        setMultiRequests.erase(i);
-        delete request;
-        stream.writeU8(Protocol::RESULT_OK);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleExecuteSetMulti()
-{
-    uint32_t id = stream.readU32();
-    if (!stream) return false;
-
-    setMultiRequests_t::iterator i = setMultiRequests.find(id);
-    if (i==setMultiRequests.end()) {
-        stream.writeU8(Protocol::RESULT_INVALID_ID);
-    } else {
-        SetMultiDataRefRequest* request = i->second;
-        request->readValues(stream);
-        if (!stream || !requestQueue.execute(request)) return false;
-        request->writeResult(stream);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleGetVersions()
-{
-    int xplaneVersion = 0;
-    int xplmVersion = 0;
-
-    listenThread.getGlobals().getVersions(xplaneVersion, xplmVersion);
-
-    stream.writeU8(Protocol::RESULT_OK);
-    stream.writeS32(xplaneVersion);
-    stream.writeS32(xplmVersion);
-    stream.writeS32(Protocol::version);
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleReloadPlugins()
-{
-    ReloadPluginsRequest request;
-    if (!requestQueue.execute(&request)) return false;
-
-    stream.writeU8(Protocol::RESULT_OK);
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-#ifdef XPLM200
-
-bool ServerThread::handleSaveSituation()
-{
-    string path = stream.readString();
-    SaveSituationRequest request(path);
-    if (!requestQueue.execute(&request)) return false;
-
-    stream.writeU8(request.getSuccess() ? Protocol::RESULT_OK :
-                   Protocol::RESULT_OTHER_ERROR);
-
-    return true;
-}
-
-#endif
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleShowMessage()
-{
-    string message = stream.readString();
-    float duration = stream.readFloat();
-    if (!stream) return false;
-
-    if (duration>Protocol::MAX_MESSAGE_DURATION) {
-        stream.writeU8(Protocol::RESULT_INVALID_DURATION);
-    } else {
-        MessageRequest request(listenThread.getGlobals().getMessageWindow(),
-                               message, duration);
-        if (!requestQueue.execute(&request)) return false;
-
-        stream.writeU8(Protocol::RESULT_OK);
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleRegisterHotkeys()
-{
-    size_t numHotkeys = stream.readU32();
-    if (!stream) return false;
-
-    if (numHotkeys>Protocol::MAX_HOTKEY_COUNT) {
-        stream.writeU8(Protocol::RESULT_INVALID_LENGTH);
-    } else {
-        HotkeyHandler::Hotkeys* newHotkeys =
-            new HotkeyHandler::Hotkeys(numHotkeys, stream);
-        if (newHotkeys->isValid()) {
-            destroyHotkeys();
-            hotkeys = newHotkeys;
-            listenThread.getGlobals().getHotkeyHandler().registerHotkeys(hotkeys);
-            stream.writeU8(Protocol::RESULT_OK);
-        } else {
-            delete newHotkeys;
-            return false;
-        }
-    }
-
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleQueryHotkeys()
-{
-    stream.writeU8(Protocol::RESULT_OK);
-    if (hotkeys==0) {
-        stream.writeU32(0);
-    } else {
-        hotkeys->writePressed(stream);
-    }
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-bool ServerThread::handleUnregisterHotkeys()
-{
-    destroyHotkeys();
-    stream.writeU8(Protocol::RESULT_OK);
-    return true;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/ServerThread.h
===================================================================
--- src/plugin/src/xplra/ServerThread.h	(revision 104)
+++ 	(revision )
@@ -1,318 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_SERVERTHREAD_H
-#define XPLRA_SERVERTHREAD_H
-//------------------------------------------------------------------------------
-
-#include "HotkeyHandler.h"
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/BufferedStream.h>
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-#include <hu/varadiistvan/scpl/io/BufferedStreamAcceptor.h>
-
-#include <hu/varadiistvan/scpl/Mutex.h>
-
-#include <set>
-#include <map>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-class ListenThread;
-
-class RequestQueue;
-
-class GetMultiDataRefRequest;
-class SetMultiDataRefRequest;
-
-//------------------------------------------------------------------------------
-
-/**
- * A thread serving a client.
- */
-class ServerThread : public hu::varadiistvan::scpl::Thread
-{
-private:
-    /**
-     * Type for the set of server thread instances.
-     */
-    typedef std::set<ServerThread*> instances_t;
-
-    /**
-     * Type for the registered multiple-data query requests.
-     */
-    typedef std::map<size_t, GetMultiDataRefRequest*> getMultiRequests_t;
-
-    /**
-     * Type for the registered multiple-data update requests.
-     */
-    typedef std::map<size_t, SetMultiDataRefRequest*> setMultiRequests_t;
-
-    /**
-     * A mutex to protect the collection of server threads.
-     */
-    static hu::varadiistvan::scpl::Mutex instancesMutex;
-
-    /**
-     * The instances of this class.
-     */
-    static instances_t instances;
-
-public:
-    /**
-     * Call quit() an all threads.
-     */
-    static void quitAll();
-
-private:
-    /**
-     * The listen thread this server was started by.
-     */
-    ListenThread& listenThread;
-
-    /**
-     * The request queue to use.
-     */
-    RequestQueue& requestQueue;
-
-    /**
-     * Our waiter.
-     */
-    hu::varadiistvan::scpl::io::Waiter waiter;
-
-    /**
-     * The buffered stream to use for communication at the low-level.
-     */
-    hu::varadiistvan::scpl::io::BufferedStream* bufferedStream;
-
-    /**
-     * The data stream being used for communication.
-     */
-    hu::varadiistvan::scpl::io::DataStream stream;
-
-    /**
-     * The ID of the next multiple-data query request.
-     */
-    size_t nextGetMultiRequestID;
-
-    /**
-     * The registered multiple-data query requests.
-     */
-    getMultiRequests_t getMultiRequests;
-
-    /**
-     * The ID of the next multiple-data update request.
-     */
-    size_t nextSetMultiRequestID;
-
-    /**
-     * The registered multiple-data query requests.
-     */
-    setMultiRequests_t setMultiRequests;
-
-    /**
-     * The set of hotkeys currently being handled.
-     */
-    HotkeyHandler::Hotkeys* hotkeys;
-
-public:
-    /**
-     * Construct the thread by using a LocalSocket returned by the
-     * given acceptor.
-     */
-    ServerThread(ListenThread& listenThread, RequestQueue& requestQueue,
-                 hu::varadiistvan::scpl::io::BufferedStreamAcceptor& acceptor);
-
-    /**
-     * Destroy the thread.
-     */
-    virtual ~ServerThread();
-
-    /**
-     * Quit the thread. It interrupts the blocking stream.
-     */
-    void quit();
-
-    /**
-     * Perform the thread's operation.
-     */
-    virtual void run();
-
-private:
-    /**
-     * Handle the COMMAND_GET_SINGLE command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleGetSingle();
-
-    /**
-     * Handle the COMMAND_SET_SINGLE command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleSetSingle();
-
-    /**
-     * Handle the COMMAND_GET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleGetMulti();
-
-    /**
-     * Handle the COMMAND_SET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleSetMulti();
-
-    /**
-     * Handle the COMMAND_REGISTER_GET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleRegisterGetMulti();
-
-    /**
-     * Handle the COMMAND_UNREGISTER_GET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleUnregisterGetMulti();
-
-    /**
-     * Handle the COMMAND_EXECUTE_GET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleExecuteGetMulti();
-
-    /**
-     * Handle the COMMAND_REGISTER_SET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleRegisterSetMulti();
-
-    /**
-     * Handle the COMMAND_UNREGISTER_SET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleUnregisterSetMulti();
-
-    /**
-     * Handle the COMMAND_EXECUTE_SET_MULTI command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleExecuteSetMulti();
-
-    /**
-     * Handle the COMMAND_GET_VERSIONS command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleGetVersions();
-
-    /**
-     * Handle the COMMAND_RELOAD_PLUGINS command.
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleReloadPlugins();
-
-#ifdef XPLM200
-    /**
-     * Handle the COMMAND_SAVE_SITUATION command.
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleSaveSituation();
-#endif
-
-    /**
-     * Handle the COMMAND_SHOW_MESSAGE command
-     *
-     * @return true, if we can continue, false if the thread should quit
-     */
-    bool handleShowMessage();
-
-    /**
-     * Handle the COMMAND_REGISTER_HOTKEYS command.
-     *
-     * @return true if we can continue, false if the thread should
-     * quit.
-     */
-    bool handleRegisterHotkeys();
-
-    /**
-     * Handle the COMMAND_QUERY_HOTKEYS command.
-     *
-     * @return true if we can continue, false if the thread should
-     * quit.
-     */
-    bool handleQueryHotkeys();
-
-    /**
-     * Handle the COMMAND_UNREGISTER_HOTKEYS command.
-     *
-     * @return true if we can continue, false if the thread should
-     * quit.
-     */
-    bool handleUnregisterHotkeys();
-
-private:
-    /**
-     * Destroy the current set of hotkeys, if any.
-     *
-     * @return whether there were any hotkeys or not.
-     */
-    bool destroyHotkeys();
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_SERVERTHREAD_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/SetDataRefTask.cc
===================================================================
--- src/plugin/src/xplra/SetDataRefTask.cc	(revision 13)
+++ 	(revision )
@@ -1,122 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "SetDataRefTask.h"
-
-#include "Protocol.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::SetDataRefTask;
-using xplra::SetIntDataRefTask;
-using xplra::SetFloatDataRefTask;
-using xplra::SetDoubleDataRefTask;
-
-using hu::varadiistvan::scpl::io::DataStream;
-
-using std::string;
-
-//------------------------------------------------------------------------------
-
-SetDataRefTask* SetDataRefTask::create(uint8_t& result, DataStream& stream)
-{
-    result = Protocol::RESULT_OK;
-
-    string name = stream.readString();
-    uint8_t type = stream.readU8();
-    if (!stream) return 0;
-
-    if (type==Protocol::TYPE_INT) {
-        return new SetIntDataRefTask(name);
-    } else if (type==Protocol::TYPE_FLOAT) {
-        return new SetFloatDataRefTask(name);
-    } else if (type==Protocol::TYPE_DOUBLE) {
-        return new SetDoubleDataRefTask(name);
-    } else if (type==Protocol::TYPE_FLOAT_ARRAY ||
-               type==Protocol::TYPE_INT_ARRAY ||
-               type==Protocol::TYPE_BYTE_ARRAY)
-    {
-        int length = stream.readS32();
-        int offset = stream.readS32();
-        if (!stream) return 0;
-        if (length<=0 || length>Protocol::MAX_LENGTH) {
-            result = Protocol::RESULT_INVALID_LENGTH;
-            return 0;
-        }
-        if (offset<0) {
-            result = Protocol::RESULT_INVALID_OFFSET;
-            return 0;
-        }
-
-        if (type==Protocol::TYPE_INT_ARRAY) {
-            return new SetIntArrayDataRefTask(name, length, offset);
-        } else if (type==Protocol::TYPE_FLOAT_ARRAY) {
-            return new SetFloatArrayDataRefTask(name, length, offset);
-        } else {
-            return new SetByteArrayDataRefTask(name, length, offset);
-        }
-    } else {
-        result = Protocol::RESULT_INVALID_TYPE;
-    }
-
-    return 0;
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-void SetIntDataRefTask::readValue(DataStream& stream)
-{
-    value = stream.readS32();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-void SetFloatDataRefTask::readValue(DataStream& stream)
-{
-    value = stream.readFloat();
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-void SetDoubleDataRefTask::readValue(DataStream& stream)
-{
-    value = stream.readDouble();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/SetDataRefTask.h
===================================================================
--- src/plugin/src/xplra/SetDataRefTask.h	(revision 66)
+++ 	(revision )
@@ -1,616 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_SETDATAREFTASK_H
-#define XPLRA_SETDATAREFTASK_H
-//------------------------------------------------------------------------------
-
-#include "DataRefTask.h"
-
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * Base class for dataref tasks that set the value of some data
- * referenced by a dataref.
- *
- * Since XPLM provides no feedback on whether the setting is
- * successful, we detect only if the dataref is valid or not. So the
- * isValid() function provides the only feedback if the task executed
- * successfully or not. (We could use XPLMCanWriteDataRef, but for
- * efficiency reasons we refrain from it. A separate task may be
- * created for this purpose.)
- */
-class SetDataRefTask : public DataRefTask
-{
-public:
-    /**
-     * Read a dataref setting specification and create the appropriate
-     * SetDataRefTask instance.
-     *
-     * @param result will contain the result of the operation. It
-     * signifies an error only, if some wrong data is read. If the
-     * stream fails, it will indicate RESULT_OK.
-     * @param stream the stream to read from
-     *
-     * @return the new instance or 0 on error.
-     */
-    static SetDataRefTask* create(uint8_t& result, hu::varadiistvan::scpl::io::DataStream& stream);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Read and set the value to update from the given stream
-     */
-    virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream) = 0;
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Base class for dataref setting tasks that set a single scalar
- * value.
- *
- * ConcreteClass is the actual child class. It should have a function
- * name setData() which performs the actual setting.
- */
-template <typename T, class ConcreteClass>
-class SetScalarDataRefTask : public SetDataRefTask
-{
-protected:
-    /**
-     * The value to set.
-     */
-    T value;
-
-public:
-    /**
-     * Construct the task for setting the data referenced by the
-     * dataref with the given name.
-     */
-    SetScalarDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for setting the data referenced by the given
-     * dataref.
-     */
-    SetScalarDataRefTask(XPLMDataRef dataRef);
-
-protected:
-    /**
-     * Perform the actual operation.
-     */
-    virtual void process();
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Task to set the value of an integer data.
- */
-class SetIntDataRefTask :
-        public SetScalarDataRefTask<int, SetIntDataRefTask>
-{
-public:
-    /**
-     * Set the given dataref's value to the given value.
-     */
-    static void setData(XPLMDataRef dataRef, int value);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetIntDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetIntDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Read and set the value to update from the given stream
-     */
-    virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Task to set the value of a single-precision floating point data.
- */
-class SetFloatDataRefTask :
-        public SetScalarDataRefTask<float, SetFloatDataRefTask>
-{
-public:
-    /**
-     * Set the given dataref's value to the given value.
-     */
-    static void setData(XPLMDataRef dataRef, float value);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetFloatDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetFloatDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Read and set the value to update from the given stream
-     */
-    virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Task to set the value of a double-precision floating point data.
- */
-class SetDoubleDataRefTask :
-        public SetScalarDataRefTask<double, SetDoubleDataRefTask>
-{
-public:
-    /**
-     * Set the given dataref's value to the given value.
-     */
-    static void setData(XPLMDataRef dataRef, double value);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetDoubleDataRefTask(const std::string& name);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetDoubleDataRefTask(XPLMDataRef dataRef);
-
-    /**
-     * Read and set the value to update from the given stream
-     */
-    virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * Base class for dataref setting tasks that set the values of an
- * array.
- *
- * ConcreteClass is the actual child class. It should have a function
- * name setData() which performs the actual setting.
- */
-template <typename T, class ConcreteClass>
-class SetArrayDataRefTask : public SetDataRefTask
-{
-private:
-    /**
-     * The number of data items in the value.
-     */
-    int count;
-
-    /**
-     * The offset starting with which the data should be set.
-     */
-    int offset;
-
-    /**
-     * The value to set.
-     */
-    T* value;
-
-public:
-    /**
-     * Construct the data setting task for the dataref with the given
-     * name.
-     *
-     * The value array will be allocated, but not filled with
-     * data. Thus count should be positive!
-     */
-    SetArrayDataRefTask(const std::string& name, int count, int offset = 0);
-
-    /**
-     * Construct the data setting task for the given dataref.
-     *
-     * The value array will be allocated, but not filled with
-     * data. Thus count should be positive!
-     */
-    SetArrayDataRefTask(XPLMDataRef dataRef, int count, int offset = 0);
-
-    /**
-     * Destroy the task.
-     */
-    virtual ~SetArrayDataRefTask();
-
-    /**
-     * Read and set the value to update from the given stream
-     */
-    virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream);
-
-protected:
-    /**
-     * Perform the actual operation.
-     */
-    virtual void process();
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref setting task which sets an array of integers.
- */
-class SetIntArrayDataRefTask :
-    public SetArrayDataRefTask<int, SetIntArrayDataRefTask>
-{
-public:
-    /**
-     * Perform the actual setting.
-     */
-    static void setData(XPLMDataRef dataRef, int* value, int count, int offset);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetIntArrayDataRefTask(const std::string& name, int count, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetIntArrayDataRefTask(XPLMDataRef dataRef, int count, int offset = 0);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref setting task which sets an array of single-precision
- * floating-point values.
- */
-class SetFloatArrayDataRefTask :
-    public SetArrayDataRefTask<float, SetFloatArrayDataRefTask>
-{
-public:
-    /**
-     * Perform the actual setting.
-     */
-    static void setData(XPLMDataRef dataRef, float* value, int count, int offset);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetFloatArrayDataRefTask(const std::string& name, int count, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetFloatArrayDataRefTask(XPLMDataRef dataRef, int count, int offset = 0);
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-/**
- * A dataref setting task which sets an array of bytes.
- */
-class SetByteArrayDataRefTask :
-    public SetArrayDataRefTask<unsigned char, SetByteArrayDataRefTask>
-{
-public:
-    /**
-     * Perform the actual setting.
-     */
-    static void setData(XPLMDataRef dataRef, unsigned char* value,
-                        int count, int offset);
-
-    /**
-     * Construct the task for the dataref with the given name.
-     */
-    SetByteArrayDataRefTask(const std::string& name, int count, int offset = 0);
-
-    /**
-     * Construct the task for the given dataref.
-     */
-    SetByteArrayDataRefTask(XPLMDataRef dataRef, int count, int offset = 0);
-};
-
-//------------------------------------------------------------------------------
-// Template definitions
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline SetScalarDataRefTask<T, ConcreteClass>::
-SetScalarDataRefTask(const std::string& name) :
-    SetDataRefTask(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline SetScalarDataRefTask<T, ConcreteClass>::
-SetScalarDataRefTask(XPLMDataRef dataRef) :
-    SetDataRefTask(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-void SetScalarDataRefTask<T, ConcreteClass>::process()
-{
-    ConcreteClass::setData(getDataRef(), value);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline SetArrayDataRefTask<T, ConcreteClass>::
-SetArrayDataRefTask(const std::string& name, int count, int offset) :
-    SetDataRefTask(name),
-    count(count),
-    offset(offset),
-    value(new T[count])
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline SetArrayDataRefTask<T, ConcreteClass>::
-SetArrayDataRefTask(XPLMDataRef dataRef, int count, int offset) :
-    SetDataRefTask(dataRef),
-    count(count),
-    offset(offset),
-    value(new T[count])
-{
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-inline SetArrayDataRefTask<T, ConcreteClass>::~SetArrayDataRefTask()
-{
-    delete [] value;
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-void SetArrayDataRefTask<T, ConcreteClass>::
-readValue(hu::varadiistvan::scpl::io::DataStream& stream)
-{
-    stream.read(value, count * sizeof(T));
-}
-
-//------------------------------------------------------------------------------
-
-template <typename T, class ConcreteClass>
-void SetArrayDataRefTask<T, ConcreteClass>::process()
-{
-    ConcreteClass::setData(getDataRef(), value, count, offset);
-}
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline SetDataRefTask::SetDataRefTask(const std::string& name) :
-    DataRefTask(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline SetDataRefTask::SetDataRefTask(XPLMDataRef dataRef) :
-    DataRefTask(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void SetIntDataRefTask::setData(XPLMDataRef dataRef, int value)
-{
-    XPLMSetDatai(dataRef, value);
-}
-
-//------------------------------------------------------------------------------
-
-inline SetIntDataRefTask::SetIntDataRefTask(const std::string& name) :
-    SetScalarDataRefTask<int, SetIntDataRefTask>(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline SetIntDataRefTask::SetIntDataRefTask(XPLMDataRef dataRef) :
-    SetScalarDataRefTask<int, SetIntDataRefTask>(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void SetFloatDataRefTask::setData(XPLMDataRef dataRef, float value)
-{
-    XPLMSetDatai(dataRef, value);
-}
-
-//------------------------------------------------------------------------------
-
-inline SetFloatDataRefTask::SetFloatDataRefTask(const std::string& name) :
-    SetScalarDataRefTask<float, SetFloatDataRefTask>(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline SetFloatDataRefTask::SetFloatDataRefTask(XPLMDataRef dataRef) :
-    SetScalarDataRefTask<float, SetFloatDataRefTask>(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void SetDoubleDataRefTask::setData(XPLMDataRef dataRef, double value)
-{
-    XPLMSetDatai(dataRef, value);
-}
-
-//------------------------------------------------------------------------------
-
-inline SetDoubleDataRefTask::SetDoubleDataRefTask(const std::string& name) :
-    SetScalarDataRefTask<double, SetDoubleDataRefTask>(name)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline SetDoubleDataRefTask::SetDoubleDataRefTask(XPLMDataRef dataRef) :
-    SetScalarDataRefTask<double, SetDoubleDataRefTask>(dataRef)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void SetIntArrayDataRefTask::setData(XPLMDataRef dataRef, int* value,
-                                            int count, int offset)
-{
-    XPLMSetDatavi(dataRef, value, offset, count);
-}
-
-//------------------------------------------------------------------------------
-
-inline SetIntArrayDataRefTask::SetIntArrayDataRefTask(const std::string& name,
-                                                      int count, int offset) :
-    SetArrayDataRefTask<int, SetIntArrayDataRefTask>(name, count, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline SetIntArrayDataRefTask::SetIntArrayDataRefTask(XPLMDataRef dataRef,
-                                                      int count, int offset) :
-    SetArrayDataRefTask<int, SetIntArrayDataRefTask>(dataRef, count, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void SetFloatArrayDataRefTask::setData(XPLMDataRef dataRef,
-                                              float* value,
-                                              int count, int offset)
-{
-    XPLMSetDatavf(dataRef, value, offset, count);
-}
-
-//------------------------------------------------------------------------------
-
-inline
-SetFloatArrayDataRefTask::SetFloatArrayDataRefTask(const std::string& name,
-                                                   int count, int offset) :
-    SetArrayDataRefTask<float, SetFloatArrayDataRefTask>(name, count, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline
-SetFloatArrayDataRefTask::SetFloatArrayDataRefTask(XPLMDataRef dataRef,
-                                                   int count, int offset) :
-    SetArrayDataRefTask<float, SetFloatArrayDataRefTask>(dataRef, count, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void SetByteArrayDataRefTask::setData(XPLMDataRef dataRef,
-                                             unsigned char* value,
-                                             int count, int offset)
-{
-    XPLMSetDatab(dataRef, value, offset, count);
-}
-
-//------------------------------------------------------------------------------
-
-inline
-SetByteArrayDataRefTask::SetByteArrayDataRefTask(const std::string& name,
-                                                 int count, int offset) :
-    SetArrayDataRefTask<unsigned char, SetByteArrayDataRefTask>(name,
-                                                                count, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline
-SetByteArrayDataRefTask::SetByteArrayDataRefTask(XPLMDataRef dataRef,
-                                                 int count, int offset) :
-    SetArrayDataRefTask<unsigned char, SetByteArrayDataRefTask>(dataRef,
-                                                                count, offset)
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_SETDATAREFTASK_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/SetMultiDataRefRequest.cc
===================================================================
--- src/plugin/src/xplra/SetMultiDataRefRequest.cc	(revision 13)
+++ 	(revision )
@@ -1,102 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "SetMultiDataRefRequest.h"
-
-#include "Protocol.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::SetMultiDataRefRequest;
-
-using hu::varadiistvan::scpl::io::DataStream;
-
-//------------------------------------------------------------------------------
-
-SetMultiDataRefRequest::SetMultiDataRefRequest(uint8_t& result,
-                                               DataStream& stream,
-                                               bool readValues)
-{
-    result = Protocol::RESULT_OK;
-
-    uint32_t numTasks = stream.readU32();
-    if (!stream) return;
-    if (numTasks==0 || numTasks>Protocol::MAX_MULTI_COUNT) {
-        result = Protocol::RESULT_INVALID_COUNT;
-        return;
-    }
-
-    for(size_t i = 0;
-        i<numTasks && result==Protocol::RESULT_OK && stream; ++i) {
-        SetDataRefTask* task = SetDataRefTask::create(result, stream);
-        if (task!=0) {
-            if (readValues) {
-                task->readValue(stream);
-            }
-            addTask(task);
-        }
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void SetMultiDataRefRequest::readValues(DataStream& stream)
-{
-    size_t numTasks = getNumTasks();
-    for(size_t i = 0; i<numTasks && stream; ++i) {
-        SetDataRefTask* task = getTask(i);
-        task->readValue(stream);
-    }
-}
-
-//------------------------------------------------------------------------------
-
-void SetMultiDataRefRequest::writeResult(DataStream& stream) const
-{
-    size_t numTasks = getNumTasks();
-    for(size_t i = 0; i<numTasks; ++i) {
-        SetDataRefTask* task = getTask(i);
-        if (!task->isValid()) {
-            stream.writeU8(Protocol::RESULT_UNKNOWN_DATAREF);
-            stream.writeU32(i);
-            return;
-        }
-    }
-
-    stream.writeU8(Protocol::RESULT_OK);
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/SetMultiDataRefRequest.h
===================================================================
--- src/plugin/src/xplra/SetMultiDataRefRequest.h	(revision 13)
+++ 	(revision )
@@ -1,84 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_SETMULTIDATAREFREQUEST_H
-#define XPLRA_SETMULTIDATAREFREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "MultiTaskRequest.h"
-#include "SetDataRefTask.h"
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A request containing several dataref update tasks.
- */
-class SetMultiDataRefRequest : public MultiTaskRequestTemplate<SetDataRefTask>
-{
-public:
-    /**
-     * Construct the request by reading the task specifications from
-     * the given stream.
-     */
-    SetMultiDataRefRequest(uint8_t& result,
-                           hu::varadiistvan::scpl::io::DataStream& stream,
-                           bool readValues);
-
-    /**
-     * Read the values of all tasks.
-     */
-    void readValues(hu::varadiistvan::scpl::io::DataStream& stream);
-
-    /**
-     * Write the result of an execution.
-     *
-     * If there is at least one invalid dataref, the result will be
-     * RESULT_UNKNOWN_DATAREF followed by a 32-bit unsigned value with
-     * the index of the first unknown dataref.
-     *
-     * Otherwise the result is RESULT_OK.
-     */
-    void writeResult(hu::varadiistvan::scpl::io::DataStream& stream) const;
-};
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_SETMULTIDATAREFREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/Task.h
===================================================================
--- src/plugin/src/xplra/Task.h	(revision 13)
+++ 	(revision )
@@ -1,75 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_TASK_H
-#define XPLRA_TASK_H
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A task is like a request, but it cannot be executed directly by the
- * flight loop callback. Instead, it defines some simple task, of
- * which potentially many can be added to a single request.
- */
-class Task
-{
-public:
-    /**
-     * Virtual destructor.
-     */
-    virtual ~Task();
-
-    /**
-     * Perform the task
-     */
-    virtual void perform() = 0;
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline Task::~Task()
-{
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_TASK_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/TaskRequest.cc
===================================================================
--- src/plugin/src/xplra/TaskRequest.cc	(revision 13)
+++ 	(revision )
@@ -1,50 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "TaskRequest.h"
-
-//------------------------------------------------------------------------------
-
-using xplra::TaskRequest;
-
-//------------------------------------------------------------------------------
-
-void TaskRequest::execute()
-{
-    task->perform();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/TaskRequest.h
===================================================================
--- src/plugin/src/xplra/TaskRequest.h	(revision 13)
+++ 	(revision )
@@ -1,101 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#ifndef XPLRA_TASKREQUEST_H
-#define XPLRA_TASKREQUEST_H
-//------------------------------------------------------------------------------
-
-#include "Request.h"
-
-#include "Task.h"
-
-//------------------------------------------------------------------------------
-
-namespace xplra {
-
-//------------------------------------------------------------------------------
-
-/**
- * A request the performs a task.
- */
-class TaskRequest : public Request
-{
-private:
-    /**
-     * The task belonging to the request. It is owned by the request,
-     * i.e. deleted when the request is deleted.
-     */
-    Task* task;
-
-public:
-    /**
-     * Construct the request for the given task. The task will become
-     * owned by the request, so it will be deleted when the task is
-     * deleted.
-     */
-    TaskRequest(Task* task);
-
-    /**
-     * Destroy the task request.
-     */
-    virtual ~TaskRequest();
-
-    /**
-     * Execute the request by performing the task.
-     */
-    virtual void execute();
-};
-
-//------------------------------------------------------------------------------
-// Inline definitions
-//------------------------------------------------------------------------------
-
-inline TaskRequest::TaskRequest(Task* task) :
-    task(task)
-{
-}
-
-//------------------------------------------------------------------------------
-
-inline TaskRequest::~TaskRequest()
-{
-    delete task;
-}
-
-//------------------------------------------------------------------------------
-
-} /* namespace xplra */
-
-//------------------------------------------------------------------------------
-#endif // XPLRA_TASKREQUEST_H
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/plugin.cc
===================================================================
--- src/plugin/src/xplra/plugin.cc	(revision 106)
+++ 	(revision )
@@ -1,144 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ListenThread.h"
-
-#include "Globals.h"
-
-#include <hu/varadiistvan/xplcommon/Util.h>
-#include <hu/varadiistvan/scpl/config.h>
-#include <hu/varadiistvan/scpl/Log.h>
-
-#include <XPLMDefs.h>
-#include <XPLMProcessing.h>
-#include <XPLMMenus.h>
-
-#include <cstdio>
-#include <cstring>
-#include <cstdarg>
-
-#if TARGET_API_POSIX
-#include <signal.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-using xplra::ListenThread;
-using xplra::Globals;
-
-using hu::varadiistvan::xplcommon::Util;
-
-using hu::varadiistvan::scpl::Log;
-
-//------------------------------------------------------------------------------
-
-/**
- * The global objects.
- */
-static Globals* globals = 0;
-
-/**
- * The thread to use to listen for incoming connections.
- */
-static ListenThread* listenThread = 0;
-
-//------------------------------------------------------------------------------
-
-PLUGIN_API int XPluginStart(char* outName, char* outSignature,
-                            char* outDescription)
-{
-    Log::registerFunction(&Util::debug);
-    Util::debug("hu.varadiistvan.xplra called\n");
-
-    strcpy(outName, "X-Plane Remote Access");
-    strcpy(outSignature, "hu.varadiistvan.xplra");
-    strcpy(outDescription, "Provides remote access to datarefs");
-
-#if TARGET_API_POSIX
-    signal(SIGPIPE, SIG_IGN);
-#endif
-
-    return 1;
-}
-
-//------------------------------------------------------------------------------
-
-PLUGIN_API void XPluginEnable(void)
-{
-    Util::debug("hu.varadiistvan.xplra.XPluginEnable called\n");
-    // XPLMRegisterFlightLoopCallback(&callback, 5.0, 0);
-
-    globals = new Globals();
-
-    listenThread = new ListenThread(*globals);
-    listenThread->start();
-}
-
-//------------------------------------------------------------------------------
-
-PLUGIN_API void XPluginReceiveMessage(XPLMPluginID inFrom, long inMessage,
-                                      void* inParam)
-{
-    Util::debug("hu.varadiistvan.xplra.XPluginReceiveMessage called, inFrom=%d, inMessage=%ld, inParam=%p\n",
-          inFrom, inMessage, inParam);
-}
-
-//------------------------------------------------------------------------------
-
-PLUGIN_API void XPluginDisable(void)
-{
-    Util::debug("hu.varadiistvan.xplra.XPluginDisable called\n");
-    // XPLMUnregisterFlightLoopCallback(&callback, 0);
-
-    if (listenThread!=0) {
-        listenThread->quit();
-        listenThread->join();
-        delete listenThread;
-        listenThread = 0;
-    }
-
-    delete globals; globals = 0;
-    Util::debug("hu.varadiistvan.xplra.XPluginDisable done\n");
-}
-
-//------------------------------------------------------------------------------
-
-PLUGIN_API void XPluginStop(void)
-{
-    Util::debug("hu.varadiistvan.xplra.XPluginStop called\n");
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: c/plugin/src/xplra/version.ldscript
===================================================================
--- src/plugin/src/xplra/version.ldscript	(revision 13)
+++ 	(revision )
@@ -1,10 +1,0 @@
-{
- global:
-  XPluginStart;
-  XPluginStop;
-  XPluginEnable;
-  XPluginDisable;
-  XPluginReceiveMessage;
- local:
-   *;
-};
Index: src/xplra/.copyright
===================================================================
--- src/xplra/.copyright	(revision 0)
+++ src/xplra/.copyright	(revision 0)
@@ -0,0 +1,23 @@
+// 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.
+
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// The views and conclusions contained in the software and documentation are those
+// of the authors and should not be interpreted as representing official policies,
+// either expressed or implied, of the FreeBSD Project.
Index: src/xplra/.namespace
===================================================================
--- src/xplra/.namespace	(revision 0)
+++ src/xplra/.namespace	(revision 0)
@@ -0,0 +1,1 @@
+xplra
Index: src/xplra/.srcmessage
===================================================================
--- src/xplra/.srcmessage	(revision 0)
+++ src/xplra/.srcmessage	(revision 0)
@@ -0,0 +1,1 @@
+// This file is part of XPLRA, a remote-access plugin for X-Plane
Index: src/xplra/ListenThread.cc
===================================================================
--- src/xplra/ListenThread.cc	(revision 0)
+++ src/xplra/ListenThread.cc	(revision 0)
@@ -0,0 +1,58 @@
+// Copyright (c) 2013 by István Váradi
+
+// This file is part of XPLRA, a remote-access plugin for X-Plane
+
+// 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.
+
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// The views and conclusions contained in the software and documentation are those
+// of the authors and should not be interpreted as representing official policies,
+// either expressed or implied, of the FreeBSD Project.
+
+//------------------------------------------------------------------------------
+
+#include "ListenThread.h"
+
+#include <XPLMUtilities.h>
+
+//------------------------------------------------------------------------------
+
+using xplra::ListenThread;
+
+//------------------------------------------------------------------------------
+
+void ListenThread::run()
+{
+    XPLMDebugString("xplra::ListenThread::run: started\n");
+
+    while(!quitEvent.check() && !quitEvent.failed()) {
+        waiter.wait();
+    }
+
+    XPLMDebugString("xplra::ListenThread::run: quitting\n");
+}
+
+//------------------------------------------------------------------------------
+
+// Local Variables:
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: nil
+// End:
Index: src/xplra/ListenThread.h
===================================================================
--- src/xplra/ListenThread.h	(revision 0)
+++ src/xplra/ListenThread.h	(revision 0)
@@ -0,0 +1,108 @@
+// Copyright (c) 2013 by István Váradi
+
+// This file is part of XPLRA, a remote-access plugin for X-Plane
+
+// 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.
+
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// The views and conclusions contained in the software and documentation are those
+// of the authors and should not be interpreted as representing official policies,
+// either expressed or implied, of the FreeBSD Project.
+
+#ifndef XPLRA_LISTENTHREAD_H
+#define XPLRA_LISTENTHREAD_H
+//------------------------------------------------------------------------------
+
+#include <xplcommon/Thread.h>
+#include <xplcommon/Waiter.h>
+#include <xplcommon/WaitableEvent.h>
+
+//------------------------------------------------------------------------------
+
+namespace xplra {
+
+//------------------------------------------------------------------------------
+
+/**
+ * The thread that listens to incoming connections and starts the
+ * client serving threads.
+ *
+ * This is a detached thread, to allow it to quit automatically.
+ */
+class ListenThread : public xplcommon::Thread
+{
+private:
+    /**
+     * The waiter used in the thread.
+     */
+    xplcommon::Waiter waiter;
+
+    /**
+     * The event that can be fired to notify the thread that it should
+     * quit.
+     */
+    xplcommon::WaitableEvent quitEvent;
+
+public:
+    /**
+     * Construct the thread.
+     */
+    ListenThread();
+
+    /**
+     * Notify the thread to quit.
+     */
+    void quit();
+
+    /**
+     * Perform the thread's operation.
+     */
+    virtual void run();
+};
+
+//------------------------------------------------------------------------------
+// Inline definitions
+//------------------------------------------------------------------------------
+
+inline ListenThread::ListenThread() :
+    Thread(true),
+    quitEvent(&waiter)
+{
+}
+
+//------------------------------------------------------------------------------
+
+inline void ListenThread::quit()
+{
+    quitEvent.fire();
+}
+
+//------------------------------------------------------------------------------
+
+} /* namespace xplra */
+
+//------------------------------------------------------------------------------
+#endif // XPLRA_LISTENTHREAD_H
+
+// Local Variables:
+// mode: C++
+// c-basic-offset: 4
+// indent-tabs-mode: nil
+// End:
Index: src/xplra/Makefile.am
===================================================================
--- src/xplra/Makefile.am	(revision 0)
+++ src/xplra/Makefile.am	(revision 0)
@@ -0,0 +1,24 @@
+INCLUDES=@XPSDK_INCLUDES@
+
+AM_CXXFLAGS=$(LIBXPLCOMMON_CFLAGS)
+
+if TARGET_API_WIN32
+AM_CPPFLAGS=-DIBM
+AM_LDFLAGS=@XPSDK_LDFLAGS@ -lXPLM -no-undefined
+endif
+
+if TARGET_API_POSIX
+AM_CPPFLAGS=-DLIN
+AM_CXXFLAGS+=-fPIC -fno-stack-protector
+endif
+
+lib_LTLIBRARIES=libxplra.la
+
+libxplra_la_SOURCES= \
+	plugin.cc	\
+	ListenThread.cc
+
+libxplra_la_LIBADD=$(LIBXPLCOMMON_LIBS)
+
+noinst_HEADERS= \
+	ListenThread.h
Index: src/xplra/plugin.cc
===================================================================
--- src/xplra/plugin.cc	(revision 0)
+++ src/xplra/plugin.cc	(revision 0)
@@ -0,0 +1,83 @@
+#include "ListenThread.h"
+
+#include <XPLMDefs.h>
+#include <XPLMUtilities.h>
+#include <XPLMProcessing.h>
+
+#include <cstdio>
+#include <cstring>
+#include <cstdarg>
+
+//------------------------------------------------------------------------------
+
+using xplra::ListenThread;
+
+//------------------------------------------------------------------------------
+
+static ListenThread* listenThread = 0;
+
+//------------------------------------------------------------------------------
+
+static void debug(const char* format, ...)
+{
+    va_list ap;
+    va_start(ap, format);
+
+    char buf[256];
+    vsnprintf(buf, sizeof(buf), format, ap);
+
+    va_end(ap);
+
+    XPLMDebugString(buf);
+}
+
+PLUGIN_API int XPluginStart(char* outName, char* outSignature,
+                            char* outDescription)
+{
+    debug("hu.varadiistvan.xplra called\n");
+
+    strcpy(outName, "X-Plane Remote Access");
+    strcpy(outSignature, "hu.varadiistvan.xplra");
+    strcpy(outDescription, "Provides remote access to datarefs");
+
+    return 1;
+}
+
+// float callback(float elapsedSinceLastCall, float elapsedTimeSinceLastFlightLoop,
+//               int counter, void* refcon)
+// {
+//     debug("hu.varadiistvan.proba.callback called: elapsedSinceLastCall=%f, elapsedTimeSinceLastFlightLoop=%f, counter=%d, refcon=%p\n",
+//           elapsedSinceLastCall, elapsedTimeSinceLastFlightLoop,
+//           counter, refcon);
+//     return 5.0;
+// }
+
+PLUGIN_API void XPluginEnable(void)
+{
+    debug("hu.varadiistvan.proba.XPluginEnable called\n");
+    // XPLMRegisterFlightLoopCallback(&callback, 5.0, 0);
+    listenThread = new ListenThread();
+    listenThread->start();
+}
+
+PLUGIN_API void XPluginReceiveMessage(XPLMPluginID inFrom, long inMessage,
+                                      void* inParam)
+{
+    debug("hu.varadiistvan.proba.XPluginReceiveMessage called, inFrom=%d, inMessage=%ld, inParam=%p\n",
+          inFrom, inMessage, inParam);
+}
+
+PLUGIN_API void XPluginDisable(void)
+{
+    debug("hu.varadiistvan.proba.XPluginDisable called\n");
+    // XPLMUnregisterFlightLoopCallback(&callback, 0);
+    if (listenThread!=0) {
+        listenThread->quit();
+        listenThread = 0;
+    }
+}
+
+PLUGIN_API void XPluginStop(void)
+{
+    debug("hu.varadiistvan.proba.XPluginStop called\n");
+}
Index: st/.copyright
===================================================================
--- test/.copyright	(revision 14)
+++ 	(revision )
@@ -1,23 +1,0 @@
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
Index: st/.srcmessage
===================================================================
--- test/.srcmessage	(revision 14)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of XPLRA, a remote-access plugin for X-Plane
Index: st/Makefile.am
===================================================================
--- test/Makefile.am	(revision 117)
+++ 	(revision )
@@ -1,54 +1,0 @@
-AM_CPPFLAGS=-I $(top_srcdir)/src/client/c -I$(top_srcdir)/src/plugin/src $(VSCPL_CFLAGS)
-
-LDADD=../src/client/c/hu/varadiistvan/xplra/libxplra.la $(VSCPL_LIBS)
-if TARGET_API_WIN32
-AM_LDFLAGS=-static -static-libgcc -static-libstdc++
-endif
-
-noinst_PROGRAMS=ctest basictest basicctest multigettest multigetctest multisettest multisetctest hotkeytest hotkeyctest emulator
-
-ctest_SOURCES=ctest.c
-if TARGET_API_WIN32
-ctest_LDFLAGS=-lstdc++
-endif
-
-basictest_SOURCES=basictest.cc common.cc
-
-basicctest_SOURCES=basicctest.c ccommon.c
-if TARGET_API_WIN32
-basicctest_LDFLAGS=-lstdc++
-endif
-
-multigettest_SOURCES=multigettest.cc common.cc
-
-multigetctest_SOURCES=multigetctest.c ccommon.c
-if TARGET_API_WIN32
-multigetctest_LDFLAGS=-lstdc++
-endif
-
-multisettest_SOURCES=multisettest.cc common.cc
-
-multisetctest_SOURCES=multisetctest.c ccommon.c
-if TARGET_API_WIN32
-multisetctest_LDFLAGS=-lstdc++
-endif
-
-hotkeytest_SOURCES=hotkeytest.cc common.cc
-
-hotkeyctest_SOURCES=hotkeyctest.c ccommon.c
-if TARGET_API_WIN32
-hotkeyctest_LDFLAGS=-lstdc++
-endif
-
-emulator_SOURCES=emulator.cc
-
-EXTRA_DIST=\
-	common.h		\
-        common.cc		\
-	ccommon.h		\
-	ccommon.c		\
-        runpy.sh                \
-        basictest.py            \
-        multigettest.py         \
-        multisettest.py         \
-        hotkeytest.py
Index: st/basicctest.c
===================================================================
--- test/basicctest.c	(revision 114)
+++ 	(revision )
@@ -1,429 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/xplra.h>
-
-#include "ccommon.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef _WIN32
-#include <windows.h>
-#else
-#include <unistd.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-#ifdef _WIN32
-void xplra_sleep(int ms)
-{
-    Sleep(ms);
-}
-#else
-void xplra_sleep(int ms)
-{
-    usleep(ms*1000);
-}
-#endif
-
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    static const char* tailNum1 = "VAI";
-
-    int retval = 0;
-    const char* errorString = 0;
-
-    int xplaneVersion = 0;
-    int xplmVersion = 0;
-    int xplraVersion = 0;
-
-    int numEngines = 0;
-    float spoolTime = 0.0;
-    double latitude = 0.0, longitude = 0.0;
-    ssize_t length, i;
-    size_t length1, j;
-    uint8_t result[260];
-    uint8_t* result1 = 0;
-    int32_t result3[8];
-    int32_t* result4 = 0;
-    float result5[8];
-    float* result6 = 0;
-    float acfElevUp;
-    double localX;
-    float numBlades[8];
-    int32_t batteryArrayOn[8];
-    uint8_t tailNum[40];
-
-    printf("Connection to X-Plane...\n");
-    int connectionID = connect_xplane(argc, argv);
-
-    if (connectionID>=0) {
-        printf("Connected.\n\n");
-    } else {
-        printf("Connection failed.\n");
-        goto cleanup;
-    }
-
-    printf("Showing a message...\n");
-    if (xplra_show_message(connectionID, "[basictest] Starting tests", 5.0)<0) goto error;
-    printf("\n");
-
-    printf("Querying the versions...\n");
-    if (xplra_get_versions(connectionID, &xplaneVersion,
-                           &xplmVersion, &xplraVersion)<0) goto error;
-    printf("X-Plane version: %d, XPLM: %d, XPLRA: %03d\n\n",
-           xplaneVersion, xplmVersion, xplraVersion);
-
-    printf("Saving the situation...\n");
-    if (xplra_save_situation(connectionID, "output/situations/test.sit")<0) goto error;
-    printf("Saved the situation\n\n");
-
-    printf("Querying the number of the engines...\n");
-    if (xplra_get_int(&numEngines, connectionID,
-                      "sim/aircraft/engine/acf_num_engines")<0)
-    {
-        goto error;
-    }
-    printf("The number of engines: %d\n\n", numEngines);
-
-    printf("Querying an invalid dataref...\n");
-    if (xplra_get_int(&numEngines, connectionID,
-                      "sim/aircraft/engine/num_engines")==0) {
-        printf("\n>>>>>>>>>>>> Succeeded!!!!!!!!!!!!!!!!!!!!!!\n\n");
-    } else {
-        printf("Error occured: %s\n\n",
-               xplra_get_last_error_string(connectionID));
-        xplra_clear_last_error(connectionID);
-    }
-
-    printf("Querying the spool time of a jet engine...\n");
-    if (xplra_get_float(&spoolTime, connectionID,
-                        "sim/aircraft/engine/acf_spooltime_jet")<0)
-    {
-        goto error;
-    }
-    printf("The spool time: %f\n\n", spoolTime);
-
-    printf("Querying the spool time of a propeller...\n");
-    if (xplra_get_float(&spoolTime, connectionID,
-                        "sim/aircraft/engine/acf_spooltime_prop")<0)
-    {
-        goto error;
-    }
-    printf("The spool time: %f\n\n", spoolTime);
-
-    printf("Querying the coordinates...\n");
-    if (xplra_get_double(&latitude, connectionID,
-                         "sim/flightmodel/position/latitude")<0)
-    {
-        goto error;
-    }
-    if (xplra_get_double(&longitude, connectionID,
-                         "sim/flightmodel/position/longitude")<0)
-    {
-        goto error;
-    }
-    printf("The coordinates: %f, %f\n\n", latitude, longitude);
-
-    printf("Querying the aircraft's description as an array of a fixed size...\n");
-    length = xplra_get_byte_array(result, sizeof(result)/sizeof(result[0]),
-                                  0, connectionID,
-                                  "sim/aircraft/view/acf_descrip");
-    if (length<0) goto error;
-    printf("Got %lu bytes, as a string: '%s'\n\n", (unsigned long)length, result);
-
-    printf("Querying the aircraft's description as a dynamically created array with an offset of 3...\n");
-    length1 = 0;
-    result1 = xplra_get_byte_array_new(&length1, 3, connectionID,
-                                       "sim/aircraft/view/acf_descrip");
-    if (result1==0) goto error;
-    printf("Got %lu bytes, as a string: '%s'\n\n", (unsigned long)length1, result1);
-
-    printf("Querying the aircraft's engine types as an array of a fixed size...\n");
-    length = xplra_get_int_array(result3, sizeof(result3)/sizeof(result3[0]), 0,
-                                 connectionID, "sim/aircraft/prop/acf_en_type");
-
-    if (length<0) goto error;
-    printf("Got %ld values:", (long)length);
-    for(i = 0; i<length; ++i) {
-        if (i>0) printf(",");
-        printf(" %d", result3[i]);
-    }
-    printf("\n\n");
-
-    printf("Querying the aircraft's engine types as a dynamically created array...\n");
-    length1 = 0;
-    result4 = xplra_get_int_array_new(&length1, 0, connectionID,
-                                      "sim/aircraft/prop/acf_en_type");
-    printf("Got %lu values:", (unsigned long)length1);
-    for(j = 0; j<length1; ++j) {
-        if (j>0) printf(",");
-        printf(" %d", result4[j]);
-    }
-    printf("\n\n");
-
-    printf("Querying the aircraft's propeller direction as an array of a fixed size...\n");
-    length = xplra_get_float_array(result5, sizeof(result5)/sizeof(result5[0]),
-                                   0, connectionID,
-                                   "sim/aircraft/prop/acf_prop_dir");
-    printf("Got %ld values:", (long)length);
-    for(i = 0; i<length; ++i) {
-        if (i>0) printf(",");
-        printf(" %f", result5[i]);
-    }
-    printf("\n\n");
-
-    printf("Querying the aircraft's propeller direction as a dynamically created array...\n");
-    length1 = 0;
-    result6 = xplra_get_float_array_new(&length1, 0, connectionID,
-                                        "sim/aircraft/prop/acf_prop_dir");
-    printf("Got %lu values:", (unsigned long)length1);
-    for(j = 0; j<length1; ++j) {
-        if (j>0) printf(",");
-        printf(" %f", result6[j]);
-    }
-    printf("\n\n");
-
-
-    if (xplaneVersion<12000 || xplaneVersion>12005) {
-        printf("Setting the number of the engines to %d...\n", numEngines + 1);
-        if (xplra_set_int(connectionID, "sim/aircraft/engine/acf_num_engines",
-                          numEngines + 1)<0)
-        {
-            goto error;
-        }
-        if (xplra_get_int(&numEngines, connectionID,
-                          "sim/aircraft/engine/acf_num_engines")<0)
-        {
-            goto error;
-        }
-        printf("The new number of engines: %d\n\n", numEngines);
-    } else {
-        if (xplra_get_int(&numEngines, connectionID,
-                          "sim/aircraft/engine/acf_num_engines")<0)
-        {
-            goto error;
-        }
-        printf("Not setting the number of engines, which is: %d\n\n", numEngines);
-    }
-
-
-    if (xplra_get_float(&acfElevUp, connectionID,
-                        "sim/aircraft/controls/acf_elev_up")<0)
-    {
-        goto error;
-    }
-    printf("Setting the aircraft elevator up control from %f to %f...\n",
-           acfElevUp, acfElevUp + 15.0);
-    if (xplra_set_float(connectionID,
-                        "sim/aircraft/controls/acf_elev_up",
-                        acfElevUp + 15.0) < 0)
-    {
-        goto error;
-    }
-    if (xplra_get_float(&acfElevUp, connectionID,
-                        "sim/aircraft/controls/acf_elev_up")<0)
-    {
-        goto error;
-    }
-    printf("The aircraft elevator up control set to %f\n\n", acfElevUp);
-
-    if (xplra_get_double(&localX, connectionID,
-                         "sim/flightmodel/position/local_x")<0)
-    {
-        goto error;
-    }
-    printf("Setting the aircraft's local X-coordinate from %f to %f...\n",
-           localX, localX + 15.0);
-    if (xplra_set_double(connectionID, "sim/flightmodel/position/local_x",
-                         localX + 15.0)<0)
-    {
-        goto error;
-    }
-    if (xplra_get_double(&localX, connectionID,
-                         "sim/flightmodel/position/local_x")<0)
-    {
-        goto error;
-    }
-    printf("The aircraft's local X-coordinate set to %f\n\n", localX);
-
-    length = xplra_get_float_array(numBlades,
-                                   sizeof(numBlades)/sizeof(numBlades[0]), 0,
-                                   connectionID,
-                                   "sim/aircraft/prop/acf_num_blades");
-    if (length<0) goto error;
-
-    printf("Setting the number of blades\n    from:");
-    for(i = 0; i<length; ++i) {
-        if (i>0) printf(",");
-        printf(" %f", numBlades[i]);
-    }
-    printf("\n    to:");
-    for(i = 0; i<length; ++i) {
-        numBlades[i] += 2.5;
-        if (i>0) printf(",");
-        printf(" %f", numBlades[i]);
-    }
-    printf("\n");
-    if (xplra_set_float_array(connectionID,
-                              "sim/aircraft/prop/acf_num_blades",
-                              numBlades, length, 0)<0)
-    {
-        goto error;
-    }
-    length = xplra_get_float_array(numBlades,
-                                   sizeof(numBlades)/sizeof(numBlades[0]), 0,
-                                   connectionID,
-                                   "sim/aircraft/prop/acf_num_blades");
-    if (length<0) goto error;
-    printf("The result:");
-    for(i = 0; i<length; ++i) {
-        if (i>0) printf(",");
-        printf(" %f", numBlades[i]);
-    }
-    printf("\n\n");
-
-    length = xplra_get_int_array(batteryArrayOn,
-                                 sizeof(batteryArrayOn)/sizeof(batteryArrayOn[0]),
-                                 0, connectionID,
-                                 "sim/cockpit/electrical/battery_array_on");
-    if (length<0) goto error;
-    printf("Setting the batteries\n    from:");
-    for(i = 0; i<length; ++i) {
-        if (i>0) printf(",");
-        printf(" %d", batteryArrayOn[i]);
-    }
-    printf("\n    to:");
-    for(i = 0; i<length; ++i) {
-        batteryArrayOn[i] = !batteryArrayOn[i];
-        numBlades[i] += 2.5;
-        if (i>0) printf(",");
-        printf(" %d", batteryArrayOn[i]);
-    }
-    printf("\n");
-    if (xplra_set_int_array(connectionID,
-                            "sim/cockpit/electrical/battery_array_on",
-                            batteryArrayOn, length, 0)<0)
-    {
-        goto error;
-    }
-    length = xplra_get_int_array(batteryArrayOn,
-                                 sizeof(batteryArrayOn)/sizeof(batteryArrayOn[0]),
-                                 0, connectionID,
-                                 "sim/cockpit/electrical/battery_array_on");
-    if (length<0) goto error;
-    printf("The result:");
-    for(i = 0; i<length; ++i) {
-        if (i>0) printf(",");
-        printf(" %d", batteryArrayOn[i]);
-    }
-    printf("\n\n");
-
-    memset(tailNum, 0, sizeof(tailNum));
-    strcpy((char*)tailNum, "HA-VAI");
-    printf("Setting the tail number to %s as a byte array...\n", tailNum);
-    if (xplra_set_byte_array(connectionID,
-                             "sim/aircraft/view/acf_tailnum",
-                             tailNum, sizeof(tailNum), 0)<0)
-    {
-        goto error;
-    }
-
-    memset(tailNum, 0, sizeof(tailNum));
-    length = xplra_get_byte_array(tailNum, sizeof(tailNum), 0,
-                                  connectionID,
-                                  "sim/aircraft/view/acf_tailnum");
-    if (length<0) goto error;
-    printf("The tail number is: '%s'\n\n", (char*)tailNum);
-
-    printf("Setting the tail number to %s as a string...\n", tailNum1);
-    if (xplra_set_string(connectionID, "sim/aircraft/view/acf_tailnum",
-                         tailNum1, 40, 0)<0)
-    {
-        goto error;
-    }
-    memset(tailNum, 0, sizeof(tailNum));
-    length = xplra_get_byte_array(tailNum, sizeof(tailNum), 0,
-                                  connectionID,
-                                  "sim/aircraft/view/acf_tailnum");
-    if (length<0) goto error;
-    printf("The tail number is: '%s'\n\n", (char*)tailNum);
-
-    printf("Preparing for the message tests, sleeping for 5 seconds...\n");
-    xplra_sleep(5*1000);
-
-    printf("Showing a message for 10 seconds...\n");
-    if (xplra_show_message(connectionID, "[basictest] this message appears for 10 seconds", 10.0)<0) {
-        goto error;
-    }
-
-    printf("Sleeping for 3 seconds...\n");
-    xplra_sleep(3*1000);
-
-    printf("Showing another message interrupting the previous one for 3 seconds");
-    if (xplra_show_message(connectionID, "[basictest] but this message interrupts it, and is displayed for 3 seconds", 3.0)<0) {
-        goto error;
-    }
-
-    printf("Sleeping for 5 seconds...\n");
-    xplra_sleep(5*1000);
-    if (xplra_show_message(connectionID, "[basictest] and the tests come to an end!", 5.0)<0) {
-        goto error;
-    }
-
-    goto cleanup;
-
-error:
-    errorString = xplra_get_last_error_string(connectionID);
-    if (errorString==0) {
-        printf("\nUnknown error occured!\n");
-    } else {
-        printf("\nError: %s\n", errorString);
-    }
-
-    retval = 1;
-
-cleanup:
-    if (connectionID>=0) xplra_disconnect(connectionID);
-    return retval;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/basictest.cc
===================================================================
--- test/basictest.cc	(revision 114)
+++ 	(revision )
@@ -1,295 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "common.h"
-
-#include <hu/varadiistvan/xplra/XPlane.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include <cstdio>
-#include <cstring>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::Exception;
-using hu::varadiistvan::xplra::ProtocolException;
-
-using hu::varadiistvan::scpl::Thread;
-
-using std::string;
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    try {
-        XPlane xplane;
-
-        printf("Connecting to X-Plane...\n");
-        connectXPlane(xplane, argc, argv);
-        printf("Connected to X-Plane.\n\n");
-
-        int xplaneVersion = 0;
-        int xplmVersion = 0;
-        int xplraVersion = 0;
-
-        printf("Showing a message...\n");
-        xplane.showMessage("[basictest] Starting tests", 5.0);
-        printf("\n");
-
-        printf("Querying the versions...\n");
-        xplane.getVersions(xplaneVersion, xplmVersion, xplraVersion);
-        printf("X-Plane version: %d, XPLM: %d, XPLRA: %03d\n\n",
-               xplaneVersion, xplmVersion, xplraVersion);
-
-        printf("Saving the situation...\n");
-        xplane.saveSituation("output/situations/test.sit");
-        printf("Saved the situation\n\n");
-
-        printf("Querying the number of the engines...\n");
-        int numEngines = xplane.getInt("sim/aircraft/engine/acf_num_engines");
-        printf("The number of engines: %d\n\n", numEngines);
-
-        try {
-            printf("Querying an invalid dataref...\n");
-            xplane.getInt("sim/aircraft/engine/num_engines");
-            printf("\n>>>>>>>>>>>> Succeeded!!!!!!!!!!!!!!!!!!!!!!\n\n");
-        } catch(const ProtocolException& exception) {
-            printf("Exception caugth: %s\n\n", exception.what());
-        }
-
-        printf("Querying the spool time of a jet engine...\n");
-        float spoolTime = xplane.getFloat("sim/aircraft/engine/acf_spooltime_jet");
-        printf("The spool time: %f\n\n", spoolTime);
-
-        printf("Querying the spool time of a propeller...\n");
-        spoolTime = xplane.getFloat("sim/aircraft/engine/acf_spooltime_prop");
-        printf("The spool time: %f\n\n", spoolTime);
-
-        printf("Querying the coordinates...\n");
-        double latitude = xplane.getDouble("sim/flightmodel/position/latitude");
-        double longitude = xplane.getDouble("sim/flightmodel/position/longitude");
-        printf("The coordinates: %f, %f\n\n", latitude, longitude);
-
-        printf("Querying the aircraft's description as an array of a fixed size...\n");
-        uint8_t result[260];
-        size_t length = xplane.getByteArray("sim/aircraft/view/acf_descrip",
-                                            result, sizeof(result)/sizeof(result[0]));
-        printf("Got %lu bytes, as a string: '%s'\n\n",
-               static_cast<unsigned long>(length), result);
-
-        printf("Querying the aircraft's description as a dynamically created array...\n");
-        uint8_t* result1 = xplane.getByteArray("sim/aircraft/view/acf_descrip", length);
-        printf("Got %lu bytes, as a string: '%s'\n\n",
-               static_cast<unsigned long>(length), result1);
-
-        printf("Querying the aircraft's description as a string, with an offset of 3...\n");
-        string result2 = xplane.getString("sim/aircraft/view/acf_descrip", 3);
-        printf("Got: '%s'\n\n", result2.c_str());
-
-        printf("Querying the aircraft's engine types as an array of a fixed size...\n");
-        int32_t result3[8];
-        length = xplane.getIntArray("sim/aircraft/prop/acf_en_type",
-                                    result3, sizeof(result3)/sizeof(result3[0]));
-        printf("Got %lu values:", static_cast<unsigned long>(length));
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %d", result3[i]);
-        }
-        printf("\n\n");
-
-        printf("Querying the aircraft's engine types as a dynamically created array...\n");
-        length = 0;
-        int32_t* result4 = xplane.getIntArray("sim/aircraft/prop/acf_en_type", length);
-        printf("Got %lu values:", static_cast<unsigned long>(length));
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %d", result4[i]);
-        }
-        printf("\n\n");
-
-        printf("Querying the aircraft's propeller direction as an array of a fixed size...\n");
-        float result5[8];
-        length = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir",
-                                      result5, sizeof(result5)/sizeof(result5[0]));
-        printf("Got %lu values:", static_cast<unsigned long>(length));
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %f", result5[i]);
-        }
-        printf("\n\n");
-
-        printf("Querying the aircraft's propeller direction as a dynamically created array...\n");
-        length = 0;
-        float* result6 = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir", length);
-        printf("Got %lu values:", static_cast<unsigned long>(length));
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %f", result6[i]);
-        }
-        printf("\n\n");
-
-        if (xplaneVersion<12000 || xplaneVersion>12005) {
-            printf("Setting the number of the engines to %d...\n", numEngines + 1);
-            xplane.setInt("sim/aircraft/engine/acf_num_engines", numEngines + 1);
-            numEngines = xplane.getInt("sim/aircraft/engine/acf_num_engines");
-            printf("The new number of engines: %d\n\n", numEngines);
-        } else {
-            numEngines = xplane.getInt("sim/aircraft/engine/acf_num_engines");
-            printf("Not setting the number of engines, which is: %d\n\n", numEngines);
-        }
-
-        float acfElevUp = xplane.getFloat("sim/aircraft/controls/acf_elev_up");
-        printf("Setting the aircraft elevator up control from %f to %f...\n",
-               acfElevUp, acfElevUp + 15.0);
-        xplane.setFloat("sim/aircraft/controls/acf_elev_up", acfElevUp + 15.0);
-        acfElevUp = xplane.getFloat("sim/aircraft/controls/acf_elev_up");
-        printf("The aircraft elevator up control set to %f\n\n", acfElevUp);
-
-        double localX = xplane.getDouble("sim/flightmodel/position/local_x");
-        printf("Setting the aircraft's local X-coordinate from %f to %f...\n",
-               localX, localX + 15.0);
-        xplane.setDouble("sim/flightmodel/position/local_x", localX + 15.0);
-        localX = xplane.getDouble("sim/flightmodel/position/local_x");
-        printf("The aircraft's local X-coordinate set to %f\n\n", localX);
-
-        float numBlades[8];
-        length = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades",
-                                      numBlades, sizeof(numBlades)/sizeof(numBlades[0]));
-
-        printf("Setting the number of blades\n    from:");
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %f", numBlades[i]);
-        }
-        printf("\n    to:");
-        for(size_t i = 0; i<length; ++i) {
-            numBlades[i] += 2.5;
-            if (i>0) printf(",");
-            printf(" %f", numBlades[i]);
-        }
-        printf("\n");
-        xplane.setFloatArray("sim/aircraft/prop/acf_num_blades",
-                             numBlades, length);
-        length = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades",
-                                      numBlades, sizeof(numBlades)/sizeof(numBlades[0]));
-        printf("The result:");
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %f", numBlades[i]);
-        }
-        printf("\n\n");
-
-        int32_t batteryArrayOn[8];
-        length = xplane.getIntArray("sim/cockpit/electrical/battery_array_on",
-                                    batteryArrayOn,
-                                    sizeof(batteryArrayOn)/sizeof(batteryArrayOn[0]));
-
-        printf("Setting the batteries\n    from:");
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %d", batteryArrayOn[i]);
-        }
-        printf("\n    to:");
-        for(size_t i = 0; i<length; ++i) {
-            batteryArrayOn[i] = !batteryArrayOn[i];
-            numBlades[i] += 2.5;
-            if (i>0) printf(",");
-            printf(" %d", batteryArrayOn[i]);
-        }
-        printf("\n");
-        xplane.setIntArray("sim/cockpit/electrical/battery_array_on",
-                           batteryArrayOn, length);
-        length = xplane.getIntArray("sim/cockpit/electrical/battery_array_on",
-                                    batteryArrayOn,
-                                    sizeof(batteryArrayOn)/sizeof(batteryArrayOn[0]));
-        printf("The result:");
-        for(size_t i = 0; i<length; ++i) {
-            if (i>0) printf(",");
-            printf(" %d", batteryArrayOn[i]);
-        }
-        printf("\n\n");
-
-        uint8_t tailNum[40];
-        memset(tailNum, 0, sizeof(tailNum));
-        strcpy(reinterpret_cast<char*>(tailNum), "HA-VAI");
-        printf("Setting the tail number to %s as a byte array...\n", tailNum);
-        xplane.setByteArray("sim/aircraft/view/acf_tailnum",
-                            tailNum, sizeof(tailNum));
-        printf("The tail number is: '%s'\n\n",
-               xplane.getString("sim/aircraft/view/acf_tailnum").c_str());
-
-        static const char* tailNum1 = "VAI";
-        printf("Setting the tail number to %s as a string...\n", tailNum1);
-        xplane.setString("sim/aircraft/view/acf_tailnum", tailNum1, 40);
-        printf("The tail number is: '%s'\n\n",
-               xplane.getString("sim/aircraft/view/acf_tailnum").c_str());
-
-        try {
-            printf("Querying an invalid dataref...\n");
-            xplane.getInt("sim/aircraft/engine/num_engines");
-            printf("\n>>>>>>>>>>>> Succeeded!!!!!!!!!!!!!!!!!!!!!!\n\n");
-        } catch(const ProtocolException& exception) {
-            printf("Exception caugth: %s\n\n", exception.what());
-        }
-
-        printf("Preparing for the message tests, sleeping for 5 seconds...\n");
-        Thread::sleep(5*1000);
-
-        printf("Showing a message for 10 seconds...\n");
-        xplane.showMessage("[basictest] this message appears for 10 seconds", 10.0);
-
-        printf("Sleeping for 3 seconds...\n");
-        Thread::sleep(3*1000);
-
-        printf("Showing another message interrupting the previous one for 3 seconds\n");
-        xplane.showMessage("[basictest] but this message interrupts it, and is displayed for 3 seconds", 3.0);
-
-        printf("Sleeping for 5 seconds...\n");
-        Thread::sleep(5*1000);
-        xplane.showMessage("[basictest] and the tests come to an end!", 5.0);
-
-        return 0;
-    } catch(const Exception& exception) {
-        printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
-
-        return 1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/basictest.py
===================================================================
--- test/basictest.py	(revision 89)
+++ 	(revision )
@@ -1,167 +1,0 @@
-# Basic test program for the Python client library
-
-#------------------------------------------------------------------------------
-
-import time
-
-#------------------------------------------------------------------------------
-
-if __name__ == "__main__":
-    from xplra import XPlane, ProtocolException
-
-    xplane = XPlane()
-
-    try:
-        print "Connecting to X-Plane..."
-        xplane.connect()
-        print "Connected to X-Plane."
-        print
-
-        print "Showing a message..."
-        xplane.showMessage("[basictest] Starting tests", 5.0)
-        print
-
-        print "Querying the versions..."
-        (xplaneVersion, xplmVersion, xplraVersion) = xplane.getVersions()
-        print "X-Plane version: %d, XPLM: %d, XPLRA: %03d" % \
-               (xplaneVersion, xplmVersion, xplraVersion)
-        print
-
-        print "Saving the situation..."
-        xplane.saveSituation("output/situations/test.sit")
-        print "Saved the situation"
-        print
-
-        print "Querying the number of the engines..."
-        numEngines = xplane.getInt("sim/aircraft/engine/acf_num_engines")
-        print "The number of engines:", numEngines
-        print
-
-        try:
-            print "Querying an invalid dataref..."
-            xplane.getInt("sim/aircraft/engine/num_engines")
-            print
-            print ">>>>>>>>>>>> Succeeded!!!!!!!!!!!!!!!!!!!!!!"
-        except ProtocolException as e:
-            print "Exception caugth:", str(e)
-        print
-
-        print "Querying the spool time of a jet engine..."
-        spoolTime = xplane.getFloat("sim/aircraft/engine/acf_spooltime_jet")
-        print "The spool time:", spoolTime
-        print
-
-        print "Querying the spool time of a propeller..."
-        spoolTime = xplane.getFloat("sim/aircraft/engine/acf_spooltime_prop")
-        print "The spool time:", spoolTime
-        print
-
-        print "Querying the coordinates..."
-        latitude = xplane.getDouble("sim/flightmodel/position/latitude")
-        longitude = xplane.getDouble("sim/flightmodel/position/longitude")
-        print "The coordinates: " + `latitude` + ", " + `longitude`
-        print
-
-        print "Querying the aircraft's description..."
-        result = xplane.getByteArray("sim/aircraft/view/acf_descrip")
-        print "The description:", result
-        print
-
-        print "Querying the aircraft's description as a string, with an offset of 3..."
-        result2 = xplane.getString("sim/aircraft/view/acf_descrip", offset = 3);
-        print "Got: '" + result2 + "' (" + `len(result2)` + ")"
-        print result2=="h 8 Q400"
-        print
-
-        print "Querying the aircraft's engine types..."
-        result3 = xplane.getIntArray("sim/aircraft/prop/acf_en_type")
-        print "Got:", result3
-        print
-
-        print "Querying the aircraft's propeller directions..."
-        result5 = xplane.getFloatArray("sim/aircraft/prop/acf_prop_dir")
-        print  "Got:", result5
-        print
-
-        print "Setting the number of the engines to", numEngines + 1
-        xplane.setInt("sim/aircraft/engine/acf_num_engines", numEngines + 1)
-        numEngines = xplane.getInt("sim/aircraft/engine/acf_num_engines")
-        print "The new number of engines:", numEngines
-        print
-
-        acfElevUp = xplane.getFloat("sim/aircraft/controls/acf_elev_up")
-        print "Setting the aircraft elevator up control from %f to %f..." % \
-            (acfElevUp, acfElevUp + 15.0)
-        xplane.setFloat("sim/aircraft/controls/acf_elev_up", acfElevUp + 15.0)
-        acfElevUp = xplane.getFloat("sim/aircraft/controls/acf_elev_up")
-        print "The aircraft elevator up control set to", acfElevUp
-        print
-
-        localX = xplane.getDouble("sim/flightmodel/position/local_x")
-        print "Setting the aircraft's local X-coordinate from %f to %f..." % \
-            (localX, localX + 15.0)
-        xplane.setDouble("sim/flightmodel/position/local_x", localX + 15.0)
-        localX = xplane.getDouble("sim/flightmodel/position/local_x")
-        print "The aircraft's local X-coordinate set to", localX
-        print
-
-        numBlades = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades")
-        print "Setting the number of blades"
-        print "    from:", numBlades
-        numBlades = [n+2.5 for n in numBlades]
-        print "    to:", numBlades
-        xplane.setFloatArray("sim/aircraft/prop/acf_num_blades",  numBlades)
-
-        numBlades = xplane.getFloatArray("sim/aircraft/prop/acf_num_blades")
-        print "The result:", numBlades
-        print
-
-        batteryArrayOn = xplane.getIntArray("sim/cockpit/electrical/battery_array_on")
-        print "Setting the batteries"
-        print "    from:", batteryArrayOn
-        batteryArrayOn = [1 if b==0 else 0 for b in batteryArrayOn]
-        print "    to:", batteryArrayOn
-        xplane.setIntArray("sim/cockpit/electrical/battery_array_on", batteryArrayOn)
-        batteryArrayOn = xplane.getIntArray("sim/cockpit/electrical/battery_array_on")
-        print "The result:", batteryArrayOn
-        print
-
-        tailNum = [0] * 40
-        tailNum[0] = ord('H')
-        tailNum[1] = ord('A')
-        tailNum[2] = ord('-')
-        tailNum[3] = ord('V')
-        tailNum[4] = ord('A')
-        tailNum[5] = ord('I')
-
-        print "Setting the tail number to %s as a byte array..." % (tailNum,)
-        xplane.setByteArray("sim/aircraft/view/acf_tailnum", tailNum)
-        print "The tail number is:", xplane.getString("sim/aircraft/view/acf_tailnum")
-        print
-
-        tailNum1 = "VAIS"
-        print "Setting the tail number to " + tailNum1 + " as a string..."
-        xplane.setString("sim/aircraft/view/acf_tailnum", tailNum1, 40)
-        print "The tail number is:", xplane.getString("sim/aircraft/view/acf_tailnum")
-        print
-
-        print "Preparing for the message tests, sleeping for 5 seconds..."
-        time.sleep(5.0)
-
-        print "Showing a message for 10 seconds..."
-        xplane.showMessage("[basictest] this message appears for 10 seconds", 10.0)
-
-        print "Sleeping for 3 seconds..."
-        time.sleep(3.0)
-
-        print "Showing another message interrupting the previous one for 3 seconds"
-        xplane.showMessage("[basictest] but this message interrupts it, and is displayed for 3 seconds", 3.0)
-
-        print "Sleeping for 5 seconds..."
-        time.sleep(5.0)
-        xplane.showMessage("[basictest] and the tests come to an end!", 5.0)
-
-    except Exception as e:
-        print ">>>>>>>>>>>>>>>>>>>>>> Exception caught:", str(e)
-    finally:
-        xplane.disconnect()
Index: st/ccommon.c
===================================================================
--- test/ccommon.c	(revision 112)
+++ 	(revision )
@@ -1,58 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "ccommon.h"
-
-#include <hu/varadiistvan/xplra/xplra.h>
-
-#include <string.h>
-
-//------------------------------------------------------------------------------
-
-int connect_xplane(int argc, char* argv[])
-{
-    for(int i = 1; i<argc; ++i) {
-        if (strcmp(argv[i], "--tcp")==0) {
-            if ((i+1)<argc) {
-                return xplra_connect_tcp(argv[i+1]);
-            }
-        }
-    }
-
-    return xplra_connect();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/ccommon.h
===================================================================
--- test/ccommon.h	(revision 112)
+++ 	(revision )
@@ -1,41 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-int connect_xplane(int argc, char* argv[]);
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/common.cc
===================================================================
--- test/common.cc	(revision 112)
+++ 	(revision )
@@ -1,63 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include "common.h"
-
-#include <hu/varadiistvan/xplra/XPlane.h>
-
-#include <cstring>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-
-//------------------------------------------------------------------------------
-
-void connectXPlane(XPlane& xplane, int argc, char* argv[])
-{
-    for(int i = 1; i<argc; ++i) {
-        if (strcmp(argv[i], "--tcp")==0) {
-            if ((i+1)<argc) {
-                xplane.connectTCP(argv[i+1]);
-                return;
-            }
-        }
-    }
-
-    xplane.connect();
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/common.h
===================================================================
--- test/common.h	(revision 112)
+++ 	(revision )
@@ -1,50 +1,0 @@
-// Copyright (c) 2022 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-#pragma once
-
-//------------------------------------------------------------------------------
-
-namespace hu { namespace varadiistvan { namespace xplra {
-
-class XPlane;
-
-} } }
-
-//------------------------------------------------------------------------------
-
-void connectXPlane(hu::varadiistvan::xplra::XPlane& xplane,
-                   int argc, char* argv[]);
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/ctest.c
===================================================================
--- test/ctest.c	(revision 73)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/* Copyright (c) 2013 by István Váradi
- *
- * This file is part of XPLRA, a remote-access plugin for X-Plane
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those
- * of the authors and should not be interpreted as representing official policies,
- * either expressed or implied, of the FreeBSD Project.
- */
-
-/*----------------------------------------------------------------------------*/
-
-#include <hu/varadiistvan/xplra/xplra.h>
-
-#include <stdio.h>
-
-/*----------------------------------------------------------------------------*/
-
-int main()
-{
-    printf("xplra_connect: %d\n", xplra_connect());
-
-    return 0;
-}
Index: st/emulator.cc
===================================================================
--- test/emulator.cc	(revision 99)
+++ 	(revision )
@@ -1,215 +1,0 @@
-// Copyright (c) 2019 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-//------------------------------------------------------------------------------
-
-#include "xplra/Protocol.h"
-
-#include <hu/varadiistvan/scpl/io/Waiter.h>
-#include <hu/varadiistvan/scpl/io/LocalServerSocket.h>
-#include <hu/varadiistvan/scpl/io/LocalAcceptor.h>
-#include <hu/varadiistvan/scpl/io/BufferedStream.h>
-#include <hu/varadiistvan/scpl/io/DataStream.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-//------------------------------------------------------------------------------
-
-using xplra::Protocol;
-
-using hu::varadiistvan::scpl::io::Waiter;
-using hu::varadiistvan::scpl::io::LocalServerSocket;
-using hu::varadiistvan::scpl::io::LocalAcceptor;
-
-using std::string;
-
-//------------------------------------------------------------------------------
-
-class ServerThread : public hu::varadiistvan::scpl::Thread
-{
-private:
-    /**
-     * Our waiter.
-     */
-    hu::varadiistvan::scpl::io::Waiter waiter;
-
-    /**
-     * The buffered stream to use for communication at the low-level.
-     */
-    hu::varadiistvan::scpl::io::BufferedStream* bufferedStream;
-
-    /**
-     * The data stream being used for communication.
-     */
-    hu::varadiistvan::scpl::io::DataStream stream;
-
-public:
-    /**
-     * Construct the thread by using a LocalSocket returned by the
-     * given acceptor.
-     */
-    ServerThread(hu::varadiistvan::scpl::io::LocalAcceptor& acceptor);
-
-    /**
-     * Destroy the thread.
-     */
-    virtual ~ServerThread();
-
-    /**
-     * Perform the thread's operation.
-     */
-    virtual void run();
-};
-
-//------------------------------------------------------------------------------
-
-ServerThread::ServerThread(LocalAcceptor& acceptor) :
-    bufferedStream(acceptor.getSocket(&waiter)),
-    stream(*bufferedStream)
-{
-}
-
-//------------------------------------------------------------------------------
-
-ServerThread::~ServerThread()
-{
-    delete bufferedStream;
-}
-
-//------------------------------------------------------------------------------
-
-void ServerThread::run()
-{
-    printf("hu.varadiistvan.xplra.ServerThread[%p]::run\n", this);
-    while(stream) {
-        uint8_t command = stream.readU8();
-        if (!stream) continue;
-
-        printf("hu.varadiistvan.xplra.ServerThread[%p]::run: command=0x%02x\n",
-               this, command);
-
-        if (command==Protocol::COMMAND_GET_VERSIONS) {
-            printf("Get versions\n");
-            int xplaneVersion = 0x110000;
-            int xplmVersion = 0x31000;
-
-
-            stream.writeU8(Protocol::RESULT_OK);
-            stream.writeS32(xplaneVersion);
-            stream.writeS32(xplmVersion);
-            stream.writeS32(Protocol::version);
-        } else if (command==Protocol::COMMAND_GET_MULTI) {
-            printf("Get multi\n");
-            uint32_t numTasks = stream.readU32();
-            if (!stream) break;
-
-            for(size_t i = 0; i<numTasks; ++i) {
-                string name = stream.readString();
-                uint8_t type = stream.readU8();
-                if (!stream) break;
-
-                printf("    name='%s', type=%u\n",
-                       name.c_str(), type);
-
-                if (type==Protocol::TYPE_FLOAT_ARRAY ||
-                    type==Protocol::TYPE_INT_ARRAY ||
-                    type==Protocol::TYPE_BYTE_ARRAY)
-                {
-                    int length = stream.readS32();
-                    int offset = stream.readS32();
-                    if (!stream) break;
-                }
-
-            }
-
-            stream.writeU8(Protocol::RESULT_UNKNOWN_DATAREF);
-            stream.writeU32(0);
-        }
-//         if (command==Protocol::COMMAND_GET_SINGLE) {
-//             if (!handleGetSingle()) break;
-//         } else if (command==Protocol::COMMAND_SET_SINGLE) {
-//             if (!handleSetSingle()) break;
-//         } else if (command==Protocol::COMMAND_GET_MULTI) {
-//             if (!handleGetMulti()) break;
-//         } else if (command==Protocol::COMMAND_SET_MULTI) {
-//             if (!handleSetMulti()) break;
-//         } else if (command==Protocol::COMMAND_REGISTER_GET_MULTI) {
-//             if (!handleRegisterGetMulti()) break;
-//         } else if (command==Protocol::COMMAND_UNREGISTER_GET_MULTI) {
-//             if (!handleUnregisterGetMulti()) break;
-//         } else if (command==Protocol::COMMAND_EXECUTE_GET_MULTI) {
-//             if (!handleExecuteGetMulti()) break;
-//         } else if (command==Protocol::COMMAND_REGISTER_SET_MULTI) {
-//             if (!handleRegisterSetMulti()) break;
-//         } else if (command==Protocol::COMMAND_UNREGISTER_SET_MULTI) {
-//             if (!handleUnregisterSetMulti()) break;
-//         } else if (command==Protocol::COMMAND_EXECUTE_SET_MULTI) {
-//             if (!handleExecuteSetMulti()) break;
-//         } else if (command==Protocol::COMMAND_GET_VERSIONS) {
-//             if (!handleGetVersions()) break;
-//         } else if (command==Protocol::COMMAND_RELOAD_PLUGINS) {
-//             if (!handleReloadPlugins()) break;
-// #ifdef XPLM200
-//         } else if (command==Protocol::COMMAND_SAVE_SITUATION) {
-//             if (!handleSaveSituation()) break;
-// #endif
-//         } else if (command==Protocol::COMMAND_SHOW_MESSAGE) {
-//             if (!handleShowMessage()) break;
-//         } else if (command==Protocol::COMMAND_REGISTER_HOTKEYS) {
-//             if (!handleRegisterHotkeys()) break;
-//         } else if (command==Protocol::COMMAND_QUERY_HOTKEYS) {
-//             if (!handleQueryHotkeys()) break;
-//         } else if (command==Protocol::COMMAND_UNREGISTER_HOTKEYS) {
-//             if (!handleUnregisterHotkeys()) break;
-//         } else {
-//             stream.writeU8(Protocol::RESULT_INVALID_COMMAND);
-//         }
-        stream.flush();
-    }
-
-    // destroyHotkeys();
-
-    printf("hu.varadiistvan.xplra.ServerThread[%p]::run: quitting\n", this);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-int main()
-{
-    Waiter waiter;
-
-    LocalServerSocket socket("xplra", &waiter);
-    LocalAcceptor& acceptor = socket.getAcceptor();
-    while(!acceptor.failed()) {
-        while (acceptor.accept()) {
-            ServerThread* serverThread = new ServerThread(acceptor);
-            serverThread->start();
-        }
-        waiter.wait();
-    }
-}
Index: st/hotkeyctest.c
===================================================================
--- test/hotkeyctest.c	(revision 112)
+++ 	(revision )
@@ -1,149 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/xplra.h>
-
-#include "ccommon.h"
-
-#include <stdio.h>
-#include <string.h>
-
-#ifdef _WIN32
-#include <windows.h>
-#else
-#include <unistd.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-#ifdef _WIN32
-void xplra_sleep(int ms)
-{
-    Sleep(ms);
-}
-#else
-void xplra_sleep(int ms)
-{
-    usleep(ms*1000);
-}
-#endif
-
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    int retval = 0;
-    const char* errorString = 0;
-
-    uint16_t codes[] = { 0x0241, 0x0142, 0x0343, 0x0251 };
-
-    printf("Connecting to X-Plane...\n");
-    int connectionID = connect_xplane(argc, argv);
-
-    if (connectionID>=0) {
-        printf("Connected.\n\n");
-    } else {
-        printf("Connection failed.\n");
-        goto cleanup;
-    }
-
-
-    printf("Registering hotkeys: Ctrl+A, Shift+B, Ctrl+Shift+C, Ctrl+Q...\n");
-    if (xplra_register_hotkeys(connectionID,
-                               codes, sizeof(codes)/sizeof(uint16_t))<0)
-    {
-        goto error;
-    }
-    printf("Registered hotkeys...\n\n");
-
-    printf("Listening to hotkeys...\n");
-    while(1) {
-        uint8_t states[4];
-        char message[256];
-
-        if (xplra_query_hotkeys(connectionID, states, sizeof(states))<0) {
-            goto error;
-        }
-
-        if (states[3]!=0) {
-            if (xplra_unregister_hotkeys(connectionID)<0) {
-                goto error;
-            }
-            break;
-        }
-
-        message[0] = '\0';
-
-        if (states[0]!=0) {
-            if (message[0]!='\0') strcat(message, ", ");
-            strcat(message, "Ctrl+A");
-        }
-        if (states[1]!=0) {
-            if (message[0]!='\0') strcat(message, ", ");
-            strcat(message, "Shift+B");
-        }
-        if (states[2]!=0) {
-            if (message[0]!='\0') strcat(message, ", ");
-            strcat(message, "Ctrl+Shift+C");
-        }
-
-        if (message[0]!='\0') {
-            strcat(message, " pressed");
-            if (xplra_show_message(connectionID, message, 3.0)<0) {
-                goto error;
-            }
-        }
-
-        xplra_sleep(500);
-    }
-
-    goto cleanup;
-
-error:
-    errorString = xplra_get_last_error_string(connectionID);
-    if (errorString==0) {
-        printf("\nUnknown error occured!\n");
-    } else {
-        printf("\nError: %s\n", errorString);
-    }
-
-cleanup:
-    if (connectionID>=0) xplra_disconnect(connectionID);
-    return retval;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/hotkeytest.cc
===================================================================
--- test/hotkeytest.cc	(revision 112)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/XPlane.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include "common.h"
-
-#include <cstdio>
-#include <cstring>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::Exception;
-using hu::varadiistvan::xplra::ProtocolException;
-
-using hu::varadiistvan::scpl::Thread;
-
-using std::string;
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    try {
-        XPlane xplane;
-
-        printf("Connecting to X-Plane...\n");
-        connectXPlane(xplane, argc, argv);
-        printf("Connected to X-Plane.\n\n");
-
-        printf("Registering hotkeys: Ctrl+A, Shift+B, Ctrl+Shift+C, Ctrl+Q...\n");
-        uint16_t codes[] = { 0x0241, 0x0142, 0x0343, 0x0251 };
-        xplane.registerHotkeys(codes, sizeof(codes)/sizeof(uint16_t));
-        printf("Registered hotkeys...\n\n");
-
-        printf("Listening to hotkeys...\n");
-        while(true) {
-            uint8_t states[4];
-            xplane.queryHotkeys(states, sizeof(states));
-            if (states[3]!=0) {
-                xplane.unregisterHotkeys();
-                break;
-            }
-
-            char message[256];
-            message[0] = '\0';
-
-            if (states[0]!=0) {
-                if (message[0]!='\0') strcat(message, ", ");
-                strcat(message, "Ctrl+A");
-            }
-            if (states[1]!=0) {
-                if (message[0]!='\0') strcat(message, ", ");
-                strcat(message, "Shift+B");
-            }
-            if (states[2]!=0) {
-                if (message[0]!='\0') strcat(message, ", ");
-                strcat(message, "Ctrl+Shift+C");
-            }
-
-            if (message[0]!='\0') {
-                strcat(message, " pressed");
-                xplane.showMessage(message, 3.0);
-            }
-
-            Thread::sleep(500);
-        }
-
-
-    } catch(const Exception& exception) {
-        printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
-
-        return 1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/hotkeytest.py
===================================================================
--- test/hotkeytest.py	(revision 54)
+++ 	(revision )
@@ -1,49 +1,0 @@
-# Test program for the Python client library: hotkey handling
-
-#------------------------------------------------------------------------------
-
-import time
-
-#------------------------------------------------------------------------------
-
-if __name__ == "__main__":
-    from xplra import XPlane, ProtocolException
-
-    xplane = XPlane()
-
-    try:
-        print "Connecting to X-Plane..."
-        xplane.connect()
-        print "Connected to X-Plane."
-        print
-
-        print "Registering hotkeys: Ctrl+A, Shift+B, Ctrl+Shift+C, Ctrl+Q..."
-        xplane.registerHotkeys([0x0241, 0x0142, 0x0343, 0x0251])
-        print "Registered hotkeys..."
-        print
-
-        print "Listening to hotkeys..."
-        while True:
-            states = xplane.queryHotkeys()
-            message = ""
-            if states[3]: break
-            if states[0]:
-                if message: message += ", "
-                message += "Ctrl+A"
-            if states[1]:
-                if message: message += ", "
-                message += "Shift+B"
-            if states[2]:
-                if message: message += ", "
-                message += "Ctrl+Shift+C"
-            if message:
-                message += " pressed"
-                xplane.showMessage(message, 3.0)
-
-            time.sleep(0.5)
-
-    except Exception as e:
-        print ">>>>>>>>>>>>>>>>>>>>>> Exception caught:", str(e)
-    finally:
-        xplane.unregisterHotkeys()
-        xplane.disconnect()
Index: st/multigetctest.c
===================================================================
--- test/multigetctest.c	(revision 112)
+++ 	(revision )
@@ -1,369 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/xplra.h>
-
-#include "ccommon.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#ifdef _WIN32
-#include <windows.h>
-#else
-#include <unistd.h>
-#endif
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    int retval = 0;
-    const char* errorString;
-
-    int i;
-
-    int connectionID = -1;
-    int wrongGetterID = -1;
-    int getterID = -1;
-
-    size_t tailnumID = INVALID_DATAREF_ID;
-    size_t daysID = INVALID_DATAREF_ID;
-    size_t zuluSecID = INVALID_DATAREF_ID;
-    size_t pausedID = INVALID_DATAREF_ID;
-    size_t latitudeID = INVALID_DATAREF_ID;
-    size_t longitudeID = INVALID_DATAREF_ID;
-    size_t replayID = INVALID_DATAREF_ID;
-    size_t overspeedID = INVALID_DATAREF_ID;
-    size_t stalledID = INVALID_DATAREF_ID;
-    size_t onTheGroundID = INVALID_DATAREF_ID;
-    size_t emptyWeightID = INVALID_DATAREF_ID;
-    size_t payloadWeightID = INVALID_DATAREF_ID;
-    size_t grossWeightID = INVALID_DATAREF_ID;
-    size_t headingID = INVALID_DATAREF_ID;
-    size_t pitchID = INVALID_DATAREF_ID;
-    size_t bankID = INVALID_DATAREF_ID;
-    size_t iasID = INVALID_DATAREF_ID;
-    size_t machID = INVALID_DATAREF_ID;
-    size_t groundSpeedID = INVALID_DATAREF_ID;
-    size_t vsID = INVALID_DATAREF_ID;
-    size_t radioAltitudeID = INVALID_DATAREF_ID;
-    size_t altitudeID = INVALID_DATAREF_ID;
-    size_t gLoadID = INVALID_DATAREF_ID;
-    size_t flapsControlID = INVALID_DATAREF_ID;
-    size_t flapsLeftID = INVALID_DATAREF_ID;
-    size_t flapsRightID = INVALID_DATAREF_ID;
-    size_t navLightsID = INVALID_DATAREF_ID;
-    size_t beaconLightsID = INVALID_DATAREF_ID;
-    size_t strobeLightsID = INVALID_DATAREF_ID;
-    size_t landingLightsID = INVALID_DATAREF_ID;
-    size_t pitotID = INVALID_DATAREF_ID;
-    size_t parkingID = INVALID_DATAREF_ID;
-    size_t gearControlID = INVALID_DATAREF_ID;
-    size_t noseGearID = INVALID_DATAREF_ID;
-    size_t altimeterID = INVALID_DATAREF_ID;
-    size_t qnhID = INVALID_DATAREF_ID;
-    size_t navTypesID = INVALID_DATAREF_ID;
-    size_t busVoltsID = INVALID_DATAREF_ID;
-
-    const char* tailnum = 0;
-    const int32_t* days = 0;
-    const float* zuluSec = 0;
-    const int32_t* paused = 0;
-    const double* latitude = 0;
-    const double* longitude = 0;
-    const int32_t* replay = 0;
-    const int32_t* overspeed = 0;
-    const int32_t* stalled = 0;
-    const int32_t* onTheGround = 0;
-    const float* emptyWeight = 0;
-    const float* payloadWeight = 0;
-    const float* grossWeight = 0;
-    const float* heading = 0;
-    const float* pitch = 0;
-    const float* bank = 0;
-    const float* ias = 0;
-    const float* mach = 0;
-    const float* groundSpeed = 0;
-    const float* vs = 0;
-    const float* radioAltitude = 0;
-    const float* altitude = 0;
-    const float* gLoad = 0;
-    const float* flapsControl = 0;
-    const float* flapsLeft = 0;
-    const float* flapsRight = 0;
-    const int32_t* navLights = 0;
-    const int32_t* beaconLights = 0;
-    const int32_t* strobeLights = 0;
-    const int32_t* landingLights = 0;
-    const int32_t* pitot = 0;
-    const float* parking = 0;
-    const int32_t* gearControl = 0;
-    const float* noseGear = 0;
-    const float* altimeter = 0;
-    const float* qnh = 0;
-    const int32_t* navTypes = 0;
-    const float* busVolts = 0;
-
-    int dontregister = 0;
-
-    for(i = 1; i<argc; ++i) {
-        if (strcmp(argv[i], "dontregister")==0) {
-            dontregister = 1;
-        }
-    }
-
-    printf("Connecting to X-Plane...\n");
-    connectionID = connect_xplane(argc, argv);
-    if (connectionID>=0) {
-        printf("Connected to X-Plane.\n\n");
-    } else {
-        printf("Connection failed.\n\n");
-        goto cleanup;
-    }
-
-    wrongGetterID = xplra_multi_create_getter(connectionID);
-    if (wrongGetterID<0) goto error;
-    xplra_multi_add_int(wrongGetterID, "sim/time/local_date_days");
-    xplra_multi_add_int(wrongGetterID, "sim/time/paused");
-    xplra_multi_add_int(wrongGetterID, "sim/time/hello_te_lo");
-    xplra_multi_add_float(wrongGetterID, "sim/time/zulu_time_sec");
-    xplra_multi_add_int(wrongGetterID, "sim/operation/prefs/replay_mode");
-
-    printf("Executing a multi-dataref getter with an invalid dataref...\n");
-    if (xplra_multi_execute(wrongGetterID)<0) {
-        printf("Error occured: %s\n\n",
-               xplra_get_last_error_string(connectionID));
-        xplra_clear_last_error(connectionID);
-    } else {
-        printf(">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!\n\n");
-    }
-
-    printf("Executing a registered multi-dataref getter with an invalid dataref...\n");
-    if (xplra_multi_register(wrongGetterID)<0) goto error;
-    if (xplra_multi_execute(wrongGetterID)<0) {
-        printf("Error occured: %s\n\n",
-               xplra_get_last_error_string(connectionID));
-        xplra_clear_last_error(connectionID);
-    } else {
-        printf(">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!\n\n");
-    }
-
-
-    getterID = xplra_multi_create_getter(connectionID);
-    if (getterID<0) goto error;
-
-    tailnumID = xplra_multi_add_byte_array(getterID, "sim/aircraft/view/acf_tailnum", 40, 0);
-    daysID = xplra_multi_add_int(getterID, "sim/time/local_date_days");
-    zuluSecID = xplra_multi_add_float(getterID, "sim/time/zulu_time_sec");
-    pausedID = xplra_multi_add_int(getterID, "sim/time/paused");
-    latitudeID = xplra_multi_add_double(getterID, "sim/flightmodel/position/latitude");
-    longitudeID = xplra_multi_add_double(getterID, "sim/flightmodel/position/longitude");
-    replayID = xplra_multi_add_int(getterID, "sim/operation/prefs/replay_mode");
-    overspeedID = xplra_multi_add_int(getterID, "sim/flightmodel/failures/over_vne");
-    stalledID = xplra_multi_add_int(getterID, "sim/flightmodel/failures/stallwarning");
-    onTheGroundID = xplra_multi_add_int(getterID, "sim/flightmodel/failures/onground_any");
-    emptyWeightID = xplra_multi_add_float(getterID, "sim/aircraft/weight/acf_m_empty");
-    payloadWeightID = xplra_multi_add_float(getterID, "sim/flightmodel/weight/m_fixed");
-    grossWeightID = xplra_multi_add_float(getterID, "sim/flightmodel/weight/m_total");
-    headingID = xplra_multi_add_float(getterID, "sim/flightmodel/position/psi");
-    pitchID = xplra_multi_add_float(getterID, "sim/flightmodel/position/theta");
-    bankID = xplra_multi_add_float(getterID, "sim/flightmodel/position/phi");
-    iasID = xplra_multi_add_float(getterID, "sim/flightmodel/position/indicated_airspeed2");
-    machID = xplra_multi_add_float(getterID, "sim/flightmodel/misc/machno");
-    groundSpeedID = xplra_multi_add_float(getterID, "sim/flightmodel/position/groundspeed");
-    vsID = xplra_multi_add_float(getterID, "sim/flightmodel/position/vh_ind_fpm2");
-    radioAltitudeID = xplra_multi_add_float(getterID, "sim/flightmodel/position/y_agl");
-    altitudeID = xplra_multi_add_float(getterID, "sim/flightmodel/position/elevation");
-    gLoadID = xplra_multi_add_float(getterID, "sim/flightmodel/forces/g_nrml");
-    flapsControlID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/flaprqst");
-    flapsLeftID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/flaprat");
-    flapsRightID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/flap2rat");
-    navLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/nav_lights_on");
-    beaconLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/beacon_lights_on");
-    strobeLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/strobe_lights_on");
-    landingLightsID = xplra_multi_add_int(getterID, "sim/cockpit/electrical/landing_lights_on");
-    pitotID = xplra_multi_add_int(getterID, "sim/cockpit/switches/pitot_heat_on");
-    parkingID = xplra_multi_add_float(getterID, "sim/flightmodel/controls/parkbrake");
-    gearControlID = xplra_multi_add_int(getterID, "sim/cockpit2/controls/gear_handle_down");
-    noseGearID = xplra_multi_add_float_array(getterID, "sim/flightmodel2/gear/deploy_ratio", 1, 0);
-    altimeterID = xplra_multi_add_float(getterID, "sim/cockpit/misc/barometer_setting");
-    qnhID = xplra_multi_add_float(getterID, "sim/flightmodel/misc/Qstatic");
-    navTypesID = xplra_multi_add_int_array(getterID, "sim/cockpit/radios/nav_type", 6, 0);
-    busVoltsID = xplra_multi_add_float_array(getterID, "sim/cockpit2/electrical/bus_volts", 4, 0);
-
-    if (dontregister) {
-        xplra_multi_finalize(getterID);
-    } else {
-        printf("Registering getter...\n");
-        if (xplra_multi_register(getterID)<0) goto error;
-        printf("Registered getter.\n\n");
-    }
-
-    tailnum = xplra_multi_get_string_ptr(getterID, tailnumID, 0);
-    days = xplra_multi_get_int_ptr(getterID, daysID);
-    zuluSec = xplra_multi_get_float_ptr(getterID, zuluSecID);
-    paused = xplra_multi_get_int_ptr(getterID, pausedID);
-    latitude = xplra_multi_get_double_ptr(getterID, latitudeID);
-    longitude = xplra_multi_get_double_ptr(getterID, longitudeID);
-    // frozen
-    // slew
-    replay = xplra_multi_get_int_ptr(getterID, replayID);
-    overspeed = xplra_multi_get_int_ptr(getterID, overspeedID);
-    stalled = xplra_multi_get_int_ptr(getterID, stalledID);
-    onTheGround = xplra_multi_get_int_ptr(getterID, onTheGroundID);
-    emptyWeight = xplra_multi_get_float_ptr(getterID, emptyWeightID);
-    payloadWeight = xplra_multi_get_float_ptr(getterID, payloadWeightID);
-    grossWeight = xplra_multi_get_float_ptr(getterID, grossWeightID);
-    heading = xplra_multi_get_float_ptr(getterID, headingID);
-    pitch = xplra_multi_get_float_ptr(getterID, pitchID);
-    bank = xplra_multi_get_float_ptr(getterID, bankID);
-    ias = xplra_multi_get_float_ptr(getterID, iasID);
-    mach = xplra_multi_get_float_ptr(getterID, machID);
-    groundSpeed = xplra_multi_get_float_ptr(getterID, groundSpeedID);
-    vs = xplra_multi_get_float_ptr(getterID, vsID);
-    radioAltitude = xplra_multi_get_float_ptr(getterID, radioAltitudeID);
-    altitude = xplra_multi_get_float_ptr(getterID, altitudeID);
-    gLoad = xplra_multi_get_float_ptr(getterID, gLoadID);
-    flapsControl = xplra_multi_get_float_ptr(getterID, flapsControlID);
-    flapsLeft = xplra_multi_get_float_ptr(getterID, flapsLeftID);
-    flapsRight = xplra_multi_get_float_ptr(getterID, flapsRightID);
-    navLights = xplra_multi_get_int_ptr(getterID, navLightsID);
-    beaconLights = xplra_multi_get_int_ptr(getterID, beaconLightsID);
-    strobeLights = xplra_multi_get_int_ptr(getterID, strobeLightsID);
-    landingLights = xplra_multi_get_int_ptr(getterID, landingLightsID);
-    pitot = xplra_multi_get_int_ptr(getterID, pitotID);
-    parking = xplra_multi_get_float_ptr(getterID, parkingID);
-    gearControl = xplra_multi_get_int_ptr(getterID, gearControlID);
-    noseGear = xplra_multi_get_float_array_ptr(getterID, noseGearID, 0);
-    altimeter = xplra_multi_get_float_ptr(getterID, altimeterID);
-    qnh = xplra_multi_get_float_ptr(getterID, qnhID);
-    navTypes = xplra_multi_get_int_array_ptr(getterID, navTypesID, 0);
-    busVolts = xplra_multi_get_float_array_ptr(getterID, busVoltsID, 0);
-
-    while(1) {
-        if (xplra_multi_execute(getterID)<0) goto error;
-        printf("tail number: '%s', days: %d, zuluSec: %f\n",
-               tailnum, *days, *zuluSec);
-        printf("paused=%d, replay=%d, overspeed=%d, stalled=%d, onTheGround=%d\n",
-               *paused, *replay, *overspeed, *stalled, *onTheGround);
-        printf("emptyWeight=%f, payloadWeight=%f, grossWeight=%f\n",
-               *emptyWeight, *payloadWeight, *grossWeight);
-        printf("latitude=%f, longitude=%f, radioAltitude=%f, altitude=%f, gLoad=%f\n",
-               *latitude, *longitude, (*radioAltitude)/.3048, (*altitude)/.3048, *gLoad);
-        printf("heading=%f, pitch=%f, bank=%f, ias=%f, mach=%f, groundSpeed=%f, vs=%f\n",
-               *heading, *pitch, *bank, *ias, *mach, *groundSpeed, *vs);
-        printf("flapsControl=%f, flapsLeft=%f, flapsRight=%f\n",
-               *flapsControl, *flapsLeft, *flapsRight);
-        printf("Lights: NAV: %d, beacon: %d, strobe: %d, landing: %d\n",
-               *navLights, *beaconLights, *strobeLights, *landingLights);
-        printf("pitot: %d, parking: %f, gearControl: %d, noseGear: %f\n",
-               *pitot, *parking, *gearControl, *noseGear);
-        printf("altimeter: %f, qnh: %f\n",
-               *altimeter, *qnh);
-        printf("NAV types: %d %d %d %d %d %d\n",
-               navTypes[0], navTypes[1], navTypes[2],
-               navTypes[3], navTypes[4], navTypes[5]);
-        printf("bus voltages: %f %f %f %f\n",
-               busVolts[0], busVolts[1], busVolts[2], busVolts[3]);
-        printf("\n");
-#ifdef _WIN32
-        Sleep(1000);
-#else
-        usleep(1000*1000);
-#endif
-    }
-
-    goto cleanup;
-
-error:
-    errorString = xplra_get_last_error_string(connectionID);
-    if (errorString==0) {
-        printf("\nUnknown error occured!\n");
-    } else {
-        printf("\nError: %s\n", errorString);
-    }
-
-    retval = 1;
-
-cleanup:
-    if (connectionID>=0) xplra_disconnect(connectionID);
-    return retval;
-
-    // try {
-
-
-    //     while(true) {
-    //         getter.execute();
-    //         printf("tail number: '%s', days: %d, zuluSec: %f\n",
-    //                getter.getString(tailnumID).c_str(), days, zuluSec);
-    //         printf("paused=%d, replay=%d, overspeed=%d, stalled=%d, onTheGround=%d\n",
-    //                paused, replay, overspeed, stalled, onTheGround);
-    //         printf("emptyWeight=%f, payloadWeight=%f, grossWeight=%f\n",
-    //                emptyWeight, payloadWeight, grossWeight);
-    //         printf("latitude=%f, longitude=%f, radioAltitude=%f, altitude=%f, gLoad=%f\n",
-    //                latitude, longitude, radioAltitude/.3048, altitude/.3048, gLoad);
-    //         printf("heading=%f, pitch=%f, bank=%f, ias=%f, mach=%f, groundSpeed=%f, vs=%f\n",
-    //                heading, pitch,bank, ias, mach, groundSpeed, vs);
-    //         printf("flapsControl=%f, flapsLeft=%f, flapsRight=%f\n",
-    //                flapsControl, flapsLeft, flapsRight);
-    //         printf("Lights: NAV: %d, beacon: %d, strobe: %d, landing: %d\n",
-    //                navLights, beaconLights, strobeLights, landingLights);
-    //         printf("pitot: %d, parking: %f, gearControl: %d, noseGear: %f\n",
-    //                pitot, parking, gearControl, noseGear);
-    //         printf("altimeter: %f, qnh: %f\n",
-    //                altimeter, qnh);
-    //         printf("NAV types: %d %d %d %d %d %d\n",
-    //                navTypes[0], navTypes[1], navTypes[2],
-    //                navTypes[3], navTypes[4], navTypes[5]);
-    //         printf("bus voltages: %f %f %f %f\n",
-    //                busVolts[0], busVolts[1], busVolts[2], busVolts[3]);
-    //         printf("\n");
-    //         Thread::sleep(1000);
-    //     }
-
-    //     //xplane.destroyMultiBuffer(getter);
-
-    //     return 0;
-    // } catch(Exception& exception) {
-    //     printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
-
-    //     return 1;
-    // }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/multigettest.cc
===================================================================
--- test/multigettest.cc	(revision 112)
+++ 	(revision )
@@ -1,227 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/XPlane.h>
-#include <hu/varadiistvan/xplra/MultiGetter.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include "common.h"
-
-#include <cstdio>
-#include <cstring>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::MultiGetter;
-using hu::varadiistvan::xplra::Exception;
-using hu::varadiistvan::xplra::ProtocolException;
-
-using hu::varadiistvan::scpl::Thread;
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    bool dontregister = false;
-    for(int i = 1; i<argc; ++i) {
-        if (strcmp(argv[i], "dontregister")==0) {
-            dontregister = true;
-        }
-    }
-
-    try {
-        XPlane xplane;
-
-        printf("Connecting to X-Plane...\n");
-        connectXPlane(xplane, argc, argv);
-        printf("Connected to X-Plane.\n\n");
-
-        MultiGetter& wrongGetter = xplane.createMultiGetter();
-        wrongGetter.addInt("sim/time/local_date_days");
-        wrongGetter.addInt("sim/time/paused");
-        wrongGetter.addInt("sim/time/hello_te_lo");
-        wrongGetter.addFloat("sim/time/zulu_time_sec");
-        wrongGetter.addInt("sim/operation/prefs/replay_mode");
-
-        printf("Executing a multi-dataref getter with an invalid dataref...\n");
-        try {
-            wrongGetter.execute();
-            printf(">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!\n\n");
-        } catch(const ProtocolException& e) {
-            printf("Caught protocol exception: %s\n\n", e.what());
-        }
-
-        printf("Executing a registered multi-dataref getter with an invalid dataref...\n");
-        wrongGetter.registerInXPlane();
-        try {
-            wrongGetter.execute();
-            printf(">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!\n\n");
-        } catch(const ProtocolException& e) {
-            printf("Caught protocol exception: %s\n\n", e.what());
-        }
-
-        MultiGetter& getter = xplane.createMultiGetter();
-
-        const size_t tailnumID = getter.addByteArray("sim/aircraft/view/acf_tailnum", 40);
-        const size_t daysID = getter.addInt("sim/time/local_date_days");
-        const size_t zuluSecID = getter.addFloat("sim/time/zulu_time_sec");
-        const size_t pausedID = getter.addInt("sim/time/paused");
-        const size_t latitudeID = getter.addDouble("sim/flightmodel/position/latitude");
-        const size_t longitudeID = getter.addDouble("sim/flightmodel/position/longitude");
-        const size_t replayID = getter.addInt("sim/operation/prefs/replay_mode");
-        const size_t overspeedID = getter.addInt("sim/flightmodel/failures/over_vne");
-        const size_t stalledID = getter.addInt("sim/flightmodel/failures/stallwarning");
-        const size_t onTheGroundID = getter.addInt("sim/flightmodel/failures/onground_any");
-        const size_t emptyWeightID = getter.addFloat("sim/aircraft/weight/acf_m_empty");
-        const size_t payloadWeightID = getter.addFloat("sim/flightmodel/weight/m_fixed");
-        const size_t grossWeightID = getter.addFloat("sim/flightmodel/weight/m_total");
-        const size_t headingID = getter.addFloat("sim/flightmodel/position/psi");
-        const size_t pitchID = getter.addFloat("sim/flightmodel/position/theta");
-        const size_t bankID = getter.addFloat("sim/flightmodel/position/phi");
-        const size_t iasID = getter.addFloat("sim/flightmodel/position/indicated_airspeed2");
-        const size_t machID = getter.addFloat("sim/flightmodel/misc/machno");
-        const size_t groundSpeedID = getter.addFloat("sim/flightmodel/position/groundspeed");
-        const size_t vsID = getter.addFloat("sim/flightmodel/position/vh_ind_fpm2");
-        const size_t radioAltitudeID = getter.addFloat("sim/flightmodel/position/y_agl");
-        const size_t altitudeID = getter.addFloat("sim/flightmodel/position/elevation");
-        const size_t gLoadID = getter.addFloat("sim/flightmodel/forces/g_nrml");
-        const size_t flapsControlID = getter.addFloat("sim/flightmodel/controls/flaprqst");
-        const size_t flapsLeftID = getter.addFloat("sim/flightmodel/controls/flaprat");
-        const size_t flapsRightID = getter.addFloat("sim/flightmodel/controls/flap2rat");
-        const size_t navLightsID = getter.addInt("sim/cockpit/electrical/nav_lights_on");
-        const size_t beaconLightsID = getter.addInt("sim/cockpit/electrical/beacon_lights_on");
-        const size_t strobeLightsID = getter.addInt("sim/cockpit/electrical/strobe_lights_on");
-        const size_t landingLightsID = getter.addInt("sim/cockpit/electrical/landing_lights_on");
-        const size_t pitotID = getter.addInt("sim/cockpit/switches/pitot_heat_on");
-        const size_t parkingID = getter.addFloat("sim/flightmodel/controls/parkbrake");
-        //const size_t gearControlID = getter.addInt("sim/cockpit/switches/gear_handle_status");
-        const size_t gearControlID = getter.addInt("sim/cockpit2/controls/gear_handle_down");
-        const size_t noseGearID = getter.addFloatArray("sim/flightmodel2/gear/deploy_ratio", 1);
-        const size_t altimeterID = getter.addFloat("sim/cockpit/misc/barometer_setting");
-        const size_t qnhID = getter.addFloat("sim/flightmodel/misc/Qstatic");
-        const size_t navTypesID = getter.addIntArray("sim/cockpit/radios/nav_type", 6);
-        const size_t busVoltsID = getter.addFloatArray("sim/cockpit2/electrical/bus_volts", 4);
-
-        if (dontregister) {
-            getter.finalize();
-        } else {
-            printf("Registering getter...\n");
-            getter.registerInXPlane();
-            printf("Registered getter.\n\n");
-        }
-
-        const int32_t& days = getter.getIntRef(daysID);
-        const float& zuluSec = getter.getFloatRef(zuluSecID);
-        const int32_t& paused = getter.getIntRef(pausedID);
-        const double& latitude = getter.getDoubleRef(latitudeID);
-        const double& longitude = getter.getDoubleRef(longitudeID);
-        // frozen
-        // slew
-        const int32_t& replay = getter.getIntRef(replayID);
-        const int32_t& overspeed = getter.getIntRef(overspeedID);
-        const int32_t& stalled = getter.getIntRef(stalledID);
-        const int32_t& onTheGround = getter.getIntRef(onTheGroundID);
-        const float& emptyWeight = getter.getFloatRef(emptyWeightID);
-        const float& payloadWeight = getter.getFloatRef(payloadWeightID);
-        const float& grossWeight = getter.getFloatRef(grossWeightID);
-        const float& heading = getter.getFloatRef(headingID);
-        const float& pitch = getter.getFloatRef(pitchID);
-        const float& bank = getter.getFloatRef(bankID);
-        const float& ias = getter.getFloatRef(iasID);
-        const float& mach = getter.getFloatRef(machID);
-        const float& groundSpeed = getter.getFloatRef(groundSpeedID);
-        const float& vs = getter.getFloatRef(vsID);
-        const float& radioAltitude = getter.getFloatRef(radioAltitudeID);
-        const float& altitude = getter.getFloatRef(altitudeID);
-        const float& gLoad = getter.getFloatRef(gLoadID);
-        const float& flapsControl = getter.getFloatRef(flapsControlID);
-        const float& flapsLeft = getter.getFloatRef(flapsLeftID);
-        const float& flapsRight = getter.getFloatRef(flapsRightID);
-        const int32_t& navLights = getter.getIntRef(navLightsID);
-        const int32_t& beaconLights = getter.getIntRef(beaconLightsID);
-        const int32_t& strobeLights = getter.getIntRef(strobeLightsID);
-        const int32_t& landingLights = getter.getIntRef(landingLightsID);
-        const int32_t& pitot = getter.getIntRef(pitotID);
-        const float& parking = getter.getFloatRef(parkingID);
-        const int32_t& gearControl = getter.getIntRef(gearControlID);
-        const float& noseGear = getter.getFloatArray(noseGearID)[0];
-        const float& altimeter = getter.getFloatRef(altimeterID);
-        const float& qnh = getter.getFloatRef(qnhID);
-        const int32_t* navTypes = getter.getIntArray(navTypesID);
-        const float* busVolts = getter.getFloatArray(busVoltsID);
-
-        while(true) {
-            getter.execute();
-            printf("tail number: '%s', days: %d, zuluSec: %f\n",
-                   getter.getString(tailnumID).c_str(), days, zuluSec);
-            printf("paused=%d, replay=%d, overspeed=%d, stalled=%d, onTheGround=%d\n",
-                   paused, replay, overspeed, stalled, onTheGround);
-            printf("emptyWeight=%f, payloadWeight=%f, grossWeight=%f\n",
-                   emptyWeight, payloadWeight, grossWeight);
-            printf("latitude=%f, longitude=%f, radioAltitude=%f, altitude=%f, gLoad=%f\n",
-                   latitude, longitude, radioAltitude/.3048, altitude/.3048, gLoad);
-            printf("heading=%f, pitch=%f, bank=%f, ias=%f, mach=%f, groundSpeed=%f, vs=%f\n",
-                   heading, pitch,bank, ias, mach, groundSpeed, vs);
-            printf("flapsControl=%f, flapsLeft=%f, flapsRight=%f\n",
-                   flapsControl, flapsLeft, flapsRight);
-            printf("Lights: NAV: %d, beacon: %d, strobe: %d, landing: %d\n",
-                   navLights, beaconLights, strobeLights, landingLights);
-            printf("pitot: %d, parking: %f, gearControl: %d, noseGear: %f\n",
-                   pitot, parking, gearControl, noseGear);
-            printf("altimeter: %f, qnh: %f\n",
-                   altimeter, qnh);
-            printf("NAV types: %d %d %d %d %d %d\n",
-                   navTypes[0], navTypes[1], navTypes[2],
-                   navTypes[3], navTypes[4], navTypes[5]);
-            printf("bus voltages: %f %f %f %f\n",
-                   busVolts[0], busVolts[1], busVolts[2], busVolts[3]);
-            printf("\n");
-            Thread::sleep(1000);
-        }
-
-        //xplane.destroyMultiBuffer(getter);
-
-        return 0;
-    } catch(Exception& exception) {
-        printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
-
-        return 1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/multigettest.py
===================================================================
--- test/multigettest.py	(revision 41)
+++ 	(revision )
@@ -1,130 +1,0 @@
-# Multi-dataref query test program for the Python client library
-
-#------------------------------------------------------------------------------
-
-if __name__ == "__main__":
-    import sys
-    import time
-    from xplra import XPlane, ProtocolException
-
-    xplane = XPlane()
-
-    dontregister = "dontregister" in sys.argv
-
-    try:
-        print "Connecting to X-Plane..."
-        xplane.connect()
-        print "Connected to X-Plane."
-        print
-
-        wrongGetter = xplane.createMultiGetter();
-        wrongGetter.addInt("sim/time/local_date_days");
-        wrongGetter.addInt("sim/time/paused");
-        wrongGetter.addInt("sim/time/hello_te_lo");
-        wrongGetter.addFloat("sim/time/zulu_time_sec");
-        wrongGetter.addInt("sim/operation/prefs/replay_mode");
-
-        print "Executing a multi-dataref getter with an invalid dataref..."
-        try:
-            wrongGetter.execute();
-            print ">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!"
-        except ProtocolException, e:
-            print "Caught protocol exception: " + str(e)
-        print
-
-        print "Executing a registered multi-dataref getter with an invalid dataref..."
-        wrongGetter.register()
-        try:
-            wrongGetter.execute();
-            print ">>>>>>>>>>>>>>>>>>>>> Succeeded, but it should not have!!!!"
-        except ProtocolException, e:
-            print "Caught protocol exception: " + str(e)
-        print
-
-        getter = xplane.createMultiGetter()
-
-        tailnumID = getter.addByteArray("sim/aircraft/view/acf_tailnum", 40)
-        daysID = getter.addInt("sim/time/local_date_days")
-        zuluSecID = getter.addFloat("sim/time/zulu_time_sec")
-        pausedID = getter.addInt("sim/time/paused")
-        latitudeID = getter.addDouble("sim/flightmodel/position/latitude")
-        longitudeID = getter.addDouble("sim/flightmodel/position/longitude")
-        replayID = getter.addInt("sim/operation/prefs/replay_mode")
-        overspeedID = getter.addInt("sim/flightmodel/failures/over_vne")
-        stalledID = getter.addInt("sim/flightmodel/failures/stallwarning")
-        onTheGroundID = getter.addInt("sim/flightmodel/failures/onground_any")
-        emptyWeightID = getter.addFloat("sim/aircraft/weight/acf_m_empty")
-        payloadWeightID = getter.addFloat("sim/flightmodel/weight/m_fixed")
-        grossWeightID = getter.addFloat("sim/flightmodel/weight/m_total")
-        headingID = getter.addFloat("sim/flightmodel/position/psi")
-        pitchID = getter.addFloat("sim/flightmodel/position/theta")
-        bankID = getter.addFloat("sim/flightmodel/position/phi")
-        iasID = getter.addFloat("sim/flightmodel/position/indicated_airspeed2")
-        machID = getter.addFloat("sim/flightmodel/misc/machno")
-        groundSpeedID = getter.addFloat("sim/flightmodel/position/groundspeed")
-        vsID = getter.addFloat("sim/flightmodel/position/vh_ind_fpm2")
-        radioAltitudeID = getter.addFloat("sim/flightmodel/position/y_agl")
-        altitudeID = getter.addFloat("sim/flightmodel/position/elevation")
-        gLoadID = getter.addFloat("sim/flightmodel/forces/g_nrml")
-        flapsControlID = getter.addFloat("sim/flightmodel/controls/flaprqst")
-        flapsLeftID = getter.addFloat("sim/flightmodel/controls/flaprat")
-        flapsRightID = getter.addFloat("sim/flightmodel/controls/flap2rat")
-        navLightsID = getter.addInt("sim/cockpit/electrical/nav_lights_on")
-        beaconLightsID = getter.addInt("sim/cockpit/electrical/beacon_lights_on")
-        strobeLightsID = getter.addInt("sim/cockpit/electrical/strobe_lights_on")
-        landingLightsID = getter.addInt("sim/cockpit/electrical/landing_lights_on")
-        pitotID = getter.addInt("sim/cockpit/switches/pitot_heat_on")
-        parkingID = getter.addFloat("sim/flightmodel/controls/parkbrake")
-        gearControlID = getter.addInt("sim/cockpit2/controls/gear_handle_down")
-        noseGearID = getter.addFloatArray("sim/flightmodel2/gear/deploy_ratio", 1)
-        altimeterID = getter.addFloat("sim/cockpit/misc/barometer_setting")
-        qnhID = getter.addFloat("sim/flightmodel/misc/Qstatic")
-        navTypesID = getter.addIntArray("sim/cockpit/radios/nav_type", 6)
-        busVoltsID = getter.addFloatArray("sim/cockpit2/electrical/bus_volts", 4)
-
-        if dontregister:
-            getter.finalize()
-        else:
-            print "Registering getter..."
-            getter.register()
-            print "Registered getter."
-            print
-
-        while True:
-            getter.execute()
-            print "tail number: '%s', days: %d, zuluSec: %f" % \
-                (getter.getString(tailnumID), getter[daysID], getter[zuluSecID])
-            print "paused=%d, replay=%d, overspeed=%d, stalled=%d, onTheGround=%d" % \
-                (getter[pausedID], getter[replayID], getter[overspeedID],
-                 getter[stalledID], getter[onTheGroundID])
-            print "emptyWeight=%f, payloadWeight=%f, grossWeight=%f" % \
-                (getter[emptyWeightID], getter[payloadWeightID],
-                 getter[grossWeightID])
-            print "latitude=%f, longitude=%f, radioAltitude=%f, altitude=%f, gLoad=%f" % \
-                (getter[latitudeID], getter[longitudeID],
-                 getter[radioAltitudeID]/.3048, getter[altitudeID]/.3048,
-                 getter[gLoadID])
-            print "heading=%f, pitch=%f, bank=%f, ias=%f, mach=%f, groundSpeed=%f, vs=%f" % \
-                (getter[headingID], getter[pitchID], getter[bankID],
-                 getter[iasID], getter[machID], getter[groundSpeedID],
-                 getter[vsID]);
-            print "flapsControl=%f, flapsLeft=%f, flapsRight=%f" % \
-                (getter[flapsControlID], getter[flapsLeftID],
-                 getter[flapsRightID]);
-            print "Lights: NAV: %d, beacon: %d, strobe: %d, landing: %d" % \
-                (getter[navLightsID], getter[beaconLightsID],
-                 getter[strobeLightsID], getter[landingLightsID]);
-            print "pitot: %d, parking: %f, gearControl: %d, noseGear: %f" % \
-                (getter[pitotID], getter[parkingID],
-                 getter[gearControlID], getter[noseGearID][0]);
-            print "altimeter: %f, qnh: %f" % \
-                (getter[altimeterID], getter[qnhID]);
-            print "NAV types:", getter[navTypesID]
-            print "bus voltages:", getter[busVoltsID]
-            print
-            time.sleep(1.0)
-
-    except Exception as e:
-        print ">>>>>>>>>>>>>>>>>>>>>> Exception caught:", str(e)
-    finally:
-        xplane.disconnect()
Index: st/multisetctest.c
===================================================================
--- test/multisetctest.c	(revision 112)
+++ 	(revision )
@@ -1,134 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/xplra.h>
-
-#include "ccommon.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    int retval = 0;
-    const char* errorString;
-
-    int i;
-
-    int connectionID = -1;
-    int setterID = -1;
-
-    size_t simSpeedID = INVALID_DATAREF_ID;
-    size_t zuluSecID = INVALID_DATAREF_ID;
-    size_t localXID = INVALID_DATAREF_ID;
-    size_t tailNumID = INVALID_DATAREF_ID;
-    size_t generatorOnID = INVALID_DATAREF_ID;
-    size_t propPitchID = INVALID_DATAREF_ID;
-
-    int32_t generatorOn[8] = { 1, 0, 1, 0, 1, 0, 1, 0 };
-    float propPitch[2] = { 32.4, 78.2 };
-
-    int dontregister = 0;
-
-    for(i = 1; i<argc; ++i) {
-        if (strcmp(argv[i], "dontregister")==0) {
-            dontregister = 1;
-        }
-    }
-
-    printf("Connecting to X-Plane...\n");
-    connectionID = connect_xplane(argc, argv);
-    if (connectionID>=0) {
-        printf("Connected to X-Plane.\n\n");
-    } else {
-        printf("Connection failed.\n\n");
-        goto cleanup;
-    }
-
-    setterID = xplra_multi_create_setter(connectionID);
-    if (setterID<0) goto error;
-
-    simSpeedID = xplra_multi_add_int(setterID, "sim/time/sim_speed");
-    zuluSecID = xplra_multi_add_float(setterID, "sim/time/zulu_time_sec");
-    localXID = xplra_multi_add_double(setterID, "sim/flightmodel/position/local_x");
-    tailNumID = xplra_multi_add_byte_array(setterID, "sim/aircraft/view/acf_tailnum", 40, 0);
-    generatorOnID = xplra_multi_add_int_array(setterID, "sim/cockpit/electrical/generator_on", 8, 0);
-    propPitchID = xplra_multi_add_float_array(setterID, "sim/cockpit2/engine/actuators/prop_pitch_deg", 2, 0);
-
-    if (dontregister) {
-        xplra_multi_finalize(setterID);
-    } else {
-        printf("Registering getter...\n");
-        if (xplra_multi_register(setterID)<0) goto error;
-        printf("Registered getter.\n\n");
-    }
-
-    printf("Setting values...\n");
-
-    xplra_multi_set_int(setterID, simSpeedID, 0);
-    xplra_multi_set_float(setterID, zuluSecID, 7265.0);
-    xplra_multi_set_double(setterID, localXID, 12.0);
-    xplra_multi_set_string(setterID, tailNumID, "Kukutyin", 0);
-    xplra_multi_set_int_array(setterID, generatorOnID, generatorOn, 8, 0);
-    xplra_multi_set_float_array(setterID, propPitchID, propPitch, 2, 0);
-
-    printf("Executing...\n");
-
-    if (xplra_multi_execute(setterID)<0) goto error;
-
-    printf("Done.\n");
-
-    goto cleanup;
-
-error:
-    errorString = xplra_get_last_error_string(connectionID);
-    if (errorString==0) {
-        printf("\nUnknown error occured!\n");
-    } else {
-        printf("\nError: %s\n", errorString);
-    }
-
-    retval = 1;
-
-cleanup:
-    if (connectionID>=0) xplra_disconnect(connectionID);
-    return retval;
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/multisettest.cc
===================================================================
--- test/multisettest.cc	(revision 112)
+++ 	(revision )
@@ -1,123 +1,0 @@
-// Copyright (c) 2013 by István Váradi
-
-// This file is part of XPLRA, a remote-access plugin for X-Plane
-
-// 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.
-
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// The views and conclusions contained in the software and documentation are those
-// of the authors and should not be interpreted as representing official policies,
-// either expressed or implied, of the FreeBSD Project.
-
-//------------------------------------------------------------------------------
-
-#include <hu/varadiistvan/xplra/XPlane.h>
-#include <hu/varadiistvan/xplra/MultiSetter.h>
-
-#include <hu/varadiistvan/scpl/Thread.h>
-
-#include "common.h"
-
-#include <cstdio>
-#include <cstring>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::MultiSetter;
-using hu::varadiistvan::xplra::Exception;
-
-using hu::varadiistvan::scpl::Thread;
-
-//------------------------------------------------------------------------------
-
-int main(int argc, char* argv[])
-{
-    bool dontregister = false;
-    for(int i = 1; i<argc; ++i) {
-        if (strcmp(argv[i], "dontregister")==0) {
-            dontregister = true;
-        }
-    }
-
-    try {
-        XPlane xplane;
-
-        printf("Connecting to X-Plane...\n");
-        connectXPlane(xplane, argc, argv);
-        printf("Connected to X-Plane.\n\n");
-
-        MultiSetter& setter = xplane.createMultiSetter();
-
-        try {
-            const size_t simSpeedID = setter.addInt("sim/time/sim_speed");
-            const size_t zuluSecID = setter.addFloat("sim/time/zulu_time_sec");
-            const size_t localXID = setter.addDouble("sim/flightmodel/position/local_x");
-            const size_t tailNumID = setter.addByteArray("sim/aircraft/view/acf_tailnum", 40);
-            const size_t generatorOnID = setter.addIntArray("sim/cockpit/electrical/generator_on", 8);
-            const size_t propPitchID = setter.addFloatArray("sim/cockpit2/engine/actuators/prop_pitch_deg", 2);
-
-            if (dontregister) {
-                setter.finalize();
-            } else {
-                printf("Registering getter...\n");
-                setter.registerInXPlane();
-                printf("Registered getter.\n\n");
-            }
-
-            printf("Setting values...\n");
-
-            setter.setInt(simSpeedID, 0);
-            setter.setFloat(zuluSecID, 7265.0);
-            setter.setDouble(localXID, 12.0);
-            setter.setString(tailNumID, "Kukutyin");
-            int32_t generatorOn[8] = { 1, 0, 1, 0, 1, 0, 1, 0 };
-            setter.setIntArray(generatorOnID, generatorOn, 8);
-            float propPitch[2] = { 32.4, 78.2 };
-            setter.setFloatArray(propPitchID, propPitch, 2);
-
-            printf("Executing...\n");
-
-            setter.execute();
-
-            printf("Done.\n");
-
-            //xplane.destroyMultiBuffer(setter);
-
-            return 0;
-        } catch(Exception& exception) {
-            printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
-
-            return 1;
-        }
-    } catch(Exception& exception) {
-        printf("\n>>>>>>>>>>>>>>>>> Exception caugth: %s\n", exception.what());
-
-        return 1;
-    }
-}
-
-//------------------------------------------------------------------------------
-
-// Local Variables:
-// mode: C++
-// c-basic-offset: 4
-// indent-tabs-mode: nil
-// End:
Index: st/multisettest.py
===================================================================
--- test/multisettest.py	(revision 35)
+++ 	(revision )
@@ -1,55 +1,0 @@
-# Multi-dataref query test program for the Python client library
-
-#------------------------------------------------------------------------------
-
-if __name__ == "__main__":
-    import sys
-    import time
-    from xplra import XPlane, ProtocolException
-
-    xplane = XPlane()
-
-    dontregister = "dontregister" in sys.argv
-
-    try:
-        print "Connecting to X-Plane..."
-        xplane.connect()
-        print "Connected to X-Plane."
-        print
-
-        setter = xplane.createMultiSetter()
-
-        simSpeedID = setter.addInt("sim/time/sim_speed")
-        zuluSecID = setter.addFloat("sim/time/zulu_time_sec")
-        localXID = setter.addDouble("sim/flightmodel/position/local_x")
-        tailNumID = setter.addByteArray("sim/aircraft/view/acf_tailnum", 40)
-        generatorOnID = setter.addIntArray("sim/cockpit/electrical/generator_on", 8)
-        propPitchID = setter.addFloatArray("sim/cockpit2/engine/actuators/prop_pitch_deg", 2)
-
-        if dontregister:
-            setter.finalize()
-        else:
-            print "Registering setter..."
-            setter.register();
-            print "Registered setter"
-            print
-
-        print "Setting values..."
-
-        setter[simSpeedID] = 0
-        setter[zuluSecID] = 7265.0
-        setter[localXID] = 12.0
-        setter[tailNumID] = "Kukutyin"
-        setter[generatorOnID] =[ 1, 0, 1, 0, 1, 0, 1 , 0 ]
-        setter[propPitchID] = [ 32.4, 78.2 ]
-
-        print "Executing..."
-
-        setter.execute()
-
-        print "Done."
-
-    except Exception as e:
-        print ">>>>>>>>>>>>>>>>>>>>>> Exception caught:", str(e)
-    finally:
-        xplane.disconnect()
Index: st/runpy.sh
===================================================================
--- test/runpy.sh	(revision 31)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#!/bin/sh
-
-set -e -u
-
-scriptdir=`dirname $0`
-
-pythondir="${scriptdir}/../src/client/python"
-pythondir=`cd "${pythondir}" && pwd`
-
-PYTHONPATH="${pythondir}:${PYTHONPATH:-}"
-export PYTHONPATH
-
-exec python "$@"
