diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-03-27 13:53:47 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-04-04 10:20:22 +0300 |
commit | cb5f603b695ca5f462801150cb42b5fae8ec5d30 (patch) | |
tree | ae2d56c66c2004dc00aecc7d1fffcc1bba910c15 /client/dbus_helpers.h | |
parent | c30c95f50672fa4d31ce3227b5c7c5f1bb489c51 (diff) | |
download | connman-cb5f603b695ca5f462801150cb42b5fae8ec5d30.tar.gz connman-cb5f603b695ca5f462801150cb42b5fae8ec5d30.tar.bz2 connman-cb5f603b695ca5f462801150cb42b5fae8ec5d30.zip |
client: Add connmanctl D-Bus helper functions
Add helper functions for pretty-printing D-Bus messages and making a
method call.
Diffstat (limited to 'client/dbus_helpers.h')
-rw-r--r-- | client/dbus_helpers.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/client/dbus_helpers.h b/client/dbus_helpers.h new file mode 100644 index 00000000..be312d7e --- /dev/null +++ b/client/dbus_helpers.h @@ -0,0 +1,46 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2013 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef __CONNMANCTL_DBUS_HELPERS_H +#define __CONNMANCTL_DBUS_HELPERS_H + +#include <dbus/dbus.h> + +#ifdef __cplusplus +extern "C" { +#endif + +void __connmanctl_dbus_print(DBusMessageIter *iter, const char *pre, + const char *dict, const char *sep); + +typedef void (*connmanctl_dbus_method_return_func_t)(DBusMessageIter *iter, + const char *error, void *user_data); +int __connmanctl_dbus_method_call(DBusConnection *connection, const char *path, + const char *interface, const char *method, + connmanctl_dbus_method_return_func_t cb, void * user_data, + int arg1, ...); + +#ifdef __cplusplus +} +#endif + +#endif |