Browse Source

Merge branch '0_0_2_test1' of http://mayun.itc.cmbchina.cn/QD_RemoteBankArea/LR04.02_RVCTerminalPlus into 0_0_2_test1

gifur 4 years ago
parent
commit
dc91fdd571
100 changed files with 3446 additions and 683 deletions
  1. 1 0
      .gitignore
  2. 1 6
      Module/CMakeLists.txt
  3. 2 0
      Module/mod_FingerPrint/FingerPrintFSM.cpp
  4. 86 0
      Module/mod_RomoteController/CMakeLists.txt
  5. 15 1
      Module/mod_RomoteController/MyZip.cpp
  6. 0 10
      Module/mod_RomoteController/RemoteController.xml
  7. 205 208
      Module/mod_RomoteController/RemoteControllerCnn.cpp
  8. 49 38
      Module/mod_RomoteController/RemoteControllerCnn.h
  9. 0 1
      Module/mod_RomoteController/RemoteControllerFSM.cpp
  10. 0 56
      Module/mod_RomoteController/RemoteController_client_g.h
  11. 0 22
      Module/mod_RomoteController/RemoteController_def_g.h
  12. 0 77
      Module/mod_RomoteController/RemoteController_server_g.h
  13. 0 1
      Module/mod_RomoteController/digital_conv.h
  14. 0 24
      Module/mod_RomoteController/mod_RemoteController.cpp
  15. 0 120
      Module/mod_RomoteController/mod_RomoteController.vcxproj
  16. 0 80
      Module/mod_RomoteController/mod_RomoteController.vcxproj.filters
  17. 167 0
      Module/mod_RomoteController/remoteBase.cpp
  18. 29 0
      Module/mod_RomoteController/remoteBase.h
  19. 24 7
      Module/mod_chromium/CModTools.cpp
  20. 1 1
      Module/mod_chromium/CModTools.h
  21. 39 0
      Module/mod_rpc/CMakeLists.txt
  22. 0 31
      Module/mod_rpc/CMakeLists.txt.useless
  23. 0 0
      ThirdParty/Include/XZip/XZip.cpp
  24. 0 0
      ThirdParty/Include/XZip/XZip.h
  25. 24 0
      ThirdParty/Include/msgpack/msgpack.h
  26. 18 0
      ThirdParty/Include/msgpack/msgpack.hpp
  27. 18 0
      ThirdParty/Include/msgpack/msgpack/adaptor/adaptor_base.hpp
  28. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/adaptor_base_decl.hpp
  29. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/array_ref.hpp
  30. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/array_ref_decl.hpp
  31. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/bool.hpp
  32. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/boost/fusion.hpp
  33. 18 0
      ThirdParty/Include/msgpack/msgpack/adaptor/boost/msgpack_variant.hpp
  34. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/boost/msgpack_variant_decl.hpp
  35. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/boost/optional.hpp
  36. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/boost/string_ref.hpp
  37. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/char_ptr.hpp
  38. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/check_container_size.hpp
  39. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/check_container_size_decl.hpp
  40. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/array.hpp
  41. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/array_char.hpp
  42. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/array_unsigned_char.hpp
  43. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/forward_list.hpp
  44. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/reference_wrapper.hpp
  45. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/shared_ptr.hpp
  46. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/tuple.hpp
  47. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/unique_ptr.hpp
  48. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/unordered_map.hpp
  49. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/unordered_set.hpp
  50. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/define.hpp
  51. 142 0
      ThirdParty/Include/msgpack/msgpack/adaptor/define_decl.hpp
  52. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/deque.hpp
  53. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/ext.hpp
  54. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/ext_decl.hpp
  55. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/fixint.hpp
  56. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/fixint_decl.hpp
  57. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/float.hpp
  58. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/int.hpp
  59. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/int_decl.hpp
  60. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/list.hpp
  61. 18 0
      ThirdParty/Include/msgpack/msgpack/adaptor/map.hpp
  62. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/map_decl.hpp
  63. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/msgpack_tuple.hpp
  64. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/msgpack_tuple_decl.hpp
  65. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/nil.hpp
  66. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/nil_decl.hpp
  67. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/pair.hpp
  68. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/raw.hpp
  69. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/raw_decl.hpp
  70. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/set.hpp
  71. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/string.hpp
  72. 171 0
      ThirdParty/Include/msgpack/msgpack/adaptor/tr1/unordered_map.hpp
  73. 165 0
      ThirdParty/Include/msgpack/msgpack/adaptor/tr1/unordered_set.hpp
  74. 17 0
      ThirdParty/Include/msgpack/msgpack/adaptor/v4raw.hpp
  75. 16 0
      ThirdParty/Include/msgpack/msgpack/adaptor/v4raw_decl.hpp
  76. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/vector.hpp
  77. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/vector_bool.hpp
  78. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/vector_char.hpp
  79. 15 0
      ThirdParty/Include/msgpack/msgpack/adaptor/vector_unsigned_char.hpp
  80. 17 0
      ThirdParty/Include/msgpack/msgpack/cpp_config.hpp
  81. 16 0
      ThirdParty/Include/msgpack/msgpack/cpp_config_decl.hpp
  82. 38 0
      ThirdParty/Include/msgpack/msgpack/fbuffer.h
  83. 17 0
      ThirdParty/Include/msgpack/msgpack/fbuffer.hpp
  84. 16 0
      ThirdParty/Include/msgpack/msgpack/fbuffer_decl.hpp
  85. 25 0
      ThirdParty/Include/msgpack/msgpack/gcc_atomic.h
  86. 18 0
      ThirdParty/Include/msgpack/msgpack/iterator.hpp
  87. 17 0
      ThirdParty/Include/msgpack/msgpack/iterator_decl.hpp
  88. 18 0
      ThirdParty/Include/msgpack/msgpack/meta.hpp
  89. 17 0
      ThirdParty/Include/msgpack/msgpack/meta_decl.hpp
  90. 111 0
      ThirdParty/Include/msgpack/msgpack/object.h
  91. 17 0
      ThirdParty/Include/msgpack/msgpack/object.hpp
  92. 17 0
      ThirdParty/Include/msgpack/msgpack/object_decl.hpp
  93. 19 0
      ThirdParty/Include/msgpack/msgpack/object_fwd.hpp
  94. 17 0
      ThirdParty/Include/msgpack/msgpack/object_fwd_decl.hpp
  95. 147 0
      ThirdParty/Include/msgpack/msgpack/pack.h
  96. 17 0
      ThirdParty/Include/msgpack/msgpack/pack.hpp
  97. 16 0
      ThirdParty/Include/msgpack/msgpack/pack_decl.hpp
  98. 18 0
      ThirdParty/Include/msgpack/msgpack/pack_define.h
  99. 909 0
      ThirdParty/Include/msgpack/msgpack/pack_template.h
  100. 19 0
      ThirdParty/Include/msgpack/msgpack/predef.h

+ 1 - 0
.gitignore

@@ -197,3 +197,4 @@ _deps
 #CMakeSettings.json
 /Other/libimageproc/RCa15420
 /cpp.hint
+!/ThirdParty/Include/msgpack/msgpack/preprocessor/debug

+ 1 - 6
Module/CMakeLists.txt

@@ -204,12 +204,7 @@ add_subdirectory(mod_counterconnector)
 #add_subdirectory(mod_ResourceWatcher)
 #add_subdirectory(mod_livenessdetection)
 #add_subdirectory(mod_SalesRecorder)
-
-
-
-
-
-
+add_subdirectory(mod_RomoteController)
 
 
 

+ 2 - 0
Module/mod_FingerPrint/FingerPrintFSM.cpp

@@ -199,6 +199,8 @@ ErrorCodeEnum CFingerPrintFSM::OnInit()
 {
 	LOG_FUNCTION();
 
+	CDevAdptEntityBase* pEntity = GET_DEV_ENTITY_BASE_POINTER();
+	pEntity->InitializeVendorLogSwitch();
 	ErrorCodeEnum errDev;
 	CSimpleStringA strLibFullPath(true);
 	errDev = ExtractVendorLib(strLibFullPath);

+ 86 - 0
Module/mod_RomoteController/CMakeLists.txt

@@ -0,0 +1,86 @@
+define_module("RomoteController")
+
+file(GLOB RomoteControl_CPP_SRCS *.cpp)
+file(GLOB RomoteControl_H_SRCS *.h)
+if (MSVC)
+	set(ZIP_SRCS
+	${ThirdPartyHeadRoot}/XZip/XZip.h
+	${ThirdPartyHeadRoot}/XZip/XZip.cpp
+	)
+else()
+	set(ZIP_SRCS
+	../mod_upload/XZipZilb.h
+	../mod_upload/XZipZilb.cpp
+	)
+endif()
+
+MESSAGE( STATUS "RomoteControl_CPP_SRCS = ${RomoteControl_CPP_SRCS}")
+MESSAGE( STATUS "RomoteControl_H_SRCS = ${RomoteControl_H_SRCS}")
+MESSAGE( STATUS "ZIP_SRCS = ${ZIP_SRCS}")
+
+	#need boost
+conan_cmake_run(REQUIRES boost/1.69.0@LR04.02_ThirdParty/testing
+BASIC_SETUP CMAKE_TARGETS
+BUILD missing)
+
+MESSAGE( STATUS "BOOST_ROOT = ${CONAN_BOOST_ROOT}")
+#set(BOOST_ROOT /home/pcacc/Desktop/boost_1_69_0)
+set(BOOST_ROOT ${CONAN_BOOST_ROOT})
+
+set(Boost_DEBUG ON)
+set(Boost_USE_STATIC_LIBS   ON)
+if (MSVC)
+else()
+	set(Boost_NO_SYSTEM_PATHS ON)
+	set(Boost_USE_MULTITHREADED      ON)
+	set(Boost_USE_STATIC_RUNTIME    ON)
+	add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)
+endif()
+
+find_package(Boost COMPONENTS atomic chrono date_time filesystem regex system thread REQUIRED)
+
+if(Boost_FOUND)
+	include_directories(${Boost_INCLUDE_DIRS})
+	MESSAGE( STATUS "Boost_INCLUDE_DIRS = ${Boost_INCLUDE_DIRS}")
+	MESSAGE( STATUS "Boost_LIBRARIES = ${Boost_LIBRARIES}")
+	MESSAGE( STATUS "Boost_LIB_VERSION = ${Boost_LIB_VERSION}")
+endif()
+
+#boost end
+
+conan_cmake_run(REQUIRES zlib/1.2.11@LR04.02_ThirdParty/stable
+BASIC_SETUP CMAKE_TARGETS
+BUILD missing)
+
+MESSAGE( STATUS "CONAN_INCLUDE_DIRS_ZLIB = ${CONAN_INCLUDE_DIRS_ZLIB}")
+MESSAGE( STATUS "CONAN_PKG_LIBS_ZLIB = ${CONAN_PKG_LIBS_ZLIB}")
+
+set(${MODULE_PREFIX}_SRCS
+	${RomoteControl_CPP_SRCS}
+	${RomoteControl_H_SRCS}
+	${ThirdPartyHeadRoot}/CJson/cJSON.c
+	${Boost_INCLUDE_DIRS}
+	${ZIP_SRCS}
+	)
+
+set(MOD_VERSION_STRING "0.0.1-dev1")
+add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
+
+target_include_directories(${MODULE_NAME} PRIVATE
+	${RVC_FRAMEWORK_INCLUDES_DIR}
+	${CONAN_INCLUDE_DIRS_OPENSSL}
+	${ThirdPartyHeadRoot}/CJson
+	${CONAN_LIB_DIRS_BOOST}
+	${CONAN_INCLUDE_DIRS_ZLIB}
+	${ThirdPartyHeadRoot}/XZip
+)
+
+target_link_directories(${MODULE_NAME} PRIVATE
+	${CONAN_LIB_DIRS_ZLIB}
+)
+
+# 添加实体需要依赖的其他共享库(包括系统库)
+set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_LIBS} ${RVCCOMM_LIB} ${CONAN_PKG_LIBS_ZLIB})
+target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} CONAN_PKG::OpenSSL ${Boost_LIBRARIES})
+
+deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 15 - 1
Module/mod_RomoteController/MyZip.cpp

@@ -1,5 +1,8 @@
 #include "MyZip.h"
 
+
+#if (defined _WIN32 || defined _WIN64)
+
 #include <cstring>
 #include <windows.h>
 #include <winnt.h>
@@ -157,4 +160,15 @@ std::pair<bool, std::string> ZipVector(const std::string &dstFile, const std::ve
 
 }
 
-}
+}
+#else
+std::pair<bool, std::string> ZipDir(const std::string& dstFile, const std::string& srcDir, void* hz = NULL)
+{
+	return std::make_pair(true, "");
+}
+std::pair<bool, std::string> ZipVector(const std::string& dstFile, const std::vector<std::string>& srcArr)
+{
+	return std::make_pair(true, "");
+}
+
+#endif

+ 0 - 10
Module/mod_RomoteController/RemoteController.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="gb2312"?>
-<entity name="RemoteController">
-  <class name="RemoteControllerService" overlap="true" exclusive="false">
-    <!--<oneway name="Unregist" overlap="true">
-        <param name="nReason" type="int"/>
-        <param name="nWay" type="int"/>
-    </oneway>-->
-  </class>
-</entity>
-

File diff suppressed because it is too large
+ 205 - 208
Module/mod_RomoteController/RemoteControllerCnn.cpp


+ 49 - 38
Module/mod_RomoteController/RemoteControllerCnn.h

@@ -92,8 +92,8 @@ struct RvcViewDbgReq
     int TaskID;					 // 任务号
     char EntityName[32];    // 实体名
     char ViewDate[10];		// 查看对应日期的日志,空表示当天,如"20131218"
-    __int64 StartPos;          // 起始位移,0表示从头开始
-    __int64 MaxRetBytes;   // 最大返回字节数
+    long long StartPos;          // 起始位移,0表示从头开始
+    long long MaxRetBytes;   // 最大返回字节数
 };
 
 //[StructName("ViewDbgA")]
@@ -102,8 +102,8 @@ struct RvcViewDbgRet
     int TaskID;					// 任务号
 	char EntityName[32];	// 实体名
     char ViewDate[10];		// 查看对应日期的日志,空表示当天,如"20131218"
-    __int64 NextPos;			// 下次开始位移,如果为0表示已结束
-	__int64 FileLength;       // 当前日志文件长度
+    long long NextPos;			// 下次开始位移,如果为0表示已结束
+	long long FileLength;       // 当前日志文件长度
     char LogData[0];          // 日志内容(变长字段)
 };
 
@@ -125,10 +125,21 @@ struct RvcOperateDiskReq
 struct RvcOperateDiskJsonRet
 {
 	int TaskID;
-	__int64 jsonLength;
+	long long jsonLength;
 	char jsonData[0];
 };
 
+#if !(defined _WIN32 || defined _WIN64)
+
+#define _TRUNCATE ((size_t)-1)
+int strncpy_s(char* _Destination, size_t _SizeInBytes, char const* _Source, size_t _MaxCount);
+
+int strncpy_s(char* _Destination, char const* _Source, size_t _MaxCount);
+
+#endif
+
+#include "remoteBase.h"
+
 // [StructName("OprDiskA2")]
 class RvcOperateDiskRet2
 {
@@ -139,8 +150,8 @@ public:
 		ZeroMemory(fileName, sizeof(fileName));
 		ZeroMemory(reserved2, sizeof(reserved2));
 	}
