Browse Source

Reading/Writing data structure

Now we can fill the struct and convert it into a Variant
master
David Lanzendörfer 1 year ago
parent
commit
2ca6d738a7
2 changed files with 26 additions and 2 deletions
  1. +21
    -0
      types/pEpDBusMessage.cpp
  2. +5
    -2
      types/pEpDBusMessage.h

+ 21
- 0
types/pEpDBusMessage.cpp View File

@ -44,3 +44,24 @@ message& pEpDBusMessage::operator << (message &m)
return m;
}
message& operator << (message &m, const pEpDBusMessage&)
{
return m;
}
message& operator >> (message &m, const pEpDBusMessage&)
{
return m;
}
void pEpDBusMessage::omnom_pEp_message(message m)
{
writer().append_string(m.from->address);
}
message pEpDBusMessage::spit_out_pEp_message()
{
message m;
return m;
}

+ 5
- 2
types/pEpDBusMessage.h View File

@ -21,10 +21,13 @@ public:
friend DBus::Variant& operator << (DBus::Variant&, const pEpDBusMessage&);
friend DBus::Variant& operator >> (DBus::Variant&, const pEpDBusMessage&);
friend message& operator << (message &m, const pEpDBusMessage&) { return m; }
friend message& operator >> (message &m, const pEpDBusMessage&) { return m; }
friend message& operator << (message &m, const pEpDBusMessage&);
friend message& operator >> (message &m, const pEpDBusMessage&);
//friend std::string operator << (DBus::Variant&, const pEpDBusMessage&);
private:
void omnom_pEp_message(message m);
message spit_out_pEp_message();
};
#endif

Loading…
Cancel
Save