* IM Account management
* D-Bus dictionary helper function git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@8130 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
parent
35702f41b3
commit
19712668b1
7 changed files with 34617 additions and 3565 deletions
|
@ -96,6 +96,15 @@ public:
|
|||
return _msg.writer();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
operator T() const
|
||||
{
|
||||
T cast;
|
||||
MessageIter ri = _msg.reader();
|
||||
ri >> cast;
|
||||
return cast;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Message _msg;
|
||||
|
@ -116,6 +125,12 @@ struct Struct
|
|||
T1 _1; T2 _2; T3 _3; T4 _4; T5 _5; T6 _6; T7 _7; T8 _8;
|
||||
};
|
||||
|
||||
template<typename K, typename V>
|
||||
inline bool dict_has_key( const std::map<K,V>& map, const K& key )
|
||||
{
|
||||
return map.find(key) != map.end();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct type
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue