00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
#ifndef BLUEOBEX_H
00014
#define BLUEOBEX_H
00015
00016
00017
00018
00019
00020
00021
00022
extern "C"
00023 {
00024
#include <openobex/obex.h>
00025 }
00026
00027
00028
00029
00030
00031
enum session_transport
00032 {
00033 TRANS_NONE,
00034 TRANS_TCP,
00035 TRANS_IRDA,
00036 TRANS_SERIAL
00037 };
00038
00039
00040
00041
00042
00043
enum session_operation
00044 {
00045 OPERATION_NONE,
00046 OPERATION_BACKUP,
00047 OPERATION_SEND
00048 };
00049
00050
00051
00052
00053
00054
enum session_target
00055 {
00056 TARGET_NONE,
00057 TARGET_PHONEBOOK,
00058 TARGET_CAL,
00059 TARGET_ALL
00060 };
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 struct BlueObex
00072 {
00073
int connected;
00074
bool client_done;
00075
enum session_transport transport;
00076
enum session_operation operation;
00077
enum session_target target;
00078
const char *filename;
00079 };
00080
00081
00082
00083
00084
00085
00086 obex_t* obexInit(
struct BlueObex *myObex,
int method,
const char *address,
int channel);
00087
00088
00089
00090
00091
00092
int obexConnect(obex_t *handle);
00093
00094
00095
00096
00097
00098
void obexEvent(obex_t *handle, obex_object_t *object,
int mode,
int event,
int obex_cmd,
int obex_rsp);
00099
00100
00101
00102
00103
00104
char* obexPutReadFile(
const char *filename,
int *length);
00105
00106
00107
00108
00109
00110
int obexPutfile(obex_t *handle,
struct BlueObex *s,
const char *name);
00111
00112
00113
00114
00115
00116
void syncwait(obex_t *handle);
00117
00118
00119
00120
00121
00122
void obexEventDone(obex_t *handle, obex_object_t *object,
int obex_cmd,
int obex_rsp);
00123
00124
00125
00126
00127
00128
int obexDisconnect(obex_t *handle);
00129
00130
00131
00132
#endif
00133
00134