obexftp.h File Reference

Data structures and general functions for OBEX clients and servers. More...

## Macros

#define | STREAM_CHUNK 4096
| Number of bytes passed at one time to OBEX. More...
#define | OBEX_SYNC_SERVICE 0x1104
#define | OBEX_PUSH_SERVICE 0x1105
#define | OBEX_FTP_SERVICE 0x1106
#define | obexftp_discover_bt() obexftp_discover_bt_src(NULL)
#define | obexftp_bt_name(addr) obexftp_bt_name_src(addr, NULL)
#define | obexftp_browse_bt(device, service) obexftp_browse_bt_src(NULL, device, service)
#define | obexftp_browse_bt_ftp(device) obexftp_browse_bt_src(NULL, device, OBEX_FTP_SERVICE)
#define | obexftp_browse_bt_push(device) obexftp_browse_bt_src(NULL, device, OBEX_PUSH_SERVICE)
#define | obexftp_browse_bt_sync(device) obexftp_browse_bt_src(NULL, device, OBEX_SYNC_SERVICE)
#define | obexftp_sdp_register_ftp(channel) obexftp_sdp_register(OBEX_FTP_SERVICE, channel)
#define | obexftp_sdp_register_push(channel) obexftp_sdp_register(OBEX_PUSH_SERVICE, channel)
#define | obexftp_sdp_register_sync(channel) obexftp_sdp_register(OBEX_SYNC_SERVICE, channel)
#define | obexftp_sdp_unregister_ftp() obexftp_sdp_unregister(OBEX_FTP_SERVICE)
#define | obexftp_sdp_unregister_push() obexftp_sdp_unregister(OBEX_PUSH_SERVICE)
#define | obexftp_sdp_unregister_sync() obexftp_sdp_unregister(OBEX_SYNC_SERVICE)

## Typedefs

typedef void(* | obexftp_info_cb_t) (int event, const char *buf, int len, void *data)
| ObexFTP message callback prototype. More...

## Enumerations

enum | { OBEXFTP_EV_ERRMSG, OBEXFTP_EV_OK, OBEXFTP_EV_ERR, OBEXFTP_EV_CONNECTING, OBEXFTP_EV_DISCONNECTING, OBEXFTP_EV_SENDING, OBEXFTP_EV_LISTENING, OBEXFTP_EV_CONNECTIND, OBEXFTP_EV_DISCONNECTIND, OBEXFTP_EV_RECEIVING, OBEXFTP_EV_BODY, OBEXFTP_EV_INFO, OBEXFTP_EV_PROGRESS }
| ObexFTP message callback events. More...

## Functions

char ** | obexftp_discover (int transport)
| Device discovery wrapper for a named transport. More...
char ** | obexftp_discover_bt_src (const char *src)
char * | obexftp_bt_name_src (const char *addr, const char *src)
int | obexftp_browse_bt_src (const char *src, const char *addr, int svclass)
int | obexftp_sdp_register (int svclass, int channel)
int | obexftp_sdp_unregister (int svclass)

## Detailed Description

Data structures and general functions for OBEX clients and servers.

ObexFTP library - language bindings for OBEX file transfer.

Copyright (c) 2002-2007 Christian W. Zuckschwerdt zany@.nosp@m.triq.nosp@m..net

ObexFTP is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with ObexFTP. If not, see http://www.gnu.org/.

## Macro Definition Documentation

## OBEX_FTP_SERVICE

#define OBEX_FTP_SERVICE 0x1106

## OBEX_PUSH_SERVICE

#define OBEX_PUSH_SERVICE 0x1105

## OBEX_SYNC_SERVICE

#define OBEX_SYNC_SERVICE 0x1104

## obexftp_browse_bt

#define obexftp_browse_bt | ( |  | device,
|  |  | service
| ) |  | obexftp_browse_bt_src(NULL, device, service)

## obexftp_browse_bt_ftp

#define obexftp_browse_bt_ftp | ( |  | device | ) | obexftp_browse_bt_src(NULL, device, OBEX_FTP_SERVICE)

## obexftp_browse_bt_push

#define obexftp_browse_bt_push | ( |  | device | ) | obexftp_browse_bt_src(NULL, device, OBEX_PUSH_SERVICE)

## obexftp_browse_bt_sync

#define obexftp_browse_bt_sync | ( |  | device | ) | obexftp_browse_bt_src(NULL, device, OBEX_SYNC_SERVICE)

## obexftp_bt_name

#define obexftp_bt_name | ( |  | addr | ) | obexftp_bt_name_src(addr, NULL)

## obexftp_discover_bt

#define obexftp_discover_bt | ( |  | ) | obexftp_discover_bt_src(NULL)

## obexftp_sdp_register_ftp

#define obexftp_sdp_register_ftp | ( |  | channel | ) | obexftp_sdp_register(OBEX_FTP_SERVICE, channel)

## obexftp_sdp_register_push

#define obexftp_sdp_register_push | ( |  | channel | ) | obexftp_sdp_register(OBEX_PUSH_SERVICE, channel)

## obexftp_sdp_register_sync

#define obexftp_sdp_register_sync | ( |  | channel | ) | obexftp_sdp_register(OBEX_SYNC_SERVICE, channel)

## obexftp_sdp_unregister_ftp

#define obexftp_sdp_unregister_ftp | ( |  | ) | obexftp_sdp_unregister(OBEX_FTP_SERVICE)

## obexftp_sdp_unregister_push

#define obexftp_sdp_unregister_push | ( |  | ) | obexftp_sdp_unregister(OBEX_PUSH_SERVICE)

## obexftp_sdp_unregister_sync

#define obexftp_sdp_unregister_sync | ( |  | ) | obexftp_sdp_unregister(OBEX_SYNC_SERVICE)

## STREAM_CHUNK

#define STREAM_CHUNK 4096

Number of bytes passed at one time to OBEX.

## Typedef Documentation

## obexftp_info_cb_t

typedef void(* obexftp_info_cb_t) (int event, const char *buf, int len, void *data)

ObexFTP message callback prototype.

## Enumeration Type Documentation

## anonymous enum

anonymous enum

ObexFTP message callback events.

Enumerator
OBEXFTP_EV_ERRMSG |
OBEXFTP_EV_OK |
OBEXFTP_EV_ERR |
OBEXFTP_EV_CONNECTING |
OBEXFTP_EV_DISCONNECTING |
OBEXFTP_EV_SENDING |
OBEXFTP_EV_LISTENING |
OBEXFTP_EV_CONNECTIND |
OBEXFTP_EV_DISCONNECTIND |
OBEXFTP_EV_RECEIVING |
OBEXFTP_EV_BODY |
OBEXFTP_EV_INFO |
OBEXFTP_EV_PROGRESS |

## Function Documentation

## obexftp_browse_bt_src()

int obexftp_browse_bt_src | ( | const char * | src,
|  | const char * | addr,
|  | int | svclass
| ) |  |

## obexftp_bt_name_src()

char* obexftp_bt_name_src | ( | const char * | addr,
|  | const char * | src
| ) |  |

## obexftp_discover()

char** obexftp_discover | ( | int | transport | ) |

Device discovery wrapper for a named transport.

Parameters

  transport | a transport from the OBEX_TRANS_x enum.

Returns
  the discovery results as array of strings.

Note
  USB and BT only for now.

## obexftp_discover_bt_src()

char** obexftp_discover_bt_src | ( | const char * | src | ) |

## obexftp_sdp_register()

int obexftp_sdp_register | ( | int | svclass,
|  | int | channel
| ) |  |

## obexftp_sdp_unregister()

int obexftp_sdp_unregister | ( | int | svclass | ) |