git-svn-id: svn://db.shs.com.ru/pip@915 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -6,8 +6,14 @@ set(PIP_BUILD 1)
|
|||||||
include(CheckFunctionExists)
|
include(CheckFunctionExists)
|
||||||
include(PIPMacros.cmake)
|
include(PIPMacros.cmake)
|
||||||
|
|
||||||
|
set(_ICU_DEFAULT OFF)
|
||||||
|
if((NOT DEFINED WIN32) AND (NOT DEFINED ANDROID_PLATFORM) AND (NOT DEFINED APPLE))
|
||||||
|
set(_ICU_DEFAULT ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
option(ICU "ICU support for convert codepages" OFF)
|
option(ICU "ICU support for convert codepages" ${_ICU_DEFAULT})
|
||||||
option(STD_IOSTREAM "Building with std iostream operators support" OFF)
|
option(STD_IOSTREAM "Building with std iostream operators support" OFF)
|
||||||
option(INTROSPECTION "Build with introspection" OFF)
|
option(INTROSPECTION "Build with introspection" OFF)
|
||||||
option(LIB "System install" ON)
|
option(LIB "System install" ON)
|
||||||
@@ -43,7 +49,8 @@ set(PIP_SRC_FFTW "src_fftw")
|
|||||||
set(PIP_SRC_OPENCL "src_opencl")
|
set(PIP_SRC_OPENCL "src_opencl")
|
||||||
set(PIP_SRC_IO_UTILS "src_io_utils")
|
set(PIP_SRC_IO_UTILS "src_io_utils")
|
||||||
set(PIP_SRC_CONCURRENT "src_concurrent")
|
set(PIP_SRC_CONCURRENT "src_concurrent")
|
||||||
set(PIP_SRC_DIRS "src_main" "src_crypt" "src_compress" "src_usb" "src_fftw" "src_opencl" "src_io_utils" "src_concurrent")
|
set(PIP_SRC_CLOUD "src_cloud")
|
||||||
|
set(PIP_SRC_DIRS "src_main" "src_crypt" "src_compress" "src_usb" "src_fftw" "src_opencl" "src_io_utils" "src_concurrent" "src_cloud")
|
||||||
set(PIP_LIBS_TARGETS pip)
|
set(PIP_LIBS_TARGETS pip)
|
||||||
set(LIBS_MAIN)
|
set(LIBS_MAIN)
|
||||||
set(LIBS_STATUS)
|
set(LIBS_STATUS)
|
||||||
@@ -132,7 +139,7 @@ get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
|||||||
# Sources
|
# Sources
|
||||||
|
|
||||||
# Main lib
|
# Main lib
|
||||||
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent")
|
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent" "cloud")
|
||||||
if(PIP_FREERTOS)
|
if(PIP_FREERTOS)
|
||||||
#list(REMOVE_ITEM PIP_FOLDERS "console")
|
#list(REMOVE_ITEM PIP_FOLDERS "console")
|
||||||
#include_directories("${PIP_SRC_MAIN}/console")
|
#include_directories("${PIP_SRC_MAIN}/console")
|
||||||
@@ -167,6 +174,9 @@ gather_src("${PIP_SRC_CONCURRENT}" CPP_LIB_CONCURRENT HDRS PHDRS)
|
|||||||
|
|
||||||
gather_src("${PIP_SRC_CONCURRENT_TEST}" CPP_CONCURRENT_TEST HDRS PHDRS)
|
gather_src("${PIP_SRC_CONCURRENT_TEST}" CPP_CONCURRENT_TEST HDRS PHDRS)
|
||||||
|
|
||||||
|
# Cloud lib
|
||||||
|
gather_src("${PIP_SRC_CLOUD}" CPP_LIB_CLOUD HDRS PHDRS)
|
||||||
|
|
||||||
if(PIP_FREERTOS)
|
if(PIP_FREERTOS)
|
||||||
add_definitions(-DPIP_FREERTOS)
|
add_definitions(-DPIP_FREERTOS)
|
||||||
set(ICU OFF)
|
set(ICU OFF)
|
||||||
@@ -488,6 +498,7 @@ if (NOT PIP_FREERTOS)
|
|||||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
||||||
|
|
||||||
|
|
||||||
# Concurrent module
|
# Concurrent module
|
||||||
set(CONCURRENT_LIBS pip)
|
set(CONCURRENT_LIBS pip)
|
||||||
add_library(pip_concurrent ${PIP_LIB_TYPE} ${CPP_LIB_CONCURRENT})
|
add_library(pip_concurrent ${PIP_LIB_TYPE} ${CPP_LIB_CONCURRENT})
|
||||||
@@ -503,6 +514,17 @@ if (NOT PIP_FREERTOS)
|
|||||||
add_custom_target(pip_concurrent_test_perform ALL COMMAND pip_concurrent_test)
|
add_custom_target(pip_concurrent_test_perform ALL COMMAND pip_concurrent_test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Build cloud library if crypt enabled
|
||||||
|
if(sodium_FOUND)
|
||||||
|
message(STATUS "Building PICloud support")
|
||||||
|
add_definitions(-DPIP_CLOUD)
|
||||||
|
add_library(pip_cloud ${PIP_LIB_TYPE} ${CPP_LIB_CLOUD})
|
||||||
|
target_link_libraries(pip_cloud pip pip_crypt)
|
||||||
|
list(APPEND PIP_LIBS_TARGETS pip_cloud)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Test program
|
# Test program
|
||||||
if(PIP_UTILS)
|
if(PIP_UTILS)
|
||||||
add_executable(pip_test "main.cpp")
|
add_executable(pip_test "main.cpp")
|
||||||
@@ -581,6 +603,7 @@ if(NOT PIP_FREERTOS)
|
|||||||
if(sodium_FOUND)
|
if(sodium_FOUND)
|
||||||
add_subdirectory("utils/system_daemon")
|
add_subdirectory("utils/system_daemon")
|
||||||
add_subdirectory("utils/crypt_tool")
|
add_subdirectory("utils/crypt_tool")
|
||||||
|
add_subdirectory("utils/cloud_dispatcher")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
28
src_cloud/piccloudtcp.cpp
Normal file
28
src_cloud/piccloudtcp.cpp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
PIP - Platform Independent Primitives
|
||||||
|
PICloud TCP transport
|
||||||
|
Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "piccloudtcp.h"
|
||||||
|
#include "picrypt.h"
|
||||||
|
|
||||||
|
const char hash_def_key[] = "_picrypt_";
|
||||||
|
|
||||||
|
|
||||||
|
PICloudTCP::PICloudTCP() {
|
||||||
|
}
|
||||||
|
|
||||||
25
src_main/cloud/piccloudmodule.h
Normal file
25
src_main/cloud/piccloudmodule.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
PIP - Platform Independent Primitives
|
||||||
|
Module includes
|
||||||
|
Copyright (C) 2019 Andrey Bychkov work.a.b@yandex.ru
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PICLOUDMODULE_H
|
||||||
|
#define PICLOUDMODULE_H
|
||||||
|
|
||||||
|
#include "piccloudtcp.h"
|
||||||
|
|
||||||
|
#endif // PICLOUDMODULE_H
|
||||||
38
src_main/cloud/piccloudtcp.h
Normal file
38
src_main/cloud/piccloudtcp.h
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*! \file piccloudtcp.h
|
||||||
|
* \brief PICloud TCP transport
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
PIP - Platform Independent Primitives
|
||||||
|
PICloud TCP transport
|
||||||
|
Copyright (C) 2020 Ivan Pelipenko peri4ko@yandex.ru
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PICCLOUDTCP_H
|
||||||
|
#define PICCLOUDTCP_H
|
||||||
|
|
||||||
|
#include "pistring.h"
|
||||||
|
|
||||||
|
class PIP_EXPORT PICloudTCP {
|
||||||
|
public:
|
||||||
|
//!
|
||||||
|
PICloudTCP();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PICCLOUDTCP_H
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PIMATHMODULE_H
|
#ifndef PICRYPTMODULE_H
|
||||||
#define PIMATHMODULE_H
|
#define PICRYPTMODULE_H
|
||||||
|
|
||||||
#include "picrypt.h"
|
#include "picrypt.h"
|
||||||
#include "piauth.h"
|
#include "piauth.h"
|
||||||
|
|
||||||
#endif // PIMATHMODULE_H
|
#endif // PICRYPTMODULE_H
|
||||||
|
|||||||
Reference in New Issue
Block a user