summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-06-29 20:42:11 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-06-29 20:42:11 +0200
commite911899c56f2c6a7c1742ea6c72405118e7b7aaa (patch)
treedfe93714db1ff9191b1237e01187ebdd6ee349dd /include
parente7268afd947083942836cea24b52a4bdccbf5d19 (diff)
downloadconnman-e911899c56f2c6a7c1742ea6c72405118e7b7aaa.tar.gz
connman-e911899c56f2c6a7c1742ea6c72405118e7b7aaa.tar.bz2
connman-e911899c56f2c6a7c1742ea6c72405118e7b7aaa.zip
Remove the useless extern declaration for public functions
Diffstat (limited to 'include')
-rw-r--r--include/dbus.h10
-rw-r--r--include/device.h67
-rw-r--r--include/driver.h4
-rw-r--r--include/element.h32
-rw-r--r--include/inet.h16
-rw-r--r--include/ipconfig.h10
-rw-r--r--include/log.h6
-rw-r--r--include/network.h67
-rw-r--r--include/notifier.h4
-rw-r--r--include/option.h2
-rw-r--r--include/resolver.h8
-rw-r--r--include/rtnl.h12
-rw-r--r--include/security.h4
-rw-r--r--include/service.h8
-rw-r--r--include/storage.h4
15 files changed, 126 insertions, 128 deletions
diff --git a/include/dbus.h b/include/dbus.h
index 4007a14d..1a6833bc 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -43,17 +43,17 @@ extern "C" {
#define CONNMAN_NETWORK_INTERFACE CONNMAN_SERVICE ".Network"
#define CONNMAN_CONNECTION_INTERFACE CONNMAN_SERVICE ".Connection"
-extern DBusConnection *connman_dbus_get_connection(void);
+DBusConnection *connman_dbus_get_connection(void);
-extern void connman_dbus_property_append_variant(DBusMessageIter *property,
+void connman_dbus_property_append_variant(DBusMessageIter *property,
const char *key, int type, void *val);
-extern void connman_dbus_dict_append_array(DBusMessageIter *dict,
+void connman_dbus_dict_append_array(DBusMessageIter *dict,
const char *key, int type, void *val, int len);
-extern void connman_dbus_dict_append_variant(DBusMessageIter *dict,
+void connman_dbus_dict_append_variant(DBusMessageIter *dict,
const char *key, int type, void *val);
-extern char *connman_dbus_encode_string(const char *value);
+char *connman_dbus_encode_string(const char *value);
#ifdef __cplusplus
}
diff --git a/include/device.h b/include/device.h
index acf90c78..5b103a28 100644
--- a/include/device.h
+++ b/include/device.h
@@ -58,57 +58,56 @@ enum connman_device_mode {
struct connman_device;
-extern struct connman_device *connman_device_create(const char *node,
+struct connman_device *connman_device_create(const char *node,
enum connman_device_type type);
-extern struct connman_device *connman_device_ref(struct connman_device *device);
-extern void connman_device_unref(struct connman_device *device);
-
-extern enum connman_device_type connman_device_get_type(struct connman_device *device);
-extern const char *connman_device_get_name(struct connman_device *device);
-extern const char *connman_device_get_path(struct connman_device *device);
-extern void connman_device_set_index(struct connman_device *device,
- int index);
-extern int connman_device_get_index(struct connman_device *device);
-extern void connman_device_set_interface(struct connman_device *device,
+struct connman_device *connman_device_ref(struct connman_device *device);
+void connman_device_unref(struct connman_device *device);
+
+enum connman_device_type connman_device_get_type(struct connman_device *device);
+const char *connman_device_get_name(struct connman_device *device);
+const char *connman_device_get_path(struct connman_device *device);
+void connman_device_set_index(struct connman_device *device, int index);
+int connman_device_get_index(struct connman_device *device);
+void connman_device_set_interface(struct connman_device *device,
const char *interface);
-extern const char *connman_device_get_interface(struct connman_device *device);
+const char *connman_device_get_interface(struct connman_device *device);
-extern void connman_device_set_ident(struct connman_device *device,
- const char *ident);
+void connman_device_set_ident(struct connman_device *device,
+ const char *ident);
-extern void connman_device_set_mode(struct connman_device *device,
- enum connman_device_mode mode);
-extern enum connman_device_mode connman_device_get_mode(struct connman_device *device);
-extern void connman_device_set_secondary(struct connman_device *device,
+void connman_device_set_mode(struct connman_device *device,
+ enum connman_device_mode mode);
+enum connman_device_mode connman_device_get_mode(struct connman_device *device);
+void connman_device_set_secondary(struct connman_device *device,
connman_bool_t secondary);
-extern connman_bool_t connman_device_get_secondary(struct connman_device *device);
+connman_bool_t connman_device_get_secondary(struct connman_device *device);
-extern int connman_device_set_powered(struct connman_device *device,
+int connman_device_set_powered(struct connman_device *device,
connman_bool_t powered);
-extern int connman_device_set_carrier(struct connman_device *device,
+int connman_device_set_carrier(struct connman_device *device,
connman_bool_t carrier);
-extern int connman_device_set_scanning(struct connman_device *device,
+int connman_device_set_scanning(struct connman_device *device,
connman_bool_t scanning);
-extern int connman_device_set_disconnected(struct connman_device *device,
+int connman_device_set_disconnected(struct connman_device *device,
connman_bool_t disconnected);
-extern int connman_device_set_string(struct connman_device *device,
+int connman_device_set_string(struct connman_device *device,
const char *key, const char *value);
-extern const char *connman_device_get_string(struct connman_device *device,
+const char *connman_device_get_string(struct connman_device *device,
const char *key);
-extern int connman_device_add_network(struct connman_device *device,
+int connman_device_add_network(struct connman_device *device,
struct connman_network *network);
-extern struct connman_network *connman_device_get_network(struct connman_device *device,
+struct connman_network *connman_device_get_network(struct connman_device *device,
const char *identifier);
-extern int connman_device_remove_network(struct connman_device *device,
+int connman_device_remove_network(struct connman_device *device,
const char *identifier);
-extern int connman_device_register(struct connman_device *device);
-extern void connman_device_unregister(struct connman_device *device);
+int connman_device_register(struct connman_device *device);
+void connman_device_unregister(struct connman_device *device);
-extern void *connman_device_get_data(struct connman_device *device);
-extern void connman_device_set_data(struct connman_device *device, void *data);
+void *connman_device_get_data(struct connman_device *device);
+void connman_device_set_data(struct connman_device *device, void *data);
struct connman_device_driver {
const char *name;
@@ -125,8 +124,8 @@ struct connman_device_driver {
struct connman_network *network);
};
-extern int connman_device_driver_register(struct connman_device_driver *driver);
-extern void connman_device_driver_unregister(struct connman_device_driver *driver);
+int connman_device_driver_register(struct connman_device_driver *driver);
+void connman_device_driver_unregister(struct connman_device_driver *driver);
#ifdef __cplusplus
}
diff --git a/include/driver.h b/include/driver.h
index 61ec465f..4df96036 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -48,8 +48,8 @@ struct connman_driver {
void (*change) (struct connman_element *element);
};
-extern int connman_driver_register(struct connman_driver *driver);
-extern void connman_driver_unregister(struct connman_driver *driver);
+int connman_driver_register(struct connman_driver *driver);
+void connman_driver_unregister(struct connman_driver *driver);
#ifdef __cplusplus
}
diff --git a/include/element.h b/include/element.h
index 5e0b28b2..cca87f59 100644
--- a/include/element.h
+++ b/include/element.h
@@ -109,35 +109,35 @@ struct connman_element {
} ipv4;
};
-extern struct connman_element *connman_element_create(const char *name);
-extern struct connman_element *connman_element_ref(struct connman_element *element);
-extern void connman_element_unref(struct connman_element *element);
+struct connman_element *connman_element_create(const char *name);
+struct connman_element *connman_element_ref(struct connman_element *element);
+void connman_element_unref(struct connman_element *element);
-extern int connman_element_get_value(struct connman_element *element,
+int connman_element_get_value(struct connman_element *element,
enum connman_property_id id, void *value);
-extern int connman_element_set_string(struct connman_element *element,
+int connman_element_set_string(struct connman_element *element,
const char *key, const char *value);
-extern const char *connman_element_get_string(struct connman_element *element,
+const char *connman_element_get_string(struct connman_element *element,
const char *key);
-extern int connman_element_set_uint8(struct connman_element *element,
+int connman_element_set_uint8(struct connman_element *element,
const char *key, connman_uint8_t value);
-extern connman_uint8_t connman_element_get_uint8(struct connman_element *element,
+connman_uint8_t connman_element_get_uint8(struct connman_element *element,
const char *key);
-extern int connman_element_set_blob(struct connman_element *element,
+int connman_element_set_blob(struct connman_element *element,
const char *key, const void *data, unsigned int size);
-extern const void *connman_element_get_blob(struct connman_element *element,
+const void *connman_element_get_blob(struct connman_element *element,
const char *key, unsigned int *size);
-extern int connman_element_register(struct connman_element *element,
+int connman_element_register(struct connman_element *element,
struct connman_element *parent);
-extern void connman_element_unregister(struct connman_element *element);
-extern void connman_element_unregister_children(struct connman_element *element);
-extern void connman_element_update(struct connman_element *element);
+void connman_element_unregister(struct connman_element *element);
+void connman_element_unregister_children(struct connman_element *element);
+void connman_element_update(struct connman_element *element);
-extern int connman_element_set_enabled(struct connman_element *element,
+int connman_element_set_enabled(struct connman_element *element,
gboolean enabled);
-extern void connman_element_set_error(struct connman_element *element,
+void connman_element_set_error(struct connman_element *element,
enum connman_element_error error);
static inline void *connman_element_get_data(struct connman_element *element)
diff --git a/include/inet.h b/include/inet.h
index 1f80b74a..66285d80 100644
--- a/include/inet.h
+++ b/include/inet.h
@@ -30,18 +30,18 @@ extern "C" {
#include <connman/device.h>
-extern int connman_inet_ifindex(const char *name);
-extern char *connman_inet_ifname(int index);
+int connman_inet_ifindex(const char *name);
+char *connman_inet_ifname(int index);
-extern int connman_inet_ifup(int index);
-extern int connman_inet_ifdown(int index);
+int connman_inet_ifup(int index);
+int connman_inet_ifdown(int index);
-extern struct connman_device *connman_inet_create_device(int index);
+struct connman_device *connman_inet_create_device(int index);
-extern int connman_inet_set_address(int index, struct in_addr address,
+int connman_inet_set_address(int index, struct in_addr address,
struct in_addr netmask, struct in_addr broadcast);
-extern int connman_inet_clear_address(int index);
-extern int connman_inet_set_gateway(int index, struct in_addr gateway);
+int connman_inet_clear_address(int index);
+int connman_inet_set_gateway(int index, struct in_addr gateway);
#ifdef __cplusplus
}
diff --git a/include/ipconfig.h b/include/ipconfig.h
index e40981ff..94dfe671 100644
--- a/include/ipconfig.h
+++ b/include/ipconfig.h
@@ -47,9 +47,9 @@ enum connman_ipconfig_method {
struct connman_ipconfig;
-extern struct connman_ipconfig *connman_ipconfig_create(void);
-extern struct connman_ipconfig *connman_ipconfig_ref(struct connman_ipconfig *ipconfig);
-extern void connman_ipconfig_unref(struct connman_ipconfig *ipconfig);
+struct connman_ipconfig *connman_ipconfig_create(void);
+struct connman_ipconfig *connman_ipconfig_ref(struct connman_ipconfig *ipconfig);
+void connman_ipconfig_unref(struct connman_ipconfig *ipconfig);
#define CONNMAN_IPCONFIG_PRIORITY_LOW -100
#define CONNMAN_IPCONFIG_PRIORITY_DEFAULT 0
@@ -64,8 +64,8 @@ struct connman_ipconfig_driver {
int (*renew) (const char *interface);
};
-extern int connman_ipconfig_driver_register(struct connman_ipconfig_driver *driver);
-extern void connman_ipconfig_driver_unregister(struct connman_ipconfig_driver *driver);
+int connman_ipconfig_driver_register(struct connman_ipconfig_driver *driver);
+void connman_ipconfig_driver_unregister(struct connman_ipconfig_driver *driver);
#ifdef __cplusplus
}
diff --git a/include/log.h b/include/log.h
index d154ba7c..991e019a 100644
--- a/include/log.h
+++ b/include/log.h
@@ -32,11 +32,11 @@ extern "C" {
* @short_description: Functions for logging error and debug information
*/
-extern void connman_info(const char *format, ...)
+void connman_info(const char *format, ...)
__attribute__((format(printf, 1, 2)));
-extern void connman_error(const char *format, ...)
+void connman_error(const char *format, ...)
__attribute__((format(printf, 1, 2)));
-extern void connman_debug(const char *format, ...)
+void connman_debug(const char *format, ...)
__attribute__((format(printf, 1, 2)));
/**
diff --git a/include/network.h b/include/network.h
index 7710913e..8d9a2fdb 100644
--- a/include/network.h
+++ b/include/network.h
@@ -53,61 +53,60 @@ enum connman_network_protocol {
struct connman_network;
-extern struct connman_network *connman_network_create(const char *identifier,
- enum connman_network_type type);
-extern struct connman_network *connman_network_ref(struct connman_network *network);
-extern void connman_network_unref(struct connman_network *network);
+struct connman_network *connman_network_create(const char *identifier,
+ enum connman_network_type type);
+struct connman_network *connman_network_ref(struct connman_network *network);
+void connman_network_unref(struct connman_network *network);
-extern enum connman_network_type connman_network_get_type(struct connman_network *network);
-extern const char *connman_network_get_identifier(struct connman_network *network);
+enum connman_network_type connman_network_get_type(struct connman_network *network);
+const char *connman_network_get_identifier(struct connman_network *network);
-extern const char *connman_network_get_path(struct connman_network *network);
-extern void connman_network_set_index(struct connman_network *network,
- int index);
-extern int connman_network_get_index(struct connman_network *network);
+const char *connman_network_get_path(struct connman_network *network);
+void connman_network_set_index(struct connman_network *network, int index);
+int connman_network_get_index(struct connman_network *network);
-extern void connman_network_set_protocol(struct connman_network *network,
+void connman_network_set_protocol(struct connman_network *network,
enum connman_network_protocol protocol);
-extern void connman_network_set_group(struct connman_network *network,
- const char *group);
+void connman_network_set_group(struct connman_network *network,
+ const char *group);
-extern int connman_network_set_available(struct connman_network *network,
+int connman_network_set_available(struct connman_network *network,
connman_bool_t available);
-extern connman_bool_t connman_network_get_available(struct connman_network *network);
-extern int connman_network_set_associating(struct connman_network *network,
+connman_bool_t connman_network_get_available(struct connman_network *network);
+int connman_network_set_associating(struct connman_network *network,
connman_bool_t associating);
-extern int connman_network_set_connected(struct connman_network *network,
+int connman_network_set_connected(struct connman_network *network,
connman_bool_t connected);
-extern connman_bool_t connman_network_get_connected(struct connman_network *network);
+connman_bool_t connman_network_get_connected(struct connman_network *network);
-extern int connman_network_set_address(struct connman_network *network,
+int connman_network_set_address(struct connman_network *network,
const void *address, unsigned int size);
-extern int connman_network_set_name(struct connman_network *network,
+int connman_network_set_name(struct connman_network *network,
const char *name);
-extern int connman_network_set_strength(struct connman_network *network,
+int connman_network_set_strength(struct connman_network *network,
connman_uint8_t strength);
-extern int connman_network_set_string(struct connman_network *network,
+int connman_network_set_string(struct connman_network *network,
const char *key, const char *value);
-extern const char *connman_network_get_string(struct connman_network *network,
+const char *connman_network_get_string(struct connman_network *network,
const char *key);
-extern int connman_network_set_uint8(struct connman_network *network,
+int connman_network_set_uint8(struct connman_network *network,
const char *key, connman_uint8_t value);
-extern connman_uint8_t connman_network_get_uint8(struct connman_network *network,
+connman_uint8_t connman_network_get_uint8(struct connman_network *network,
const char *key);
-extern int connman_network_set_uint16(struct connman_network *network,
+int connman_network_set_uint16(struct connman_network *network,
const char *key, connman_uint16_t value);
-extern connman_uint16_t connman_network_get_uint16(struct connman_network *network,
+connman_uint16_t connman_network_get_uint16(struct connman_network *network,
const char *key);
-extern int connman_network_set_blob(struct connman_network *network,
+int connman_network_set_blob(struct connman_network *network,
const char *key, const void *data, unsigned int size);
-extern const void *connman_network_get_blob(struct connman_network *network,
+const void *connman_network_get_blob(struct connman_network *network,
const char *key, unsigned int *size);
-extern struct connman_device *connman_network_get_device(struct connman_network *network);
+struct connman_device *connman_network_get_device(struct connman_network *network);
-extern void *connman_network_get_data(struct connman_network *network);
-extern void connman_network_set_data(struct connman_network *network, void *data);
+void *connman_network_get_data(struct connman_network *network);
+void connman_network_set_data(struct connman_network *network, void *data);
struct connman_network_driver {
const char *name;
@@ -119,8 +118,8 @@ struct connman_network_driver {
int (*disconnect) (struct connman_network *network);
};
-extern int connman_network_driver_register(struct connman_network_driver *driver);
-extern void connman_network_driver_unregister(struct connman_network_driver *driver);
+int connman_network_driver_register(struct connman_network_driver *driver);
+void connman_network_driver_unregister(struct connman_network_driver *driver);
#ifdef __cplusplus
}
diff --git a/include/notifier.h b/include/notifier.h
index 046b8bf5..fdbc1b9d 100644
--- a/include/notifier.h
+++ b/include/notifier.h
@@ -46,8 +46,8 @@ struct connman_notifier {
void (*offline_mode) (connman_bool_t enabled);
};
-extern int connman_notifier_register(struct connman_notifier *notifier);
-extern void connman_notifier_unregister(struct connman_notifier *notifier);
+int connman_notifier_register(struct connman_notifier *notifier);
+void connman_notifier_unregister(struct connman_notifier *notifier);
#ifdef __cplusplus
}
diff --git a/include/option.h b/include/option.h
index b80c8c99..36888323 100644
--- a/include/option.h
+++ b/include/option.h
@@ -26,7 +26,7 @@
extern "C" {
#endif
-extern const char *connman_option_get_string(const char *key);
+const char *connman_option_get_string(const char *key);
#ifdef __cplusplus
}
diff --git a/include/resolver.h b/include/resolver.h
index d5fefe99..18c3ab89 100644
--- a/include/resolver.h
+++ b/include/resolver.h
@@ -45,12 +45,12 @@ struct connman_resolver {
const char *server);
};
-extern int connman_resolver_register(struct connman_resolver *resolver);
-extern void connman_resolver_unregister(struct connman_resolver *resolver);
+int connman_resolver_register(struct connman_resolver *resolver);
+void connman_resolver_unregister(struct connman_resolver *resolver);
-extern int connman_resolver_append(const char *interface, const char *domain,
+int connman_resolver_append(const char *interface, const char *domain,
const char *server);
-extern int connman_resolver_remove_all(const char *interface);
+int connman_resolver_remove_all(const char *interface);
#ifdef __cplusplus
}
diff --git a/include/rtnl.h b/include/rtnl.h
index c78556b9..4a60fb0a 100644
--- a/include/rtnl.h
+++ b/include/rtnl.h
@@ -35,9 +35,9 @@ extern "C" {
typedef void (* connman_rtnl_link_cb_t) (unsigned flags, unsigned change,
void *user_data);
-extern unsigned int connman_rtnl_add_newlink_watch(int index,
+unsigned int connman_rtnl_add_newlink_watch(int index,
connman_rtnl_link_cb_t callback, void *user_data);
-extern void connman_rtnl_remove_watch(unsigned int id);
+void connman_rtnl_remove_watch(unsigned int id);
#define CONNMAN_RTNL_PRIORITY_LOW -100
#define CONNMAN_RTNL_PRIORITY_DEFAULT 0
@@ -54,11 +54,11 @@ struct connman_rtnl {
void (*delgateway) (int index, const char *gateway);
};
-extern int connman_rtnl_register(struct connman_rtnl *rtnl);
-extern void connman_rtnl_unregister(struct connman_rtnl *rtnl);
+int connman_rtnl_register(struct connman_rtnl *rtnl);
+void connman_rtnl_unregister(struct connman_rtnl *rtnl);
-extern int connman_rtnl_send_getlink(void);
-extern int connman_rtnl_send_getroute(void);
+int connman_rtnl_send_getlink(void);
+int connman_rtnl_send_getroute(void);
#ifdef __cplusplus
}
diff --git a/include/security.h b/include/security.h
index 9e27a5f2..2b18c56e 100644
--- a/include/security.h
+++ b/include/security.h
@@ -49,8 +49,8 @@ struct connman_security {
enum connman_security_privilege privilege);
};
-extern int connman_security_register(struct connman_security *security);
-extern void connman_security_unregister(struct connman_security *security);
+int connman_security_register(struct connman_security *security);
+void connman_security_unregister(struct connman_security *security);
#ifdef __cplusplus
}
diff --git a/include/service.h b/include/service.h
index 49b6c01d..5e5faa93 100644
--- a/include/service.h
+++ b/include/service.h
@@ -68,11 +68,11 @@ enum connman_service_state {
struct connman_service;
-extern struct connman_service *connman_service_create(void);
-extern struct connman_service *connman_service_ref(struct connman_service *service);
-extern void connman_service_unref(struct connman_service *service);
+struct connman_service *connman_service_create(void);
+struct connman_service *connman_service_ref(struct connman_service *service);
+void connman_service_unref(struct connman_service *service);
-extern int connman_service_set_favorite(struct connman_service *service,
+int connman_service_set_favorite(struct connman_service *service,
connman_bool_t favorite);
#ifdef __cplusplus
diff --git a/include/storage.h b/include/storage.h
index 61cbf9a4..bb3b3746 100644
--- a/include/storage.h
+++ b/include/storage.h
@@ -56,8 +56,8 @@ struct connman_storage {
int (*service_save) (struct connman_service *service);
};
-extern int connman_storage_register(struct connman_storage *storage);
-extern void connman_storage_unregister(struct connman_storage *storage);
+int connman_storage_register(struct connman_storage *storage);
+void connman_storage_unregister(struct connman_storage *storage);
#ifdef __cplusplus
}