catkin_make
This commit is contained in:
parent
b64702260f
commit
bb14979b8a
120
CMakeLists.txt
120
CMakeLists.txt
|
|
@ -1,14 +1,67 @@
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.0.2)
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# Dual-mode CMakeLists.txt: Supports both Catkin and Standalone CMake
|
||||||
|
# ========================================================
|
||||||
|
|
||||||
|
# Detect if building with Catkin
|
||||||
|
if(DEFINED CATKIN_DEVEL_PREFIX OR DEFINED CATKIN_TOPLEVEL)
|
||||||
|
set(BUILDING_WITH_CATKIN TRUE)
|
||||||
|
message(STATUS "Building robot_xmlrpcpp with Catkin")
|
||||||
|
else()
|
||||||
|
set(BUILDING_WITH_CATKIN FALSE)
|
||||||
|
message(STATUS "Building robot_xmlrpcpp with Standalone CMake")
|
||||||
|
endif()
|
||||||
|
|
||||||
project(robot_xmlrpcpp)
|
project(robot_xmlrpcpp)
|
||||||
|
|
||||||
|
## Compile as C++17
|
||||||
|
add_compile_options(-std=c++17)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
# ========================================================
|
||||||
add_compile_options(-Wall -Wextra -Wpedantic -fPIC)
|
# Find Packages
|
||||||
|
# ========================================================
|
||||||
|
|
||||||
|
if(BUILDING_WITH_CATKIN)
|
||||||
|
## Find catkin macros and libraries
|
||||||
|
find_package(catkin REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
## System dependencies are found with CMake's conventions
|
||||||
|
find_package(console_bridge REQUIRED)
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# Catkin specific configuration
|
||||||
|
# ========================================================
|
||||||
|
|
||||||
|
if(BUILDING_WITH_CATKIN)
|
||||||
|
## The catkin_package macro generates cmake config files for your package
|
||||||
|
catkin_package(
|
||||||
|
INCLUDE_DIRS include
|
||||||
|
LIBRARIES robot_xmlrpcpp
|
||||||
|
CATKIN_DEPENDS
|
||||||
|
DEPENDS console_bridge
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
###########
|
||||||
|
## Build ##
|
||||||
|
###########
|
||||||
|
|
||||||
|
## Specify additional locations of header files
|
||||||
|
include_directories(
|
||||||
|
include
|
||||||
|
${console_bridge_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILDING_WITH_CATKIN)
|
||||||
|
include_directories(${catkin_INCLUDE_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
## Declare a C++ library
|
||||||
add_library(robot_xmlrpcpp
|
add_library(robot_xmlrpcpp
|
||||||
src/XmlRpcClient.cpp
|
src/XmlRpcClient.cpp
|
||||||
src/XmlRpcDispatch.cpp
|
src/XmlRpcDispatch.cpp
|
||||||
|
|
@ -21,33 +74,54 @@ add_library(robot_xmlrpcpp
|
||||||
src/XmlRpcValue.cpp
|
src/XmlRpcValue.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
## Target include directories
|
||||||
target_include_directories(robot_xmlrpcpp
|
target_include_directories(robot_xmlrpcpp
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
|
$<INSTALL_INTERFACE:include>
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Cài đặt thư viện vào hệ thống khi chạy make install ---
|
## Add cmake target dependencies of the library
|
||||||
install(TARGETS robot_xmlrpcpp
|
if(BUILDING_WITH_CATKIN)
|
||||||
EXPORT robot_xmlrpcpp-targets
|
add_dependencies(robot_xmlrpcpp ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||||
ARCHIVE DESTINATION lib # Thư viện tĩnh .a
|
endif()
|
||||||
LIBRARY DESTINATION lib # Thư viện động .so
|
|
||||||
RUNTIME DESTINATION bin # File thực thi (nếu có)
|
## Specify libraries to link a library or executable target against
|
||||||
INCLUDES DESTINATION include # Cài đặt include
|
target_link_libraries(robot_xmlrpcpp
|
||||||
|
${console_bridge_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
if(BUILDING_WITH_CATKIN)
|
||||||
|
target_link_libraries(robot_xmlrpcpp ${catkin_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
## Compiler flags
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
target_compile_options(robot_xmlrpcpp PRIVATE -Wall -Wextra -Wpedantic -fPIC -Wno-unused-parameter)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# ========================================================
|
||||||
|
# Installation (Standalone CMake only)
|
||||||
|
# ========================================================
|
||||||
|
|
||||||
|
if(NOT BUILDING_WITH_CATKIN)
|
||||||
|
install(TARGETS robot_xmlrpcpp
|
||||||
|
EXPORT robot_xmlrpcpp-targets
|
||||||
|
ARCHIVE DESTINATION lib # Thư viện tĩnh .a
|
||||||
|
LIBRARY DESTINATION lib # Thư viện động .so
|
||||||
|
RUNTIME DESTINATION bin # File thực thi (nếu có)
|
||||||
|
INCLUDES DESTINATION include # Cài đặt include
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
DIRECTORY include/
|
DIRECTORY include/
|
||||||
DESTINATION include/
|
DESTINATION include/
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- Xuất export set robot_xmlrpcpp-targets thành file CMake module ---
|
# --- Xuất export set robot_xmlrpcpp-targets thành file CMake module ---
|
||||||
# --- Tạo file lib/cmake/robot_xmlrpcpp/robot_xmlrpcpp-targets.cmake ---
|
install(EXPORT robot_xmlrpcpp-targets
|
||||||
# --- File này chứa cấu hình giúp project khác có thể dùng ---
|
FILE robot_xmlrpcpp-targets.cmake
|
||||||
# --- Find_package(robot_xmlrpcpp REQUIRED) ---
|
NAMESPACE robot_xmlrpcpp::
|
||||||
# --- Target_link_libraries(my_app PRIVATE robot_xmlrpcpp::robot_xmlrpcpp) ---
|
DESTINATION lib/cmake/robot_xmlrpcpp
|
||||||
install(EXPORT robot_xmlrpcpp-targets
|
)
|
||||||
FILE robot_xmlrpcpp-targets.cmake
|
endif()
|
||||||
NAMESPACE robot_xmlrpcpp::
|
|
||||||
DESTINATION lib/cmake/robot_xmlrpcpp
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@
|
||||||
#include "XmlRpcValue.h"
|
#include "XmlRpcValue.h"
|
||||||
#include "XmlRpcUtil.h"
|
#include "XmlRpcUtil.h"
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
|
|
||||||
//! An interface allowing custom handling of error message reporting.
|
//! An interface allowing custom handling of error message reporting.
|
||||||
|
|
@ -90,7 +89,6 @@ namespace XmlRpc {
|
||||||
//! Version identifier
|
//! Version identifier
|
||||||
extern const char XMLRPC_VERSION[];
|
extern const char XMLRPC_VERSION[];
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPC_H_
|
#endif // _XMLRPC_H_
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@
|
||||||
#include "robot_xmlrpcpp/XmlRpcDispatch.h"
|
#include "robot_xmlrpcpp/XmlRpcDispatch.h"
|
||||||
#include "robot_xmlrpcpp/XmlRpcSource.h"
|
#include "robot_xmlrpcpp/XmlRpcSource.h"
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
// Arguments and results are represented by XmlRpcValues
|
// Arguments and results are represented by XmlRpcValues
|
||||||
class XmlRpcValue;
|
class XmlRpcValue;
|
||||||
|
|
@ -124,7 +123,6 @@ namespace XmlRpc {
|
||||||
|
|
||||||
}; // class XmlRpcClient
|
}; // class XmlRpcClient
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPCCLIENT_H_
|
#endif // _XMLRPCCLIENT_H_
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@
|
||||||
# include <list>
|
# include <list>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
// An RPC source represents a file descriptor to monitor
|
// An RPC source represents a file descriptor to monitor
|
||||||
class XmlRpcSource;
|
class XmlRpcSource;
|
||||||
|
|
@ -84,7 +83,6 @@ namespace XmlRpc {
|
||||||
bool _inWork;
|
bool _inWork;
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPCDISPATCH_H_
|
#endif // _XMLRPCDISPATCH_H_
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
//! A class representing an error.
|
//! A class representing an error.
|
||||||
//! If server methods throw this exception, a fault response is returned
|
//! If server methods throw this exception, a fault response is returned
|
||||||
|
|
@ -38,7 +37,6 @@ namespace XmlRpc {
|
||||||
int _code;
|
int _code;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPCEXCEPTION_H_
|
#endif // _XMLRPCEXCEPTION_H_
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@
|
||||||
#include "robot_xmlrpcpp/XmlRpcDispatch.h"
|
#include "robot_xmlrpcpp/XmlRpcDispatch.h"
|
||||||
#include "robot_xmlrpcpp/XmlRpcSource.h"
|
#include "robot_xmlrpcpp/XmlRpcSource.h"
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
|
|
||||||
// An abstract class supporting XML RPC methods
|
// An abstract class supporting XML RPC methods
|
||||||
|
|
@ -100,7 +99,6 @@ namespace XmlRpc {
|
||||||
XmlRpcServerMethod* _methodHelp;
|
XmlRpcServerMethod* _methodHelp;
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif //_XMLRPCSERVER_H_
|
#endif //_XMLRPCSERVER_H_
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,7 @@
|
||||||
#include "robot_xmlrpcpp/XmlRpcValue.h"
|
#include "robot_xmlrpcpp/XmlRpcValue.h"
|
||||||
#include "robot_xmlrpcpp/XmlRpcSource.h"
|
#include "robot_xmlrpcpp/XmlRpcSource.h"
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
|
|
||||||
// The server waits for client connections and provides methods
|
// The server waits for client connections and provides methods
|
||||||
|
|
@ -98,7 +97,6 @@ namespace XmlRpc {
|
||||||
// Whether to keep the current client connection open for further requests
|
// Whether to keep the current client connection open for further requests
|
||||||
bool _keepAlive;
|
bool _keepAlive;
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPCSERVERCONNECTION_H_
|
#endif // _XMLRPCSERVERCONNECTION_H_
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@
|
||||||
# include <string>
|
# include <string>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
// Representation of a parameter or result value
|
// Representation of a parameter or result value
|
||||||
class XmlRpcValue;
|
class XmlRpcValue;
|
||||||
|
|
@ -43,7 +42,6 @@ namespace XmlRpc {
|
||||||
std::string _name;
|
std::string _name;
|
||||||
XmlRpcServer* _server;
|
XmlRpcServer* _server;
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPCSERVERMETHOD_H_
|
#endif // _XMLRPCSERVERMETHOD_H_
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
# include <string>
|
# include <string>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
//! A platform-independent socket API.
|
//! A platform-independent socket API.
|
||||||
class XmlRpcSocket {
|
class XmlRpcSocket {
|
||||||
|
|
@ -65,7 +64,6 @@ namespace XmlRpc {
|
||||||
static std::string getErrorMsg(int error);
|
static std::string getErrorMsg(int error);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
# pragma warning(disable:4786) // identifier was truncated in debug info
|
# pragma warning(disable:4786) // identifier was truncated in debug info
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
//! An RPC source represents a file descriptor to monitor
|
//! An RPC source represents a file descriptor to monitor
|
||||||
class XmlRpcSource {
|
class XmlRpcSource {
|
||||||
|
|
@ -51,7 +50,6 @@ namespace XmlRpc {
|
||||||
// In the client, keep connections open if you intend to make multiple calls.
|
// In the client, keep connections open if you intend to make multiple calls.
|
||||||
bool _keepOpen;
|
bool _keepOpen;
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif //_XMLRPCSOURCE_H_
|
#endif //_XMLRPCSOURCE_H_
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@
|
||||||
# define strncasecmp strnicmp
|
# define strncasecmp strnicmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
//! Utilities for XML parsing, encoding, and decoding and message handlers.
|
//! Utilities for XML parsing, encoding, and decoding and message handlers.
|
||||||
class XmlRpcUtil {
|
class XmlRpcUtil {
|
||||||
|
|
@ -57,7 +56,6 @@ namespace XmlRpc {
|
||||||
static void error(const char* fmt, ...);
|
static void error(const char* fmt, ...);
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
#endif // _XMLRPCUTIL_H_
|
#endif // _XMLRPCUTIL_H_
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@
|
||||||
# include <time.h>
|
# include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
//! RPC method arguments and results are represented by Values
|
//! RPC method arguments and results are represented by Values
|
||||||
// should probably refcount them...
|
// should probably refcount them...
|
||||||
|
|
@ -181,11 +180,10 @@ namespace XmlRpc {
|
||||||
} _value;
|
} _value;
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& os, robot::XmlRpc::XmlRpcValue& v);
|
std::ostream& operator<<(std::ostream& os, robot_xmlrpcpp::XmlRpcValue& v);
|
||||||
|
|
||||||
|
|
||||||
#endif // _XMLRPCVALUE_H_
|
#endif // _XMLRPCVALUE_H_
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace robot::XmlRpc;
|
using namespace robot_xmlrpcpp;
|
||||||
|
|
||||||
// Static data
|
// Static data
|
||||||
const char XmlRpcClient::REQUEST_BEGIN[] =
|
const char XmlRpcClient::REQUEST_BEGIN[] =
|
||||||
|
|
@ -397,7 +397,7 @@ XmlRpcClient::parseResponse(XmlRpcValue& result)
|
||||||
// Expect either <params><param>... or <fault>...
|
// Expect either <params><param>... or <fault>...
|
||||||
if ((XmlRpcUtil::nextTagIs(PARAMS_TAG,_response,&offset) &&
|
if ((XmlRpcUtil::nextTagIs(PARAMS_TAG,_response,&offset) &&
|
||||||
XmlRpcUtil::nextTagIs(PARAM_TAG,_response,&offset)) ||
|
XmlRpcUtil::nextTagIs(PARAM_TAG,_response,&offset)) ||
|
||||||
XmlRpcUtil::nextTagIs(FAULT_TAG,_response,&offset) && (_isFault = true))
|
(XmlRpcUtil::nextTagIs(FAULT_TAG,_response,&offset) && (_isFault = true)))
|
||||||
{
|
{
|
||||||
if ( ! result.fromXml(_response, &offset)) {
|
if ( ! result.fromXml(_response, &offset)) {
|
||||||
XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response value. Response:\n%s", _response.c_str());
|
XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response value. Response:\n%s", _response.c_str());
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#endif // _WINDOWS
|
#endif // _WINDOWS
|
||||||
|
|
||||||
|
|
||||||
using namespace robot::XmlRpc;
|
using namespace robot_xmlrpcpp;
|
||||||
|
|
||||||
|
|
||||||
XmlRpcDispatch::XmlRpcDispatch()
|
XmlRpcDispatch::XmlRpcDispatch()
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include "robot_xmlrpcpp/XmlRpcException.h"
|
#include "robot_xmlrpcpp/XmlRpcException.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace robot::XmlRpc;
|
using namespace robot_xmlrpcpp;
|
||||||
|
|
||||||
|
|
||||||
XmlRpcServer::XmlRpcServer()
|
XmlRpcServer::XmlRpcServer()
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace robot::XmlRpc;
|
using namespace robot_xmlrpcpp;
|
||||||
|
|
||||||
// Static data
|
// Static data
|
||||||
const char XmlRpcServerConnection::METHODNAME_TAG[] = "<methodName>";
|
const char XmlRpcServerConnection::METHODNAME_TAG[] = "<methodName>";
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
#include "robot_xmlrpcpp/XmlRpcServerMethod.h"
|
#include "robot_xmlrpcpp/XmlRpcServerMethod.h"
|
||||||
#include "robot_xmlrpcpp/XmlRpcServer.h"
|
#include "robot_xmlrpcpp/XmlRpcServer.h"
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
|
|
||||||
XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server)
|
XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server)
|
||||||
|
|
@ -19,5 +18,4 @@ namespace XmlRpc {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ extern "C" {
|
||||||
#endif // MAKEDEPEND
|
#endif // MAKEDEPEND
|
||||||
|
|
||||||
|
|
||||||
using namespace robot::XmlRpc;
|
using namespace robot_xmlrpcpp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
#include "robot_xmlrpcpp/XmlRpcSocket.h"
|
#include "robot_xmlrpcpp/XmlRpcSocket.h"
|
||||||
#include "robot_xmlrpcpp/XmlRpcUtil.h"
|
#include "robot_xmlrpcpp/XmlRpcUtil.h"
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
|
|
||||||
XmlRpcSource::XmlRpcSource(int fd /*= -1*/, bool deleteOnClose /*= false*/)
|
XmlRpcSource::XmlRpcSource(int fd /*= -1*/, bool deleteOnClose /*= false*/)
|
||||||
|
|
@ -33,5 +32,4 @@ namespace XmlRpc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
#include "robot_xmlrpcpp/XmlRpc.h"
|
#include "robot_xmlrpcpp/XmlRpc.h"
|
||||||
|
|
||||||
using namespace robot::XmlRpc;
|
using namespace robot_xmlrpcpp;
|
||||||
|
|
||||||
|
|
||||||
//#define USE_WINDOWS_DEBUG // To make the error and log messages go to VC++ debug output
|
//#define USE_WINDOWS_DEBUG // To make the error and log messages go to VC++ debug output
|
||||||
|
|
@ -21,7 +21,7 @@ using namespace robot::XmlRpc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Version id
|
// Version id
|
||||||
const char robot::XmlRpc::XMLRPC_VERSION[] = "XMLRPC++ 0.7";
|
const char robot_xmlrpcpp::XMLRPC_VERSION[] = "XMLRPC++ 0.7";
|
||||||
|
|
||||||
// Default log verbosity: 0 for no messages through 5 (writes everything)
|
// Default log verbosity: 0 for no messages through 5 (writes everything)
|
||||||
int XmlRpcLogHandler::_verbosity = 0;
|
int XmlRpcLogHandler::_verbosity = 0;
|
||||||
|
|
@ -63,8 +63,8 @@ XmlRpcErrorHandler* XmlRpcErrorHandler::_errorHandler = &defaultErrorHandler;
|
||||||
|
|
||||||
|
|
||||||
// Easy API for log verbosity
|
// Easy API for log verbosity
|
||||||
int robot::XmlRpc::getVerbosity() { return XmlRpcLogHandler::getVerbosity(); }
|
int robot_xmlrpcpp::getVerbosity() { return XmlRpcLogHandler::getVerbosity(); }
|
||||||
void robot::XmlRpc::setVerbosity(int level) { XmlRpcLogHandler::setVerbosity(level); }
|
void robot_xmlrpcpp::setVerbosity(int level) { XmlRpcLogHandler::setVerbosity(level); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace robot {
|
namespace robot_xmlrpcpp {
|
||||||
namespace XmlRpc {
|
|
||||||
|
|
||||||
|
|
||||||
static const char VALUE_TAG[] = "<value>";
|
static const char VALUE_TAG[] = "<value>";
|
||||||
|
|
@ -598,12 +597,11 @@ namespace XmlRpc {
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace XmlRpc
|
} // namespace robot_xmlrpcpp
|
||||||
} // namespace robot
|
|
||||||
|
|
||||||
|
|
||||||
// ostream
|
// ostream
|
||||||
std::ostream& operator<<(std::ostream& os, robot::XmlRpc::XmlRpcValue& v)
|
std::ostream& operator<<(std::ostream& os, robot_xmlrpcpp::XmlRpcValue& v)
|
||||||
{
|
{
|
||||||
// If you want to output in xml format:
|
// If you want to output in xml format:
|
||||||
//return os << v.toXml();
|
//return os << v.toXml();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user