5 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef __CONNMAN_AGENT_H
23 #define __CONNMAN_AGENT_H
33 * @title: agent primitives
34 * @short_description: Functions for handling generic agent details
39 struct connman_agent_driver {
41 const char *interface;
43 int (*probe) (struct connman_agent *agent);
44 void (*remove) (struct connman_agent *agent);
45 void * (*context_ref) (void *user_context);
46 void (*context_unref) (void *user_context);
49 int connman_agent_driver_register(struct connman_agent_driver *driver);
50 void connman_agent_driver_unregister(struct connman_agent_driver *driver);
52 typedef void (* report_error_cb_t) (void *user_context,
53 bool retry, void *user_data);
55 int connman_agent_report_error_full(void *user_context, const char *path,
56 const char *method, const char *error,
57 report_error_cb_t callback,
58 const char *dbus_sender, void *user_data);
59 int connman_agent_report_error(void *user_context, const char *path,
61 report_error_cb_t callback,
62 const char *dbus_sender, void *user_data);
64 int connman_agent_register(const char *sender, const char *path);
65 int connman_agent_unregister(const char *sender, const char *path);
66 void connman_agent_cancel(void *user_context);
68 typedef void (*agent_queue_cb)(DBusMessage *reply, void *user_data);
70 int connman_agent_queue_message(void *user_context,
71 DBusMessage *msg, int timeout,
72 agent_queue_cb callback, void *user_data,
75 void *connman_agent_get_info(const char *dbus_sender, const char **sender,
82 #endif /* __CONNMAN_TECHNOLOGY_H */