Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:58

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright (C) 2006-2007 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: Alexander Larsson <alexl@redhat.com>
0021  */
0022 
0023 #ifndef __G_MOUNT_OPERATION_H__
0024 #define __G_MOUNT_OPERATION_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_MOUNT_OPERATION         (g_mount_operation_get_type ())
0035 #define G_MOUNT_OPERATION(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_MOUNT_OPERATION, GMountOperation))
0036 #define G_MOUNT_OPERATION_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_MOUNT_OPERATION, GMountOperationClass))
0037 #define G_IS_MOUNT_OPERATION(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_MOUNT_OPERATION))
0038 #define G_IS_MOUNT_OPERATION_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_MOUNT_OPERATION))
0039 #define G_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_MOUNT_OPERATION, GMountOperationClass))
0040 
0041 typedef struct _GMountOperationClass   GMountOperationClass;
0042 typedef struct _GMountOperationPrivate GMountOperationPrivate;
0043 
0044 struct _GMountOperation
0045 {
0046   GObject parent_instance;
0047 
0048   GMountOperationPrivate *priv;
0049 };
0050 
0051 struct _GMountOperationClass
0052 {
0053   GObjectClass parent_class;
0054 
0055   /* signals: */
0056 
0057   void (* ask_password) (GMountOperation       *op,
0058              const char            *message,
0059              const char            *default_user,
0060              const char            *default_domain,
0061              GAskPasswordFlags      flags);
0062 
0063   /**
0064    * GMountOperationClass::ask_question:
0065    * @op: a #GMountOperation
0066    * @message: string containing a message to display to the user
0067    * @choices: (array zero-terminated=1) (element-type utf8): an array of
0068    *    strings for each possible choice
0069    *
0070    * Virtual implementation of #GMountOperation::ask-question.
0071    */
0072   void (* ask_question) (GMountOperation       *op,
0073              const char            *message,
0074              const char            *choices[]);
0075 
0076   void (* reply)        (GMountOperation       *op,
0077              GMountOperationResult  result);
0078 
0079   void (* aborted)      (GMountOperation       *op);
0080 
0081   /**
0082    * GMountOperationClass::show_processes:
0083    * @op: a #GMountOperation
0084    * @message: string containing a message to display to the user
0085    * @processes: (element-type GPid): an array of #GPid for processes blocking
0086    *    the operation
0087    * @choices: (array zero-terminated=1) (element-type utf8): an array of
0088    *    strings for each possible choice
0089    *
0090    * Virtual implementation of #GMountOperation::show-processes.
0091    *
0092    * Since: 2.22
0093    */
0094   void (* show_processes) (GMountOperation      *op,
0095                            const gchar          *message,
0096                            GArray               *processes,
0097                            const gchar          *choices[]);
0098 
0099   void (* show_unmount_progress) (GMountOperation *op,
0100                                   const gchar     *message,
0101                                   gint64           time_left,
0102                                   gint64           bytes_left);
0103 
0104   /*< private >*/
0105   /* Padding for future expansion */
0106   void (*_g_reserved1) (void);
0107   void (*_g_reserved2) (void);
0108   void (*_g_reserved3) (void);
0109   void (*_g_reserved4) (void);
0110   void (*_g_reserved5) (void);
0111   void (*_g_reserved6) (void);
0112   void (*_g_reserved7) (void);
0113   void (*_g_reserved8) (void);
0114   void (*_g_reserved9) (void);
0115 };
0116 
0117 GIO_AVAILABLE_IN_ALL
0118 GType             g_mount_operation_get_type      (void) G_GNUC_CONST;
0119 GIO_AVAILABLE_IN_ALL
0120 GMountOperation * g_mount_operation_new           (void);
0121 
0122 GIO_AVAILABLE_IN_ALL
0123 const char *  g_mount_operation_get_username      (GMountOperation *op);
0124 GIO_AVAILABLE_IN_ALL
0125 void          g_mount_operation_set_username      (GMountOperation *op,
0126                            const char      *username);
0127 GIO_AVAILABLE_IN_ALL
0128 const char *  g_mount_operation_get_password      (GMountOperation *op);
0129 GIO_AVAILABLE_IN_ALL
0130 void          g_mount_operation_set_password      (GMountOperation *op,
0131                            const char      *password);
0132 GIO_AVAILABLE_IN_ALL
0133 gboolean      g_mount_operation_get_anonymous     (GMountOperation *op);
0134 GIO_AVAILABLE_IN_ALL
0135 void          g_mount_operation_set_anonymous     (GMountOperation *op,
0136                            gboolean         anonymous);
0137 GIO_AVAILABLE_IN_ALL
0138 const char *  g_mount_operation_get_domain        (GMountOperation *op);
0139 GIO_AVAILABLE_IN_ALL
0140 void          g_mount_operation_set_domain        (GMountOperation *op,
0141                            const char      *domain);
0142 GIO_AVAILABLE_IN_ALL
0143 GPasswordSave g_mount_operation_get_password_save (GMountOperation *op);
0144 GIO_AVAILABLE_IN_ALL
0145 void          g_mount_operation_set_password_save (GMountOperation *op,
0146                            GPasswordSave    save);
0147 GIO_AVAILABLE_IN_ALL
0148 int           g_mount_operation_get_choice        (GMountOperation *op);
0149 GIO_AVAILABLE_IN_ALL
0150 void          g_mount_operation_set_choice        (GMountOperation *op,
0151                            int              choice);
0152 GIO_AVAILABLE_IN_ALL
0153 void          g_mount_operation_reply             (GMountOperation *op,
0154                            GMountOperationResult result);
0155 GIO_AVAILABLE_IN_2_58
0156 gboolean      g_mount_operation_get_is_tcrypt_hidden_volume (GMountOperation *op);
0157 GIO_AVAILABLE_IN_2_58
0158 void          g_mount_operation_set_is_tcrypt_hidden_volume (GMountOperation *op,
0159                                                              gboolean hidden_volume);
0160 GIO_AVAILABLE_IN_2_58
0161 gboolean      g_mount_operation_get_is_tcrypt_system_volume (GMountOperation *op);
0162 GIO_AVAILABLE_IN_2_58
0163 void          g_mount_operation_set_is_tcrypt_system_volume (GMountOperation *op,
0164                                                              gboolean system_volume);
0165 GIO_AVAILABLE_IN_2_58
0166 guint  g_mount_operation_get_pim           (GMountOperation *op);
0167 GIO_AVAILABLE_IN_2_58
0168 void          g_mount_operation_set_pim           (GMountOperation *op,
0169                                                    guint pim);
0170 
0171 G_END_DECLS
0172 
0173 #endif /* __G_MOUNT_OPERATION_H__ */