-	RvcOperateDiskRet2(const CSimpleStringA &oldName, const unsigned __int64 &oldSize, const unsigned __int64 &oldCreate, const unsigned __int64 &oldModified, 
-		const unsigned __int64 &oldAccess, const unsigned int &oldAttribute, const unsigned int &oldForbidAttributes, const int &oldReserved1, const CSimpleStringA &oldReserved2)
+	RvcOperateDiskRet2(const CSimpleStringA &oldName, const unsigned long long &oldSize, const unsigned long long &oldCreate, const unsigned long long &oldModified, 
+		const unsigned long long &oldAccess, const unsigned int &oldAttribute, const unsigned int &oldForbidAttributes, const int &oldReserved1, const CSimpleStringA &oldReserved2)
 		:fileSize(oldSize), ftCreate(oldCreate), ftModified(oldModified), ftAccess(oldAccess), fileAttribute(oldAttribute), forbidAttributes(oldForbidAttributes), reserved1(oldReserved1)
 	{
 		ZeroMemory(fileName, sizeof(fileName));
@@ -426,16 +437,16 @@ struct RvcUploadEventLogReq
 	unsigned short evtName;              //0x0000:不筛选,0x0001:应用程序,0x0002:安全,0x0004:Setup,0x0008:系统,0x0100:自定义,0x00FF:全部类型(不包括自定义)
 	unsigned short evtLevel;             //0x0000:不筛选,0x0001:错误,0x0002:警告,0x0004:信息,0x0008:审计成功,0x0010:审计失败,0x00FF:全部类型
 	unsigned short duration;             //0x0000:任何时间,0x0001: 近1小时,0x0002:近12小时,0x0003:近1天,0x0004:近7天,0x0005:近30天,0x000F:自定义
-	unsigned __int64 startTime;            //当 duration == 0x000F 时有效,如下两项有效,startTime存储筛选的开始时间,endTime存储筛选的结束时间,具体到秒,需满足endTime >= startTime
-	unsigned __int64 endTime;
+	unsigned long long startTime;            //当 duration == 0x000F 时有效,如下两项有效,startTime存储筛选的开始时间,endTime存储筛选的结束时间,具体到秒,需满足endTime >= startTime
+	unsigned long long endTime;
 	char cusEvtFileName[260];        //当 evtName == 0x0100 时有效,存储 日志名称
 	char evtSrcEventName[260];			//存储事件日志来源,一般应用程序名称,比较常用的应该是“Application Error”,不指定请置为NULL或“”
 	int reversed1;               //保留字段
 	char reversed2[260];
 
 	char UploadFile[128];		// 第一次传入指定日志文件名, 续传时传入上传后保存文件名
-	__int64 StartPos;				// 起始位移,0表示从头开始
-	__int64 MaxRetBytes;		// 最大返回字节数
+	long long StartPos;				// 起始位移,0表示从头开始
+	long long MaxRetBytes;		// 最大返回字节数
 };
 
 //[StructName("EvtLogA")]
@@ -443,9 +454,9 @@ struct RvcUploadEventLogRet
 {
 	int TaskID;						  // 任务号
 	char UploadFile[128];         // 导出后文件名
-	__int64 ZipFileLen;             // 压缩后长度
-	__int64 StartPos;				 // 起始位移,0表示从头开始
-	__int64 NextPos;               // 下次开始位移,如果为0表示已结束
+	long long ZipFileLen;             // 压缩后长度
+	long long StartPos;				 // 起始位移,0表示从头开始
+	long long NextPos;               // 下次开始位移,如果为0表示已结束
 	char LogData[0];				 // 日志内容(变长字段)
 };
 
@@ -459,8 +470,8 @@ struct RvcUploadLogByDateReq
 	 int TaskID;						// 任务号
 	 char ViewDate[10];		// 查看对应日期的日志,空表示当天,如"20131218"
 	 char UploadFile[128];		// 第一次传入指定日志文件名, 续传时传入上传后保存文件名
-	 __int64 StartPos;				// 起始位移,0表示从头开始
-	 __int64 MaxRetBytes;		// 最大返回字节数
+	 long long StartPos;				// 起始位移,0表示从头开始
+	 long long MaxRetBytes;		// 最大返回字节数
 };
 
 //[StructName("ULogBDA")]
@@ -468,9 +479,9 @@ struct RvcUploadLogByDateRet
 {
 	int TaskID;						  // 任务号
 	char UploadFile[128];         // 导出后文件名
-	__int64 ZipFileLen;             // 压缩后长度
-	__int64 StartPos;				 // 起始位移,0表示从头开始
-	__int64 NextPos;               // 下次开始位移,如果为0表示已结束
+	long long ZipFileLen;             // 压缩后长度
+	long long StartPos;				 // 起始位移,0表示从头开始
+	long long NextPos;               // 下次开始位移,如果为0表示已结束
 	char LogData[0];				 // 日志内容(变长字段)
 };
 
@@ -482,8 +493,8 @@ struct RvcUploadLogReq
 {
 	 int TaskID;						// 任务号
 	 char UploadFile[128];		// 第一次传入指定日志文件名, 续传时传入上传后保存文件名
-	 __int64 StartPos;				// 起始位移,0表示从头开始
-	 __int64 MaxRetBytes;		// 最大返回字节数
+	 long long StartPos;				// 起始位移,0表示从头开始
+	 long long MaxRetBytes;		// 最大返回字节数
 };
 
 //[StructName("UpldLogA")]
@@ -491,9 +502,9 @@ struct RvcUploadLogRet
 {
 	int TaskID;						  // 任务号
 	char UploadFile[128];         // 导出后文件名
-	__int64 ZipFileLen;             // 压缩后长度
-	__int64 StartPos;				 // 起始位移,0表示从头开始
-	__int64 NextPos;               // 下次开始位移,如果为0表示已结束
+	long long ZipFileLen;             // 压缩后长度
+	long long StartPos;				 // 起始位移,0表示从头开始
+	long long NextPos;               // 下次开始位移,如果为0表示已结束
 	char LogData[0];				 // 日志内容(变长字段)
 };
 
@@ -507,8 +518,8 @@ struct RvcBatchUploadLogsByDateReq
 	char ViewDate[10];		// 查看对应日期的日志,空表示当天,如"20131218"
 	char UploadFile[1024];		// 批量导出日志名,以;分隔
 	char ZipFileName[128];		 // 压缩文件包名
-	__int64 StartPos;				// 起始位移,0表示从头开始
-	__int64 MaxRetBytes;			// 最大返回字节数
+	long long StartPos;				// 起始位移,0表示从头开始
+	long long MaxRetBytes;			// 最大返回字节数
 };
 
 struct RvcBatchUploadLogsByDateReq2
@@ -517,8 +528,8 @@ struct RvcBatchUploadLogsByDateReq2
 	char ViewDate[10];		// 查看对应日期的日志,空表示当天,如"20131218"
 	char UploadFile[512];		// 批量导出日志名,以;分隔
 	char ZipFileName[128];		 // 压缩文件包名
-	__int64 StartPos;				// 起始位移,0表示从头开始
-	__int64 MaxRetBytes;			// 最大返回字节数
+	long long StartPos;				// 起始位移,0表示从头开始
+	long long MaxRetBytes;			// 最大返回字节数
 };
 
 //[StructName("ULogsBDA")]
@@ -526,9 +537,9 @@ struct RvcBatchUploadLogsByDateRet
 {
 	int TaskID;						  // 任务号
 	char ZipFileName[128];		 // 压缩文件包名
-	__int64 ZipFileLen;             // 压缩后长度
-	__int64 StartPos;				 // 起始位移,0表示从头开始
-	__int64 NextPos;               // 下次开始位移,如果为0表示已结束
+	long long ZipFileLen;             // 压缩后长度
+	long long StartPos;				 // 起始位移,0表示从头开始
+	long long NextPos;               // 下次开始位移,如果为0表示已结束
 	char LogData[0];				// 日志内容(变长字段)
 };
 
@@ -543,8 +554,8 @@ struct RvcBatchUploadLogsReq
 	int TaskID;						// 任务号
 	char UploadFile[1024];		// 批量导出日志名,以;分隔
 	char ZipFileName[128];		 // 压缩文件包名
-	__int64 StartPos;				// 起始位移,0表示从头开始
-	__int64 MaxRetBytes;			// 最大返回字节数
+	long long StartPos;				// 起始位移,0表示从头开始
+	long long MaxRetBytes;			// 最大返回字节数
 };
 
 struct RvcBatchUploadLogsReq2
@@ -552,8 +563,8 @@ struct RvcBatchUploadLogsReq2
 	int TaskID;						// 任务号
 	char UploadFile[512];		// 批量导出日志名,以;分隔
 	char ZipFileName[128];		 // 压缩文件包名
-	__int64 StartPos;				// 起始位移,0表示从头开始
-	__int64 MaxRetBytes;			// 最大返回字节数
+	long long StartPos;				// 起始位移,0表示从头开始
+	long long MaxRetBytes;			// 最大返回字节数
 };
 
 //[StructName("UpdLogsA")]
@@ -561,9 +572,9 @@ struct RvcBatchUploadLogsRet
 {
 	int TaskID;						  // 任务号
 	char ZipFileName[128];		 // 压缩文件包名
-	__int64 ZipFileLen;             // 压缩后长度
-	__int64 StartPos;				 // 起始位移,0表示从头开始
-	__int64 NextPos;               // 下次开始位移,如果为0表示已结束
+	long long ZipFileLen;             // 压缩后长度
+	long long StartPos;				 // 起始位移,0表示从头开始
+	long long NextPos;               // 下次开始位移,如果为0表示已结束
 	char LogData[0];				// 日志内容(变长字段)
 };
 

+ 0 - 1
Module/mod_RomoteController/RemoteControllerFSM.cpp

@@ -1,4 +1,3 @@
-#include "stdafx.h"
 #include "RemoteControllerFSM.h"
 
 

+ 0 - 56
Module/mod_RomoteController/RemoteController_client_g.h

@@ -1,56 +0,0 @@
-
-#ifndef __REMOTECONTROLLER_CLIENT_G_H
-#define __REMOTECONTROLLER_CLIENT_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "RemoteController_def_g.h"
-
-namespace RemoteController {
-class RemoteControllerService_ClientBase : public CClientSessionBase {
-public:
-	RemoteControllerService_ClientBase(CEntityBase *pEntity) : m_pEntityBase(pEntity), m_bSysManaged(false) {}
-
-protected:
-	virtual ~RemoteControllerService_ClientBase() {}
-public:
-
-	ErrorCodeEnum Connect(CSmartPointer<IAsynWaitSp> &spAsyncWait)
-	{
-		CSmartPointer<IEntityFunction> pFunc = m_pEntityBase->GetFunction();
-		ErrorCodeEnum Error = pFunc->ConnectRemoteEntity(this, "RemoteController", "RemoteControllerService", spAsyncWait);
-		if (Error == Error_Succeed) {
-			m_bSysManaged = true;
-		}
-		return Error;
-	}
-	ErrorCodeEnum Connect()
-	{
-		CSmartPointer<IAsynWaitSp> spAsyncWait;
-		ErrorCodeEnum Error = Connect(spAsyncWait);
-		if (Error == Error_Succeed) {
-			Error = spAsyncWait->WaitAnswer();
-		}
-		return Error;
-	}
-
-
-	bool SafeDelete()
-	{
-		if (!m_bSysManaged) {
-			delete this;
-		}
-		return m_bSysManaged;
-	}
-
-protected:
-	bool m_bSysManaged;
-	CEntityBase *m_pEntityBase;
-};
-
-///////////////////////////
-
-} // namespace RemoteController
-#endif // __REMOTECONTROLLER_CLIENT_G_H

+ 0 - 22
Module/mod_RomoteController/RemoteController_def_g.h

@@ -1,22 +0,0 @@
-#ifndef __REMOTECONTROLLER_DEF_G_H
-#define __REMOTECONTROLLER_DEF_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "SpHelper.h"
-
-namespace RemoteController {
-//
-// const goes here
-//
-
-
-
-
-///////////////////////////
-
-} // namespace RemoteController
-
-#endif // __REMOTECONTROLLER_DEF_G_H

+ 0 - 77
Module/mod_RomoteController/RemoteController_server_g.h

@@ -1,77 +0,0 @@
-
-#ifndef __REMOTECONTROLLER_SERVER_G_H
-#define __REMOTECONTROLLER_SERVER_G_H
-
-#pragma once
-
-// This code is generated by spgen tool!
-
-#include "RemoteController_def_g.h"
-
-namespace RemoteController {
-class RemoteControllerService_ServerSessionBase : public CServerSessionBase
-{
-public:
-	RemoteControllerService_ServerSessionBase() { }
-
-	virtual ~RemoteControllerService_ServerSessionBase() { }
-
-	virtual bool IsExclusive() { return false; }
-
-	virtual bool IsSessionOverlap() { return true; }
-
-	virtual ErrorCodeEnum GetMessageAttr(DWORD dwMessageID, DWORD dwSignature, bool &bOverlap)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	int CheckMessageSignature(DWORD dwMessageID, DWORD dwSignature)
-	{
-		ErrorCodeEnum Error = Error_Succeed;
-		switch (dwMessageID) {
-		default:
-			Error = Error_MethodNotFound;
-			break;
-		}
-		return Error;
-	}
-
-	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
-	{
-		CAutoBuffer Buf;
-		DWORD dwMessageID;
-		DWORD dwMessageSignature;
-		ErrorCodeEnum Error = pTransactionContext->GetReceiveBuffer(dwMessageID, dwMessageSignature, Buf);
-		if (Error == Error_Succeed) {
-#ifdef DEBUG
-			assert(CheckMessageSignature(dwMessageID, dwMessageSignature) == Error_Succeed);
-#else
-			if (CheckMessageSignature(dwMessageID, dwMessageSignature) != Error_Succeed) {
-				pTransactionContext->SendAnswer(Error_MethodSignatureFailed);
-				return;
-			}
-#endif
-			switch (dwMessageID) {
-				default:
-					assert(0);
-					break;
-			}
-			
-		} else {
-			pTransactionContext->SendAnswer(Error);
-		}
-	}
-
-};
-
-
-///////////////////////////
-
-} // namespace RemoteController
-#endif // __REMOTECONTROLLER_SERVER_G_H

+ 0 - 1
Module/mod_RomoteController/digital_conv.h

@@ -6,7 +6,6 @@
 *********************************************************************/
 
 #pragma once
-#include "stdafx.h"
 #include "string_util.h"
 
 

+ 0 - 24
Module/mod_RomoteController/mod_RemoteController.cpp

@@ -1,24 +1,10 @@
-#include "stdafx.h"
 #include "SpBase.h"
 #include "Event.h"
-
-#include "RemoteController_server_g.h"
-using namespace RemoteController;
-
 #include "RemoteControllerFSM.h"
 
 // Ô¶³Ì¿ØÖÆ 0x504
 class CRemoteControllerEntity;
 
-class CRemoteControllerSession : public RemoteControllerService_ServerSessionBase
-{
-public:
-	CRemoteControllerSession(CRemoteControllerEntity *pEntity) : m_pEntity(pEntity) {}
-	virtual ~CRemoteControllerSession() {}
-
-private:
-	CRemoteControllerEntity *m_pEntity;
-};
 
 //class PinPadClass;
 class CRemoteControllerEntity : public CEntityBase, public ILogListener
@@ -33,13 +19,8 @@ public:
 	virtual void OnStarted()
 	{
 		m_FSM.Init(this);
-
 		// subscribe heartbeat entity event for create remote control channel
 		GetFunction()->SubscribeLog(m_LogSubID, this, Log_Event,  Severity_None, Error_IgnoreAll, EVENT_START_REMOTE_CONTROL, "HeartBeat", true);
-
-		// {TEST}+
-		//m_FSM.PostEventFIFO(new FSMEvent(CRemoteControllerFSM::Event_CreateChannel));		
-		// {TEST}-
 	}	
 
 	virtual void OnPreClose(EntityCloseCauseEnum eCloseCause,CSmartPointer<ITransactionContext> pTransactionContext)
@@ -50,16 +31,11 @@ public:
 		pTransactionContext->SendAnswer(Error_Succeed);
 	}
 		
-	virtual CServerSessionBase *OnNewSession(const char* /*pszRemoteEntityName*/, const char * /*pszClass*/)
-	{
-		return new CRemoteControllerSession(this);
-	}
 
 	virtual void OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
 		const DWORD dwSysError,const DWORD dwUserCode,const DWORD dwEntityInstanceID, const WORD wEntityDevelID, 
 		const CAutoArray<DWORD> &Param, const char *pszEntityName, const char *pszModuleName,const char *pszMessage)
 	{
-		//assert(dwUserCode == EVENT_START_REMOTE_CONTROL);
 		Dbg("recv log event: %d", dwUserCode);
 		if (dwUserCode == EVENT_START_REMOTE_CONTROL)
 		{

+ 0 - 120
Module/mod_RomoteController/mod_RomoteController.vcxproj

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <ItemGroup>
-    <Xml Include="RemoteController.xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="$(FrameworkHeadRoot)\Common\stdafx.h" />
-    <ClInclude Include="base64.h" />
-    <ClInclude Include="Event.h" />
-    <ClInclude Include="MyZip.h" />
-    <ClInclude Include="RemoteControllerCnn.h" />
-    <ClInclude Include="RemoteControllerFSM.h" />
-    <ClInclude Include="RemoteController_client_g.h" />
-    <ClInclude Include="RemoteController_def_g.h" />
-    <ClInclude Include="RemoteController_server_g.h" />
-    <ClInclude Include="XZip.h" />
-    <ClInclude Include="$(ThirdPartyHeadRoot)\CJson\cJson.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="$(FrameworkHeadRoot)\Common\stdafx.cpp" />
-    <ClCompile Include="base64.cpp" />
-    <ClCompile Include="mod_RemoteController.cpp" />
-    <ClCompile Include="MyZip.cpp">
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
-      <TreatWChar_tAsBuiltInType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</TreatWChar_tAsBuiltInType>
-    </ClCompile>
-    <ClCompile Include="RemoteControllerCnn.cpp" />
-    <ClCompile Include="RemoteControllerFSM.cpp" />
-    <ClCompile Include="$(ThirdPartyHeadRoot)\CJson\cJson.c" />
-    <ClCompile Include="XZip.cpp">
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
-    </ClCompile>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{8D091091-063E-48B4-9673-FA9CA4A4F3FE}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>mod_RomoteController</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>Windows7.1SDK</PlatformToolset>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <Import Project="..\modmake.setting" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_ROMOTECONTROLLER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(FrameworkHeadRoot)\Common;$(FrameworkHeadRoot)\libtoolkit;$(ThirdPartyHeadRoot)\CJson</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>$(FrameworkLib)\RVCComm.lib;$(FrameworkLib)\SpBase.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_ROMOTECONTROLLER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(FrameworkHeadRoot)\Common;$(FrameworkHeadRoot)\libtoolkit</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>$(FrameworkLib)\RVCComm.lib;$(FrameworkLib)\SpBase.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 0 - 80
Module/mod_RomoteController/mod_RomoteController.vcxproj.filters

@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Header Files">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="Resource Files">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <Xml Include="RemoteController.xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="RemoteController_client_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="RemoteController_def_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="RemoteController_server_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="RemoteControllerFSM.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="RemoteControllerCnn.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="Event.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="$(FrameworkHeadRoot)\Common\stdafx.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="XZip.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="cJson.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="base64.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="mod_RemoteController.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="RemoteControllerFSM.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="RemoteControllerCnn.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="$(FrameworkHeadRoot)\Common\stdafx.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="XZip.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="cJson.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="base64.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc">
-      <Filter>Resource Files</Filter>
-    </ResourceCompile>
-  </ItemGroup>
-</Project>

+ 167 - 0
Module/mod_RomoteController/remoteBase.cpp

@@ -0,0 +1,167 @@
+#include "remoteBase.h"
+//ip
+#include <vector>
+#include <string>
+#include <boost/asio.hpp> 
+#include <boost/algorithm/string.hpp>
+#include <boost/lexical_cast.hpp>
+#include <cstdio>
+using boost::asio::ip::tcp;
+
+#include <boost/format.hpp>
+#include <boost/date_time/gregorian/gregorian.hpp>
+
+//ini write
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/ini_parser.hpp>
+
+
+namespace fs = boost::filesystem;
+
+bool Base_DeleteFile(std::string filePath)
+{
+	
+	if (fs::exists(filePath))
+		return fs::remove(filePath);
+	return false;
+}
+
+bool Base_Exist(std::string filePath)
+{
+	return fs::exists(filePath);
+}
+
+uintmax_t Base_filesize(std::string filePath)
+{
+	return fs::file_size(filePath);
+}
+
+
+std::pair<bool, int> Base_readFile(std::string filePath, uintmax_t start, char* readBuf, int readSize)
+{
+	auto cfgFile = fopen(filePath.c_str(), "r");
+	if (nullptr == cfgFile)
+		return std::make_pair(false, 0);
+	else
+	{
+		if (0 != fseek(cfgFile, start, SEEK_SET))
+			return std::make_pair(false, 0);
+
+		char* pBuf = new char[readSize];
+		memset(pBuf, 0, readSize);
+
+		int nHasRead = fread(readBuf, readSize, 1, cfgFile);
+
+		if (nHasRead <= 0)
+			return std::make_pair(false, 0);
+		delete[] pBuf;
+		fclose(cfgFile);
+		return std::make_pair(true, nHasRead);
+	}
+}
+
+
+bool Base_GetHostIPAddr(BYTE addr[4])
+{
+	boost::asio::io_service io_service;
+	tcp::resolver resolver(io_service);
+	tcp::resolver::query query(boost::asio::ip::host_name(), "");
+	tcp::resolver::iterator iter = resolver.resolve(query);
+	tcp::resolver::iterator end; // End marker. 
+	while (iter != end)
+	{
+		tcp::endpoint ep = *iter++;
+		if (ep.address().is_v4())
+		{
+			auto ipaddr = ep.address().to_string();
+			std::vector<std::string> vec;
+			boost::split(vec, ipaddr, boost::is_any_of("."));
+			if (4 == vec.size())
+			{
+				for (auto i = 0; i < vec.size(); i++)
+				{
+					int it = boost::lexical_cast<int>(vec[i].c_str());
+					addr[i] = it;
+				}
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
+bool Base_CopyFile(std::string src, std::string dst)
+{
+	boost::system::error_code ec;
+	if (fs::exists(src))
+	{
+		fs::copy_file(src, dst, boost::filesystem::copy_option::overwrite_if_exists, ec);
+		if (!ec.failed())
+			return true;
+	}
+	else
+		return false;
+}
+
+//替换所有需要更换日期的地方
+std::string getCurData()
+{
+	boost::gregorian::date d(boost::gregorian::day_clock::local_day());
+	return (boost::format("%.4d%.2d%.2d") % d.year() % d.month().as_number() % d.day()).str();
+}
+
+//统一切换stricmp,Linux和windows部分都切换,因为很多使用了CSimpleString来比较
+bool iequals(const std::string& a, const std::string& b)
+{
+	unsigned int sz = a.size();
+	if (b.size() != sz)
+		return false;
+	for (unsigned int i = 0; i < sz; ++i)
+		if (tolower(a[i]) != tolower(b[i]))
+			return false;
+	return true;
+}
+
+unsigned int get_proc_mem(unsigned int pid) {//获取进程占用内存
+
+	auto VMRSS_LINE = 17;
+	char file_name[64] = { 0 };
+	FILE* fd;
+	char line_buff[512] = { 0 };
+	sprintf(file_name, "/proc/%d/status", pid);
+
+	fd = fopen(file_name, "r");
+	if (nullptr == fd) {
+		return 0;
+	}
+
+	char name[64];
+	int vmrss;
+	for (int i = 0; i < VMRSS_LINE - 1; i++) {
+		fgets(line_buff, sizeof(line_buff), fd);
+	}
+
+	fgets(line_buff, sizeof(line_buff), fd);
+	sscanf(line_buff, "%s %d", name, &vmrss);
+	fclose(fd);
+
+	return vmrss;
+}
+
+std::string getPathName(std::string filePath)
+{
+	return fs::path(filePath).filename().string();
+}
+
+template<typename T>
+void Base_writeIni(std::string section, std::string key, T value, std::string cfgPath)
+{
+	boost::property_tree::ptree lvptProperties;
+	boost::property_tree::ini_parser::read_ini(cfgPath, lvptProperties);
+	boost::property_tree::basic_ptree<std::string, std::string> lvbtItems = lvptProperties.get_child(section);
+
+
+		lvptProperties.add<T>(key, value);
+
+	boost::property_tree::ini_parser::write_ini(cfgPath, lvptProperties);
+}

+ 29 - 0
Module/mod_RomoteController/remoteBase.h

@@ -0,0 +1,29 @@
+#include "SpBase.h"
+#include <string>
+#include <vector>
+#include <boost/filesystem.hpp>
+#include <stdio.h>
+#include <utility>
+
+bool Base_GetHostIPAddr(BYTE addr[4]);
+
+std::string getCurData();
+
+bool Base_DeleteFile(std::string filePath);
+
+bool Base_Exist(std::string filePath);
+
+bool iequals(const std::string& a, const std::string& b);
+
+bool Base_CopyFile(std::string src, std::string dst);
+
+uintmax_t Base_filesize(std::string filePath);
+
+std::pair<bool, int> Base_readFile(std::string filePath, uintmax_t start, char* readBuf, int readSize);
+
+unsigned int get_proc_mem(unsigned int pid);
+
+std::string getPathName(std::string filePath);
+
+template<typename T>
+void Base_writeIni(std::string section, std::string key, T value, std::string cfgPath);

+ 24 - 7
Module/mod_chromium/CModTools.cpp

@@ -61,10 +61,25 @@ std::pair<bool, std::string> CModTools::getMainUrl()
 	this->m_pEntity->GetFunction()->GetPath("Base", strChromiumPath);
 	strChromiumPath.Append(CSimpleStringA(SPLIT_SLASH_STR) + "bin" + SPLIT_SLASH_STR + "Chromium" + SPLIT_SLASH_STR);
 
+	//get major version
+	CSystemStaticInfo sysInfo;
+	m_pEntity->GetFunction()->GetSystemStaticInfo(sysInfo);
+	auto majorVersion = sysInfo.MachineVersion.GetMajor();
+
+
 	auto configRet = ReadCenterConfigStr();
 	CSimpleStringA strUrl;
 	bool isOpenExtend = false;
-	if (std::get<1>(configRet).Compare(""))
+	if(majorVersion >= 5)
+	{
+		auto mainUrl = std::get<3>(configRet);
+		std::vector<std::string> urlArr;
+		urlArr.push_back(mainUrl.GetData());
+		DetectActiveHttp(urlArr);
+		strUrl = mainUrl;
+		isOpenExtend = false;
+	}
+	else if (std::get<1>(configRet).Compare(""))
 	{
 		auto mainUrl = std::get<1>(configRet);
 		auto exUrl = std::get<2>(configRet);
@@ -110,7 +125,8 @@ std::string CModTools::generateCefclientCmd(bool isExtend, std::string mainUrl)
 	CSimpleStringA cachePath;
 	this->m_pEntity->GetFunction()->GetPath("Temp", cachePath);
 	cachePath.Append(CSimpleStringA(SPLIT_SLASH_STR) + "cefCache");
-	//strCmdLine.Append(" --hide-controls=true --cache-path=").Append(cachePath);
+	//strCmdLine.Append(" --hide-controls=true")
+	strCmdLine.Append(" --cache-path=").Append(cachePath);
 	strCmdLine.Append(" --no-sandbox");
 	DbgEx("cmdline : %s", strCmdLine.GetData());
 
@@ -201,8 +217,8 @@ void CModTools::RestartProxyServer(){
 	return;
 }
 
-std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA> CModTools::ReadCenterConfigStr(CSimpleStringA entityName){
-	CSimpleStringA str = "", strNew = "", strEx = "";
+std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA, CSimpleStringA> CModTools::ReadCenterConfigStr(CSimpleStringA entityName){
+	CSimpleStringA str = "", strNew = "", strEx = "", strFulture = "";
 	CSmartPointer<IConfigInfo> spCerConfig;
 	ErrorCodeEnum err = this->m_pEntity->GetFunction()->OpenConfig(Config_CenterSetting, spCerConfig);
 	if (entityName == "")
@@ -213,10 +229,11 @@ std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA> CModTools::ReadCenter
 	table.AddEntryString(entityName, "UserMgrUrl", str, "");
 	table.AddEntryString(entityName, "UserMgrUrlNoSidebar", strNew, "");
 	table.AddEntryString(entityName, "UserMgrUrlNoSidebarMuti", strEx, "");
+	table.AddEntryString(entityName, "UserMgrUrlFulture", strFulture, "");
 	if (Error_Succeed == table.Load(spCerConfig))
-		DbgEx(CSimpleString::Format("read centersetting config : UserMgrUrl-%s, UserMgrUrlNoSidebar-%s, UserMgrUrlNoSidebarMuti-%s",
-			str.GetData(), strNew.GetData(), strEx.GetData()));
-	return std::make_tuple(str, strNew, strEx);
+		DbgEx(CSimpleString::Format("read centersetting config : UserMgrUrl-%s, UserMgrUrlNoSidebar-%s, UserMgrUrlNoSidebarMuti-%s, UserMgrUrlFulture-%s",
+			str.GetData(), strNew.GetData(), strEx.GetData(), strFulture.GetData()));
+	return std::make_tuple(str, strNew, strEx, strFulture);
 }
 
 std::pair<CSimpleStringA, int> CModTools::ReadConfig() {

+ 1 - 1
Module/mod_chromium/CModTools.h

@@ -25,7 +25,7 @@ public:
 	bool killAllChromium();	//通过taskkill 关闭掉所有的cefclient
 	void RestartProxyServer();
 	std::pair<CSimpleStringA, int>  ReadConfig();	//读本地配置,已废弃
-	std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA> ReadCenterConfigStr(CSimpleStringA entityName = "");
+	std::tuple<CSimpleStringA, CSimpleStringA, CSimpleStringA, CSimpleStringA> ReadCenterConfigStr(CSimpleStringA entityName = "");
 private:
 	std::pair<bool, std::string> getMainUrl();
 	std::string generateCefclientCmd(bool isExtend, std::string mainUrl);

+ 39 - 0
Module/mod_rpc/CMakeLists.txt

@@ -0,0 +1,39 @@
+# 定义实体名称
+define_module("RPCClient")
+
+set(${MODULE_PREFIX}_SRCS
+	mod_rpc.cpp
+	guitask.cpp)
+
+if(NOT BOOST_ROOT)
+conan_cmake_run(REQUIRES boost/1.69.0@LR04.02_ThirdParty/testing
+BASIC_SETUP CMAKE_TARGETS)
+
+set(BOOST_ROOT ${CONAN_BOOST_ROOT})
+set(Boost_DEBUG ON)
+set(Boost_USE_STATIC_LIBS   ON)
+if (NOT MSVC)
+	set(Boost_NO_SYSTEM_PATHS ON)
+	set(Boost_USE_MULTITHREADED      ON)
+	set(Boost_USE_STATIC_RUNTIME    ON)
+	add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)
+endif()
+endif(NOT BOOST_ROOT)
+
+set(MOD_VERSION_STRING "1.0.0-dev1")
+add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
+target_include_directories(${MODULE_NAME}
+	PRIVATE ${MODULE_BASE_DIR}/mod_rpc
+	${Boost_INCLUDE_DIRS}
+	${CMAKE_CURRENT_SOURCE_DIR}/rpcServer
+	${ThirdPartyHeadRoot}/msgpack
+)
+
+# MSVC only??
+#set(CMAKE_CXX_FLAGS "/EHsc ${CMAKE_CXX_FLAGS}")
+
+# 添加实体需要依赖的其他共享库(包括系统库)
+set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_LIBS})
+target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${Boost_LIBRARIES})
+
+deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 0 - 31
Module/mod_rpc/CMakeLists.txt.useless

@@ -1,31 +0,0 @@
-# 定义实体名称
-define_moudle("rpcclient")
-
-include_directories(./rpcServer)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/msgpack)
-
-set(${MODULE_PREFIX}_SRCS
-	mod_rpc.cpp
-	guitask.cpp)
-
-
-
-set(Boost_INCLUDE_DIR D:/boost_1_67_0)
-set(Boost_LIBRARY_DIR D:/boost_1_67_0/stage/lib)
-include_directories(${Boost_INCLUDE_DIR})
-link_directories(${Boost_LIBRARY_DIR})
-
-
-
-add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME})
-target_include_directories(${MODULE_NAME}
-	PRIVATE ${MODULE_BASE_DIR}/mod_rpc
-)
-
-set(CMAKE_CXX_FLAGS "/EHsc ${CMAKE_CXX_FLAGS}")
-
-# 添加实体需要依赖的其他共享库(包括系统库)
-set(${MODULE_PREFIX}_LIBS spbase)
-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${Boost_LIBRARIES})
-
-deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 0 - 0
Module/mod_RomoteController/XZip.cpp → ThirdParty/Include/XZip/XZip.cpp


+ 0 - 0
Module/mod_RomoteController/XZip.h → ThirdParty/Include/XZip/XZip.h


+ 24 - 0
ThirdParty/Include/msgpack/msgpack.h

@@ -0,0 +1,24 @@
+/*
+ * MessagePack for C
+ *
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
+ *
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+/**
+ * @defgroup msgpack MessagePack C
+ * @{
+ * @}
+ */
+
+#include "msgpack/util.h"
+#include "msgpack/object.h"
+#include "msgpack/zone.h"
+#include "msgpack/pack.h"
+#include "msgpack/unpack.h"
+#include "msgpack/sbuffer.h"
+#include "msgpack/vrefbuffer.h"
+#include "msgpack/version.h"
+

+ 18 - 0
ThirdParty/Include/msgpack/msgpack.hpp

@@ -0,0 +1,18 @@
+//
+// MessagePack for C++
+//
+// Copyright (C) 2008-2009 FURUHASHI Sadayuki
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#include "msgpack/object.hpp"
+#include "msgpack/iterator.hpp"
+#include "msgpack/zone.hpp"
+#include "msgpack/pack.hpp"
+#include "msgpack/unpack.hpp"
+#include "msgpack/sbuffer.hpp"
+#include "msgpack/vrefbuffer.hpp"
+#include "msgpack/version.hpp"
+#include "msgpack/type.hpp"

+ 18 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/adaptor_base.hpp

@@ -0,0 +1,18 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015-2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_ADAPTOR_BASE_HPP
+#define MSGPACK_ADAPTOR_BASE_HPP
+
+#include "msgpack/adaptor/adaptor_base_decl.hpp"
+
+#include "msgpack/v1/adaptor/adaptor_base.hpp"
+#include "msgpack/v2/adaptor/adaptor_base.hpp"
+
+#endif // MSGPACK_ADAPTOR_BASE_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/adaptor_base_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_ADAPTOR_BASE_DECL_HPP
+#define MSGPACK_ADAPTOR_BASE_DECL_HPP
+
+#include "msgpack/v1/adaptor/adaptor_base_decl.hpp"
+#include "msgpack/v2/adaptor/adaptor_base_decl.hpp"
+
+#endif // MSGPACK_ADAPTOR_BASE_DECL_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/array_ref.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_ARRAY_REF_HPP
+#define MSGPACK_TYPE_ARRAY_REF_HPP
+
+#include "msgpack/adaptor/array_ref_decl.hpp"
+
+#include "msgpack/v1/adaptor/array_ref.hpp"
+
+#endif // MSGPACK_TYPE_ARRAY_REFL_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/array_ref_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_ARRAY_REF_DECL_HPP
+#define MSGPACK_TYPE_ARRAY_REF_DECL_HPP
+
+#include "msgpack/v1/adaptor/array_ref_decl.hpp"
+#include "msgpack/v2/adaptor/array_ref_decl.hpp"
+
+#endif // MSGPACK_TYPE_ARRAY_REF_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/bool.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_BOOL_HPP
+#define MSGPACK_TYPE_BOOL_HPP
+
+#include "msgpack/v1/adaptor/bool.hpp"
+
+#endif // MSGPACK_TYPE_BOOL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/boost/fusion.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_BOOST_FUSION_HPP
+#define MSGPACK_TYPE_BOOST_FUSION_HPP
+
+#include "msgpack/v1/adaptor/boost/fusion.hpp"
+
+#endif // MSGPACK_TYPE_BOOST_FUSION_HPP

+ 18 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/boost/msgpack_variant.hpp

@@ -0,0 +1,18 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015-2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_HPP
+#define MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_HPP
+
+#include "msgpack/adaptor/boost/msgpack_variant_decl.hpp"
+
+#include "msgpack/v1/adaptor/boost/msgpack_variant.hpp"
+//#include "msgpack/v2/adaptor/boost/msgpack_variant.hpp"
+
+#endif // MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/boost/msgpack_variant_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP
+#define MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP
+
+#include "msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp"
+#include "msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp"
+
+#endif // MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/boost/optional.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_BOOST_OPTIONAL_HPP
+#define MSGPACK_TYPE_BOOST_OPTIONAL_HPP
+
+#include "msgpack/v1/adaptor/boost/optional.hpp"
+
+#endif // MSGPACK_TYPE_BOOST_OPTIONAL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/boost/string_ref.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_BOOST_STRING_REF_HPP
+#define MSGPACK_TYPE_BOOST_STRING_REF_HPP
+
+#include "msgpack/v1/adaptor/boost/string_ref.hpp"
+
+#endif // MSGPACK_TYPE_BOOST_STRING_REF_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/char_ptr.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_CHAR_PTR_HPP
+#define MSGPACK_TYPE_CHAR_PTR_HPP
+
+#include "msgpack/v1/adaptor/char_ptr.hpp"
+
+#endif // MSGPACK_TYPE_CHAR_PTR_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/check_container_size.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015-2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_CHECK_CONTAINER_SIZE_HPP
+#define MSGPACK_CHECK_CONTAINER_SIZE_HPP
+
+#include "msgpack/adaptor/check_container_size_decl.hpp"
+
+#include "msgpack/v1/adaptor/check_container_size.hpp"
+
+#endif // MSGPACK_CHECK_CONTAINER_SIZE_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/check_container_size_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_CHECK_CONTAINER_SIZE_DECL_HPP
+#define MSGPACK_CHECK_CONTAINER_SIZE_DECL_HPP
+
+#include "msgpack/v1/adaptor/check_container_size_decl.hpp"
+#include "msgpack/v2/adaptor/check_container_size_decl.hpp"
+
+#endif // MSGPACK_CHECK_CONTAINER_SIZE_DECL_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/array.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_ARRAY_HPP
+#define MSGPACK_TYPE_CPP11_ARRAY_HPP
+
+#include "msgpack/v1/adaptor/cpp11/array.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_ARRAY_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/array_char.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_ARRAY_CHAR_HPP
+#define MSGPACK_TYPE_CPP11_ARRAY_CHAR_HPP
+
+#include "msgpack/v1/adaptor/cpp11/array_char.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_ARRAY_CHAR_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/array_unsigned_char.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_ARRAY_UNSIGNED_CHAR_HPP
+#define MSGPACK_TYPE_CPP11_ARRAY_UNSIGNED_CHAR_HPP
+
+#include "msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_ARRAY_UNSIGNED_CHAR_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/forward_list.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_FORWARD_LIST_HPP
+#define MSGPACK_TYPE_CPP11_FORWARD_LIST_HPP
+
+#include "msgpack/v1/adaptor/cpp11/forward_list.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_FORWARD_LIST_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/reference_wrapper.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_REFERENCE_WRAPPER_HPP
+#define MSGPACK_TYPE_CPP11_REFERENCE_WRAPPER_HPP
+
+#include "msgpack/v1/adaptor/cpp11/reference_wrapper.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_REFERENCE_WRAPPER_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/shared_ptr.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_SHARED_PTR_HPP
+#define MSGPACK_TYPE_CPP11_SHARED_PTR_HPP
+
+#include "msgpack/v1/adaptor/cpp11/shared_ptr.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_SHARED_PTR_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/tuple.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_TUPLE_HPP
+#define MSGPACK_TYPE_CPP11_TUPLE_HPP
+
+#include "msgpack/v1/adaptor/cpp11/tuple.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_TUPLE_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/unique_ptr.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_UNIQUE_PTR_HPP
+#define MSGPACK_TYPE_CPP11_UNIQUE_PTR_HPP
+
+#include "msgpack/v1/adaptor/cpp11/unique_ptr.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_UNIQUE_PTR_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/unordered_map.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_UNORDERED_MAP_HPP
+#define MSGPACK_TYPE_CPP11_UNORDERED_MAP_HPP
+
+#include "msgpack/v1/adaptor/cpp11/unordered_map.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_UNORDERED_MAP_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/cpp11/unordered_set.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_TYPE_CPP11_UNORDERED_SET_HPP
+#define MSGPACK_TYPE_CPP11_UNORDERED_SET_HPP
+
+#include "msgpack/v1/adaptor/cpp11/unordered_set.hpp"
+
+#endif // MSGPACK_TYPE_CPP11_UNORDERED_SET_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/define.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_DEFINE_HPP
+#define MSGPACK_DEFINE_HPP
+
+#include "msgpack/adaptor/define_decl.hpp"
+
+#include "msgpack/v1/adaptor/define.hpp"
+
+#endif // MSGPACK_DEFINE_HPP

+ 142 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/define_decl.hpp

@@ -0,0 +1,142 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_DEFINE_DECL_HPP
+#define MSGPACK_DEFINE_DECL_HPP
+
+// BOOST_PP_VARIADICS is defined in boost/preprocessor/config/config.hpp
+// http://www.boost.org/libs/preprocessor/doc/ref/variadics.html
+// However, supporting compiler detection is not complete. msgpack-c requires
+// variadic macro arguments support. So BOOST_PP_VARIADICS is defined here explicitly.
+#if !defined(MSGPACK_PP_VARIADICS)
+#define MSGPACK_PP_VARIADICS
+#endif
+
+#include <msgpack/preprocessor.hpp>
+
+#include "msgpack/versioning.hpp"
+
+// for MSGPACK_ADD_ENUM
+#include "msgpack/adaptor/int.hpp"
+
+#define MSGPACK_DEFINE_ARRAY(...) \
+    template <typename Packer> \
+    void msgpack_pack(Packer& pk) const \
+    { \
+        msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(pk); \
+    } \
+    void msgpack_unpack(msgpack::object const& o) \
+    { \
+        msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(o); \
+    }\
+    template <typename MSGPACK_OBJECT> \
+    void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \
+    { \
+        msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(o, z); \
+    }
+
+#define MSGPACK_BASE_ARRAY(base) (*const_cast<base *>(static_cast<base const*>(this)))
+
+#define MSGPACK_DEFINE_MAP_EACH_PROC(r, data, elem) \
+    MSGPACK_PP_IF( \
+        MSGPACK_PP_IS_BEGIN_PARENS(elem), \
+        elem, \
+        (MSGPACK_PP_STRINGIZE(elem))(elem) \
+    )
+
+#define MSGPACK_DEFINE_MAP_IMPL(...) \
+    MSGPACK_PP_SEQ_TO_TUPLE( \
+        MSGPACK_PP_SEQ_FOR_EACH( \
+            MSGPACK_DEFINE_MAP_EACH_PROC, \
+            0, \
+            MSGPACK_PP_VARIADIC_TO_SEQ(__VA_ARGS__) \
+        ) \
+    )
+
+#define MSGPACK_DEFINE_MAP(...) \
+    template <typename Packer> \
+    void msgpack_pack(Packer& pk) const \
+    { \
+        msgpack::type::make_define_map \
+            MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
+            .msgpack_pack(pk); \
+    } \
+    void msgpack_unpack(msgpack::object const& o) \
+    { \
+        msgpack::type::make_define_map \
+            MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
+            .msgpack_unpack(o); \
+    }\
+    template <typename MSGPACK_OBJECT> \
+    void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \
+    { \
+        msgpack::type::make_define_map \
+            MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
+            .msgpack_object(o, z); \
+    }
+
+#define MSGPACK_BASE_MAP(base) \
+    (MSGPACK_PP_STRINGIZE(base))(*const_cast<base *>(static_cast<base const*>(this)))
+
+// MSGPACK_ADD_ENUM must be used in the global namespace.
+#define MSGPACK_ADD_ENUM(enum_name) \
+  namespace msgpack { \
+  /** @cond */ \
+  MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS) { \
+  /** @endcond */ \
+  namespace adaptor { \
+    template<> \
+    struct convert<enum_name> { \
+      msgpack::object const& operator()(msgpack::object const& o, enum_name& v) const { \
+        msgpack::underlying_type<enum_name>::type tmp; \
+        msgpack::operator>>(o, tmp);                   \
+        v = static_cast<enum_name>(tmp);   \
+        return o; \
+      } \
+    }; \
+    template<> \
+    struct object<enum_name> { \
+      void operator()(msgpack::object& o, const enum_name& v) const { \
+        msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(v); \
+        msgpack::operator<<(o, tmp);                                    \
+      } \
+    }; \
+    template<> \
+    struct object_with_zone<enum_name> { \
+      void operator()(msgpack::object::with_zone& o, const enum_name& v) const {  \
+        msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(v); \
+        msgpack::operator<<(o, tmp);                                    \
+      } \
+    }; \
+    template <> \
+    struct pack<enum_name> { \
+      template <typename Stream> \
+      msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const enum_name& v) const { \
+          return msgpack::operator<<(o, static_cast<msgpack::underlying_type<enum_name>::type>(v)); \
+      } \
+    }; \
+  } \
+  /** @cond */ \
+  } \
+  /** @endcond */ \
+  }
+
+#if defined(MSGPACK_USE_DEFINE_MAP)
+#define MSGPACK_DEFINE MSGPACK_DEFINE_MAP
+#define MSGPACK_BASE MSGPACK_BASE_MAP
+#else  // defined(MSGPACK_USE_DEFINE_MAP)
+#define MSGPACK_DEFINE MSGPACK_DEFINE_ARRAY
+#define MSGPACK_BASE MSGPACK_BASE_ARRAY
+#endif // defined(MSGPACK_USE_DEFINE_MAP)
+
+
+#include "msgpack/v1/adaptor/define_decl.hpp"
+#include "msgpack/v2/adaptor/define_decl.hpp"
+
+#endif // MSGPACK_DEFINE_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/deque.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_DEQUE_HPP
+#define MSGPACK_TYPE_DEQUE_HPP
+
+#include "msgpack/v1/adaptor/deque.hpp"
+
+#endif // MSGPACK_TYPE_DEQUE_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/ext.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_EXT_HPP
+#define MSGPACK_TYPE_EXT_HPP
+
+#include "msgpack/adaptor/ext_decl.hpp"
+
+#include "msgpack/v1/adaptor/ext.hpp"
+
+#endif //  MSGPACK_TYPE_EXT_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/ext_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_EXT_DECL_HPP
+#define MSGPACK_TYPE_EXT_DECL_HPP
+
+#include "msgpack/v1/adaptor/ext_decl.hpp"
+#include "msgpack/v2/adaptor/ext_decl.hpp"
+
+#endif // MSGPACK_TYPE_EXT_DECL_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/fixint.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_FIXINT_HPP
+#define MSGPACK_TYPE_FIXINT_HPP
+
+#include "msgpack/adaptor/fixint_decl.hpp"
+
+#include "msgpack/v1/adaptor/fixint.hpp"
+
+#endif // MSGPACK_TYPE_FIXINT_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/fixint_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_FIXINT_DECL_HPP
+#define MSGPACK_TYPE_FIXINT_DECL_HPP
+
+#include "msgpack/v1/adaptor/fixint_decl.hpp"
+#include "msgpack/v2/adaptor/fixint_decl.hpp"
+
+#endif // MSGPACK_TYPE_FIXINT_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/float.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_FLOAT_HPP
+#define MSGPACK_TYPE_FLOAT_HPP
+
+#include "msgpack/v1/adaptor/float.hpp"
+
+#endif // MSGPACK_TYPE_FLOAT_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/int.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_INT_HPP
+#define MSGPACK_TYPE_INT_HPP
+
+#include "msgpack/adaptor/int_decl.hpp"
+
+#include "msgpack/v1/adaptor/int.hpp"
+
+#endif // MSGPACK_TYPE_INT_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/int_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_INT_DECL_HPP
+#define MSGPACK_TYPE_INT_DECL_HPP
+
+#include "msgpack/v1/adaptor/int_decl.hpp"
+#include "msgpack/v2/adaptor/int_decl.hpp"
+
+#endif // MSGPACK_TYPE_INT_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/list.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_LIST_HPP
+#define MSGPACK_TYPE_LIST_HPP
+
+#include "msgpack/v1/adaptor/list.hpp"
+
+#endif // MSGPACK_TYPE_LIST_HPP

