Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::platform::DBus::Writer Class Reference

Appends values to an outgoing message (reply or signal). More...

#include <dbus.hpp>

Classes

struct  Container
 A nested container being built. More...

Public Member Functions

bool append_string (const std::string &s)
bool append_object_path (const std::string &p)
bool append_bool (bool v)
bool append_int32 (int v)
bool append_uint32 (unsigned v)
bool append_double (double v)
bool append_byte (unsigned char v)
 Append a byte ('y').
Container open_array (const std::string &element_signature)
 Open an array.
Container open_struct ()
 Open a struct ("(...)" — no signature string for libdbus structs).
Container open_variant (const std::string &value_signature)
 Open a variant holding a single value of value_signature (e.g. "s").
Container open_dict_entry ()
 Open a dict-entry (only valid inside an a{..} array).
bool close_container (Container &c)
Writer sub (Container &c)
 Append into an already-open container instead of the top level.

Friends

class DBus

Detailed Description

Appends values to an outgoing message (reply or signal).

Container open/ close calls must be balanced; the matching close uses the cursor handed back by the open.

Member Function Documentation

◆ append_bool()

bool pulp::platform::DBus::Writer::append_bool ( bool v)

◆ append_byte()

bool pulp::platform::DBus::Writer::append_byte ( unsigned char v)

Append a byte ('y').

Needed to build an 'ay' byte array such as the value passed to BlueZ GattCharacteristic1.WriteValue.

◆ append_double()

bool pulp::platform::DBus::Writer::append_double ( double v)

◆ append_int32()

bool pulp::platform::DBus::Writer::append_int32 ( int v)

◆ append_object_path()

bool pulp::platform::DBus::Writer::append_object_path ( const std::string & p)

◆ append_string()

bool pulp::platform::DBus::Writer::append_string ( const std::string & s)

◆ append_uint32()

bool pulp::platform::DBus::Writer::append_uint32 ( unsigned v)

◆ close_container()

bool pulp::platform::DBus::Writer::close_container ( Container & c)

◆ open_array()

Container pulp::platform::DBus::Writer::open_array ( const std::string & element_signature)

Open an array.

element_signature is the D-Bus signature of the element type (e.g. "s", "(so)", "{sv}"). The returned Container's own writer methods append into the array.

◆ open_dict_entry()

Container pulp::platform::DBus::Writer::open_dict_entry ( )

Open a dict-entry (only valid inside an a{..} array).

◆ open_struct()

Container pulp::platform::DBus::Writer::open_struct ( )

Open a struct ("(...)" — no signature string for libdbus structs).

◆ open_variant()

Container pulp::platform::DBus::Writer::open_variant ( const std::string & value_signature)

Open a variant holding a single value of value_signature (e.g. "s").

◆ sub()

Writer pulp::platform::DBus::Writer::sub ( Container & c)

Append into an already-open container instead of the top level.

◆ DBus

friend class DBus
friend

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/platform/include/pulp/platform/dbus.hpp