Update Italian translation
[glib.git] / gio / gmountoperation.h
blobf3155a5b35f64c134a95d5497010ae3e2d87cbde
1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2006-2007 Red Hat, Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General
16 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 * Author: Alexander Larsson <alexl@redhat.com>
21 #ifndef __G_MOUNT_OPERATION_H__
22 #define __G_MOUNT_OPERATION_H__
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
26 #endif
28 #include <gio/giotypes.h>
30 G_BEGIN_DECLS
32 #define G_TYPE_MOUNT_OPERATION (g_mount_operation_get_type ())
33 #define G_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MOUNT_OPERATION, GMountOperation))
34 #define G_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MOUNT_OPERATION, GMountOperationClass))
35 #define G_IS_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MOUNT_OPERATION))
36 #define G_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MOUNT_OPERATION))
37 #define G_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MOUNT_OPERATION, GMountOperationClass))
39 /**
40 * GMountOperation:
42 * Class for providing authentication methods for mounting operations,
43 * such as mounting a file locally, or authenticating with a server.
44 **/
45 typedef struct _GMountOperationClass GMountOperationClass;
46 typedef struct _GMountOperationPrivate GMountOperationPrivate;
48 struct _GMountOperation
50 GObject parent_instance;
52 GMountOperationPrivate *priv;
55 struct _GMountOperationClass
57 GObjectClass parent_class;
59 /* signals: */
61 void (* ask_password) (GMountOperation *op,
62 const char *message,
63 const char *default_user,
64 const char *default_domain,
65 GAskPasswordFlags flags);
67 void (* ask_question) (GMountOperation *op,
68 const char *message,
69 const char *choices[]);
71 void (* reply) (GMountOperation *op,
72 GMountOperationResult result);
74 void (* aborted) (GMountOperation *op);
76 void (* show_processes) (GMountOperation *op,
77 const gchar *message,
78 GArray *processes,
79 const gchar *choices[]);
81 void (* show_unmount_progress) (GMountOperation *op,
82 const gchar *message,
83 gint64 time_left,
84 gint64 bytes_left);
86 /*< private >*/
87 /* Padding for future expansion */
88 void (*_g_reserved1) (void);
89 void (*_g_reserved2) (void);
90 void (*_g_reserved3) (void);
91 void (*_g_reserved4) (void);
92 void (*_g_reserved5) (void);
93 void (*_g_reserved6) (void);
94 void (*_g_reserved7) (void);
95 void (*_g_reserved8) (void);
96 void (*_g_reserved9) (void);
99 GLIB_AVAILABLE_IN_ALL
100 GType g_mount_operation_get_type (void) G_GNUC_CONST;
101 GLIB_AVAILABLE_IN_ALL
102 GMountOperation * g_mount_operation_new (void);
104 GLIB_AVAILABLE_IN_ALL
105 const char * g_mount_operation_get_username (GMountOperation *op);
106 GLIB_AVAILABLE_IN_ALL
107 void g_mount_operation_set_username (GMountOperation *op,
108 const char *username);
109 GLIB_AVAILABLE_IN_ALL
110 const char * g_mount_operation_get_password (GMountOperation *op);
111 GLIB_AVAILABLE_IN_ALL
112 void g_mount_operation_set_password (GMountOperation *op,
113 const char *password);
114 GLIB_AVAILABLE_IN_ALL
115 gboolean g_mount_operation_get_anonymous (GMountOperation *op);
116 GLIB_AVAILABLE_IN_ALL
117 void g_mount_operation_set_anonymous (GMountOperation *op,
118 gboolean anonymous);
119 GLIB_AVAILABLE_IN_ALL
120 const char * g_mount_operation_get_domain (GMountOperation *op);
121 GLIB_AVAILABLE_IN_ALL
122 void g_mount_operation_set_domain (GMountOperation *op,
123 const char *domain);
124 GLIB_AVAILABLE_IN_ALL
125 GPasswordSave g_mount_operation_get_password_save (GMountOperation *op);
126 GLIB_AVAILABLE_IN_ALL
127 void g_mount_operation_set_password_save (GMountOperation *op,
128 GPasswordSave save);
129 GLIB_AVAILABLE_IN_ALL
130 int g_mount_operation_get_choice (GMountOperation *op);
131 GLIB_AVAILABLE_IN_ALL
132 void g_mount_operation_set_choice (GMountOperation *op,
133 int choice);
134 GLIB_AVAILABLE_IN_ALL
135 void g_mount_operation_reply (GMountOperation *op,
136 GMountOperationResult result);
138 G_END_DECLS
140 #endif /* __G_MOUNT_OPERATION_H__ */