summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/agent.h4
-rw-r--r--include/dbus.h3
-rw-r--r--include/inet.h4
-rw-r--r--include/inotify.h2
-rw-r--r--include/ipaddress.h4
-rw-r--r--include/machine.h35
-rw-r--r--include/network.h1
-rw-r--r--include/peer.h75
-rw-r--r--include/session.h2
9 files changed, 121 insertions, 9 deletions
diff --git a/include/agent.h b/include/agent.h
index 05462df..6961f7a 100644
--- a/include/agent.h
+++ b/include/agent.h
@@ -52,6 +52,10 @@ void connman_agent_driver_unregister(struct connman_agent_driver *driver);
typedef void (* report_error_cb_t) (void *user_context,
bool retry, void *user_data);
+int connman_agent_report_error_full(void *user_context, const char *path,
+ const char *method, const char *error,
+ report_error_cb_t callback,
+ const char *dbus_sender, void *user_data);
int connman_agent_report_error(void *user_context, const char *path,
const char *error,
report_error_cb_t callback,
diff --git a/include/dbus.h b/include/dbus.h
index 253a23b..26f94d6 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -188,6 +188,9 @@ int connman_dbus_get_selinux_context(DBusConnection *connection,
connman_dbus_get_context_cb_t func,
void *user_data);
+void connman_dbus_reply_pending(DBusMessage *pending,
+ int error, const char *path);
+
#ifdef __cplusplus
}
#endif
diff --git a/include/inet.h b/include/inet.h
index a836a5b..6482934 100644
--- a/include/inet.h
+++ b/include/inet.h
@@ -36,13 +36,9 @@ extern "C" {
int connman_inet_ifindex(const char *name);
char *connman_inet_ifname(int index);
-short int connman_inet_ifflags(int index);
-
int connman_inet_ifup(int index);
int connman_inet_ifdown(int index);
-bool connman_inet_is_cfg80211(int index);
-
int connman_inet_set_address(int index, struct connman_ipaddress *ipaddress);
int connman_inet_clear_address(int index, struct connman_ipaddress *ipaddress);
int connman_inet_add_host_route(int index, const char *host, const char *gateway);
diff --git a/include/inotify.h b/include/inotify.h
index 1f642ab..4bc6330 100644
--- a/include/inotify.h
+++ b/include/inotify.h
@@ -2,7 +2,7 @@
*
* Connection Manager
*
- * Copyright (C) 2012 BMW Car IT GmbH. All rights reserved.
+ * Copyright (C) 2012,2014 BMW Car IT GmbH.
*
* 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
diff --git a/include/ipaddress.h b/include/ipaddress.h
index 4ced318..3655ca8 100644
--- a/include/ipaddress.h
+++ b/include/ipaddress.h
@@ -34,6 +34,7 @@ extern "C" {
struct connman_ipaddress;
+unsigned char connman_ipaddress_calc_netmask_len(const char *netmask);
struct connman_ipaddress *connman_ipaddress_alloc(int family);
void connman_ipaddress_free(struct connman_ipaddress *ipaddress);
int connman_ipaddress_set_ipv4(struct connman_ipaddress *ipaddress,
@@ -43,11 +44,14 @@ int connman_ipaddress_set_ipv6(struct connman_ipaddress *ipaddress,
const char *address,
unsigned char prefix_length,
const char *gateway);
+int connman_ipaddress_get_ip(struct connman_ipaddress *ipaddress,
+ const char **address, unsigned char *prefix_length);
void connman_ipaddress_set_peer(struct connman_ipaddress *ipaddress,
const char *peer);
void connman_ipaddress_clear(struct connman_ipaddress *ipaddress);
void connman_ipaddress_copy_address(struct connman_ipaddress *ipaddress,
struct connman_ipaddress *source);
+struct connman_ipaddress *connman_ipaddress_copy(struct connman_ipaddress *ipaddress);
#ifdef __cplusplus
}
diff --git a/include/machine.h b/include/machine.h
new file mode 100644
index 0000000..c8d8735
--- /dev/null
+++ b/include/machine.h
@@ -0,0 +1,35 @@
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2014 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 __CONNMAN_MACHINE_H
+#define __CONNMAN_MACHINE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const char *connman_machine_get_type(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNMAN_MACHINE_H */
diff --git a/include/network.h b/include/network.h
index fcb6905..d772699 100644
--- a/include/network.h
+++ b/include/network.h
@@ -96,7 +96,6 @@ int connman_network_set_associating(struct connman_network *network,
bool associating);
void connman_network_set_error(struct connman_network *network,
enum connman_network_error error);
-void connman_network_clear_error(struct connman_network *network);
int connman_network_set_connected(struct connman_network *network,
bool connected);
bool connman_network_get_connected(struct connman_network *network);
diff --git a/include/peer.h b/include/peer.h
index 807c945..8a690f5 100644
--- a/include/peer.h
+++ b/include/peer.h
@@ -26,17 +26,88 @@
extern "C" {
#endif
+enum connman_peer_state {
+ CONNMAN_PEER_STATE_UNKNOWN = 0,
+ CONNMAN_PEER_STATE_IDLE = 1,
+ CONNMAN_PEER_STATE_ASSOCIATION = 2,
+ CONNMAN_PEER_STATE_CONFIGURATION = 3,
+ CONNMAN_PEER_STATE_READY = 4,
+ CONNMAN_PEER_STATE_DISCONNECT = 5,
+ CONNMAN_PEER_STATE_FAILURE = 6,
+};
+
+enum connman_peer_wps_method {
+ CONNMAN_PEER_WPS_UNKNOWN = 0,
+ CONNMAN_PEER_WPS_PBC = 1,
+ CONNMAN_PEER_WPS_PIN = 2,
+};
+
+enum connman_peer_service_type {
+ CONNMAN_PEER_SERVICE_UNKNOWN = 0,
+ CONNMAN_PEER_SERVICE_WIFI_DISPLAY = 1,
+};
+
struct connman_peer;
struct connman_peer *connman_peer_create(const char *identifier);
-void connman_peer_destroy(struct connman_peer *peer);
+#define connman_peer_ref(peer) \
+ connman_peer_ref_debug(peer, __FILE__, __LINE__, __func__)
+
+#define connman_peer_unref(peer) \
+ connman_peer_unref_debug(peer, __FILE__, __LINE__, __func__)
+
+struct connman_peer *connman_peer_ref_debug(struct connman_peer *peer,
+ const char *file, int line, const char *caller);
+void connman_peer_unref_debug(struct connman_peer *peer,
+ const char *file, int line, const char *caller);
+
+const char *connman_peer_get_identifier(struct connman_peer *peer);
void connman_peer_set_name(struct connman_peer *peer, const char *name);
+void connman_peer_set_device(struct connman_peer *peer,
+ struct connman_device *device);
+struct connman_device *connman_peer_get_device(struct connman_peer *peer);
+void connman_peer_set_sub_device(struct connman_peer *peer,
+ struct connman_device *device);
+void connman_peer_set_as_master(struct connman_peer *peer, bool master);
+int connman_peer_set_state(struct connman_peer *peer,
+ enum connman_peer_state new_state);
+int connman_peer_request_connection(struct connman_peer *peer);
+void connman_peer_reset_services(struct connman_peer *peer);
+void connman_peer_add_service(struct connman_peer *peer,
+ enum connman_peer_service_type type,
+ const unsigned char *data, int data_length);
+void connman_peer_services_changed(struct connman_peer *peer);
int connman_peer_register(struct connman_peer *peer);
void connman_peer_unregister(struct connman_peer *peer);
-struct connman_peer *connman_peer_get(const char *identifier);
+struct connman_peer *connman_peer_get(struct connman_device *device,
+ const char *identifier);
+
+typedef void (* peer_service_registration_cb_t) (int result, void *user_data);
+
+struct connman_peer_driver {
+ int (*connect) (struct connman_peer *peer,
+ enum connman_peer_wps_method wps_method,
+ const char *wps_pin);
+ int (*disconnect) (struct connman_peer *peer);
+ int (*register_service) (const unsigned char *specification,
+ int specification_length,
+ const unsigned char *query,
+ int query_length, int version,
+ peer_service_registration_cb_t callback,
+ void *user_data);
+ int (*unregister_service) (const unsigned char *specification,
+ int specification_length,
+ const unsigned char *query,
+ int query_length, int version);
+};
+
+int connman_peer_driver_register(struct connman_peer_driver *driver);
+void connman_peer_driver_unregister(struct connman_peer_driver *driver);
+
+bool connman_peer_service_is_master(void);
#ifdef __cplusplus
}
diff --git a/include/session.h b/include/session.h
index 3f66664..37dfc4e 100644
--- a/include/session.h
+++ b/include/session.h
@@ -2,7 +2,7 @@
*
* Connection Manager
*
- * Copyright (C) 2012 BMW Car IT GbmH. All rights reserved.
+ * Copyright (C) 2012-2014 BMW Car IT GmbH.
*
* 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