transport.h 756 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. *
  4. * OBEX Server
  5. *
  6. * Copyright (C) 2012 Intel Corporation
  7. *
  8. *
  9. */
  10. typedef void (*obc_transport_func)(GIOChannel *io, GError *err,
  11. gpointer user_data);
  12. struct obc_transport {
  13. const char *name;
  14. guint (*connect) (const char *source, const char *destination,
  15. const char *service, uint16_t port,
  16. obc_transport_func func, void *user_data);
  17. int (*getpacketopt) (GIOChannel *io, int *tx_mtu, int *rx_mtu);
  18. void (*disconnect) (guint id);
  19. const void *(*getattribute) (guint id, int attribute_id);
  20. };
  21. int obc_transport_register(struct obc_transport *transport);
  22. void obc_transport_unregister(struct obc_transport *transport);
  23. struct obc_transport *obc_transport_find(const char *name);