Do not expand autoptr macros when running introspection
[glib.git] / gio / gmountoperation.h
blob24b96e002a73df26308da0dd5a04487b8aedef3e
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.1 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 /**
68 * GMountOperationClass::ask_question:
69 * @op:
70 * @message:
71 * @choices: (array zero-terminated=1) (element-type utf8):
73 void (* ask_question) (GMountOperation *op,
74 const char *message,
75 const char *choices[]);
77 void (* reply) (GMountOperation *op,
78 GMountOperationResult result);
80 void (* aborted) (GMountOperation *op);
82 /**
83 * GMountOperationClass::show_processes:
84 * @op:
85 * @message:
86 * @processes: (element-type GPid):
87 * @choices: (array zero-terminated=1) (element-type utf8):
89 * Since: 2.22
91 void (* show_processes) (GMountOperation *op,
92 const gchar *message,
93 GArray *processes,
94 const gchar *choices[]);
96 void (* show_unmount_progress) (GMountOperation *op,
97 const gchar *message,
98 gint64 time_left,
99 gint64 bytes_left);
101 /*< private >*/
102 /* Padding for future expansion */
103 void (*_g_reserved1) (void);
104 void (*_g_reserved2) (void);
105 void (*_g_reserved3) (void);
106 void (*_g_reserved4) (void);
107 void (*_g_reserved5) (void);
108 void (*_g_reserved6) (void);
109 void (*_g_reserved7) (void);
110 void (*_g_reserved8) (void);
111 void (*_g_reserved9) (void);
114 GLIB_AVAILABLE_IN_ALL
115 GType g_mount_operation_get_type (void) G_GNUC_CONST;
116 GLIB_AVAILABLE_IN_ALL
117 GMountOperation * g_mount_operation_new (void);
119 GLIB_AVAILABLE_IN_ALL
120 const char * g_mount_operation_get_username (GMountOperation *op);
121 GLIB_AVAILABLE_IN_ALL
122 void g_mount_operation_set_username (GMountOperation *op,
123 const char *username);
124 GLIB_AVAILABLE_IN_ALL
125 const char * g_mount_operation_get_password (GMountOperation *op);
126 GLIB_AVAILABLE_IN_ALL
127 void g_mount_operation_set_password (GMountOperation *op,
128 const char *password);
129 GLIB_AVAILABLE_IN_ALL
130 gboolean g_mount_operation_get_anonymous (GMountOperation *op);
131 GLIB_AVAILABLE_IN_ALL
132 void g_mount_operation_set_anonymous (GMountOperation *op,
133 gboolean anonymous);
134 GLIB_AVAILABLE_IN_ALL
135 const char * g_mount_operation_get_domain (GMountOperation *op);
136 GLIB_AVAILABLE_IN_ALL
137 void g_mount_operation_set_domain (GMountOperation *op,
138 const char *domain);
139 GLIB_AVAILABLE_IN_ALL
140 GPasswordSave g_mount_operation_get_password_save (GMountOperation *op);
141 GLIB_AVAILABLE_IN_ALL
142 void g_mount_operation_set_password_save (GMountOperation *op,
143 GPasswordSave save);
144 GLIB_AVAILABLE_IN_ALL
145 int g_mount_operation_get_choice (GMountOperation *op);
146 GLIB_AVAILABLE_IN_ALL
147 void g_mount_operation_set_choice (GMountOperation *op,
148 int choice);
149 GLIB_AVAILABLE_IN_ALL
150 void g_mount_operation_reply (GMountOperation *op,
151 GMountOperationResult result);
153 G_END_DECLS
155 #endif /* __G_MOUNT_OPERATION_H__ */