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.
#define | OBEX_SYNC_SERVICE 0x1104
#define | OBEX_PUSH_SERVICE 0x1105
#define | OBEX_FTP_SERVICE 0x1106
#define | obexftp_discover_bt()
#define | obexftp_bt_name(addr)
#define | obexftp_browse_bt(device, service)
#define | obexftp_browse_bt_ftp(device)
#define | obexftp_browse_bt_push(device)
#define | obexftp_browse_bt_sync(device)
#define | obexftp_sdp_register_ftp(channel)
#define | obexftp_sdp_register_push(channel)
#define | obexftp_sdp_register_sync(channel)
#define | obexftp_sdp_unregister_ftp()
#define | obexftp_sdp_unregister_push()
#define | obexftp_sdp_unregister_sync()

## Typedefs

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

## 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.
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 )

Value:
obexftp_browse_bt_src(NULL, device, service)
obexftp_browse_bt_src
int obexftp_browse_bt_src(const char *src, const char *addr, int svclass)
Definition client.c:1256

## obexftp_browse_bt_ftp

#define obexftp_browse_bt_ftp | ( |  | device | ) |

Value:
obexftp_browse_bt_src(NULL, device, OBEX_FTP_SERVICE)
OBEX_FTP_SERVICE
#define OBEX_FTP_SERVICE
Definition obexftp.h:60

## obexftp_browse_bt_push

#define obexftp_browse_bt_push | ( |  | device | ) |

Value:
obexftp_browse_bt_src(NULL, device, OBEX_PUSH_SERVICE)
OBEX_PUSH_SERVICE
#define OBEX_PUSH_SERVICE
Definition obexftp.h:59

## obexftp_browse_bt_sync

#define obexftp_browse_bt_sync | ( |  | device | ) |

Value:
obexftp_browse_bt_src(NULL, device, OBEX_SYNC_SERVICE)
OBEX_SYNC_SERVICE
#define OBEX_SYNC_SERVICE
Definition obexftp.h:58

## obexftp_bt_name

#define obexftp_bt_name | ( |  | addr | ) |

Value:
obexftp_bt_name_src(addr, NULL)
obexftp_bt_name_src
char * obexftp_bt_name_src(const char *addr, const char *src)
Definition client.c:1246

## obexftp_discover_bt

#define obexftp_discover_bt | ( |  | ) |

Value:
obexftp_discover_bt_src(NULL)
obexftp_discover_bt_src
char ** obexftp_discover_bt_src(const char *src)
Definition client.c:1236

## obexftp_sdp_register_ftp

#define obexftp_sdp_register_ftp | ( |  | channel | ) |

Value:
obexftp_sdp_register(OBEX_FTP_SERVICE, channel)
obexftp_sdp_register
int obexftp_sdp_register(int svclass, int channel)
Definition client.c:1266

## obexftp_sdp_register_push

#define obexftp_sdp_register_push | ( |  | channel | ) |

Value:
obexftp_sdp_register(OBEX_PUSH_SERVICE, channel)

## obexftp_sdp_register_sync

#define obexftp_sdp_register_sync | ( |  | channel | ) |

Value:
obexftp_sdp_register(OBEX_SYNC_SERVICE, channel)

## obexftp_sdp_unregister_ftp

#define obexftp_sdp_unregister_ftp | ( |  | ) |

Value:
obexftp_sdp_unregister(OBEX_FTP_SERVICE)
obexftp_sdp_unregister
int obexftp_sdp_unregister(int svclass)
Definition client.c:1276

## obexftp_sdp_unregister_push

#define obexftp_sdp_unregister_push | ( |  | ) |

Value:
obexftp_sdp_unregister(OBEX_PUSH_SERVICE)

## obexftp_sdp_unregister_sync

#define obexftp_sdp_unregister_sync | ( |  | ) |

Value:
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 | ) |