1 /*
2  * This program is free software; you can redistribute it and/or modify it
3  * under the terms of the GNU Lesser General Public License as published by
4  * the Free Software Foundation.
5  *
6  * This program is distributed in the hope that it will be useful, but
7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9  * for more details.
10  *
11  * You should have received a copy of the GNU Lesser General Public License
12  * along with this program; if not, see <http://www.gnu.org/licenses/>.
13  *
14  *
15  * Authors:
16  *		David Trowbridge <trowbrds@cs.colorado.edu>
17  *
18  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
19  *
20  */
21 
22 #ifndef URL_EDITOR_DIALOG_H
23 #define URL_EDITOR_DIALOG_H
24 
25 #include <gtk/gtk.h>
26 #include "publish-location.h"
27 
28 G_BEGIN_DECLS
29 
30 #define URL_EDITOR_DIALOG_TYPE            (url_editor_dialog_get_type ())
31 #define URL_EDITOR_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), URL_EDITOR_DIALOG_TYPE, UrlEditorDialog))
32 #define URL_EDITOR_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), URL_EDITOR_DIALOG_TYPE, UrlEditorDialogClass))
33 #define IS_URL_EDITOR_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), URL_EDITOR_DIALOG_TYPE))
34 #define IS_URL_EDITOR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), URL_EDITOR_DIALOG_TYPE))
35 
36 enum {
37 	URL_LIST_ENABLED_COLUMN,
38 	URL_LIST_LOCATION_COLUMN,
39 	URL_LIST_URL_COLUMN,
40 	URL_LIST_N_COLUMNS
41 };
42 
43 enum {
44 	TYPE_SFTP,
45 	TYPE_ANON_FTP,
46 	TYPE_FTP,
47 	TYPE_SMB,
48 	TYPE_DAV,
49 	TYPE_DAVS,
50 	TYPE_URI
51 };
52 
53 typedef struct _UrlEditorDialog UrlEditorDialog;
54 typedef struct _UrlEditorDialogClass UrlEditorDialogClass;
55 
56 struct _UrlEditorDialog {
57 	GtkDialog parent;
58 
59 	GtkTreeModel *url_list_model;
60 	EPublishUri *uri;
61 
62 	GtkBuilder *builder;
63 
64 	GtkWidget *type_selector;
65 	GtkWidget *fb_duration_label;
66 	GtkWidget *fb_duration_spin;
67 	GtkWidget *fb_duration_combo;
68 	GtkWidget *publish_frequency;
69 
70 	GtkWidget *events_swin;
71 
72 	GtkWidget *events_selector;
73 
74 	GtkWidget *publish_service;
75 	GtkWidget *server_entry;
76 	GtkWidget *file_entry;
77 
78 	GtkWidget *port_entry;
79 	GtkWidget *username_entry;
80 	GtkWidget *password_entry;
81 	GtkWidget *remember_pw;
82 
83 	GtkWidget *optional_label;
84 
85 	GtkWidget *port_hbox;
86 	GtkWidget *username_hbox;
87 	GtkWidget *password_hbox;
88 	GtkWidget *server_hbox;
89 	GtkWidget *file_hbox;
90 
91 	GtkWidget *port_label;
92 	GtkWidget *username_label;
93 	GtkWidget *password_label;
94 	GtkWidget *server_label;
95 	GtkWidget *file_label;
96 
97 	GtkWidget *ok;
98 	GtkWidget *cancel;
99 };
100 
101 struct _UrlEditorDialogClass {
102 	GtkDialogClass parent_class;
103 };
104 
105 GtkWidget *url_editor_dialog_new (GtkTreeModel *url_list_model, EPublishUri *uri);
106 GType      url_editor_dialog_get_type (void);
107 gboolean   url_editor_dialog_run (UrlEditorDialog *dialog);
108 
109 G_END_DECLS
110 
111 #endif /* _URL_EDITOR_DIALOG_H_ */
112