DBus interface in order to connect DBus applications to the p≡p engine.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

46 lines
941 B

#include "pEpDBusMessage.h"
#include <iostream>
pEpDBusMessage::pEpDBusMessage() : DBus::Variant::Variant()
{
writer().new_variant("s");
}
pEpDBusMessage::pEpDBusMessage(message m) : DBus::Variant::Variant()
{
writer().new_variant("s");
}
DBus::Variant& operator>>(DBus::Variant &v, const pEpDBusMessage &m)
{
DBus::MessageIter to = m.writer();
v.reader().copy_data(to);
return v;
}
DBus::Variant& operator<<(DBus::Variant &v, const pEpDBusMessage &m)
{
DBus::MessageIter to = v.writer();
m.reader().copy_data(to);
return v;
}
message& pEpDBusMessage::operator >> (message &m)
{
m.from->address = writer().get_string();
return m;
}
DBus::Variant& pEpDBusMessage::operator << (DBus::Variant &v)
{
DBus::MessageIter to = writer();
v.reader().copy_data(to);
return v;
}
message& pEpDBusMessage::operator << (message &m)
{
writer().append_string(m.from->address);
return m;
}