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
27 typedef void (*transfer_callback_t) (struct obc_transfer *transfer,
28 GError *err, void *user_data);
30 struct obc_transfer *obc_transfer_get(const char *type, const char *name,
31 const char *filename, GError **err);
32 struct obc_transfer *obc_transfer_put(const char *type, const char *name,
34 const void *contents, size_t size,
37 gboolean obc_transfer_register(struct obc_transfer *transfer,
43 void obc_transfer_unregister(struct obc_transfer *transfer);
45 gboolean obc_transfer_set_callback(struct obc_transfer *transfer,
46 transfer_callback_t func,
49 gboolean obc_transfer_start(struct obc_transfer *transfer, void *obex,
51 guint8 obc_transfer_get_operation(struct obc_transfer *transfer);
53 void obc_transfer_set_params(struct obc_transfer *transfer,
54 const void *data, size_t size);
55 const void *obc_transfer_get_params(struct obc_transfer *transfer,
57 int obc_transfer_get_contents(struct obc_transfer *transfer, char **contents,
60 const char *obc_transfer_get_path(struct obc_transfer *transfer);
61 gint64 obc_transfer_get_size(struct obc_transfer *transfer);
63 DBusMessage *obc_transfer_create_dbus_reply(struct obc_transfer *transfer,
64 DBusMessage *message);