00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _OBEX_CLIENT_INTERNALS_H_
00023 #define _OBEX_CLIENT_INTERNALS_H_
00024
00025 #include "obex_bluetooth.h"
00026 #include <openobex/obex.h>
00027
00028 #ifndef WIN32
00029 #include <termios.h>
00030 #include <sys/ioctl.h>
00031 #endif
00032
00033 #define STREAM_CHUNK 4096
00034
00035 typedef enum {
00036 SML_OBEX_VENDOR_UNKNOWN = 0,
00037 SML_OBEX_VENDOR_SAMSUNG = 1,
00038 } SmlTransportObexVendorType;
00039
00040 typedef enum {
00041 SML_TRANSPORT_OBEX_DATASTORE_UNKNOWN = 0,
00042 SML_TRANSPORT_OBEX_DATASTORE_CONTACT = 1,
00043 SML_TRANSPORT_OBEX_DATASTORE_EVENT = 2,
00044 SML_TRANSPORT_OBEX_DATASTORE_NOTE = 3,
00045 SML_TRANSPORT_OBEX_DATASTORE_TODO = 4,
00046 } SmlTransportObexDatastoreType;
00047
00048 typedef struct SmlTransportObexClientEnv {
00049 SmlTransportConnectionType type;
00050 SmlTransport *tsp;
00051 obex_t *obexhandle;
00052 uint32_t connection_id;
00053 char *path;
00054 unsigned int port;
00055 char *irda_service;
00056 char *at_command;
00057 char *manufacturer;
00058 char *model;
00059 GList *datastores;
00060
00061 int fd;
00062 int state;
00063 char *databuf;
00064 int *databuflen;
00065 int connected;
00066 #ifndef WIN32
00067 struct termios oldtio;
00068 #endif
00069 SmlBool busy;
00070 SmlBool error;
00071 SmlMimeType mimetype;
00072 SmlBool isDisconnected;
00073 } SmlTransportObexClientEnv;
00074
00075 SmlBool smlTransportObexClientNew(SmlTransport *tsp, SmlError **error);
00076
00077 #endif //_OBEX_CLIENT_INTERNALS_H_