1 /*
2  * Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 
20 #ifndef __LOGIN_DIALOG_H_
21 #define __LOGIN_DIALOG_H_
22 
23 #include <libgda-ui/libgda-ui.h>
24 #include <gtk/gtk.h>
25 
26 G_BEGIN_DECLS
27 
28 #define LOGIN_TYPE_DIALOG          (login_dialog_get_type())
29 #define LOGIN_DIALOG(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, login_dialog_get_type(), LoginDialog)
30 #define LOGIN_DIALOG_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, login_dialog_get_type (), LoginDialogClass)
31 #define LOGIN_IS_DIALOG(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, login_dialog_get_type ())
32 
33 typedef struct _LoginDialog LoginDialog;
34 typedef struct _LoginDialogClass LoginDialogClass;
35 typedef struct _LoginDialogPrivate LoginDialogPrivate;
Source(const ConnectionParameters & params)36 
37 /* error reporting */
38 extern GQuark login_dialog_error_quark (void);
39 #define LOGIN_DIALOG_ERROR login_dialog_error_quark ()
40 
41 typedef enum {
42 	LOGIN_DIALOG_CANCELLED_ERROR,
43 } LoginDialogError;
44 
45 /* struct for the object's data */
46 struct _LoginDialog
47 {
48 	GtkDialog                 object;
49 	LoginDialogPrivate       *priv;
50 };
51 
52 
~Source()53 /* struct for the object's class */
54 struct _LoginDialogClass
55 {
56 	GtkDialogClass          parent_class;
57 };
58 
59 GType               login_dialog_get_type          (void) G_GNUC_CONST;
60 LoginDialog        *login_dialog_new               (GtkWindow *parent);
61 GdaConnection      *login_dialog_run               (LoginDialog *dialog, gboolean retry, GError **error);
62 
getStationByStationId(const std::string & station_id)63 G_END_DECLS
64 
65 #endif
66