root/trunk/libtinymail-maemo/tny-maemo-conic-device.h

Revision 3072 (checked in by pvanhoof, 1 year ago)

Revert incorrect merge junk

Line 
1 #ifndef TNY_MAEMO_CONIC_DEVICE_H
2 #define TNY_MAEMO_CONIC_DEVICE_H
3
4 /* libtinymail-camel - The Tiny Mail base library for Camel
5  * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with self library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #include <glib.h>
24 #include <glib-object.h>
25
26 #include <tny-device.h>
27
28 /* this TnyMaemoConicDevice comes with three different implementations;
29  * one is chosen at configure time:
30  * 1) the real TnyMaemoConicDevice (tny-maemo-conic-device.c for use on real N800/N810)
31  * 2) a dummy  TnyMaemoConicDevice (tny-maemo-conic-dummy-device.c, for use in Scratchbox)
32  * 3) another dummy TnyMaemoConicDevice (tny-maemo-noconic-device.c. for use if
33  *    libconic is not available at all (such as in Ubuntu Embedded)
34  */
35
36 #ifdef LIBTINYMAIL_MAEMO_WITHOUT_CONIC
37 typedef struct {
38 } ConIcIap;
39 #else
40 #include <coniciap.h>
41 #endif /*LIBTINYMAIL_MAEMO_WITHOUT_CONIC*/
42
43 G_BEGIN_DECLS
44
45 #define TNY_TYPE_MAEMO_CONIC_DEVICE             (tny_maemo_conic_device_get_type ())
46 #define TNY_MAEMO_CONIC_DEVICE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_MAEMO_CONIC_DEVICE, TnyMaemoConicDevice))
47 #define TNY_MAEMO_CONIC_DEVICE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_MAEMO_CONIC_DEVICE, TnyMaemoConicDeviceClass))
48 #define TNY_IS_MAEMO_CONIC_DEVICE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_MAEMO_CONIC_DEVICE))
49 #define TNY_IS_MAEMO_CONIC_DEVICE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_MAEMO_CONIC_DEVICE))
50 #define TNY_MAEMO_CONIC_DEVICE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_MAEMO_CONIC_DEVICE, TnyMaemoConicDeviceClass))
51
52 /* This is an abstract type */
53
54 typedef struct _TnyMaemoConicDevice      TnyMaemoConicDevice;
55 typedef struct _TnyMaemoConicDeviceClass TnyMaemoConicDeviceClass;
56
57 struct _TnyMaemoConicDevice {
58         GObject parent;
59 };
60
61 struct _TnyMaemoConicDeviceClass {
62         GObjectClass parent;
63 };
64
65 typedef void (*TnyMaemoConicDeviceConnectCallback) (TnyMaemoConicDevice *self, const gchar* iap_id,
66                                                     gboolean canceled, GError *err, gpointer user_data);
67
68
69 GType tny_maemo_conic_device_get_type (void);
70 TnyDevice* tny_maemo_conic_device_new (void);
71
72 gboolean tny_maemo_conic_device_connect (TnyMaemoConicDevice *self, const gchar* iap_id, gboolean user_requested);
73 void tny_maemo_conic_device_connect_async (TnyMaemoConicDevice *self, const gchar* iap_id, gboolean user_requested, TnyMaemoConicDeviceConnectCallback callback, gpointer user_data);
74 gboolean tny_maemo_conic_device_disconnect (TnyMaemoConicDevice *self, const gchar* iap_id);
75 const gchar* tny_maemo_conic_device_get_current_iap_id (TnyMaemoConicDevice *self);
76 ConIcIap* tny_maemo_conic_device_get_iap (TnyMaemoConicDevice *self, const gchar *iap_id);
77 GSList* tny_maemo_conic_device_get_iap_list (TnyMaemoConicDevice *self);
78 void tny_maemo_conic_device_free_iap_list (TnyMaemoConicDevice *self, GSList* cnx_list);
79
80 G_END_DECLS
81
82 #endif
Note: See TracBrowser for help on using the browser.