diff options
author | Tudor Marcu <tudor.a.marcu@intel.com> | 2012-09-12 15:05:53 -0700 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-09-14 16:32:00 +0300 |
commit | d00244b8e6afce2aa988c3c4a4cce7893c8d78b7 (patch) | |
tree | 62a6947efd33d89b5529dd1a269f9efa79a2dec0 /client/data_manager.h | |
parent | e96c2088902a78c319a963abba4c40bd75a12b88 (diff) | |
download | connman-d00244b8e6afce2aa988c3c4a4cce7893c8d78b7.tar.gz connman-d00244b8e6afce2aa988c3c4a4cce7893c8d78b7.tar.bz2 connman-d00244b8e6afce2aa988c3c4a4cce7893c8d78b7.zip |
client: Manager API command line client support
Support connecting/disconnecting services, list and set ConnMan properties.
'get_message()' is used to send any method request to ConnMan, and it
returns the reply that several functions use.
Diffstat (limited to 'client/data_manager.h')
-rw-r--r-- | client/data_manager.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/client/data_manager.h b/client/data_manager.h new file mode 100644 index 00000000..dead9e0a --- /dev/null +++ b/client/data_manager.h @@ -0,0 +1,51 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2012 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 version 2 as + * published by the Free Software Foundation. + * + * 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 __CLIENT_DATA_MANAGER_H +#define __CLIENT_DATA_MANAGER_H + +#include <dbus/dbus.h> + +#define SIGNAL_LISTEN_TIMEOUT 10 +#define CONNMAN_MANAGER_PATH "/" +#define CONNMAN_SERVICE "net.connman" + +struct signal_args { + DBusConnection *connection; + const char *signal_name; +}; + +struct proxy_input { + char *servers; + char *excludes; +}; + +DBusMessage *get_message(DBusConnection *connection, char *function); +int store_proxy_input(DBusConnection *connection, DBusMessage *message, + char *name, int num_args, char *argv[]); +int list_properties(DBusConnection *connection, char *function, + char *service_name); +int connect_service(DBusConnection *connection, char *name); +int disconnect_service(DBusConnection *connection, char *name); +int set_manager(DBusConnection *connection, char *key, dbus_bool_t value); +void listen_for_manager_signal(void *args); + +#endif |