forked from martinhaefner/simppl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f89bf58
commit b2330b5
Showing
22 changed files
with
1,119 additions
and
882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
|
||
|
||
inline | ||
Serializer& write(bool b) | ||
{ | ||
dbus_bool_t _b = b; | ||
dbus_message_iter_append_basic(iter_, dbus_type_code<bool>::value, &_b); | ||
return *this; | ||
} | ||
|
||
|
||
|
||
Deserializer& read(bool& t) | ||
{ | ||
dbus_bool_t b; | ||
dbus_message_iter_get_basic(iter_, &b); | ||
dbus_message_iter_next(iter_); | ||
|
||
t = b; | ||
return *this; | ||
} | ||
|
||
|
||
template<> struct dbus_type_code<bool> { enum { value = DBUS_TYPE_BOOLEAN }; }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.