From 2d2fac6c84ae3d59edb1e231b33fab9f931d5dc3 Mon Sep 17 00:00:00 2001 From: "HARMEL, Bernard" Date: Mon, 26 Aug 2024 12:06:07 +0200 Subject: [PATCH] 5.8.1.4 --- lib/include/bofstd/bofserviceendpoint.h | 32 ++++++++++++++++++------- lib/src/bofserviceendpoint.cpp | 18 +++++++------- vcpkg.json | 2 +- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/lib/include/bofstd/bofserviceendpoint.h b/lib/include/bofstd/bofserviceendpoint.h index 8f17106..507494e 100644 --- a/lib/include/bofstd/bofserviceendpoint.h +++ b/lib/include/bofstd/bofserviceendpoint.h @@ -25,6 +25,23 @@ BEGIN_BOF_NAMESPACE() +struct BOF_SERVICE_ENPOINT_META_DATA +{ + bool UserMaster_B; + std::string UserArg_S; + void *pUser; + + BOF_SERVICE_ENPOINT_META_DATA() + { + Reset(); + } + void Reset() + { + UserMaster_B = false; + UserArg_S = ""; + pUser = nullptr; + } +}; class BOFSTD_EXPORT BofServiceEndpoint { public: @@ -36,25 +53,24 @@ class BOFSTD_EXPORT BofServiceEndpoint bool IsValid(); std::string ToString(bool _ShowName_B); - bool SetUserArg(bool _UserMaster_B, const std::string &_rUserArg_S); + bool SetServiceMetaData(const BOF_SERVICE_ENPOINT_META_DATA &_rServiceEndpointMetaData_X); bool SetServiceName(const std::string &_rServiceName_S); bool SetServiceInstance(const std::string &_rServiceInstance_S); bool SetServiceUrl(const std::string &_rServiceUrl_S); bool SetServiceTagCollection(const std::set &_rServiceTagCollection); - const std::string GetUserArg(bool &_rUserMaster_B); - const std::string GetServiceName() const; - const std::string GetServiceInstance() const; - const std::string GetServiceUrl() const; - const std::set GetServiceTagCollection() const; + BOF_SERVICE_ENPOINT_META_DATA GetServiceMetaData() const; + std::string GetServiceName() const; + std::string GetServiceInstance() const; + std::string GetServiceUrl() const; + std::set GetServiceTagCollection() const; private: BofUri mUri; std::string mServiceName_S; std::string mServiceInstance_S; std::set mServiceTagCollection; - bool mUserMaster_B = false; - std::string mUserArg_S; + BOF_SERVICE_ENPOINT_META_DATA mServiceEndpointMetaData_X; }; END_BOF_NAMESPACE() \ No newline at end of file diff --git a/lib/src/bofserviceendpoint.cpp b/lib/src/bofserviceendpoint.cpp index 24f3a99..5f80c9b 100644 --- a/lib/src/bofserviceendpoint.cpp +++ b/lib/src/bofserviceendpoint.cpp @@ -52,10 +52,9 @@ std::string BofServiceEndpoint::ToString(bool _ShowName_B) Rts += mUri.ToString(); return Rts; } -bool BofServiceEndpoint::SetUserArg(bool _UserMaster_B, const std::string &_rUserArg_S) +bool BofServiceEndpoint::SetServiceMetaData(const BOF_SERVICE_ENPOINT_META_DATA &_rServiceEndpointMetaData_X) { - mUserArg_S = _UserMaster_B; - mUserMaster_B = _UserMaster_B; + mServiceEndpointMetaData_X = _rServiceEndpointMetaData_X; return true; } bool BofServiceEndpoint::SetServiceName(const std::string &_rServiceName_S) @@ -80,22 +79,21 @@ bool BofServiceEndpoint::SetServiceTagCollection(const std::set &_r mServiceTagCollection = _rServiceTagCollection; return true; } -const std::string BofServiceEndpoint::GetUserArg(bool &_rUserMaster_B) +BOF_SERVICE_ENPOINT_META_DATA BofServiceEndpoint::GetServiceMetaData() const { - _rUserMaster_B = mUserMaster_B; - return mUserArg_S; + return mServiceEndpointMetaData_X; } -const std::string BofServiceEndpoint::GetServiceName() const +std::string BofServiceEndpoint::GetServiceName() const { return mServiceName_S; } -const std::string BofServiceEndpoint::GetServiceInstance() const +std::string BofServiceEndpoint::GetServiceInstance() const { return mServiceInstance_S; } -const std::string BofServiceEndpoint::GetServiceUrl() const +std::string BofServiceEndpoint::GetServiceUrl() const { std::string Rts_S; BOF::BOF_SOCKET_ADDRESS SocketAddress_X; @@ -104,7 +102,7 @@ const std::string BofServiceEndpoint::GetServiceUrl() const return Rts_S; } -const std::set BofServiceEndpoint::GetServiceTagCollection() const +std::set BofServiceEndpoint::GetServiceTagCollection() const { return mServiceTagCollection; } diff --git a/vcpkg.json b/vcpkg.json index f76a2cb..321c886 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,6 @@ { "name": "bofstd", - "version": "5.8.1.3", + "version": "5.8.1.4", "description": "The onbings general purpose C++ Multiplatform library", "dependencies": [ {