+ 18 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/map.hpp

@@ -0,0 +1,18 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_MAP_HPP
+#define MSGPACK_TYPE_MAP_HPP
+
+#include "msgpack/adaptor/map_decl.hpp"
+
+#include "msgpack/v1/adaptor/map.hpp"
+
+
+#endif // MSGPACK_TYPE_MAP_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/map_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_MAP_DECL_HPP
+#define MSGPACK_TYPE_MAP_DECL_HPP
+
+#include "msgpack/v1/adaptor/map_decl.hpp"
+#include "msgpack/v2/adaptor/map_decl.hpp"
+
+#endif // MSGPACK_TYPE_MAP_DECL_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/msgpack_tuple.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2014 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_MSGPACK_TUPLE_HPP
+#define MSGPACK_MSGPACK_TUPLE_HPP
+
+#include "msgpack/adaptor/msgpack_tuple_decl.hpp"
+
+#include "msgpack/v1/adaptor/msgpack_tuple.hpp"
+
+#endif // MSGPACK_MSGPACK_TUPLE_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/msgpack_tuple_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_MSGPACK_TUPLE_DECL_HPP
+#define MSGPACK_MSGPACK_TUPLE_DECL_HPP
+
+#include "msgpack/v1/adaptor/msgpack_tuple_decl.hpp"
+#include "msgpack/v2/adaptor/msgpack_tuple_decl.hpp"
+
+#endif // MSGPACK_MSGPACK_TUPLE_DECL_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/nil.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_NIL_HPP
+#define MSGPACK_TYPE_NIL_HPP
+
+#include "msgpack/adaptor/nil_decl.hpp"
+
+#include "msgpack/v1/adaptor/nil.hpp"
+
+#endif // MSGPACK_TYPE_NIL_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/nil_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_NIL_DECL_HPP
+#define MSGPACK_TYPE_NIL_DECL_HPP
+
+#include "msgpack/v1/adaptor/nil_decl.hpp"
+#include "msgpack/v2/adaptor/nil_decl.hpp"
+
+#endif // MSGPACK_TYPE_NIL_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/pair.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_PAIR_HPP
+#define MSGPACK_TYPE_PAIR_HPP
+
+#include "msgpack/v1/adaptor/pair.hpp"
+
+#endif // MSGPACK_TYPE_PAIR_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/raw.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_RAW_HPP
+#define MSGPACK_TYPE_RAW_HPP
+
+#include "msgpack/adaptor/raw_decl.hpp"
+
+#include "msgpack/v1/adaptor/raw.hpp"
+
+#endif // MSGPACK_TYPE_RAW_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/raw_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_RAW_DECL_HPP
+#define MSGPACK_TYPE_RAW_DECL_HPP
+
+#include "msgpack/v1/adaptor/raw_decl.hpp"
+#include "msgpack/v2/adaptor/raw_decl.hpp"
+
+#endif // MSGPACK_TYPE_RAW_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/set.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_SET_HPP
+#define MSGPACK_TYPE_SET_HPP
+
+#include "msgpack/v1/adaptor/set.hpp"
+
+#endif // MSGPACK_TYPE_SET_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/string.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_STRING_HPP
+#define MSGPACK_TYPE_STRING_HPP
+
+#include "msgpack/v1/adaptor/string.hpp"
+
+#endif // MSGPACK_TYPE_STRING_HPP

