upload tizen1.0 source
[profile/ivi/obexd.git] / client / agent.h
1 /*
2  *
3  *  OBEX Client
4  *
5  *  Copyright (C) 2007-2010  Intel Corporation
6  *  Copyright (C) 2007-2010  Marcel Holtmann <marcel@holtmann.org>
7  *
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software
21  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22  *
23  */
24
25 #include <gdbus.h>
26
27 struct obc_agent;
28
29 struct obc_agent *obc_agent_create(DBusConnection *conn, const char *name,
30                                         const char *path, GFunc destroy,
31                                         void *user_data);
32 void obc_agent_free(struct obc_agent *agent);
33 const char *obc_agent_get_name(struct obc_agent *agent);
34 const char *obc_agent_get_path(struct obc_agent *agent);
35 int obc_agent_request(struct obc_agent *agent, const char *path,
36                                 DBusPendingCallNotifyFunction function,
37                                 void *user_data, DBusFreeFunction destroy);
38 void obc_agent_notify_progress(struct obc_agent *agent, const char *path,
39                                                         guint64 transferred);
40 void obc_agent_notify_complete(struct obc_agent *agent, const char *path);
41 void obc_agent_notify_error(struct obc_agent *agent, const char *path,
42                                                         const char *err);
43 void obc_agent_release(struct obc_agent *agent);