Open Jackie-Yang opened 4 years ago
I don't know why it was decided to map "ay"
to std::string
, but it makes some sense, since std::string
can also contain NULL bytes.
On the other hand, it would be nice if gdbus-codegen-glibmm supported D-Bus type annotations and allowed the developer to choose the C++ type (like QtDBus does).
See also #82 . (I think it comes from the fact that "ay" is treated as a '\0' terminated string, char *
, in Glib instead of e.g. a GByteArray. Glib even requires "ay" to be '\0' terminated to function correctly. Even though there is no such requirement in D-Bus, of course.)
I try to use type="ay", but it will generage std::string.