2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation; either version 2 of the
5 * License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * General Public License for more details.
12 * You should have received a copy of the GNU General Public
13 * License along with this program; if not, write to the
14 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
15 * Boston, MA 02110-1301 USA
17 * Authors: Travis Reitter <treitter@gmail.com>
25 #define MILK_TYPE_AUTH milk_auth_get_type()
27 #define MILK_AUTH(obj) \
28 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
29 MILK_TYPE_AUTH, MilkAuth))
31 #define MILK_AUTH_CLASS(klass) \
32 (G_TYPE_CHECK_CLASS_CAST ((klass), \
33 MILK_TYPE_AUTH, MilkAuthClass))
35 #define MILK_IS_AUTH(obj) \
36 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
39 #define MILK_IS_AUTH_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
43 #define MILK_AUTH_GET_CLASS(obj) \
44 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
45 MILK_TYPE_AUTH, MilkAuthClass))
47 typedef struct _MilkAuth MilkAuth;
48 typedef struct _MilkAuthClass MilkAuthClass;
49 typedef struct _MilkAuthPrivate MilkAuthPrivate;
54 MilkAuthPrivate *priv;
59 GObjectClass parent_class;
63 MILK_AUTH_STATE_DISCONNECTED,
64 MILK_AUTH_STATE_CONNECTED,
65 MILK_AUTH_STATE_SERVICE_UNAVAILABLE,
69 GType milk_auth_get_type (void);
72 MilkAuth* milk_auth_get_default (void);
73 void milk_auth_log_in (MilkAuth *auth);
74 MilkAuthState milk_auth_get_state (MilkAuth *auth);
75 GList* milk_auth_get_tasks (MilkAuth *auth,
76 const char *last_sync,
79 #endif /* _MILK_AUTH_H */