+ 171 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/tr1/unordered_map.hpp

@@ -0,0 +1,171 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2015 FURUHASHI Sadayuki
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_TR1_UNORDERED_MAP_HPP
+#define MSGPACK_TYPE_TR1_UNORDERED_MAP_HPP
+
+#include "msgpack/versioning.hpp"
+#include "msgpack/adaptor/adaptor_base.hpp"
+#include "msgpack/adaptor/check_container_size.hpp"
+
+#if defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
+
+#define MSGPACK_HAS_STD_UNORDERED_MAP
+#include <unordered_map>
+#define MSGPACK_STD_TR1 std
+
+#else   // defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
+
+#if __GNUC__ >= 4
+
+#define MSGPACK_HAS_STD_TR1_UNORDERED_MAP
+
+#include <tr1/unordered_map>
+#define MSGPACK_STD_TR1 std::tr1
+
+#endif // __GNUC__ >= 4
+
+#endif  // defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
+
+#if defined(MSGPACK_STD_TR1)
+
+namespace msgpack {
+
+/// @cond
+MSGPACK_API_VERSION_NAMESPACE(v1) {
+/// @endcond
+
+namespace adaptor {
+
+template <typename K, typename V, typename Hash, typename Pred, typename Alloc>
+struct convert<MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc> > {
+    msgpack::object const& operator()(msgpack::object const& o, MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc>& v) const {
+        if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); }
+        msgpack::object_kv* p(o.via.map.ptr);
+        msgpack::object_kv* const pend(o.via.map.ptr + o.via.map.size);
+        MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc> tmp;
+        for(; p != pend; ++p) {
+            K key;
+            p->key.convert(key);
+            p->val.convert(tmp[key]);
+        }
+        tmp.swap(v);
+        return o;
+    }
+};
+
+template <typename K, typename V, typename Hash, typename Pred, typename Alloc>
+struct pack<MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc> > {
+    template <typename Stream>
+    msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc>& v) const {
+        uint32_t size = checked_get_container_size(v.size());
+        o.pack_map(size);
+        for(typename MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc>::const_iterator it(v.begin()), it_end(v.end());
+            it != it_end; ++it) {
+            o.pack(it->first);
+            o.pack(it->second);
+        }
+        return o;
+    }
+};
+
+template <typename K, typename V, typename Hash, typename Pred, typename Alloc>
+struct object_with_zone<MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc> > {
+    void operator()(msgpack::object::with_zone& o, const MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc>& v) const {
+        o.type = msgpack::type::MAP;
+        if(v.empty()) {
+            o.via.map.ptr  = nullptr;
+            o.via.map.size = 0;
+        } else {
+            uint32_t size = checked_get_container_size(v.size());
+            msgpack::object_kv* p = static_cast<msgpack::object_kv*>(o.zone.allocate_align(sizeof(msgpack::object_kv)*size));
+            msgpack::object_kv* const pend = p + size;
+            o.via.map.ptr  = p;
+            o.via.map.size = size;
+            typename MSGPACK_STD_TR1::unordered_map<K, V, Hash, Pred, Alloc>::const_iterator it(v.begin());
+            do {
+                p->key = msgpack::object(it->first, o.zone);
+                p->val = msgpack::object(it->second, o.zone);
+                ++p;
+                ++it;
+            } while(p < pend);
+        }
+    }
+};
+
+template <typename K, typename V, typename Hash, typename Pred, typename Alloc>
+struct convert<MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc> > {
+    msgpack::object const& operator()(msgpack::object const& o, MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc>& v) const {
+        if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); }
+        msgpack::object_kv* p(o.via.map.ptr);
+        msgpack::object_kv* const pend(o.via.map.ptr + o.via.map.size);
+        MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc> tmp;
+        for(; p != pend; ++p) {
+            std::pair<K, V> value;
+            p->key.convert(value.first);
+            p->val.convert(value.second);
+            tmp.insert(value);
+        }
+        tmp.swap(v);
+        return o;
+    }
+};
+
+template <typename K, typename V, typename Hash, typename Pred, typename Alloc>
+struct pack<MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc> > {
+    template <typename Stream>
+    msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc>& v) const {
+        uint32_t size = checked_get_container_size(v.size());
+        o.pack_map(size);
+        for(typename MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc>::const_iterator it(v.begin()), it_end(v.end());
+            it != it_end; ++it) {
+            o.pack(it->first);
+            o.pack(it->second);
+        }
+        return o;
+    }
+};
+
+template <typename K, typename V, typename Hash, typename Pred, typename Alloc>
+struct object_with_zone<MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc> > {
+    void operator()(msgpack::object::with_zone& o, const MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc>& v) const {
+        o.type = msgpack::type::MAP;
+        if(v.empty()) {
+            o.via.map.ptr  = nullptr;
+            o.via.map.size = 0;
+        } else {
+            uint32_t size = checked_get_container_size(v.size());
+            msgpack::object_kv* p = static_cast<msgpack::object_kv*>(o.zone.allocate_align(sizeof(msgpack::object_kv)*size));
+            msgpack::object_kv* const pend = p + size;
+            o.via.map.ptr  = p;
+            o.via.map.size = size;
+            typename MSGPACK_STD_TR1::unordered_multimap<K, V, Hash, Pred, Alloc>::const_iterator it(v.begin());
+            do {
+                p->key = msgpack::object(it->first, o.zone);
+                p->val = msgpack::object(it->second, o.zone);
+                ++p;
+                ++it;
+            } while(p < pend);
+        }
+    }
+};
+
+} // namespace adaptor
+
+/// @cond
+} // MSGPACK_API_VERSION_NAMESPACE(v1)
+/// @endcond
+
+} // namespace msgpack
+
+#undef MSGPACK_STD_TR1
+
+#endif // MSGPACK_STD_TR1
+
+#endif // MSGPACK_TYPE_TR1_UNORDERED_MAP_HPP

+ 165 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/tr1/unordered_set.hpp

@@ -0,0 +1,165 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2015 FURUHASHI Sadayuki
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_TR1_UNORDERED_SET_HPP
+#define MSGPACK_TYPE_TR1_UNORDERED_SET_HPP
+
+#include "msgpack/versioning.hpp"
+#include "msgpack/adaptor/adaptor_base.hpp"
+#include "msgpack/adaptor/check_container_size.hpp"
+
+#if defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
+
+#define MSGPACK_HAS_STD_UNORDERED_SET
+#include <unordered_set>
+#define MSGPACK_STD_TR1 std
+
+#else   // defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
+
+#if __GNUC__ >= 4
+
+#define MSGPACK_HAS_STD_TR1_UNORDERED_SET
+
+#include <tr1/unordered_set>
+#define MSGPACK_STD_TR1 std::tr1
+
+#endif // __GNUC__ >= 4
+
+#endif  // defined(_LIBCPP_VERSION) || (_MSC_VER >= 1700)
+
+#if defined(MSGPACK_STD_TR1)
+
+namespace msgpack {
+
+/// @cond
+MSGPACK_API_VERSION_NAMESPACE(v1) {
+/// @endcond
+
+namespace adaptor {
+
+template <typename T, typename Hash, typename Compare, typename Alloc>
+struct convert<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
+    msgpack::object const& operator()(msgpack::object const& o, MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>& v) const {
+        if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }
+        msgpack::object* p = o.via.array.ptr + o.via.array.size;
+        msgpack::object* const pbegin = o.via.array.ptr;
+        MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> tmp;
+        while(p > pbegin) {
+            --p;
+            tmp.insert(p->as<T>());
+        }
+        tmp.swap(v);
+        return o;
+    }
+};
+
+template <typename T, typename Hash, typename Compare, typename Alloc>
+struct pack<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
+    template <typename Stream>
+    msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>& v) const {
+        uint32_t size = checked_get_container_size(v.size());
+        o.pack_array(size);
+        for(typename MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
+            it != it_end; ++it) {
+            o.pack(*it);
+        }
+        return o;
+    }
+};
+
+template <typename T, typename Hash, typename Compare, typename Alloc>
+struct object_with_zone<MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc> > {
+    void operator()(msgpack::object::with_zone& o, const MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>& v) const {
+        o.type = msgpack::type::ARRAY;
+        if(v.empty()) {
+            o.via.array.ptr = nullptr;
+            o.via.array.size = 0;
+        } else {
+            uint32_t size = checked_get_container_size(v.size());
+            msgpack::object* p = static_cast<msgpack::object*>(o.zone.allocate_align(sizeof(msgpack::object)*size));
+            msgpack::object* const pend = p + size;
+            o.via.array.ptr = p;
+            o.via.array.size = size;
+            typename MSGPACK_STD_TR1::unordered_set<T, Hash, Compare, Alloc>::const_iterator it(v.begin());
+            do {
+                *p = msgpack::object(*it, o.zone);
+                ++p;
+                ++it;
+            } while(p < pend);
+        }
+    }
+};
+
+
+template <typename T, typename Hash, typename Compare, typename Alloc>
+struct convert<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
+    msgpack::object const& operator()(msgpack::object const& o, MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>& v) const {
+        if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }
+        msgpack::object* p = o.via.array.ptr + o.via.array.size;
+        msgpack::object* const pbegin = o.via.array.ptr;
+        MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> tmp;
+        while(p > pbegin) {
+            --p;
+            tmp.insert(p->as<T>());
+        }
+        tmp.swap(v);
+        return o;
+    }
+};
+
+template <typename T, typename Hash, typename Compare, typename Alloc>
+struct pack<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
+    template <typename Stream>
+    msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>& v) const {
+        uint32_t size = checked_get_container_size(v.size());
+        o.pack_array(size);
+        for(typename MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
+            it != it_end; ++it) {
+            o.pack(*it);
+        }
+        return o;
+    }
+};
+
+template <typename T, typename Hash, typename Compare, typename Alloc>
+struct object_with_zone<MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc> > {
+    void operator()(msgpack::object::with_zone& o, const MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>& v) const {
+        o.type = msgpack::type::ARRAY;
+        if(v.empty()) {
+            o.via.array.ptr = nullptr;
+            o.via.array.size = 0;
+        } else {
+            uint32_t size = checked_get_container_size(v.size());
+            msgpack::object* p = static_cast<msgpack::object*>(o.zone.allocate_align(sizeof(msgpack::object)*size));
+            msgpack::object* const pend = p + size;
+            o.via.array.ptr = p;
+            o.via.array.size = size;
+            typename MSGPACK_STD_TR1::unordered_multiset<T, Hash, Compare, Alloc>::const_iterator it(v.begin());
+            do {
+                *p = msgpack::object(*it, o.zone);
+                ++p;
+                ++it;
+            } while(p < pend);
+        }
+    }
+};
+
+} // namespace adaptor
+
+/// @cond
+} // MSGPACK_API_VERSION_NAMESPACE(v1)
+/// @endcond
+
+} // namespace msgpack
+
+#undef MSGPACK_STD_TR1
+
+#endif // MSGPACK_STD_TR1
+
+#endif // MSGPACK_TYPE_TR1_UNORDERED_SET_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/v4raw.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_V4RAW_HPP
+#define MSGPACK_TYPE_V4RAW_HPP
+
+#include "msgpack/adaptor/v4raw_decl.hpp"
+
+#include "msgpack/v1/adaptor/v4raw.hpp"
+
+#endif // MSGPACK_TYPE_V4RAW_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/v4raw_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_V4RAW_DECL_HPP
+#define MSGPACK_TYPE_V4RAW_DECL_HPP
+
+#include "msgpack/v1/adaptor/v4raw_decl.hpp"
+#include "msgpack/v2/adaptor/v4raw_decl.hpp"
+
+#endif // MSGPACK_TYPE_V4RAW_DECL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/vector.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_VECTOR_HPP
+#define MSGPACK_TYPE_VECTOR_HPP
+
+#include "msgpack/v1/adaptor/vector.hpp"
+
+#endif // MSGPACK_TYPE_VECTOR_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/vector_bool.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_VECTOR_BOOL_HPP
+#define MSGPACK_TYPE_VECTOR_BOOL_HPP
+
+#include "msgpack/v1/adaptor/vector_bool.hpp"
+
+#endif // MSGPACK_TYPE_VECTOR_BOOL_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/vector_char.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_VECTOR_CHAR_HPP
+#define MSGPACK_TYPE_VECTOR_CHAR_HPP
+
+#include "msgpack/v1/adaptor/vector_char.hpp"
+
+#endif // MSGPACK_TYPE_VECTOR_CHAR_HPP

