Changeset 11:215163a309ee in xplra
- Timestamp:
- 01/20/13 09:50:28 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgignore
r0 r11 10 10 config.sub 11 11 ltmain.sh 12 m4/.*\.m4 -
Makefile.am
r0 r11 1 1 SUBDIRS=src 2 ACLOCAL_AMFLAGS=-I m4 -
configure.ac
r1 r11 7 7 AC_PROG_CC 8 8 AC_PROG_CXX 9 AC_CONFIG_MACRO_DIR([m4]) 9 10 10 11 PKG_PROG_PKG_CONFIG 11 12 12 AC_CHECK_HEADERS([windows.h winsock2.h]) 13 14 test "$ac_cv_header_windows_h" = "yes" -a "$ac_cv_header_winsock2_h" = "yes" 15 _target_win32=$? 16 17 AM_CONDITIONAL([TARGET_API_WIN32], test $_target_win32 -eq 0) 18 AM_CONDITIONAL([TARGET_API_WIN64], test $_target_win32 -eq 0 -a "$host_cpu" = "x86_64") 19 AM_CONDITIONAL([TARGET_API_POSIX], test $_target_win32 -ne 0) 20 if test $_target_win32 -eq 0; then 21 if test "$host_cpu" = "x86_64"; then 22 AC_DEFINE([TARGET_API_WIN64], [1], [Define if the target is the 64-bit Win32 API.]) 23 fi 24 AC_DEFINE([TARGET_API_WIN32], [1], [Define if the target is the Win32 API.]) 25 else 26 AC_DEFINE([TARGET_API_POSIX], [1], [Define if the target is the POSIX API.]) 27 fi 13 AM_VSCPL_TARGET_API 28 14 29 15 AC_MSG_CHECKING([where to find the X-Plane Plugin SDK]) … … 51 37 AC_SUBST(XPSDK_LDFLAGS) 52 38 39 AM_VSCPL 53 40 PKG_CHECK_MODULES([LIBXPLCOMMON], [libxplcommon >= 0.1]) 54 41 -
src/xplra/DataRefTask.cc
r3 r11 31 31 #include "DataRefTask.h" 32 32 33 #include " xplcommon/Util.h"33 #include "hu/varadiistvan/xplcommon/Util.h" 34 34 35 35 //------------------------------------------------------------------------------ … … 37 37 using xplra::DataRefTask; 38 38 39 using xplcommon::Util;39 using hu::varadiistvan::xplcommon::Util; 40 40 41 41 //------------------------------------------------------------------------------ -
src/xplra/GetDataRefTask.cc
r8 r11 32 32 #include "Protocol.h" 33 33 34 #include " xplcommon/Util.h"34 #include "hu/varadiistvan/xplcommon/Util.h" 35 35 36 36 //------------------------------------------------------------------------------ … … 41 41 using xplra::GetDoubleDataRefTask; 42 42 43 using xplcommon::DataStream;44 using xplcommon::Util;43 using hu::varadiistvan::scpl::io::DataStream; 44 using hu::varadiistvan::xplcommon::Util; 45 45 46 46 using std::string; -
src/xplra/GetDataRefTask.h
r6 r11 33 33 #include "DataRefTask.h" 34 34 35 #include < xplcommon/DataStream.h>35 #include <hu/varadiistvan/scpl/io/DataStream.h> 36 36 37 37 //------------------------------------------------------------------------------ … … 55 55 * unless the stream failed, in which case it remains RESULT_OK. 56 56 */ 57 static GetDataRefTask* create(uint8_t& result, xplcommon::DataStream& stream); 57 static GetDataRefTask* create(uint8_t& result, 58 hu::varadiistvan::scpl::io::DataStream& stream); 58 59 59 60 /** … … 70 71 * Write the value into the given stream. 71 72 */ 72 virtual void writeValue( xplcommon::DataStream& stream) = 0;73 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream) = 0; 73 74 }; 74 75 … … 141 142 * Write the value into the given stream. 142 143 */ 143 virtual void writeValue( xplcommon::DataStream& stream);144 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream); 144 145 }; 145 146 … … 173 174 * Write the value into the given stream. 174 175 */ 175 virtual void writeValue( xplcommon::DataStream& stream);176 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream); 176 177 }; 177 178 … … 205 206 * Write the value into the given stream. 206 207 */ 207 virtual void writeValue( xplcommon::DataStream& stream);208 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream); 208 209 }; 209 210 … … 289 290 * Write the value into the given stream. 290 291 */ 291 virtual void writeValue( xplcommon::DataStream& stream);292 virtual void writeValue(hu::varadiistvan::scpl::io::DataStream& stream); 292 293 }; 293 294 … … 533 534 template <typename T, class ConcreteClass> 534 535 void GetArrayDataRefTask<T, ConcreteClass>:: 535 writeValue( xplcommon::DataStream& stream)536 writeValue(hu::varadiistvan::scpl::io::DataStream& stream) 536 537 { 537 538 stream.writeS32(length); -
src/xplra/GetMultiDataRefRequest.cc
r10 r11 33 33 #include "Protocol.h" 34 34 35 #include < xplcommon/Util.h>35 #include <hu/varadiistvan/xplcommon/Util.h> 36 36 37 37 //------------------------------------------------------------------------------ … … 39 39 using xplra::GetMultiDataRefRequest; 40 40 41 using xplcommon::DataStream;42 using xplcommon::Util;41 using hu::varadiistvan::scpl::io::DataStream; 42 using hu::varadiistvan::xplcommon::Util; 43 43 44 44 //------------------------------------------------------------------------------ … … 66 66 //------------------------------------------------------------------------------ 67 67 68 void GetMultiDataRefRequest::writeResult( xplcommon::DataStream& stream) const68 void GetMultiDataRefRequest::writeResult(DataStream& stream) const 69 69 { 70 70 // Util::debug("hu.varadiistvan.xplra.GetMultiDataRefRequest[%p]::writeResult\n", this); -
src/xplra/GetMultiDataRefRequest.h
r10 r11 50 50 * specifications from the given stream. 51 51 */ 52 GetMultiDataRefRequest(uint8_t& result, xplcommon::DataStream& stream);52 GetMultiDataRefRequest(uint8_t& result, hu::varadiistvan::scpl::io::DataStream& stream); 53 53 54 54 /** … … 62 62 * the datarefs queried. 63 63 */ 64 void writeResult( xplcommon::DataStream& stream) const;64 void writeResult(hu::varadiistvan::scpl::io::DataStream& stream) const; 65 65 }; 66 66 -
src/xplra/ListenThread.cc
r3 r11 33 33 #include "ServerThread.h" 34 34 35 #include < xplcommon/LocalServerSocket.h>36 #include < xplcommon/LocalAcceptor.h>37 #include < xplcommon/Util.h>35 #include <hu/varadiistvan/scpl/io/LocalServerSocket.h> 36 #include <hu/varadiistvan/scpl/io/LocalAcceptor.h> 37 #include <hu/varadiistvan/xplcommon/Util.h> 38 38 39 39 //------------------------------------------------------------------------------ … … 41 41 using xplra::ListenThread; 42 42 43 using xplcommon::LocalServerSocket;44 using xplcommon::LocalAcceptor;45 using xplcommon::Util;43 using hu::varadiistvan::scpl::io::LocalServerSocket; 44 using hu::varadiistvan::scpl::io::LocalAcceptor; 45 using hu::varadiistvan::xplcommon::Util; 46 46 47 47 //------------------------------------------------------------------------------ -
src/xplra/ListenThread.h
r2 r11 31 31 //------------------------------------------------------------------------------ 32 32 33 #include <hu/varadiistvan/scpl/Thread.h> 34 33 35 #include "RequestQueue.h" 34 36 35 #include <xplcommon/Thread.h> 36 #include <xplcommon/Waiter.h> 37 #include <xplcommon/WaitableEvent.h> 37 #include <hu/varadiistvan/scpl/io/Waiter.h> 38 #include <hu/varadiistvan/scpl/io/WaitableEvent.h> 38 39 39 40 //------------------------------------------------------------------------------ … … 49 50 * This is a detached thread, to allow it to quit automatically. 50 51 */ 51 class ListenThread : public xplcommon::Thread52 class ListenThread : public hu::varadiistvan::scpl::Thread 52 53 { 53 54 private: … … 55 56 * The waiter used in the thread. 56 57 */ 57 xplcommon::Waiter waiter;58 hu::varadiistvan::scpl::io::Waiter waiter; 58 59 59 60 /** … … 61 62 * quit. 62 63 */ 63 xplcommon::WaitableEvent quitEvent;64 hu::varadiistvan::scpl::io::WaitableEvent quitEvent; 64 65 65 66 /** -
src/xplra/Makefile.am
r9 r11 1 1 INCLUDES=@XPSDK_INCLUDES@ 2 2 3 AM_CXXFLAGS=$( LIBXPLCOMMON_CFLAGS)3 AM_CXXFLAGS=$(VSCPL_CFLAGS) $(LIBXPLCOMMON_CFLAGS) 4 4 5 5 AM_CPPFLAGS=-DXPLM210 … … 18 18 AM_CPPFLAGS+=-DLIN 19 19 AM_CXXFLAGS+=-fPIC -fno-stack-protector 20 AM_LDFLAGS=-rdynamic -nodefaultlibs -undefined_warning -Wl,-version-script=$(srcdir)/version.ldscript 20 21 endif 21 22 … … 36 37 SetMultiDataRefRequest.cc 37 38 38 libxplra_la_LIBADD=$( LIBXPLCOMMON_LIBS)39 libxplra_la_LIBADD=$(VSCPL_LIBS) $(LIBXPLCOMMON_LIBS) 39 40 40 41 noinst_HEADERS= \ -
src/xplra/MultiTaskRequest.cc
r8 r11 33 33 #include "Task.h" 34 34 35 #include < xplcommon/Util.h>35 #include <hu/varadiistvan/xplcommon/Util.h> 36 36 37 37 //------------------------------------------------------------------------------ … … 39 39 using xplra::MultiTaskRequest; 40 40 41 using xplcommon::Util;41 using hu::varadiistvan::xplcommon::Util; 42 42 43 43 //------------------------------------------------------------------------------ -
src/xplra/RequestQueue.cc
r2 r11 33 33 #include "Request.h" 34 34 35 #include < xplcommon/Util.h>35 #include <hu/varadiistvan/xplcommon/Util.h> 36 36 37 37 //------------------------------------------------------------------------------ … … 39 39 using xplra::RequestQueue; 40 40 41 using xplcommon::Util;41 using hu::varadiistvan::xplcommon::Util; 42 42 43 43 //------------------------------------------------------------------------------ -
src/xplra/RequestQueue.h
r2 r11 31 31 //------------------------------------------------------------------------------ 32 32 33 #include < xplcommon/Mutex.h>34 #include < xplcommon/CondVar.h>33 #include <hu/varadiistvan/scpl/Mutex.h> 34 #include <hu/varadiistvan/scpl/CondVar.h> 35 35 36 36 #include <XPLMProcessing.h> … … 96 96 * The mutex protecting the queue. 97 97 */ 98 xplcommon::Mutex mutex;98 hu::varadiistvan::scpl::Mutex mutex; 99 99 100 100 /** … … 102 102 * request to be executed. 103 103 */ 104 xplcommon::CondVar requestsDone;104 hu::varadiistvan::scpl::CondVar requestsDone; 105 105 106 106 /** -
src/xplra/ServerThread.cc
r10 r11 39 39 #include "SetMultiDataRefRequest.h" 40 40 41 #include < xplcommon/Util.h>41 #include <hu/varadiistvan/xplcommon/Util.h> 42 42 43 43 #include <cstdio> … … 47 47 using xplra::ServerThread; 48 48 49 using xplcommon::LocalAcceptor;50 using xplcommon::Mutex;51 using xplcommon::Util;49 using hu::varadiistvan::scpl::io::LocalAcceptor; 50 using hu::varadiistvan::scpl::Mutex; 51 using hu::varadiistvan::xplcommon::Util; 52 52 53 53 using std::string; -
src/xplra/ServerThread.h
r10 r11 31 31 //------------------------------------------------------------------------------ 32 32 33 #include < xplcommon/Thread.h>34 35 #include < xplcommon/Mutex.h>36 37 #include < xplcommon/Waiter.h>38 #include < xplcommon/BufferedStream.h>39 #include <xplcommon/DataStream.h> 40 #include < xplcommon/LocalAcceptor.h>33 #include <hu/varadiistvan/scpl/Thread.h> 34 35 #include <hu/varadiistvan/scpl/io/Waiter.h> 36 #include <hu/varadiistvan/scpl/io/BufferedStream.h> 37 #include <hu/varadiistvan/scpl/io/DataStream.h> 38 #include <hu/varadiistvan/scpl/io/LocalAcceptor.h> 39 40 #include <hu/varadiistvan/scpl/Mutex.h> 41 41 42 42 #include <set> … … 59 59 * A thread serving a client. 60 60 */ 61 class ServerThread : public xplcommon::Thread61 class ServerThread : public hu::varadiistvan::scpl::Thread 62 62 { 63 63 private: … … 80 80 * A mutex to protect the collection of server threads. 81 81 */ 82 static xplcommon::Mutex instancesMutex;82 static hu::varadiistvan::scpl::Mutex instancesMutex; 83 83 84 84 /** … … 102 102 * Our waiter. 103 103 */ 104 xplcommon::Waiter waiter;104 hu::varadiistvan::scpl::io::Waiter waiter; 105 105 106 106 /** 107 107 * The buffered stream to use for communication at the low-level. 108 108 */ 109 xplcommon::BufferedStream* bufferedStream;109 hu::varadiistvan::scpl::io::BufferedStream* bufferedStream; 110 110 111 111 /** 112 112 * The data stream being used for communication. 113 113 */ 114 xplcommon::DataStream stream;114 hu::varadiistvan::scpl::io::DataStream stream; 115 115 116 116 /** … … 140 140 */ 141 141 ServerThread(RequestQueue& requestQueue, 142 xplcommon::LocalAcceptor& acceptor);142 hu::varadiistvan::scpl::io::LocalAcceptor& acceptor); 143 143 144 144 /** -
src/xplra/SetDataRefTask.cc
r9 r11 40 40 using xplra::SetDoubleDataRefTask; 41 41 42 using xplcommon::DataStream;42 using hu::varadiistvan::scpl::io::DataStream; 43 43 44 44 using std::string; -
src/xplra/SetDataRefTask.h
r9 r11 33 33 #include "DataRefTask.h" 34 34 35 #include < xplcommon/DataStream.h>35 #include <hu/varadiistvan/scpl/io/DataStream.h> 36 36 37 37 //------------------------------------------------------------------------------ … … 65 65 * @return the new instance or 0 on error. 66 66 */ 67 static SetDataRefTask* create(uint8_t& result, xplcommon::DataStream& stream);67 static SetDataRefTask* create(uint8_t& result, hu::varadiistvan::scpl::io::DataStream& stream); 68 68 69 69 /** … … 80 80 * Read and set the value to update from the given stream 81 81 */ 82 virtual void readValue( xplcommon::DataStream& stream) = 0;82 virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream) = 0; 83 83 }; 84 84 … … 150 150 * Read and set the value to update from the given stream 151 151 */ 152 virtual void readValue( xplcommon::DataStream& stream);152 virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream); 153 153 }; 154 154 … … 181 181 * Read and set the value to update from the given stream 182 182 */ 183 virtual void readValue( xplcommon::DataStream& stream);183 virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream); 184 184 }; 185 185 … … 212 212 * Read and set the value to update from the given stream 213 213 */ 214 virtual void readValue( xplcommon::DataStream& stream);214 virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream); 215 215 }; 216 216 … … 270 270 * Read and set the value to update from the given stream 271 271 */ 272 virtual void readValue( xplcommon::DataStream& stream);272 virtual void readValue(hu::varadiistvan::scpl::io::DataStream& stream); 273 273 274 274 protected: … … 424 424 template <typename T, class ConcreteClass> 425 425 void SetArrayDataRefTask<T, ConcreteClass>:: 426 readValue( xplcommon::DataStream& stream)426 readValue(hu::varadiistvan::scpl::io::DataStream& stream) 427 427 { 428 428 stream.read(value, count * sizeof(T)); -
src/xplra/SetMultiDataRefRequest.cc
r10 r11 37 37 using xplra::SetMultiDataRefRequest; 38 38 39 using xplcommon::DataStream;39 using hu::varadiistvan::scpl::io::DataStream; 40 40 41 41 //------------------------------------------------------------------------------ -
src/xplra/SetMultiDataRefRequest.h
r10 r11 50 50 * the given stream. 51 51 */ 52 SetMultiDataRefRequest(uint8_t& result, xplcommon::DataStream& stream, 52 SetMultiDataRefRequest(uint8_t& result, 53 hu::varadiistvan::scpl::io::DataStream& stream, 53 54 bool readValues); 54 55 … … 56 57 * Read the values of all tasks. 57 58 */ 58 void readValues( xplcommon::DataStream& stream);59 void readValues(hu::varadiistvan::scpl::io::DataStream& stream); 59 60 60 61 /** … … 67 68 * Otherwise the result is RESULT_OK. 68 69 */ 69 void writeResult( xplcommon::DataStream& stream) const;70 void writeResult(hu::varadiistvan::scpl::io::DataStream& stream) const; 70 71 }; 71 72 -
src/xplra/plugin.cc
r9 r11 31 31 #include "ListenThread.h" 32 32 33 #include < xplcommon/Util.h>34 #include < xplcommon/config.h>33 #include <hu/varadiistvan/xplcommon/Util.h> 34 #include <hu/varadiistvan/scpl/config.h> 35 35 36 36 #include <XPLMDefs.h> … … 50 50 using xplra::ListenThread; 51 51 52 using xplcommon::Util;52 using hu::varadiistvan::xplcommon::Util; 53 53 54 54 //------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.