summaryrefslogtreecommitdiff
path: root/src/connman.h
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-09-20 16:45:24 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-09-21 11:49:46 +0200
commit7d36465e46ff59fb216b943df2e8c63c2e366bd1 (patch)
tree57c2c298cbcd6fe3f9ec700abe84b38207923ea5 /src/connman.h
parent7d07dba2ee2ce01fa76d15af2b1980907ed4f9f7 (diff)
downloadconnman-7d36465e46ff59fb216b943df2e8c63c2e366bd1.tar.gz
connman-7d36465e46ff59fb216b943df2e8c63c2e366bd1.tar.bz2
connman-7d36465e46ff59fb216b943df2e8c63c2e366bd1.zip
Handle several counters simultaniously
The current implementation does not handle multiple counters at the same time correctly. Only the first counter gets the updates, all others just an empty dictionary. For each Counter object the counters have to be maintained separately.
Diffstat (limited to 'src/connman.h')
-rw-r--r--src/connman.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/connman.h b/src/connman.h
index f26514a5..f4ba942d 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -66,25 +66,16 @@ void __connman_agent_cleanup(void);
int __connman_agent_register(const char *sender, const char *path);
int __connman_agent_unregister(const char *sender, const char *path);
-struct connman_service;
-struct connman_ipconfig;
-
+void __connman_counter_send_usage(const char *path,
+ DBusMessage *message);
int __connman_counter_register(const char *owner, const char *path,
unsigned int interval);
int __connman_counter_unregister(const char *owner, const char *path);
-void __connman_counter_notify(struct connman_ipconfig *config,
- unsigned int rx_packets, unsigned int tx_packets,
- unsigned int rx_bytes, unsigned int tx_bytes,
- unsigned int rx_error, unsigned int tx_error,
- unsigned int rx_dropped, unsigned int tx_dropped);
-
-int __connman_counter_add_service(struct connman_service *service);
-void __connman_counter_remove_service(struct connman_service *service);
-
int __connman_counter_init(void);
void __connman_counter_cleanup(void);
+struct connman_service *service;
typedef void (* passphrase_cb_t) (struct connman_service *service,
const char *passphrase, void *user_data);
@@ -502,14 +493,14 @@ const char *__connman_service_get_nameserver(struct connman_service *service);
void __connman_service_set_proxy_autoconfig(struct connman_service *service,
const char *url);
-void __connman_service_stats_append(struct connman_service *service,
- DBusMessage *msg,
- connman_bool_t append_all);
-connman_bool_t __connman_service_stats_update(struct connman_service *service,
- unsigned int rx_packets, unsigned int tx_packets,
- unsigned int rx_bytes, unsigned int tx_bytes,
- unsigned int rx_error, unsigned int tx_error,
- unsigned int rx_dropped, unsigned int tx_dropped);
+void __connman_service_notify(struct connman_ipconfig *ipconfig,
+ unsigned int rx_packets, unsigned int tx_packets,
+ unsigned int rx_bytes, unsigned int tx_bytes,
+ unsigned int rx_error, unsigned int tx_error,
+ unsigned int rx_dropped, unsigned int tx_dropped);
+
+int __connman_service_counter_register(const char *counter);
+void __connman_service_counter_unregister(const char *counter);
#include <connman/location.h>