+ 15 - 0
ThirdParty/Include/msgpack/msgpack/adaptor/vector_unsigned_char.hpp

@@ -0,0 +1,15 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_TYPE_VECTOR_UNSIGNED_CHAR_HPP
+#define MSGPACK_TYPE_VECTOR_UNSIGNED_CHAR_HPP
+
+#include "msgpack/v1/adaptor/vector_unsigned_char.hpp"
+
+#endif // MSGPACK_TYPE_VECTOR_UNSIGNED_CHAR_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/cpp_config.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ C++03/C++11 Adaptation
+//
+// Copyright (C) 2013-2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_CPP_CONFIG_HPP
+#define MSGPACK_CPP_CONFIG_HPP
+
+#include "msgpack/cpp_config_decl.hpp"
+
+#include "msgpack/v1/cpp_config.hpp"
+
+#endif // MSGPACK_CPP_CONFIG_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/cpp_config_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ C++03/C++11 Adaptation
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_CPP_CONFIG_DECL_HPP
+#define MSGPACK_CPP_CONFIG_DECL_HPP
+
+#include "msgpack/v1/cpp_config_decl.hpp"
+#include "msgpack/v2/cpp_config_decl.hpp"
+
+#endif // MSGPACK_CPP_CONFIG_DECL_HPP

+ 38 - 0
ThirdParty/Include/msgpack/msgpack/fbuffer.h

@@ -0,0 +1,38 @@
+/*
+ * MessagePack for C FILE* buffer adaptor
+ *
+ * Copyright (C) 2013 Vladimir Volodko
+ *
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef MSGPACK_FBUFFER_H
+#define MSGPACK_FBUFFER_H
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * @defgroup msgpack_fbuffer FILE* buffer
+ * @ingroup msgpack_buffer
+ * @{
+ */
+
+static inline int msgpack_fbuffer_write(void* data, const char* buf, size_t len)
+{
+    return (1 == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
+}
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* msgpack/fbuffer.h */

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/fbuffer.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ FILE* buffer adaptor
+//
+// Copyright (C) 2013 Vladimir Volodko
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_FBUFFER_HPP
+#define MSGPACK_FBUFFER_HPP
+
+#include "msgpack/fbuffer_decl.hpp"
+
+#include "msgpack/v1/fbuffer.hpp"
+
+#endif // MSGPACK_FBUFFER_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/fbuffer_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ FILE* buffer adaptor
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_FBUFFER_DECL_HPP
+#define MSGPACK_FBUFFER_DECL_HPP
+
+#include "msgpack/v1/fbuffer_decl.hpp"
+#include "msgpack/v2/fbuffer_decl.hpp"
+
+#endif // MSGPACK_FBUFFER_DECL_HPP

+ 25 - 0
ThirdParty/Include/msgpack/msgpack/gcc_atomic.h

@@ -0,0 +1,25 @@
+/*
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#ifndef MSGPACK_GCC_ATOMIC_H
+#define MSGPACK_GCC_ATOMIC_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+typedef int _msgpack_atomic_counter_t;
+
+int _msgpack_sync_decr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
+int _msgpack_sync_incr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
+
+
+#if defined(__cplusplus)
+}
+#endif
+
+
+#endif // MSGPACK_GCC_ATOMIC_H

+ 18 - 0
ThirdParty/Include/msgpack/msgpack/iterator.hpp

@@ -0,0 +1,18 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015-2016 MIZUKI Hirata
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_ITERATOR_HPP
+#define MSGPACK_ITERATOR_HPP
+
+#include <msgpack/iterator_decl.hpp>
+
+#include <msgpack/v1/iterator.hpp>
+
+#endif // MSGPACK_ITERATOR_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/iterator_decl.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_ITERATOR_DECL_HPP
+#define MSGPACK_ITERATOR_DECL_HPP
+
+#include <msgpack/v1/iterator_decl.hpp>
+#include <msgpack/v2/iterator_decl.hpp>
+
+#endif // MSGPACK_V1_ITERATOR_DECL_HPP

+ 18 - 0
ThirdParty/Include/msgpack/msgpack/meta.hpp

@@ -0,0 +1,18 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015-2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_META_HPP
+#define MSGPACK_META_HPP
+
+#include "msgpack/meta_decl.hpp"
+
+#include "msgpack/v1/meta.hpp"
+
+#endif // MSGPACK_META_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/meta_decl.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2015-2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_META_DECL_HPP
+#define MSGPACK_META_DECL_HPP
+
+#include "msgpack/v1/meta_decl.hpp"
+#include "msgpack/v2/meta_decl.hpp"
+
+#endif // MSGPACK_META_DECL_HPP

+ 111 - 0
ThirdParty/Include/msgpack/msgpack/object.h

@@ -0,0 +1,111 @@
+/*
+ * MessagePack for C dynamic typing routine
+ *
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
+ *
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef MSGPACK_OBJECT_H
+#define MSGPACK_OBJECT_H
+
+#include "zone.h"
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * @defgroup msgpack_object Dynamically typed object
+ * @ingroup msgpack
+ * @{
+ */
+
+typedef enum {
+    MSGPACK_OBJECT_NIL                  = 0x00,
+    MSGPACK_OBJECT_BOOLEAN              = 0x01,
+    MSGPACK_OBJECT_POSITIVE_INTEGER     = 0x02,
+    MSGPACK_OBJECT_NEGATIVE_INTEGER     = 0x03,
+    MSGPACK_OBJECT_FLOAT                = 0x04,
+#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
+    MSGPACK_OBJECT_DOUBLE               = MSGPACK_OBJECT_FLOAT, /* obsolete */
+#endif /* MSGPACK_USE_LEGACY_NAME_AS_FLOAT */
+    MSGPACK_OBJECT_STR                  = 0x05,
+    MSGPACK_OBJECT_ARRAY                = 0x06,
+    MSGPACK_OBJECT_MAP                  = 0x07,
+    MSGPACK_OBJECT_BIN                  = 0x08,
+    MSGPACK_OBJECT_EXT                  = 0x09
+} msgpack_object_type;
+
+
+struct msgpack_object;
+struct msgpack_object_kv;
+
+typedef struct {
+    uint32_t size;
+    struct msgpack_object* ptr;
+} msgpack_object_array;
+
+typedef struct {
+    uint32_t size;
+    struct msgpack_object_kv* ptr;
+} msgpack_object_map;
+
+typedef struct {
+    uint32_t size;
+    const char* ptr;
+} msgpack_object_str;
+
+typedef struct {
+    uint32_t size;
+    const char* ptr;
+} msgpack_object_bin;
+
+typedef struct {
+    int8_t type;
+    uint32_t size;
+    const char* ptr;
+} msgpack_object_ext;
+
+typedef union {
+    bool boolean;
+    uint64_t u64;
+    int64_t  i64;
+#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
+    double   dec; /* obsolete*/
+#endif /* MSGPACK_USE_LEGACY_NAME_AS_FLOAT */
+    double   f64;
+    msgpack_object_array array;
+    msgpack_object_map map;
+    msgpack_object_str str;
+    msgpack_object_bin bin;
+    msgpack_object_ext ext;
+} msgpack_object_union;
+
+typedef struct msgpack_object {
+    msgpack_object_type type;
+    msgpack_object_union via;
+} msgpack_object;
+
+typedef struct msgpack_object_kv {
+    msgpack_object key;
+    msgpack_object val;
+} msgpack_object_kv;
+
+MSGPACK_DLLEXPORT
+void msgpack_object_print(FILE* out, msgpack_object o);
+
+MSGPACK_DLLEXPORT
+bool msgpack_object_equal(const msgpack_object x, const msgpack_object y);
+
+/** @} */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* msgpack/object.h */

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/object.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_OBJECT_HPP
+#define MSGPACK_OBJECT_HPP
+
+#include "msgpack/object_decl.hpp"
+
+#include "msgpack/v1/object.hpp"
+
+#endif // MSGPACK_OBJECT_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/object_decl.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_OBJECT_DECL_HPP
+#define MSGPACK_OBJECT_DECL_HPP
+
+#include "msgpack/v1/object_decl.hpp"
+#include "msgpack/v2/object_decl.hpp"
+
+#endif // MSGPACK_OBJECT_DECL_HPP

+ 19 - 0
ThirdParty/Include/msgpack/msgpack/object_fwd.hpp

@@ -0,0 +1,19 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_OBJECT_FWD_HPP
+#define MSGPACK_OBJECT_FWD_HPP
+
+#include "msgpack/object_fwd_decl.hpp"
+
+#include "msgpack/v1/object_fwd.hpp"
+#include "msgpack/v2/object_fwd.hpp"
+
+#endif // MSGPACK_OBJECT_FWD_HPP

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/object_fwd_decl.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ static resolution routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef MSGPACK_OBJECT_FWD_DECL_HPP
+#define MSGPACK_OBJECT_FWD_DECL_HPP
+
+#include "msgpack/v1/object_fwd_decl.hpp"
+#include "msgpack/v2/object_fwd_decl.hpp"
+
+#endif // MSGPACK_OBJECT_FWD_DECL_HPP

+ 147 - 0
ThirdParty/Include/msgpack/msgpack/pack.h

@@ -0,0 +1,147 @@
+/*
+ * MessagePack for C packing routine
+ *
+ * Copyright (C) 2008-2009 FURUHASHI Sadayuki
+ *
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef MSGPACK_PACK_H
+#define MSGPACK_PACK_H
+
+#include "pack_define.h"
+#include "object.h"
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * @defgroup msgpack_buffer Buffers
+ * @ingroup msgpack
+ * @{
+ * @}
+ */
+
+/**
+ * @defgroup msgpack_pack Serializer
+ * @ingroup msgpack
+ * @{
+ */
+
+typedef int (*msgpack_packer_write)(void* data, const char* buf, size_t len);
+
+typedef struct msgpack_packer {
+    void* data;
+    msgpack_packer_write callback;
+} msgpack_packer;
+
+static void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback);
+
+static msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback);
+static void msgpack_packer_free(msgpack_packer* pk);
+
+static int msgpack_pack_char(msgpack_packer* pk, char d);
+
+static int msgpack_pack_signed_char(msgpack_packer* pk, signed char d);
+static int msgpack_pack_short(msgpack_packer* pk, short d);
+static int msgpack_pack_int(msgpack_packer* pk, int d);
+static int msgpack_pack_long(msgpack_packer* pk, long d);
+static int msgpack_pack_long_long(msgpack_packer* pk, long long d);
+static int msgpack_pack_unsigned_char(msgpack_packer* pk, unsigned char d);
+static int msgpack_pack_unsigned_short(msgpack_packer* pk, unsigned short d);
+static int msgpack_pack_unsigned_int(msgpack_packer* pk, unsigned int d);
+static int msgpack_pack_unsigned_long(msgpack_packer* pk, unsigned long d);
+static int msgpack_pack_unsigned_long_long(msgpack_packer* pk, unsigned long long d);
+
+static int msgpack_pack_uint8(msgpack_packer* pk, uint8_t d);
+static int msgpack_pack_uint16(msgpack_packer* pk, uint16_t d);
+static int msgpack_pack_uint32(msgpack_packer* pk, uint32_t d);
+static int msgpack_pack_uint64(msgpack_packer* pk, uint64_t d);
+static int msgpack_pack_int8(msgpack_packer* pk, int8_t d);
+static int msgpack_pack_int16(msgpack_packer* pk, int16_t d);
+static int msgpack_pack_int32(msgpack_packer* pk, int32_t d);
+static int msgpack_pack_int64(msgpack_packer* pk, int64_t d);
+
+static int msgpack_pack_fix_uint8(msgpack_packer* pk, uint8_t d);
+static int msgpack_pack_fix_uint16(msgpack_packer* pk, uint16_t d);
+static int msgpack_pack_fix_uint32(msgpack_packer* pk, uint32_t d);
+static int msgpack_pack_fix_uint64(msgpack_packer* pk, uint64_t d);
+static int msgpack_pack_fix_int8(msgpack_packer* pk, int8_t d);
+static int msgpack_pack_fix_int16(msgpack_packer* pk, int16_t d);
+static int msgpack_pack_fix_int32(msgpack_packer* pk, int32_t d);
+static int msgpack_pack_fix_int64(msgpack_packer* pk, int64_t d);
+
+static int msgpack_pack_float(msgpack_packer* pk, float d);
+static int msgpack_pack_double(msgpack_packer* pk, double d);
+
+static int msgpack_pack_nil(msgpack_packer* pk);
+static int msgpack_pack_true(msgpack_packer* pk);
+static int msgpack_pack_false(msgpack_packer* pk);
+
+static int msgpack_pack_array(msgpack_packer* pk, size_t n);
+
+static int msgpack_pack_map(msgpack_packer* pk, size_t n);
+
+static int msgpack_pack_str(msgpack_packer* pk, size_t l);
+static int msgpack_pack_str_body(msgpack_packer* pk, const void* b, size_t l);
+
+static int msgpack_pack_v4raw(msgpack_packer* pk, size_t l);
+static int msgpack_pack_v4raw_body(msgpack_packer* pk, const void* b, size_t l);
+
+static int msgpack_pack_bin(msgpack_packer* pk, size_t l);
+static int msgpack_pack_bin_body(msgpack_packer* pk, const void* b, size_t l);
+
+static int msgpack_pack_ext(msgpack_packer* pk, size_t l, int8_t type);
+static int msgpack_pack_ext_body(msgpack_packer* pk, const void* b, size_t l);
+
+int msgpack_pack_object(msgpack_packer* pk, msgpack_object d);
+
+
+/** @} */
+
+
+#define msgpack_pack_inline_func(name) \
+    inline int msgpack_pack ## name
+
+#define msgpack_pack_inline_func_cint(name) \
+    inline int msgpack_pack ## name
+
+#define msgpack_pack_inline_func_fixint(name) \
+    inline int msgpack_pack_fix ## name
+
+#define msgpack_pack_user msgpack_packer*
+
+#define msgpack_pack_append_buffer(user, buf, len) \
+    return (*(user)->callback)((user)->data, (const char*)buf, len)
+
+#include "pack_template.h"
+
+inline void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback)
+{
+    pk->data = data;
+    pk->callback = callback;
+}
+
+inline msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback)
+{
+    msgpack_packer* pk = (msgpack_packer*)calloc(1, sizeof(msgpack_packer));
+    if(!pk) { return NULL; }
+    msgpack_packer_init(pk, data, callback);
+    return pk;
+}
+
+inline void msgpack_packer_free(msgpack_packer* pk)
+{
+    free(pk);
+}
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* msgpack/pack.h */

