2020-09-22 03:00:31 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2012-01-20 17:49:58 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* OBEX Server
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Intel Corporation
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef void (*obc_transport_func)(GIOChannel *io, GError *err,
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
struct obc_transport {
|
|
|
|
const char *name;
|
|
|
|
guint (*connect) (const char *source, const char *destination,
|
|
|
|
const char *service, uint16_t port,
|
|
|
|
obc_transport_func func, void *user_data);
|
2012-02-13 19:37:50 +08:00
|
|
|
int (*getpacketopt) (GIOChannel *io, int *tx_mtu, int *rx_mtu);
|
2012-01-20 17:49:58 +08:00
|
|
|
void (*disconnect) (guint id);
|
2013-04-12 17:29:02 +08:00
|
|
|
const void *(*getattribute) (guint id, int attribute_id);
|
2012-01-20 17:49:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
int obc_transport_register(struct obc_transport *transport);
|
|
|
|
void obc_transport_unregister(struct obc_transport *transport);
|
|
|
|
struct obc_transport *obc_transport_find(const char *name);
|