| /* | |
| * | |
| * OBEX Client | |
| * | |
| * Copyright (C) 2007-2010 Marcel Holtmann <marcel@holtmann.org> | |
| * | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | |
| * | |
| * You should have received a copy of the GNU General Public License | |
| * along with this program; if not, write to the Free Software | |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| * | |
| */ | |
| struct obc_transfer; | |
| typedef void (*transfer_callback_t) (struct obc_transfer *transfer, | |
| gint64 transferred, GError *err, | |
| void *user_data); | |
| struct obc_transfer *obc_transfer_get(const char *type, const char *name, | |
| const char *filename, GError **err); | |
| struct obc_transfer *obc_transfer_put(const char *type, const char *name, | |
| const char *filename, | |
| const void *contents, size_t size, | |
| GError **err); | |
| gboolean obc_transfer_register(struct obc_transfer *transfer, | |
| DBusConnection *conn, | |
| const char *agent, | |
| GError **err); | |
| void obc_transfer_unregister(struct obc_transfer *transfer); | |
| gboolean obc_transfer_set_callback(struct obc_transfer *transfer, | |
| transfer_callback_t func, | |
| void *user_data); | |
| gboolean obc_transfer_start(struct obc_transfer *transfer, void *obex, | |
| GError **err); | |
| guint8 obc_transfer_get_operation(struct obc_transfer *transfer); | |
| void obc_transfer_set_params(struct obc_transfer *transfer, | |
| const void *data, size_t size); | |
| const void *obc_transfer_get_params(struct obc_transfer *transfer, | |
| size_t *size); | |
| int obc_transfer_get_contents(struct obc_transfer *transfer, char **contents, | |
| size_t *size); | |
| void obc_transfer_set_name(struct obc_transfer *transfer, const char *name); | |
| int obc_transfer_set_filename(struct obc_transfer *transfer, | |
| const char *filename); | |
| const char *obc_transfer_get_path(struct obc_transfer *transfer); | |
| gint64 obc_transfer_get_size(struct obc_transfer *transfer); |