5 * Copyright (C) 2007-2010 Marcel Holtmann <marcel@holtmann.org>
6 * Copyright (C) 2011-2012 BMW Car IT GmbH. All rights reserved.
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.
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.
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
31 typedef void (*session_callback_t) (struct obc_session *session,
32 struct obc_transfer *transfer,
33 GError *err, void *user_data);
35 struct obc_session *obc_session_create(const char *source,
36 const char *destination,
40 session_callback_t function,
43 struct obc_session *obc_session_ref(struct obc_session *session);
44 void obc_session_unref(struct obc_session *session);
45 void obc_session_shutdown(struct obc_session *session);
47 int obc_session_set_owner(struct obc_session *session, const char *name,
48 GDBusWatchFunction func);
49 const char *obc_session_get_owner(struct obc_session *session);
51 const char *obc_session_get_path(struct obc_session *session);
52 const char *obc_session_get_target(struct obc_session *session);
54 const char *obc_session_register(struct obc_session *session,
55 GDBusDestroyFunction destroy);
57 guint obc_session_queue(struct obc_session *session,
58 struct obc_transfer *transfer,
59 session_callback_t func, void *user_data,
61 guint obc_session_setpath(struct obc_session *session, const char *path,
62 session_callback_t func, void *user_data,
64 guint obc_session_mkdir(struct obc_session *session, const char *folder,
65 session_callback_t func, void *user_data,
67 guint obc_session_copy(struct obc_session *session, const char *srcname,
68 const char *destname, session_callback_t func,
69 void *user_data, GError **err);
70 guint obc_session_move(struct obc_session *session, const char *srcname,
71 const char *destname, session_callback_t func,
72 void *user_data, GError **err);
73 guint obc_session_delete(struct obc_session *session, const char *file,
74 session_callback_t func, void *user_data,
76 void obc_session_cancel(struct obc_session *session, guint id,