* Fixed marshaling of D-Bus dictionary types
git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@8808 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
parent
8484b18054
commit
0084392c53
7 changed files with 47 additions and 27 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "echo-server.h"
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -36,6 +37,18 @@ DBus::Int32 EchoServer::Sum( const std::vector<DBus::Int32>& ints )
|
|||
return sum;
|
||||
}
|
||||
|
||||
std::map< DBus::String, DBus::String > EchoServer::Info()
|
||||
{
|
||||
std::map< DBus::String, DBus::String > info;
|
||||
char hostname[HOST_NAME_MAX];
|
||||
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
info["hostname"] = hostname;
|
||||
info["username"] = getlogin();
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
DBus::BusDispatcher dispatcher;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue