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>
25 #include "gmountoperation.h"
26 #include "gioenumtypes.h"
31 * SECTION:gmountoperation
32 * @short_description: Object used for authentication and user interaction
35 * #GMountOperation provides a mechanism for interacting with the user.
36 * It can be used for authenticating mountable operations, such as loop
37 * mounting files, hard drive partitions or server locations. It can
38 * also be used to ask the user questions or show a list of applications
39 * preventing unmount or eject operations from completing.
41 * Note that #GMountOperation is used for more than just #GMount
42 * objects – for example it is also used in g_drive_start() and
45 * Users should instantiate a subclass of this that implements all the
46 * various callbacks to show the required dialogs, such as
47 * #GtkMountOperation. If no user interaction is desired (for example
48 * when automounting filesystems at login time), usually %NULL can be
49 * passed, see each method taking a #GMountOperation for details.
51 * The term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’.
52 * [TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for
53 * encrypting file containers, partitions or whole disks, typically used with Windows.
54 * [VeraCrypt](https://www.veracrypt.fr/) is a maintained fork of TrueCrypt with various
55 * improvements and auditing fixes.
64 SHOW_UNMOUNT_PROGRESS
,
68 static guint signals
[LAST_SIGNAL
] = { 0 };
70 struct _GMountOperationPrivate
{
75 GPasswordSave password_save
;
77 gboolean hidden_volume
;
78 gboolean system_volume
;
90 PROP_IS_TCRYPT_HIDDEN_VOLUME
,
91 PROP_IS_TCRYPT_SYSTEM_VOLUME
,
95 G_DEFINE_TYPE_WITH_PRIVATE (GMountOperation
, g_mount_operation
, G_TYPE_OBJECT
)
98 g_mount_operation_set_property (GObject
*object
,
103 GMountOperation
*operation
;
105 operation
= G_MOUNT_OPERATION (object
);
110 g_mount_operation_set_username (operation
,
111 g_value_get_string (value
));
115 g_mount_operation_set_password (operation
,
116 g_value_get_string (value
));
120 g_mount_operation_set_anonymous (operation
,
121 g_value_get_boolean (value
));
125 g_mount_operation_set_domain (operation
,
126 g_value_get_string (value
));
129 case PROP_PASSWORD_SAVE
:
130 g_mount_operation_set_password_save (operation
,
131 g_value_get_enum (value
));
135 g_mount_operation_set_choice (operation
,
136 g_value_get_int (value
));
139 case PROP_IS_TCRYPT_HIDDEN_VOLUME
:
140 g_mount_operation_set_is_tcrypt_hidden_volume (operation
,
141 g_value_get_boolean (value
));
144 case PROP_IS_TCRYPT_SYSTEM_VOLUME
:
145 g_mount_operation_set_is_tcrypt_system_volume (operation
,
146 g_value_get_boolean (value
));
150 g_mount_operation_set_pim (operation
,
151 g_value_get_uint (value
));
155 G_OBJECT_WARN_INVALID_PROPERTY_ID (object
, prop_id
, pspec
);
162 g_mount_operation_get_property (GObject
*object
,
167 GMountOperation
*operation
;
168 GMountOperationPrivate
*priv
;
170 operation
= G_MOUNT_OPERATION (object
);
171 priv
= operation
->priv
;
176 g_value_set_string (value
, priv
->user
);
180 g_value_set_string (value
, priv
->password
);
184 g_value_set_boolean (value
, priv
->anonymous
);
188 g_value_set_string (value
, priv
->domain
);
191 case PROP_PASSWORD_SAVE
:
192 g_value_set_enum (value
, priv
->password_save
);
196 g_value_set_int (value
, priv
->choice
);
199 case PROP_IS_TCRYPT_HIDDEN_VOLUME
:
200 g_value_set_boolean (value
, priv
->hidden_volume
);
203 case PROP_IS_TCRYPT_SYSTEM_VOLUME
:
204 g_value_set_boolean (value
, priv
->system_volume
);
208 g_value_set_uint (value
, priv
->pim
);
212 G_OBJECT_WARN_INVALID_PROPERTY_ID (object
, prop_id
, pspec
);
219 g_mount_operation_finalize (GObject
*object
)
221 GMountOperation
*operation
;
222 GMountOperationPrivate
*priv
;
224 operation
= G_MOUNT_OPERATION (object
);
226 priv
= operation
->priv
;
228 g_free (priv
->password
);
230 g_free (priv
->domain
);
232 G_OBJECT_CLASS (g_mount_operation_parent_class
)->finalize (object
);
236 reply_non_handled_in_idle (gpointer data
)
238 GMountOperation
*op
= data
;
240 g_mount_operation_reply (op
, G_MOUNT_OPERATION_UNHANDLED
);
241 return G_SOURCE_REMOVE
;
245 ask_password (GMountOperation
*op
,
247 const char *default_user
,
248 const char *default_domain
,
249 GAskPasswordFlags flags
)
251 g_idle_add_full (G_PRIORITY_DEFAULT_IDLE
,
252 reply_non_handled_in_idle
,
258 ask_question (GMountOperation
*op
,
260 const char *choices
[])
262 g_idle_add_full (G_PRIORITY_DEFAULT_IDLE
,
263 reply_non_handled_in_idle
,
269 show_processes (GMountOperation
*op
,
270 const gchar
*message
,
272 const gchar
*choices
[])
274 g_idle_add_full (G_PRIORITY_DEFAULT_IDLE
,
275 reply_non_handled_in_idle
,
281 show_unmount_progress (GMountOperation
*op
,
282 const gchar
*message
,
290 g_mount_operation_class_init (GMountOperationClass
*klass
)
292 GObjectClass
*object_class
;
294 object_class
= G_OBJECT_CLASS (klass
);
295 object_class
->finalize
= g_mount_operation_finalize
;
296 object_class
->get_property
= g_mount_operation_get_property
;
297 object_class
->set_property
= g_mount_operation_set_property
;
299 klass
->ask_password
= ask_password
;
300 klass
->ask_question
= ask_question
;
301 klass
->show_processes
= show_processes
;
302 klass
->show_unmount_progress
= show_unmount_progress
;
305 * GMountOperation::ask-password:
306 * @op: a #GMountOperation requesting a password.
307 * @message: string containing a message to display to the user.
308 * @default_user: string containing the default user name.
309 * @default_domain: string containing the default domain.
310 * @flags: a set of #GAskPasswordFlags.
312 * Emitted when a mount operation asks the user for a password.
314 * If the message contains a line break, the first line should be
315 * presented as a heading. For example, it may be used as the
316 * primary text in a #GtkMessageDialog.
318 signals
[ASK_PASSWORD
] =
319 g_signal_new (I_("ask-password"),
320 G_TYPE_FROM_CLASS (object_class
),
322 G_STRUCT_OFFSET (GMountOperationClass
, ask_password
),
326 G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_ASK_PASSWORD_FLAGS
);
329 * GMountOperation::ask-question:
330 * @op: a #GMountOperation asking a question.
331 * @message: string containing a message to display to the user.
332 * @choices: an array of strings for each possible choice.
334 * Emitted when asking the user a question and gives a list of
335 * choices for the user to choose from.
337 * If the message contains a line break, the first line should be
338 * presented as a heading. For example, it may be used as the
339 * primary text in a #GtkMessageDialog.
341 signals
[ASK_QUESTION
] =
342 g_signal_new (I_("ask-question"),
343 G_TYPE_FROM_CLASS (object_class
),
345 G_STRUCT_OFFSET (GMountOperationClass
, ask_question
),
349 G_TYPE_STRING
, G_TYPE_STRV
);
352 * GMountOperation::reply:
353 * @op: a #GMountOperation.
354 * @result: a #GMountOperationResult indicating how the request was handled
356 * Emitted when the user has replied to the mount operation.
359 g_signal_new (I_("reply"),
360 G_TYPE_FROM_CLASS (object_class
),
362 G_STRUCT_OFFSET (GMountOperationClass
, reply
),
364 g_cclosure_marshal_VOID__ENUM
,
366 G_TYPE_MOUNT_OPERATION_RESULT
);
369 * GMountOperation::aborted:
371 * Emitted by the backend when e.g. a device becomes unavailable
372 * while a mount operation is in progress.
374 * Implementations of GMountOperation should handle this signal
375 * by dismissing open password dialogs.
380 g_signal_new (I_("aborted"),
381 G_TYPE_FROM_CLASS (object_class
),
383 G_STRUCT_OFFSET (GMountOperationClass
, aborted
),
385 g_cclosure_marshal_VOID__VOID
,
389 * GMountOperation::show-processes:
390 * @op: a #GMountOperation.
391 * @message: string containing a message to display to the user.
392 * @processes: (element-type GPid): an array of #GPid for processes
393 * blocking the operation.
394 * @choices: an array of strings for each possible choice.
396 * Emitted when one or more processes are blocking an operation
397 * e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
399 * Note that this signal may be emitted several times to update the
400 * list of blocking processes as processes close files. The
401 * application should only respond with g_mount_operation_reply() to
402 * the latest signal (setting #GMountOperation:choice to the choice
405 * If the message contains a line break, the first line should be
406 * presented as a heading. For example, it may be used as the
407 * primary text in a #GtkMessageDialog.
411 signals
[SHOW_PROCESSES
] =
412 g_signal_new (I_("show-processes"),
413 G_TYPE_FROM_CLASS (object_class
),
415 G_STRUCT_OFFSET (GMountOperationClass
, show_processes
),
419 G_TYPE_STRING
, G_TYPE_ARRAY
, G_TYPE_STRV
);
422 * GMountOperation::show-unmount-progress:
423 * @op: a #GMountOperation:
424 * @message: string containing a mesage to display to the user
425 * @time_left: the estimated time left before the operation completes,
426 * in microseconds, or -1
427 * @bytes_left: the amount of bytes to be written before the operation
428 * completes (or -1 if such amount is not known), or zero if the operation
431 * Emitted when an unmount operation has been busy for more than some time
432 * (typically 1.5 seconds).
434 * When unmounting or ejecting a volume, the kernel might need to flush
435 * pending data in its buffers to the volume stable storage, and this operation
436 * can take a considerable amount of time. This signal may be emitted several
437 * times as long as the unmount operation is outstanding, and then one
438 * last time when the operation is completed, with @bytes_left set to zero.
440 * Implementations of GMountOperation should handle this signal by
441 * showing an UI notification, and then dismiss it, or show another notification
442 * of completion, when @bytes_left reaches zero.
444 * If the message contains a line break, the first line should be
445 * presented as a heading. For example, it may be used as the
446 * primary text in a #GtkMessageDialog.
450 signals
[SHOW_UNMOUNT_PROGRESS
] =
451 g_signal_new (I_("show-unmount-progress"),
452 G_TYPE_FROM_CLASS (object_class
),
454 G_STRUCT_OFFSET (GMountOperationClass
, show_unmount_progress
),
457 G_TYPE_STRING
, G_TYPE_INT64
, G_TYPE_INT64
);
460 * GMountOperation:username:
462 * The user name that is used for authentication when carrying out
463 * the mount operation.
465 g_object_class_install_property (object_class
,
467 g_param_spec_string ("username",
472 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
475 * GMountOperation:password:
477 * The password that is used for authentication when carrying out
478 * the mount operation.
480 g_object_class_install_property (object_class
,
482 g_param_spec_string ("password",
487 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
490 * GMountOperation:anonymous:
492 * Whether to use an anonymous user when authenticating.
494 g_object_class_install_property (object_class
,
496 g_param_spec_boolean ("anonymous",
498 P_("Whether to use an anonymous user"),
501 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
504 * GMountOperation:domain:
506 * The domain to use for the mount operation.
508 g_object_class_install_property (object_class
,
510 g_param_spec_string ("domain",
512 P_("The domain of the mount operation"),
515 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
518 * GMountOperation:password-save:
520 * Determines if and how the password information should be saved.
522 g_object_class_install_property (object_class
,
524 g_param_spec_enum ("password-save",
526 P_("How passwords should be saved"),
527 G_TYPE_PASSWORD_SAVE
,
528 G_PASSWORD_SAVE_NEVER
,
530 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
533 * GMountOperation:choice:
535 * The index of the user's choice when a question is asked during the
536 * mount operation. See the #GMountOperation::ask-question signal.
538 g_object_class_install_property (object_class
,
540 g_param_spec_int ("choice",
542 P_("The users choice"),
545 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
548 * GMountOperation:is-tcrypt-hidden-volume:
550 * Whether the device to be unlocked is a TCRYPT hidden volume.
551 * See https://www.veracrypt.fr/en/Hidden%20Volume.html.
555 g_object_class_install_property (object_class
,
556 PROP_IS_TCRYPT_HIDDEN_VOLUME
,
557 g_param_spec_boolean ("is-tcrypt-hidden-volume",
558 P_("TCRYPT Hidden Volume"),
559 P_("Whether to unlock a TCRYPT hidden volume. See https://www.veracrypt.fr/en/Hidden%20Volume.html."),
562 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
565 * GMountOperation:is-tcrypt-system-volume:
567 * Whether the device to be unlocked is a TCRYPT system volume.
568 * In this context, a system volume is a volume with a bootloader
569 * and operating system installed. This is only supported for Windows
570 * operating systems. For further documentation, see
571 * https://www.veracrypt.fr/en/System%20Encryption.html.
575 g_object_class_install_property (object_class
,
576 PROP_IS_TCRYPT_SYSTEM_VOLUME
,
577 g_param_spec_boolean ("is-tcrypt-system-volume",
578 P_("TCRYPT System Volume"),
579 P_("Whether to unlock a TCRYPT system volume. Only supported for unlocking Windows system volumes. See https://www.veracrypt.fr/en/System%20Encryption.html."),
582 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
585 * GMountOperation:pim:
587 * The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See
588 * https://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20(PIM).html.
592 g_object_class_install_property (object_class
,
594 g_param_spec_uint ("pim",
596 P_("The VeraCrypt PIM value"),
599 G_PARAM_STATIC_NAME
|G_PARAM_STATIC_NICK
|G_PARAM_STATIC_BLURB
));
603 g_mount_operation_init (GMountOperation
*operation
)
605 operation
->priv
= g_mount_operation_get_instance_private (operation
);
609 * g_mount_operation_new:
611 * Creates a new mount operation.
613 * Returns: a #GMountOperation.
616 g_mount_operation_new (void)
618 return g_object_new (G_TYPE_MOUNT_OPERATION
, NULL
);
622 * g_mount_operation_get_username:
623 * @op: a #GMountOperation.
625 * Get the user name from the mount operation.
627 * Returns: a string containing the user name.
630 g_mount_operation_get_username (GMountOperation
*op
)
632 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), NULL
);
633 return op
->priv
->user
;
637 * g_mount_operation_set_username:
638 * @op: a #GMountOperation.
639 * @username: input username.
641 * Sets the user name within @op to @username.
644 g_mount_operation_set_username (GMountOperation
*op
,
645 const char *username
)
647 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
648 g_free (op
->priv
->user
);
649 op
->priv
->user
= g_strdup (username
);
650 g_object_notify (G_OBJECT (op
), "username");
654 * g_mount_operation_get_password:
655 * @op: a #GMountOperation.
657 * Gets a password from the mount operation.
659 * Returns: a string containing the password within @op.
662 g_mount_operation_get_password (GMountOperation
*op
)
664 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), NULL
);
665 return op
->priv
->password
;
669 * g_mount_operation_set_password:
670 * @op: a #GMountOperation.
671 * @password: password to set.
673 * Sets the mount operation's password to @password.
677 g_mount_operation_set_password (GMountOperation
*op
,
678 const char *password
)
680 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
681 g_free (op
->priv
->password
);
682 op
->priv
->password
= g_strdup (password
);
683 g_object_notify (G_OBJECT (op
), "password");
687 * g_mount_operation_get_anonymous:
688 * @op: a #GMountOperation.
690 * Check to see whether the mount operation is being used
691 * for an anonymous user.
693 * Returns: %TRUE if mount operation is anonymous.
696 g_mount_operation_get_anonymous (GMountOperation
*op
)
698 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), FALSE
);
699 return op
->priv
->anonymous
;
703 * g_mount_operation_set_anonymous:
704 * @op: a #GMountOperation.
705 * @anonymous: boolean value.
707 * Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
710 g_mount_operation_set_anonymous (GMountOperation
*op
,
713 GMountOperationPrivate
*priv
;
714 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
717 if (priv
->anonymous
!= anonymous
)
719 priv
->anonymous
= anonymous
;
720 g_object_notify (G_OBJECT (op
), "anonymous");
725 * g_mount_operation_get_domain:
726 * @op: a #GMountOperation.
728 * Gets the domain of the mount operation.
730 * Returns: a string set to the domain.
733 g_mount_operation_get_domain (GMountOperation
*op
)
735 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), NULL
);
736 return op
->priv
->domain
;
740 * g_mount_operation_set_domain:
741 * @op: a #GMountOperation.
742 * @domain: the domain to set.
744 * Sets the mount operation's domain.
747 g_mount_operation_set_domain (GMountOperation
*op
,
750 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
751 g_free (op
->priv
->domain
);
752 op
->priv
->domain
= g_strdup (domain
);
753 g_object_notify (G_OBJECT (op
), "domain");
757 * g_mount_operation_get_password_save:
758 * @op: a #GMountOperation.
760 * Gets the state of saving passwords for the mount operation.
762 * Returns: a #GPasswordSave flag.
766 g_mount_operation_get_password_save (GMountOperation
*op
)
768 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), G_PASSWORD_SAVE_NEVER
);
769 return op
->priv
->password_save
;
773 * g_mount_operation_set_password_save:
774 * @op: a #GMountOperation.
775 * @save: a set of #GPasswordSave flags.
777 * Sets the state of saving passwords for the mount operation.
781 g_mount_operation_set_password_save (GMountOperation
*op
,
784 GMountOperationPrivate
*priv
;
785 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
788 if (priv
->password_save
!= save
)
790 priv
->password_save
= save
;
791 g_object_notify (G_OBJECT (op
), "password-save");
796 * g_mount_operation_get_choice:
797 * @op: a #GMountOperation.
799 * Gets a choice from the mount operation.
801 * Returns: an integer containing an index of the user's choice from
802 * the choice's list, or %0.
805 g_mount_operation_get_choice (GMountOperation
*op
)
807 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), 0);
808 return op
->priv
->choice
;
812 * g_mount_operation_set_choice:
813 * @op: a #GMountOperation.
814 * @choice: an integer.
816 * Sets a default choice for the mount operation.
819 g_mount_operation_set_choice (GMountOperation
*op
,
822 GMountOperationPrivate
*priv
;
823 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
825 if (priv
->choice
!= choice
)
827 priv
->choice
= choice
;
828 g_object_notify (G_OBJECT (op
), "choice");
833 * g_mount_operation_get_is_tcrypt_hidden_volume:
834 * @op: a #GMountOperation.
836 * Check to see whether the mount operation is being used
837 * for a TCRYPT hidden volume.
839 * Returns: %TRUE if mount operation is for hidden volume.
844 g_mount_operation_get_is_tcrypt_hidden_volume (GMountOperation
*op
)
846 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), FALSE
);
847 return op
->priv
->hidden_volume
;
851 * g_mount_operation_set_is_tcrypt_hidden_volume:
852 * @op: a #GMountOperation.
853 * @hidden_volume: boolean value.
855 * Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE.
860 g_mount_operation_set_is_tcrypt_hidden_volume (GMountOperation
*op
,
861 gboolean hidden_volume
)
863 GMountOperationPrivate
*priv
;
864 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
867 if (priv
->hidden_volume
!= hidden_volume
)
869 priv
->hidden_volume
= hidden_volume
;
870 g_object_notify (G_OBJECT (op
), "is-tcrypt-hidden-volume");
875 * g_mount_operation_get_is_tcrypt_system_volume:
876 * @op: a #GMountOperation.
878 * Check to see whether the mount operation is being used
879 * for a TCRYPT system volume.
881 * Returns: %TRUE if mount operation is for system volume.
886 g_mount_operation_get_is_tcrypt_system_volume (GMountOperation
*op
)
888 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), FALSE
);
889 return op
->priv
->system_volume
;
893 * g_mount_operation_set_is_tcrypt_system_volume:
894 * @op: a #GMountOperation.
895 * @system_volume: boolean value.
897 * Sets the mount operation to use a system volume if @system_volume is %TRUE.
902 g_mount_operation_set_is_tcrypt_system_volume (GMountOperation
*op
,
903 gboolean system_volume
)
905 GMountOperationPrivate
*priv
;
906 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
909 if (priv
->system_volume
!= system_volume
)
911 priv
->system_volume
= system_volume
;
912 g_object_notify (G_OBJECT (op
), "is-tcrypt-system-volume");
917 * g_mount_operation_get_pim:
918 * @op: a #GMountOperation.
920 * Gets a PIM from the mount operation.
922 * Returns: The VeraCrypt PIM within @op.
927 g_mount_operation_get_pim (GMountOperation
*op
)
929 g_return_val_if_fail (G_IS_MOUNT_OPERATION (op
), 0);
930 return op
->priv
->pim
;
934 * g_mount_operation_set_pim:
935 * @op: a #GMountOperation.
936 * @pim: an unsigned integer.
938 * Sets the mount operation's PIM to @pim.
943 g_mount_operation_set_pim (GMountOperation
*op
,
946 GMountOperationPrivate
*priv
;
947 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
949 if (priv
->pim
!= pim
)
952 g_object_notify (G_OBJECT (op
), "pim");
957 * g_mount_operation_reply:
958 * @op: a #GMountOperation
959 * @result: a #GMountOperationResult
961 * Emits the #GMountOperation::reply signal.
964 g_mount_operation_reply (GMountOperation
*op
,
965 GMountOperationResult result
)
967 g_return_if_fail (G_IS_MOUNT_OPERATION (op
));
968 g_signal_emit (op
, signals
[REPLY
], 0, result
);