Index: test/.copyright
===================================================================
--- test/.copyright	(revision 14)
+++ test/.copyright	(revision 14)
@@ -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: test/.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: test/.srcmessage
===================================================================
--- test/.srcmessage	(revision 14)
+++ test/.srcmessage	(revision 14)
@@ -0,0 +1,1 @@
+// This file is part of XPLRA, a remote-access plugin for X-Plane
Index: test/.srcmessage
===================================================================
--- test/.srcmessage	(revision 14)
+++ 	(revision )
@@ -1,1 +1,0 @@
-// This file is part of XPLRA, a remote-access plugin for X-Plane
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 14)
+++ test/Makefile.am	(revision 14)
@@ -0,0 +1,15 @@
+INCLUDES=-I $(top_srcdir)/src/client/c $(VSCPL_CFLAGS)
+
+LDADD=../src/client/c/hu/varadiistvan/xplra/libxplra.la
+if TARGET_API_WIN32
+AM_LDFLAGS=-static -static-libgcc -static-libstdc++
+endif
+
+noinst_PROGRAMS=ctest basictest
+
+ctest_SOURCES=ctest.c
+if TARGET_API_WIN32
+ctest_LDFLAGS=-lstdc++
+endif
+
+basictest_SOURCES=basictest.cc
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 14)
+++ 	(revision )
@@ -1,15 +1,0 @@
-INCLUDES=-I $(top_srcdir)/src/client/c $(VSCPL_CFLAGS)
-
-LDADD=../src/client/c/hu/varadiistvan/xplra/libxplra.la
-if TARGET_API_WIN32
-AM_LDFLAGS=-static -static-libgcc -static-libstdc++
-endif
-
-noinst_PROGRAMS=ctest basictest
-
-ctest_SOURCES=ctest.c
-if TARGET_API_WIN32
-ctest_LDFLAGS=-lstdc++
-endif
-
-basictest_SOURCES=basictest.cc
Index: test/basictest.cc
===================================================================
--- test/basictest.cc	(revision 16)
+++ test/basictest.cc	(revision 16)
@@ -0,0 +1,149 @@
+// 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 <cstdio>
+
+//------------------------------------------------------------------------------
+
+using hu::varadiistvan::xplra::XPlane;
+using hu::varadiistvan::xplra::Exception;
+using hu::varadiistvan::xplra::ProtocolException;
+
+using std::string;
+
+//------------------------------------------------------------------------------
+
+int main()
+{
+    try {
+        XPlane xplane;
+
+        printf("Connecting to X-Plane...\n");
+        xplane.connect();
+        printf("Connected to X-Plane.\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 %zu bytes, as a string: '%s'\n\n", 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 %zu bytes, as a string: '%s'\n\n", 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 %zu values:", 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 %zu values:", 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 %zu values:", 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 %zu values:", length);
+        for(size_t i = 0; i<length; ++i) {
+            if (i>0) printf(",");
+            printf(" %f", result6[i]);
+        }
+        printf("\n\n");
+
+        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: test/basictest.cc
===================================================================
--- test/basictest.cc	(revision 15)
+++ 	(revision )
@@ -1,91 +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 <cstdio>
-
-//------------------------------------------------------------------------------
-
-using hu::varadiistvan::xplra::XPlane;
-using hu::varadiistvan::xplra::Exception;
-using hu::varadiistvan::xplra::ProtocolException;
-
-//------------------------------------------------------------------------------
-
-int main()
-{
-    try {
-        XPlane xplane;
-
-        printf("Connecting to X-Plane...\n");
-        xplane.connect();
-        printf("Connected to X-Plane.\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);
-
-        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: test/ctest.c
===================================================================
--- test/ctest.c	(revision 14)
+++ test/ctest.c	(revision 14)
@@ -0,0 +1,42 @@
+/* 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: test/ctest.c
===================================================================
--- test/ctest.c	(revision 14)
+++ 	(revision )
@@ -1,42 +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;
-}
