5 * Copyright (C) 2007-2010 Marcel Holtmann <marcel@holtmann.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #define OBEX_PORT_RANDOM UINT16_MAX
26 struct obex_service_driver {
32 const uint8_t *target;
33 unsigned int target_size;
35 unsigned int who_size;
37 void *(*connect) (struct obex_session *os, int *err);
38 void (*progress) (struct obex_session *os, void *user_data);
39 int (*get) (struct obex_session *os, void *user_data);
40 int (*put) (struct obex_session *os, void *user_data);
41 int (*chkput) (struct obex_session *os, void *user_data);
42 int (*setpath) (struct obex_session *os, void *user_data);
43 int (*action) (struct obex_session *os, void *user_data);
44 void (*disconnect) (struct obex_session *os, void *user_data);
45 void (*reset) (struct obex_session *os, void *user_data);
48 int obex_service_driver_register(struct obex_service_driver *driver);
49 void obex_service_driver_unregister(struct obex_service_driver *driver);
50 GSList *obex_service_driver_list(uint16_t services);
51 struct obex_service_driver *obex_service_driver_find(GSList *drivers,
52 const uint8_t *target, unsigned int target_size,
53 const uint8_t *who, unsigned int who_size);