+ 17 - 0
ThirdParty/Include/msgpack/msgpack/pack.hpp

@@ -0,0 +1,17 @@
+//
+// MessagePack for C++ serializing routine
+//
+// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_PACK_HPP
+#define MSGPACK_PACK_HPP
+
+#include "msgpack/pack_decl.hpp"
+
+#include "msgpack/v1/pack.hpp"
+
+#endif // MSGPACK_PACK_HPP

+ 16 - 0
ThirdParty/Include/msgpack/msgpack/pack_decl.hpp

@@ -0,0 +1,16 @@
+//
+// MessagePack for C++ serializing routine
+//
+// Copyright (C) 2016 KONDO Takatoshi
+//
+//    Distributed under the Boost Software License, Version 1.0.
+//    (See accompanying file LICENSE_1_0.txt or copy at
+//    http://www.boost.org/LICENSE_1_0.txt)
+//
+#ifndef MSGPACK_PACK_DECL_HPP
+#define MSGPACK_PACK_DECL_HPP
+
+#include "msgpack/v1/pack_decl.hpp"
+#include "msgpack/v2/pack_decl.hpp"
+
+#endif // MSGPACK_PACK_DECL_HPP

+ 18 - 0
ThirdParty/Include/msgpack/msgpack/pack_define.h

@@ -0,0 +1,18 @@
+/*
+ * MessagePack unpacking routine template
+ *
+ * Copyright (C) 2008-2010 FURUHASHI Sadayuki
+ *
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef MSGPACK_PACK_DEFINE_H
+#define MSGPACK_PACK_DEFINE_H
+
+#include "msgpack/sysdep.h"
+#include <limits.h>
+#include <string.h>
+
+#endif /* msgpack/pack_define.h */
+

+ 909 - 0
ThirdParty/Include/msgpack/msgpack/pack_template.h

