libsyncml 0.5.4

- Main Page
- Modules
- Data Structures
- Files

- File List

obex_client_internals.h
1 /*
2 * libsyncml - A syncml protocol implementation
3 * Copyright (C) 2005 Armin Bauer <armin.bauer@opensync.org>
4 * Copyright (C) 2008 Michael Bell <michael.bell@opensync.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22 #ifndef _OBEX_CLIENT_INTERNALS_H_
23 #define _OBEX_CLIENT_INTERNALS_H_
24
25 #include "obex_bluetooth.h"
26 #include <openobex/obex.h>
27
28 #ifndef WIN32
29 #include <termios.h>
30 #include <sys/ioctl.h>
31 #endif
32
33 #define STREAM_CHUNK 4096
34
35 typedef enum {
36 SML_OBEX_VENDOR_UNKNOWN = 0,
37 SML_OBEX_VENDOR_SAMSUNG = 1,
38 } SmlTransportObexVendorType;
39
40 typedef enum {
41 SML_TRANSPORT_OBEX_DATASTORE_UNKNOWN = 0,
42 SML_TRANSPORT_OBEX_DATASTORE_CONTACT = 1,
43 SML_TRANSPORT_OBEX_DATASTORE_EVENT = 2,
44 SML_TRANSPORT_OBEX_DATASTORE_NOTE = 3,
45 SML_TRANSPORT_OBEX_DATASTORE_TODO = 4,
46 } SmlTransportObexDatastoreType;
47
48 typedef struct SmlTransportObexClientEnv {
49 SmlTransportConnectionType type;
50 SmlTransport *tsp;
51 obex_t *obexhandle;
52 uint32_t connection_id;
53 char *path;
54 unsigned int port;
55 char *irda_service;
56 char *at_command;
57 char *manufacturer;
58 char *model;
59 GList *datastores;
60
61 int fd;
62 int state;
63 char *databuf;
64 int *databuflen;
65 int connected;
66 #ifndef WIN32
67 struct termios oldtio;
68 #endif
69 SmlBool busy;
70 SmlBool error;
71 SmlMimeType mimetype;
72 SmlBool isDisconnected;
73 } SmlTransportObexClientEnv;
74
75 SmlBool smlTransportObexClientNew(SmlTransport *tsp, SmlError **error);
76
77 #endif //_OBEX_CLIENT_INTERNALS_H_