From: Alex K. <ak...@se...> - 2005-02-25 15:41:14
|
On Fri, 25 Feb 2005, Hendrik Sattler wrote: > More precisely, it should be minimal with adding an > int transport; > to the obexftp_client_t struct. > Note that the correct thing would probably to add a struct obexftp_transport > where all necessary fields are included and adding that struct to > obexftp_client_t. You're actually right - that's a better approach. Not every transport can be identified by address:port pair, notably file descriptors and USB interfaces can't. This should probably be even done in openobex, not obexftp, so that instead of current int OBEX_TransportConnect(obex_t *self, struct sockaddr *saddr, int addlen); int InOBEX_TransportConnect(obex_t *self, struct sockaddr *saddr, int addrlen); int BtOBEX_TransportConnect(obex_t *self, bdaddr_t *src, bdaddr_t *dst, uint8_t channel); int FdOBEX_TransportSetup(obex_t *self, int rfd, int wfd, int mtu); int UsbOBEX_TransportConnect(obex_t *self, struct usb_obex_intf* interface); we'd have just one function: int OBEX_TransportConnect(obex_t *self, struct obex_transport *transport); The bad thing is that it would break the library API. So maybe these functions should be kept for backwards compatibility but labeled obsolete. -- Alexander Homepage: http://www.sensi.org/~ak/ |