@@ -0,0 +1,909 @@
+/*
+ * MessagePack packing routine template
+ *
+ * Copyright (C) 2008-2010 FURUHASHI Sadayuki
+ *
+ *    Distributed under the Boost Software License, Version 1.0.
+ *    (See accompanying file LICENSE_1_0.txt or copy at
+ *    http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#if MSGPACK_ENDIAN_LITTLE_BYTE
+#define TAKE8_8(d)  ((uint8_t*)&d)[0]
+#define TAKE8_16(d) ((uint8_t*)&d)[0]
+#define TAKE8_32(d) ((uint8_t*)&d)[0]
+#define TAKE8_64(d) ((uint8_t*)&d)[0]
+#elif MSGPACK_ENDIAN_BIG_BYTE
+#define TAKE8_8(d)  ((uint8_t*)&d)[0]
+#define TAKE8_16(d) ((uint8_t*)&d)[1]
+#define TAKE8_32(d) ((uint8_t*)&d)[3]
+#define TAKE8_64(d) ((uint8_t*)&d)[7]
+#else
+#error msgpack-c supports only big endian and little endian
+#endif
+
+#ifndef msgpack_pack_inline_func
+#error msgpack_pack_inline_func template is not defined
+#endif
+
+#ifndef msgpack_pack_user
+#error msgpack_pack_user type is not defined
+#endif
+
+#ifndef msgpack_pack_append_buffer
+#error msgpack_pack_append_buffer callback is not defined
+#endif
+
+
+/*
+ * Integer
+ */
+
+#define msgpack_pack_real_uint8(x, d) \
+do { \
+    if(d < (1<<7)) { \
+        /* fixnum */ \
+        msgpack_pack_append_buffer(x, &TAKE8_8(d), 1); \
+    } else { \
+        /* unsigned 8 */ \
+        unsigned char buf[2] = {0xcc, TAKE8_8(d)}; \
+        msgpack_pack_append_buffer(x, buf, 2); \
+    } \
+} while(0)
+
+#define msgpack_pack_real_uint16(x, d) \
+do { \
+    if(d < (1<<7)) { \
+        /* fixnum */ \
+        msgpack_pack_append_buffer(x, &TAKE8_16(d), 1); \
+    } else if(d < (1<<8)) { \
+        /* unsigned 8 */ \
+        unsigned char buf[2] = {0xcc, TAKE8_16(d)}; \
+        msgpack_pack_append_buffer(x, buf, 2); \
+    } else { \
+        /* unsigned 16 */ \
+        unsigned char buf[3]; \
+        buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
+        msgpack_pack_append_buffer(x, buf, 3); \
+    } \
+} while(0)
+
+#define msgpack_pack_real_uint32(x, d) \
+do { \
+    if(d < (1<<8)) { \
+        if(d < (1<<7)) { \
+            /* fixnum */ \
+            msgpack_pack_append_buffer(x, &TAKE8_32(d), 1); \
+        } else { \
+            /* unsigned 8 */ \
+            unsigned char buf[2] = {0xcc, TAKE8_32(d)}; \
+            msgpack_pack_append_buffer(x, buf, 2); \
+        } \
+    } else { \
+        if(d < (1<<16)) { \
+            /* unsigned 16 */ \
+            unsigned char buf[3]; \
+            buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
+            msgpack_pack_append_buffer(x, buf, 3); \
+        } else { \
+            /* unsigned 32 */ \
+            unsigned char buf[5]; \
+            buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
+            msgpack_pack_append_buffer(x, buf, 5); \
+        } \
+    } \
+} while(0)
+
+#define msgpack_pack_real_uint64(x, d) \
+do { \
+    if(d < (1ULL<<8)) { \
+        if(d < (1ULL<<7)) { \
+            /* fixnum */ \
+            msgpack_pack_append_buffer(x, &TAKE8_64(d), 1); \
+        } else { \
+            /* unsigned 8 */ \
+            unsigned char buf[2] = {0xcc, TAKE8_64(d)}; \
+            msgpack_pack_append_buffer(x, buf, 2); \
+        } \
+    } else { \
+        if(d < (1ULL<<16)) { \
+            /* unsigned 16 */ \
+            unsigned char buf[3]; \
+            buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
+            msgpack_pack_append_buffer(x, buf, 3); \
+        } else if(d < (1ULL<<32)) { \
+            /* unsigned 32 */ \
+            unsigned char buf[5]; \
+            buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
+            msgpack_pack_append_buffer(x, buf, 5); \
+        } else { \
+            /* unsigned 64 */ \
+            unsigned char buf[9]; \
+            buf[0] = 0xcf; _msgpack_store64(&buf[1], d); \
+            msgpack_pack_append_buffer(x, buf, 9); \
+        } \
+    } \
+} while(0)
+
+#define msgpack_pack_real_int8(x, d) \
+do { \
+    if(d < -(1<<5)) { \
+        /* signed 8 */ \
+        unsigned char buf[2] = {0xd0, TAKE8_8(d)}; \
+        msgpack_pack_append_buffer(x, buf, 2); \
+    } else { \
+        /* fixnum */ \
+        msgpack_pack_append_buffer(x, &TAKE8_8(d), 1); \
+    } \
+} while(0)
+
+#define msgpack_pack_real_int16(x, d) \
+do { \
+    if(d < -(1<<5)) { \
+        if(d < -(1<<7)) { \
+            /* signed 16 */ \
+            unsigned char buf[3]; \
+            buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
+            msgpack_pack_append_buffer(x, buf, 3); \
+        } else { \
+            /* signed 8 */ \
+            unsigned char buf[2] = {0xd0, TAKE8_16(d)}; \
+            msgpack_pack_append_buffer(x, buf, 2); \
+        } \
+    } else if(d < (1<<7)) { \
+        /* fixnum */ \
+        msgpack_pack_append_buffer(x, &TAKE8_16(d), 1); \
+    } else { \
+        if(d < (1<<8)) { \
+            /* unsigned 8 */ \
+            unsigned char buf[2] = {0xcc, TAKE8_16(d)}; \
+            msgpack_pack_append_buffer(x, buf, 2); \
+        } else { \
+            /* unsigned 16 */ \
+            unsigned char buf[3]; \
+            buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
+            msgpack_pack_append_buffer(x, buf, 3); \
+        } \
+    } \
+} while(0)
+
+#define msgpack_pack_real_int32(x, d) \
+do { \
+    if(d < -(1<<5)) { \
+        if(d < -(1<<15)) { \
+            /* signed 32 */ \
+            unsigned char buf[5]; \
+            buf[0] = 0xd2; _msgpack_store32(&buf[1], (int32_t)d); \
+            msgpack_pack_append_buffer(x, buf, 5); \
+        } else if(d < -(1<<7)) { \
+            /* signed 16 */ \
+            unsigned char buf[3]; \
+            buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
+            msgpack_pack_append_buffer(x, buf, 3); \
+        } else { \
+            /* signed 8 */ \
+            unsigned char buf[2] = {0xd0, TAKE8_32(d)}; \
+            msgpack_pack_append_buffer(x, buf, 2); \
+        } \
+    } else if(d < (1<<7)) { \
+        /* fixnum */ \
+        msgpack_pack_append_buffer(x, &TAKE8_32(d), 1); \
+    } else { \
+        if(d < (1<<8)) { \
+            /* unsigned 8 */ \
+            unsigned char buf[2] = {0xcc, TAKE8_32(d)}; \
+            msgpack_pack_append_buffer(x, buf, 2); \
+        } else if(d < (1<<16)) { \
+            /* unsigned 16 */ \
+            unsigned char buf[3]; \
+            buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
+            msgpack_pack_append_buffer(x, buf, 3); \
+        } else { \
+            /* unsigned 32 */ \
+            unsigned char buf[5]; \
+            buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
+            msgpack_pack_append_buffer(x, buf, 5); \
+        } \
+    } \
+} while(0)
+
+#define msgpack_pack_real_int64(x, d) \
+do { \
+    if(d < -(1LL<<5)) { \
+        if(d < -(1LL<<15)) { \
+            if(d < -(1LL<<31)) { \
+                /* signed 64 */ \
+                unsigned char buf[9]; \
+                buf[0] = 0xd3; _msgpack_store64(&buf[1], d); \
+                msgpack_pack_append_buffer(x, buf, 9); \
+            } else { \
+                /* signed 32 */ \
+                unsigned char buf[5]; \
+                buf[0] = 0xd2; _msgpack_store32(&buf[1], (int32_t)d); \
+                msgpack_pack_append_buffer(x, buf, 5); \
+            } \
+        } else { \
+            if(d < -(1<<7)) { \
+                /* signed 16 */ \
+                unsigned char buf[3]; \
+                buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
+                msgpack_pack_append_buffer(x, buf, 3); \
+            } else { \
+                /* signed 8 */ \
+                unsigned char buf[2] = {0xd0, TAKE8_64(d)}; \
+                msgpack_pack_append_buffer(x, buf, 2); \
+            } \
+        } \
+    } else if(d < (1<<7)) { \
+        /* fixnum */ \
+        msgpack_pack_append_buffer(x, &TAKE8_64(d), 1); \
+    } else { \
+        if(d < (1LL<<16)) { \
+            if(d < (1<<8)) { \
+                /* unsigned 8 */ \
+                unsigned char buf[2] = {0xcc, TAKE8_64(d)}; \
+                msgpack_pack_append_buffer(x, buf, 2); \
+            } else { \
+                /* unsigned 16 */ \
+                unsigned char buf[3]; \
+                buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
+                msgpack_pack_append_buffer(x, buf, 3); \
+            } \
+        } else { \
+            if(d < (1LL<<32)) { \
+                /* unsigned 32 */ \
+                unsigned char buf[5]; \
+                buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
+                msgpack_pack_append_buffer(x, buf, 5); \
+            } else { \
+                /* unsigned 64 */ \
+                unsigned char buf[9]; \
+                buf[0] = 0xcf; _msgpack_store64(&buf[1], d); \
+                msgpack_pack_append_buffer(x, buf, 9); \
+            } \
+        } \
+    } \
+} while(0)
+
+
+#ifdef msgpack_pack_inline_func_fixint
+
+msgpack_pack_inline_func_fixint(_uint8)(msgpack_pack_user x, uint8_t d)
+{
+    unsigned char buf[2] = {0xcc, TAKE8_8(d)};
+    msgpack_pack_append_buffer(x, buf, 2);
+}
+
+msgpack_pack_inline_func_fixint(_uint16)(msgpack_pack_user x, uint16_t d)
+{
+    unsigned char buf[3];
+    buf[0] = 0xcd; _msgpack_store16(&buf[1], d);
+    msgpack_pack_append_buffer(x, buf, 3);
+}
+
+msgpack_pack_inline_func_fixint(_uint32)(msgpack_pack_user x, uint32_t d)
+{
+    unsigned char buf[5];
+    buf[0] = 0xce; _msgpack_store32(&buf[1], d);
+    msgpack_pack_append_buffer(x, buf, 5);
+}
+
+msgpack_pack_inline_func_fixint(_uint64)(msgpack_pack_user x, uint64_t d)
+{
+    unsigned char buf[9];
+    buf[0] = 0xcf; _msgpack_store64(&buf[1], d);
+    msgpack_pack_append_buffer(x, buf, 9);
+}
+
+msgpack_pack_inline_func_fixint(_int8)(msgpack_pack_user x, int8_t d)
+{
+    unsigned char buf[2] = {0xd0, TAKE8_8(d)};
+    msgpack_pack_append_buffer(x, buf, 2);
+}
+
+msgpack_pack_inline_func_fixint(_int16)(msgpack_pack_user x, int16_t d)
+{
+    unsigned char buf[3];
+    buf[0] = 0xd1; _msgpack_store16(&buf[1], d);
+    msgpack_pack_append_buffer(x, buf, 3);
+}
+
+msgpack_pack_inline_func_fixint(_int32)(msgpack_pack_user x, int32_t d)
+{
+    unsigned char buf[5];
+    buf[0] = 0xd2; _msgpack_store32(&buf[1], d);
+    msgpack_pack_append_buffer(x, buf, 5);
+}
+
+msgpack_pack_inline_func_fixint(_int64)(msgpack_pack_user x, int64_t d)
+{
+    unsigned char buf[9];
+    buf[0] = 0xd3; _msgpack_store64(&buf[1], d);
+    msgpack_pack_append_buffer(x, buf, 9);
+}
+
+#undef msgpack_pack_inline_func_fixint
+#endif
+
+
+msgpack_pack_inline_func(_uint8)(msgpack_pack_user x, uint8_t d)
+{
+    msgpack_pack_real_uint8(x, d);
+}
+
+msgpack_pack_inline_func(_uint16)(msgpack_pack_user x, uint16_t d)
+{
+    msgpack_pack_real_uint16(x, d);
+}
+
+msgpack_pack_inline_func(_uint32)(msgpack_pack_user x, uint32_t d)
+{
+    msgpack_pack_real_uint32(x, d);
+}
+
+msgpack_pack_inline_func(_uint64)(msgpack_pack_user x, uint64_t d)
+{
+    msgpack_pack_real_uint64(x, d);
+}
+
+msgpack_pack_inline_func(_int8)(msgpack_pack_user x, int8_t d)
+{
+    msgpack_pack_real_int8(x, d);
+}
+
+msgpack_pack_inline_func(_int16)(msgpack_pack_user x, int16_t d)
+{
+    msgpack_pack_real_int16(x, d);
+}
+
+msgpack_pack_inline_func(_int32)(msgpack_pack_user x, int32_t d)
+{
+    msgpack_pack_real_int32(x, d);
+}
+
+msgpack_pack_inline_func(_int64)(msgpack_pack_user x, int64_t d)
+{
+    msgpack_pack_real_int64(x, d);
+}
+
+msgpack_pack_inline_func(_char)(msgpack_pack_user x, char d)
+{
+#if defined(CHAR_MIN)
+#if CHAR_MIN < 0
+        msgpack_pack_real_int8(x, d);
+#else
+        msgpack_pack_real_uint8(x, d);
+#endif
+#else
+#error CHAR_MIN is not defined
+#endif
+}
+
+msgpack_pack_inline_func(_signed_char)(msgpack_pack_user x, signed char d)
+{
+    msgpack_pack_real_int8(x, d);
+}
+
+msgpack_pack_inline_func(_unsigned_char)(msgpack_pack_user x, unsigned char d)
+{
+    msgpack_pack_real_uint8(x, d);
+}
+
+#ifdef msgpack_pack_inline_func_cint
+
+msgpack_pack_inline_func_cint(_short)(msgpack_pack_user x, short d)
+{
+#if defined(SIZEOF_SHORT)
+#if SIZEOF_SHORT == 2
+    msgpack_pack_real_int16(x, d);
+#elif SIZEOF_SHORT == 4
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#elif defined(SHRT_MAX)
+#if SHRT_MAX == 0x7fff
+    msgpack_pack_real_int16(x, d);
+#elif SHRT_MAX == 0x7fffffff
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#else
+if(sizeof(short) == 2) {
+    msgpack_pack_real_int16(x, d);
+} else if(sizeof(short) == 4) {
+    msgpack_pack_real_int32(x, d);
+} else {
+    msgpack_pack_real_int64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_int)(msgpack_pack_user x, int d)
+{
+#if defined(SIZEOF_INT)
+#if SIZEOF_INT == 2
+    msgpack_pack_real_int16(x, d);
+#elif SIZEOF_INT == 4
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#elif defined(INT_MAX)
+#if INT_MAX == 0x7fff
+    msgpack_pack_real_int16(x, d);
+#elif INT_MAX == 0x7fffffff
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#else
+if(sizeof(int) == 2) {
+    msgpack_pack_real_int16(x, d);
+} else if(sizeof(int) == 4) {
+    msgpack_pack_real_int32(x, d);
+} else {
+    msgpack_pack_real_int64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_long)(msgpack_pack_user x, long d)
+{
+#if defined(SIZEOF_LONG)
+#if SIZEOF_LONG == 2
+    msgpack_pack_real_int16(x, d);
+#elif SIZEOF_LONG == 4
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#elif defined(LONG_MAX)
+#if LONG_MAX == 0x7fffL
+    msgpack_pack_real_int16(x, d);
+#elif LONG_MAX == 0x7fffffffL
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#else
+if(sizeof(long) == 2) {
+    msgpack_pack_real_int16(x, d);
+} else if(sizeof(long) == 4) {
+    msgpack_pack_real_int32(x, d);
+} else {
+    msgpack_pack_real_int64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_long_long)(msgpack_pack_user x, long long d)
+{
+#if defined(SIZEOF_LONG_LONG)
+#if SIZEOF_LONG_LONG == 2
+    msgpack_pack_real_int16(x, d);
+#elif SIZEOF_LONG_LONG == 4
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#elif defined(LLONG_MAX)
+#if LLONG_MAX == 0x7fffL
+    msgpack_pack_real_int16(x, d);
+#elif LLONG_MAX == 0x7fffffffL
+    msgpack_pack_real_int32(x, d);
+#else
+    msgpack_pack_real_int64(x, d);
+#endif
+
+#else
+if(sizeof(long long) == 2) {
+    msgpack_pack_real_int16(x, d);
+} else if(sizeof(long long) == 4) {
+    msgpack_pack_real_int32(x, d);
+} else {
+    msgpack_pack_real_int64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_unsigned_short)(msgpack_pack_user x, unsigned short d)
+{
+#if defined(SIZEOF_SHORT)
+#if SIZEOF_SHORT == 2
+    msgpack_pack_real_uint16(x, d);
+#elif SIZEOF_SHORT == 4
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#elif defined(USHRT_MAX)
+#if USHRT_MAX == 0xffffU
+    msgpack_pack_real_uint16(x, d);
+#elif USHRT_MAX == 0xffffffffU
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#else
+if(sizeof(unsigned short) == 2) {
+    msgpack_pack_real_uint16(x, d);
+} else if(sizeof(unsigned short) == 4) {
+    msgpack_pack_real_uint32(x, d);
+} else {
+    msgpack_pack_real_uint64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_unsigned_int)(msgpack_pack_user x, unsigned int d)
+{
+#if defined(SIZEOF_INT)
+#if SIZEOF_INT == 2
+    msgpack_pack_real_uint16(x, d);
+#elif SIZEOF_INT == 4
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#elif defined(UINT_MAX)
+#if UINT_MAX == 0xffffU
+    msgpack_pack_real_uint16(x, d);
+#elif UINT_MAX == 0xffffffffU
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#else
+if(sizeof(unsigned int) == 2) {
+    msgpack_pack_real_uint16(x, d);
+} else if(sizeof(unsigned int) == 4) {
+    msgpack_pack_real_uint32(x, d);
+} else {
+    msgpack_pack_real_uint64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_unsigned_long)(msgpack_pack_user x, unsigned long d)
+{
+#if defined(SIZEOF_LONG)
+#if SIZEOF_LONG == 2
+    msgpack_pack_real_uint16(x, d);
+#elif SIZEOF_LONG == 4
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#elif defined(ULONG_MAX)
+#if ULONG_MAX == 0xffffUL
+    msgpack_pack_real_uint16(x, d);
+#elif ULONG_MAX == 0xffffffffUL
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#else
+if(sizeof(unsigned long) == 2) {
+    msgpack_pack_real_uint16(x, d);
+} else if(sizeof(unsigned long) == 4) {
+    msgpack_pack_real_uint32(x, d);
+} else {
+    msgpack_pack_real_uint64(x, d);
+}
+#endif
+}
+
+msgpack_pack_inline_func_cint(_unsigned_long_long)(msgpack_pack_user x, unsigned long long d)
+{
+#if defined(SIZEOF_LONG_LONG)
+#if SIZEOF_LONG_LONG == 2
+    msgpack_pack_real_uint16(x, d);
+#elif SIZEOF_LONG_LONG == 4
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#elif defined(ULLONG_MAX)
+#if ULLONG_MAX == 0xffffUL
+    msgpack_pack_real_uint16(x, d);
+#elif ULLONG_MAX == 0xffffffffUL
+    msgpack_pack_real_uint32(x, d);
+#else
+    msgpack_pack_real_uint64(x, d);
+#endif
+
+#else
+if(sizeof(unsigned long long) == 2) {
+    msgpack_pack_real_uint16(x, d);
+} else if(sizeof(unsigned long long) == 4) {
+    msgpack_pack_real_uint32(x, d);
+} else {
+    msgpack_pack_real_uint64(x, d);
+}
+#endif
+}
+
+#undef msgpack_pack_inline_func_cint
+#endif
+
+
+
+/*
+ * Float
+ */
+
+msgpack_pack_inline_func(_float)(msgpack_pack_user x, float d)
+{
+    unsigned char buf[5];
+    union { float f; uint32_t i; } mem;
+    mem.f = d;
+    buf[0] = 0xca; _msgpack_store32(&buf[1], mem.i);
+    msgpack_pack_append_buffer(x, buf, 5);
+}
+
+msgpack_pack_inline_func(_double)(msgpack_pack_user x, double d)
+{
+    unsigned char buf[9];
+    union { double f; uint64_t i; } mem;
+    mem.f = d;
+    buf[0] = 0xcb;
+#if defined(TARGET_OS_IPHONE)
+    // ok
+#elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi
+    // https://github.com/msgpack/msgpack-perl/pull/1
+    mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL);
+#endif
+    _msgpack_store64(&buf[1], mem.i);
+    msgpack_pack_append_buffer(x, buf, 9);
+}
+
+
+/*
+ * Nil
+ */
+
+msgpack_pack_inline_func(_nil)(msgpack_pack_user x)
+{
+    static const unsigned char d = 0xc0;
+    msgpack_pack_append_buffer(x, &d, 1);
+}
+
+
+/*
+ * Boolean
+ */
+
+msgpack_pack_inline_func(_true)(msgpack_pack_user x)
+{
+    static const unsigned char d = 0xc3;
+    msgpack_pack_append_buffer(x, &d, 1);
+}
+
+msgpack_pack_inline_func(_false)(msgpack_pack_user x)
+{
+    static const unsigned char d = 0xc2;
+    msgpack_pack_append_buffer(x, &d, 1);
+}
+
+
+/*
+ * Array
+ */
+
+msgpack_pack_inline_func(_array)(msgpack_pack_user x, size_t n)
+{
+    if(n < 16) {
+        unsigned char d = 0x90 | (uint8_t)n;
+        msgpack_pack_append_buffer(x, &d, 1);
+    } else if(n < 65536) {
+        unsigned char buf[3];
+        buf[0] = 0xdc; _msgpack_store16(&buf[1], (uint16_t)n);
+        msgpack_pack_append_buffer(x, buf, 3);
+    } else {
+        unsigned char buf[5];
+        buf[0] = 0xdd; _msgpack_store32(&buf[1], (uint32_t)n);
+        msgpack_pack_append_buffer(x, buf, 5);
+    }
+}
+
+
+/*
+ * Map
+ */
+
+msgpack_pack_inline_func(_map)(msgpack_pack_user x, size_t n)
+{
+    if(n < 16) {
+        unsigned char d = 0x80 | (uint8_t)n;
+        msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
+    } else if(n < 65536) {
+        unsigned char buf[3];
+        buf[0] = 0xde; _msgpack_store16(&buf[1], (uint16_t)n);
+        msgpack_pack_append_buffer(x, buf, 3);
+    } else {
+        unsigned char buf[5];
+        buf[0] = 0xdf; _msgpack_store32(&buf[1], (uint32_t)n);
+        msgpack_pack_append_buffer(x, buf, 5);
+    }
+}
+
+
+/*
+ * Str
+ */
+
+msgpack_pack_inline_func(_str)(msgpack_pack_user x, size_t l)
+{
+    if(l < 32) {
+        unsigned char d = 0xa0 | (uint8_t)l;
+        msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
+    } else if(l < 256) {
+        unsigned char buf[2];
+        buf[0] = 0xd9; buf[1] = (uint8_t)l;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } else if(l < 65536) {
+        unsigned char buf[3];
+        buf[0] = 0xda; _msgpack_store16(&buf[1], (uint16_t)l);
+        msgpack_pack_append_buffer(x, buf, 3);
+    } else {
+        unsigned char buf[5];
+        buf[0] = 0xdb; _msgpack_store32(&buf[1], (uint32_t)l);
+        msgpack_pack_append_buffer(x, buf, 5);
+    }
+}
+
+msgpack_pack_inline_func(_str_body)(msgpack_pack_user x, const void* b, size_t l)
+{
+    msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
+}
+
+/*
+ * Raw (V4)
+ */
+
+msgpack_pack_inline_func(_v4raw)(msgpack_pack_user x, size_t l)
+{
+    if(l < 32) {
+        unsigned char d = 0xa0 | (uint8_t)l;
+        msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
+    } else if(l < 65536) {
+        unsigned char buf[3];
+        buf[0] = 0xda; _msgpack_store16(&buf[1], (uint16_t)l);
+        msgpack_pack_append_buffer(x, buf, 3);
+    } else {
+        unsigned char buf[5];
+        buf[0] = 0xdb; _msgpack_store32(&buf[1], (uint32_t)l);
+        msgpack_pack_append_buffer(x, buf, 5);
+    }
+}
+
+msgpack_pack_inline_func(_v4raw_body)(msgpack_pack_user x, const void* b, size_t l)
+{
+    msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
+}
+
+/*
+ * Bin
+ */
+
+msgpack_pack_inline_func(_bin)(msgpack_pack_user x, size_t l)
+{
+    if(l < 256) {
+        unsigned char buf[2];
+        buf[0] = 0xc4; buf[1] = (uint8_t)l;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } else if(l < 65536) {
+        unsigned char buf[3];
+        buf[0] = 0xc5; _msgpack_store16(&buf[1], (uint16_t)l);
+        msgpack_pack_append_buffer(x, buf, 3);
+    } else {
+        unsigned char buf[5];
+        buf[0] = 0xc6; _msgpack_store32(&buf[1], (uint32_t)l);
+        msgpack_pack_append_buffer(x, buf, 5);
+    }
+}
+
+msgpack_pack_inline_func(_bin_body)(msgpack_pack_user x, const void* b, size_t l)
+{
+    msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
+}
+
+/*
+ * Ext
+ */
+
+msgpack_pack_inline_func(_ext)(msgpack_pack_user x, size_t l, int8_t type)
+{
+    switch(l) {
+    case 1: {
+        unsigned char buf[2];
+        buf[0] = 0xd4;
+        buf[1] = type;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } break;
+    case 2: {
+        unsigned char buf[2];
+        buf[0] = 0xd5;
+        buf[1] = type;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } break;
+    case 4: {
+        unsigned char buf[2];
+        buf[0] = 0xd6;
+        buf[1] = type;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } break;
+    case 8: {
+        unsigned char buf[2];
+        buf[0] = 0xd7;
+        buf[1] = type;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } break;
+    case 16: {
+        unsigned char buf[2];
+        buf[0] = 0xd8;
+        buf[1] = type;
+        msgpack_pack_append_buffer(x, buf, 2);
+    } break;
+    default:
+        if(l < 256) {
+            unsigned char buf[3];
+            buf[0] = 0xc7;
+            buf[1] = (unsigned char)l;
+            buf[2] = type;
+            msgpack_pack_append_buffer(x, buf, 3);
+        } else if(l < 65536) {
+            unsigned char buf[4];
+            buf[0] = 0xc8;
+            _msgpack_store16(&buf[1], l);
+            buf[3] = type;
+            msgpack_pack_append_buffer(x, buf, 4);
+        } else {
+            unsigned char buf[6];
+            buf[0] = 0xc9;
+            _msgpack_store32(&buf[1], l);
+            buf[5] = type;
+            msgpack_pack_append_buffer(x, buf, 6);
+        }
+        break;
+    }
+}
+
+msgpack_pack_inline_func(_ext_body)(msgpack_pack_user x, const void* b, size_t l)
+{
+    msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
+}
+
+#undef msgpack_pack_inline_func
+#undef msgpack_pack_user
+#undef msgpack_pack_append_buffer
+
+#undef TAKE8_8
+#undef TAKE8_16
+#undef TAKE8_32
+#undef TAKE8_64
+
+#undef msgpack_pack_real_uint8
+#undef msgpack_pack_real_uint16
+#undef msgpack_pack_real_uint32
+#undef msgpack_pack_real_uint64
+#undef msgpack_pack_real_int8
+#undef msgpack_pack_real_int16
+#undef msgpack_pack_real_int32
+#undef msgpack_pack_real_int64

+ 19 - 0
ThirdParty/Include/msgpack/msgpack/predef.h

@@ -0,0 +1,19 @@
+/*
+Copyright Rene Rivera 2008-2013
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef MSGPACK_PREDEF_H
+#define MSGPACK_PREDEF_H
+
+#include <msgpack/predef/language.h>
+#include <msgpack/predef/architecture.h>
+#include <msgpack/predef/compiler.h>
+#include <msgpack/predef/library.h>
+#include <msgpack/predef/os.h>
+#include <msgpack/predef/other.h>
+#include <msgpack/predef/platform.h>
+
+#endif

Some files were not shown because too many files changed in this diff