5 * Copyright (C) 2012 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
31 * @title: agent primitives
32 * @short_description: Functions for handling generic agent details
37 struct connman_agent_driver {
39 const char *interface;
41 int (*probe) (struct connman_agent *agent);
42 void (*remove) (struct connman_agent *agent);
43 void * (*context_ref) (void *user_context);
44 void (*context_unref) (void *user_context);
47 int connman_agent_driver_register(struct connman_agent_driver *driver);
48 void connman_agent_driver_unregister(struct connman_agent_driver *driver);
50 typedef void (* report_error_cb_t) (void *user_context,
51 gboolean retry, void *user_data);
53 int connman_agent_report_error(void *user_context, const char *path,
55 report_error_cb_t callback, void *user_data);
57 int connman_agent_register(const char *sender, const char *path);
58 int connman_agent_unregister(const char *sender, const char *path);
59 void connman_agent_cancel(void *user_context);
61 typedef void (*agent_queue_cb)(DBusMessage *reply, void *user_data);
63 int connman_agent_queue_message(void *user_context,
64 DBusMessage *msg, int timeout,
65 agent_queue_cb callback, void *user_data);
67 void connman_agent_get_info(const char **sender, const char **path);
73 #endif /* __CONNMAN_TECHNOLOGY_H */