DBus::priv::SimpleTransport Class Reference

The SimpleTransport handles reading and writing over a Unix FD. More...

#include <simpletransport.h>

Inheritance diagram for DBus::priv::SimpleTransport:

Public Member Functions

 ~SimpleTransport ()
 
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< SimpleTransportcreate (int fd, bool initialize)
 Create a SimpleTransport. 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

 SimpleTransport (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 SimpleTransport handles reading and writing over a Unix FD.

Constructor & Destructor Documentation

◆ SimpleTransport()

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

References LOGGER_NAME, and SIMPLELOGGER_DEBUG.

Referenced by create().

◆ ~SimpleTransport()

SimpleTransport::~SimpleTransport ( )

Member Function Documentation

◆ create()

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

Create a SimpleTransport.

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 SimpleTransport().

◆ DBUS_CXX_PROPAGATE_CONST()

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

◆ fd()

int SimpleTransport::fd ( ) const
virtual

Implements DBus::priv::Transport.

Referenced by create().

◆ is_valid()

bool SimpleTransport::is_valid ( ) const
virtual

Check if this transport is OK.

Returns

Implements DBus::priv::Transport.

◆ purgeData()

void SimpleTransport::purgeData ( )
private

References FirstHeaderPart.

Referenced by readMessage().

◆ readMessage()

◆ writeMessage()

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

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