Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1036 Remove outdated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Sep 4, 2023
1 parent 17c8af1 commit a9d4ee8
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 104 deletions.
13 changes: 0 additions & 13 deletions iceoryx_dust/include/iceoryx_dust/posix_wrapper/message_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@ class MessageQueue

~MessageQueue() noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
static expected<MessageQueue, IpcChannelError>
create(const IpcChannelName_t& name,
const IpcChannelSide channelSide,
const uint64_t maxMsgSize = MAX_MESSAGE_SIZE,
const uint64_t maxMsgNumber = MAX_NUMBER_OF_MESSAGES) noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
bool isInitialized() const noexcept
{
return m_mqDescriptor != INVALID_DESCRIPTOR;
}

static expected<bool, IpcChannelError> unlinkIfExists(const IpcChannelName_t& name) noexcept;

/// @brief send a message to queue using std::string.
Expand Down
12 changes: 0 additions & 12 deletions iceoryx_dust/include/iceoryx_dust/posix_wrapper/named_pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ class NamedPipe
NamedPipe& operator=(NamedPipe&& rhs) noexcept;
~NamedPipe() noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
static expected<NamedPipe, IpcChannelError> create(const IpcChannelName_t& name,
const IpcChannelSide channelSide,
const size_t maxMsgSize = MAX_MESSAGE_SIZE,
const uint64_t maxMsgNumber = MAX_NUMBER_OF_MESSAGES) noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
bool isInitialized() const noexcept
{
return m_data != nullptr;
}

/// @brief removes a named pipe artifact from the system
/// @return true if the artifact was removed, false when no artifact was found and
/// IpcChannelError::INTERNAL_LOGIC_ERROR when shm_unlink failed
Expand Down
14 changes: 0 additions & 14 deletions iceoryx_dust/source/posix_wrapper/message_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ MessageQueue::MessageQueue(const IpcChannelName_t& name,
{
}

// NOLINTNEXTLINE(readability-function-size) @todo iox-#832 make a struct out of arguments
expected<MessageQueue, IpcChannelError> MessageQueue::create(const IpcChannelName_t& name,
const IpcChannelSide channelSide,
const uint64_t maxMsgSize,
const uint64_t maxMsgNumber) noexcept
{
return MessageQueueBuilder()
.name(name)
.channelSide(channelSide)
.maxMsgSize(maxMsgSize)
.maxMsgNumber(maxMsgNumber)
.create();
}

MessageQueue::MessageQueue(MessageQueue&& other) noexcept
{
*this = std::move(other);
Expand Down
14 changes: 0 additions & 14 deletions iceoryx_dust/source/posix_wrapper/named_pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,6 @@ expected<NamedPipe, IpcChannelError> NamedPipeBuilder::create() const noexcept
return ok(NamedPipe{std::move(sharedMemory), data});
}

// NOLINTNEXTLINE(readability-function-size) @todo iox-#832 make a struct out of arguments
expected<NamedPipe, IpcChannelError> NamedPipe::create(const IpcChannelName_t& name,
const IpcChannelSide channelSide,
const size_t maxMsgSize,
const uint64_t maxMsgNumber) noexcept
{
return NamedPipeBuilder()
.name(name)
.channelSide(channelSide)
.maxMsgSize(maxMsgSize)
.maxMsgNumber(maxMsgNumber)
.create();
}

NamedPipe::NamedPipe(SharedMemoryObject&& sharedMemory, NamedPipeData* data) noexcept
: m_sharedMemory(std::move(sharedMemory))
, m_data(data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,6 @@ class UnixDomainSocket

~UnixDomainSocket() noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
static expected<UnixDomainSocket, IpcChannelError>
create(const IpcChannelName_t& name,
const IpcChannelSide channelSide,
const uint64_t maxMsgSize = MAX_MESSAGE_SIZE,
const uint64_t maxMsgNumber = MAX_NUMBER_OF_MESSAGES) noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
static expected<UnixDomainSocket, IpcChannelError>
create(const NoPathPrefix_t,
const UdsName_t& name,
const IpcChannelSide channelSide,
const uint64_t maxMsgSize = MAX_MESSAGE_SIZE,
const uint64_t maxMsgNumber = MAX_NUMBER_OF_MESSAGES) noexcept;

/// @todo iox-#1036 Remove when all channels are ported to the builder pattern
bool isInitialized() const noexcept
{
return m_sockfd != INVALID_FD;
}

/// @brief unlink the provided unix domain socket
/// @param name of the unix domain socket to unlink
/// @return true if the unix domain socket could be unlinked, false otherwise, IpcChannelError if error occured
Expand Down
30 changes: 0 additions & 30 deletions iceoryx_hoofs/source/posix_wrapper/unix_domain_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,36 +156,6 @@ UnixDomainSocket::UnixDomainSocket(const UdsName_t& udsName,
{
}

expected<UnixDomainSocket, IpcChannelError> UnixDomainSocket::create(const IpcChannelName_t& name,
const IpcChannelSide channelSide,
const uint64_t maxMsgSize,
const uint64_t maxMsgNumber) noexcept
{
return UnixDomainSocketBuilder()
.name(name)
.channelSide(channelSide)
.maxMsgSize(maxMsgSize)
.maxMsgNumber(maxMsgNumber)
.create();
}

// NOLINTJUSTIFICATION will be removed
// NOLINTBEGIN(readability-function-size, bugprone-easily-swappable-parameters)
expected<UnixDomainSocket, IpcChannelError> UnixDomainSocket::create(const NoPathPrefix_t,
const UdsName_t& name,
const IpcChannelSide channelSide,
const uint64_t maxMsgSize,
const uint64_t maxMsgNumber) noexcept
{
return UnixDomainSocketBuilderNoPathPrefix()
.name(name)
.channelSide(channelSide)
.maxMsgSize(maxMsgSize)
.maxMsgNumber(maxMsgNumber)
.create();
}
// NOLINTEND(readability-function-size, bugprone-easily-swappable-parameters)

UnixDomainSocket::~UnixDomainSocket() noexcept
{
if (destroy().has_error())
Expand Down

0 comments on commit a9d4ee8

Please sign in to comment.