File: transfer.h

package info (click to toggle)
bluez 5.83-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 25,664 kB
  • sloc: ansic: 471,418; python: 4,751; sh: 4,580; makefile: 1,042; xml: 126
file content (51 lines) | stat: -rw-r--r-- 1,673 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *
 *  OBEX Client
 *
 *  Copyright (C) 2007-2010  Marcel Holtmann <marcel@holtmann.org>
 *  Copyright (C) 2011-2012  BMW Car IT GmbH. All rights reserved.
 *
 *
 */

struct obc_transfer;

typedef void (*transfer_callback_t) (struct obc_transfer *transfer,
					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 *session,
					const char *owner,
					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_apparam(struct obc_transfer *transfer, void *data);
void *obc_transfer_get_apparam(struct obc_transfer *transfer);
int obc_transfer_get_contents(struct obc_transfer *transfer, char **contents,
								size_t *size);

const char *obc_transfer_get_path(struct obc_transfer *transfer);
gint64 obc_transfer_get_size(struct obc_transfer *transfer);

DBusMessage *obc_transfer_create_dbus_reply(struct obc_transfer *transfer,
							DBusMessage *message);

void obc_transfer_add_header(struct obc_transfer *transfer, void *data);