DBus::priv::SendmsgTransport Class Reference

The Sendmsg handles reading and writing over a Unix FD that supports sendmsg(). More...

#include <sendmsgtransport.h>

Inheritance diagram for DBus::priv::SendmsgTransport:

Public Member Functions

 ~SendmsgTransport ()
 
ssize_t writeMessage (std::shared_ptr< const Message > message, uint32_t serial)
 
std::shared_ptr< MessagereadMessage ()
 
bool is_valid () const
 Check if this transport is OK. More...
 
int fd () const
 
- Public Member Functions inherited from DBus::priv::Transport
virtual ~Transport ()
 

Static Public Member Functions

static std::shared_ptr< SendmsgTransportcreate (int fd, bool initialize)
 Create a SendmsgTransport. More...
 
- Static Public Member Functions inherited from DBus::priv::Transport
static std::shared_ptr< Transportopen_transport (std::string address)
 Open and return a transport based off of the given address. More...
 

Private Member Functions

 SendmsgTransport (int fd, bool initialize)
 
void purgeData ()
 
 DBUS_CXX_PROPAGATE_CONST (std::unique_ptr< priv_data >) m_priv
 

Additional Inherited Members

- Protected Attributes inherited from DBus::priv::Transport
std::vector< uint8_t > m_serverAddress
 

Detailed Description

The Sendmsg handles reading and writing over a Unix FD that supports sendmsg().

This allows you to send file descriptors over a Unix FD

Constructor & Destructor Documentation

◆ SendmsgTransport()

SendmsgTransport::SendmsgTransport ( int  fd,
bool  initialize 
)
private

References LOGGER_NAME, and SIMPLELOGGER_DEBUG.

Referenced by create().

◆ ~SendmsgTransport()

SendmsgTransport::~SendmsgTransport ( )

Member Function Documentation

◆ create()

std::shared_ptr< SendmsgTransport > SendmsgTransport::create ( int  fd,
bool  initialize 
)
static

Create a SendmsgTransport.

If the transport is unable to be created, returns an invalid shared_ptr.

Parameters
fdThe already-open file descriptor
initializeTrue if this transport should initialize the connection by sending a single NULL byte
Returns

References fd(), and SendmsgTransport().

Referenced by DBus::priv::Transport::open_transport().

◆ DBUS_CXX_PROPAGATE_CONST()

DBus::priv::SendmsgTransport::DBUS_CXX_PROPAGATE_CONST ( std::unique_ptr< priv_data >  )
private

◆ fd()

int SendmsgTransport::fd ( ) const
virtual

Implements DBus::priv::Transport.

Referenced by create(), and writeMessage().

◆ is_valid()

bool SendmsgTransport::is_valid ( ) const
virtual

Check if this transport is OK.

Returns

Implements DBus::priv::Transport.

◆ purgeData()

void SendmsgTransport::purgeData ( )
private

Referenced by readMessage().

◆ readMessage()

std::shared_ptr< DBus::Message > SendmsgTransport::readMessage ( )
virtual

◆ writeMessage()

ssize_t SendmsgTransport::writeMessage ( std::shared_ptr< const Message message,
uint32_t  serial 
)
virtual

The documentation for this class was generated from the following files: