updated build system
This commit is contained in:
		| @@ -25,6 +25,7 @@ | ||||
| #include "types/repertory.hpp" | ||||
| #include "utils/error_utils.hpp" | ||||
| #include "utils/timeout.hpp" | ||||
| #include "version.hpp" | ||||
|  | ||||
| namespace repertory { | ||||
| // clang-format off | ||||
| @@ -116,8 +117,8 @@ void packet_client::put_client(std::shared_ptr<client> &cli) { | ||||
|   } | ||||
| } | ||||
|  | ||||
| auto packet_client::read_packet(client &cli, packet &response) | ||||
|     -> packet::error_type { | ||||
| auto packet_client::read_packet(client &cli, | ||||
|                                 packet &response) -> packet::error_type { | ||||
|   data_buffer buffer(sizeof(std::uint32_t)); | ||||
|   const auto read_buffer = [&]() { | ||||
|     std::uint32_t offset{}; | ||||
| @@ -168,8 +169,8 @@ auto packet_client::send(const std::string &method, packet &request, | ||||
| } | ||||
|  | ||||
| auto packet_client::send(const std::string &method, packet &request, | ||||
|                          packet &response, std::uint32_t &service_flags) | ||||
|     -> packet::error_type { | ||||
|                          packet &response, | ||||
|                          std::uint32_t &service_flags) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   auto success = false; | ||||
| @@ -178,7 +179,7 @@ auto packet_client::send(const std::string &method, packet &request, | ||||
|   request.encode_top(utils::get_thread_id()); | ||||
|   request.encode_top(unique_id_); | ||||
|   request.encode_top(PACKET_SERVICE_FLAGS); | ||||
|   request.encode_top(get_repertory_version()); | ||||
|   request.encode_top(project_get_version()); | ||||
|  | ||||
|   static const std::uint8_t max_attempts{5U}; | ||||
|   for (std::uint8_t i = 1U; | ||||
|   | ||||
| @@ -52,8 +52,8 @@ remote_client::remote_client(const app_config &config) | ||||
|           config.get_remote_receive_timeout_secs(), | ||||
|           config.get_remote_send_timeout_secs(), config.get_remote_token()) {} | ||||
|  | ||||
| auto remote_client::winfsp_can_delete(PVOID file_desc, PWSTR file_name) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_can_delete(PVOID file_desc, | ||||
|                                       PWSTR file_name) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -68,9 +68,8 @@ auto remote_client::winfsp_can_delete(PVOID file_desc, PWSTR file_name) | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::json_create_directory_snapshot(const std::string &path, | ||||
|                                                    json &json_data) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::json_create_directory_snapshot( | ||||
|     const std::string &path, json &json_data) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -111,8 +110,8 @@ auto remote_client::json_read_directory_snapshot( | ||||
| } | ||||
|  | ||||
| auto remote_client::json_release_directory_snapshot( | ||||
|     const std::string &path, const remote::file_handle &handle) | ||||
|     -> packet::error_type { | ||||
|     const std::string &path, | ||||
|     const remote::file_handle &handle) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -127,8 +126,8 @@ auto remote_client::json_release_directory_snapshot( | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_cleanup(PVOID file_desc, PWSTR file_name, | ||||
|                                    UINT32 flags, BOOLEAN &was_closed) | ||||
|     -> packet::error_type { | ||||
|                                    UINT32 flags, | ||||
|                                    BOOLEAN &was_closed) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   auto handle = to_handle(file_desc); | ||||
| @@ -177,8 +176,8 @@ auto remote_client::winfsp_create(PWSTR file_name, UINT32 create_options, | ||||
|                                   UINT32 granted_access, UINT32 attributes, | ||||
|                                   UINT64 allocation_size, PVOID *file_desc, | ||||
|                                   remote::file_info *file_info, | ||||
|                                   std::string &normalized_name, BOOLEAN &exists) | ||||
|     -> packet::error_type { | ||||
|                                   std::string &normalized_name, | ||||
|                                   BOOLEAN &exists) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -245,9 +244,8 @@ auto remote_client::winfsp_get_dir_buffer([[maybe_unused]] PVOID file_desc, | ||||
|   return STATUS_INVALID_HANDLE; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_get_file_info(PVOID file_desc, | ||||
|                                          remote::file_info *file_info) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_get_file_info( | ||||
|     PVOID file_desc, remote::file_info *file_info) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -264,11 +262,9 @@ auto remote_client::winfsp_get_file_info(PVOID file_desc, | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_get_security_by_name(PWSTR file_name, | ||||
|                                                 PUINT32 attributes, | ||||
|                                                 std::uint64_t *descriptor_size, | ||||
|                                                 std::wstring &string_descriptor) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_get_security_by_name( | ||||
|     PWSTR file_name, PUINT32 attributes, std::uint64_t *descriptor_size, | ||||
|     std::wstring &string_descriptor) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -297,10 +293,9 @@ auto remote_client::winfsp_get_security_by_name(PWSTR file_name, | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_get_volume_info(UINT64 &total_size, | ||||
|                                            UINT64 &free_size, | ||||
|                                            std::string &volume_label) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_get_volume_info( | ||||
|     UINT64 &total_size, UINT64 &free_size, | ||||
|     std::string &volume_label) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -320,7 +315,7 @@ auto remote_client::winfsp_mounted(const std::wstring &location) | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
|   request.encode(get_repertory_version()); | ||||
|   request.encode(project_get_version()); | ||||
|   request.encode(location); | ||||
|  | ||||
|   std::uint32_t service_flags{}; | ||||
| @@ -332,11 +327,10 @@ auto remote_client::winfsp_mounted(const std::wstring &location) | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_open(PWSTR file_name, UINT32 create_options, | ||||
|                                 UINT32 granted_access, PVOID *file_desc, | ||||
|                                 remote::file_info *file_info, | ||||
|                                 std::string &normalized_name) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_open( | ||||
|     PWSTR file_name, UINT32 create_options, UINT32 granted_access, | ||||
|     PVOID *file_desc, remote::file_info *file_info, | ||||
|     std::string &normalized_name) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -367,11 +361,10 @@ auto remote_client::winfsp_open(PWSTR file_name, UINT32 create_options, | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_overwrite(PVOID file_desc, UINT32 attributes, | ||||
|                                      BOOLEAN replace_attributes, | ||||
|                                      UINT64 allocation_size, | ||||
|                                      remote::file_info *file_info) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_overwrite( | ||||
|     PVOID file_desc, UINT32 attributes, BOOLEAN replace_attributes, | ||||
|     UINT64 allocation_size, | ||||
|     remote::file_info *file_info) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -447,10 +440,9 @@ auto remote_client::winfsp_read_directory(PVOID file_desc, PWSTR pattern, | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_rename(PVOID file_desc, PWSTR file_name, | ||||
|                                   PWSTR new_file_name, | ||||
|                                   BOOLEAN replace_if_exists) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_rename( | ||||
|     PVOID file_desc, PWSTR file_name, PWSTR new_file_name, | ||||
|     BOOLEAN replace_if_exists) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -494,10 +486,9 @@ auto remote_client::winfsp_set_basic_info( | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_set_file_size(PVOID file_desc, UINT64 new_size, | ||||
|                                          BOOLEAN set_allocation_size, | ||||
|                                          remote::file_info *file_info) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_set_file_size( | ||||
|     PVOID file_desc, UINT64 new_size, BOOLEAN set_allocation_size, | ||||
|     remote::file_info *file_info) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
| @@ -533,12 +524,10 @@ auto remote_client::winfsp_unmounted(const std::wstring &location) | ||||
|   return ret; | ||||
| } | ||||
|  | ||||
| auto remote_client::winfsp_write(PVOID file_desc, PVOID buffer, UINT64 offset, | ||||
|                                  UINT32 length, BOOLEAN write_to_end, | ||||
|                                  BOOLEAN constrained_io, | ||||
|                                  PUINT32 bytes_transferred, | ||||
|                                  remote::file_info *file_info) | ||||
|     -> packet::error_type { | ||||
| auto remote_client::winfsp_write( | ||||
|     PVOID file_desc, PVOID buffer, UINT64 offset, UINT32 length, | ||||
|     BOOLEAN write_to_end, BOOLEAN constrained_io, PUINT32 bytes_transferred, | ||||
|     remote::file_info *file_info) -> packet::error_type { | ||||
|   constexpr const auto *function_name = static_cast<const char *>(__FUNCTION__); | ||||
|  | ||||
|   packet request; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user