hook gvariant vectors up to kdbus
[platform/upstream/glib.git] / gio / gmountoperation.c
index 118d0fe..d0ede5d 100644 (file)
@@ -13,9 +13,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: Alexander Larsson <alexl@redhat.com>
  */
@@ -51,8 +49,6 @@
  * passed, see each method taking a #GMountOperation for details.
  */
 
-G_DEFINE_TYPE (GMountOperation, g_mount_operation, G_TYPE_OBJECT);
-
 enum {
   ASK_PASSWORD,
   ASK_QUESTION,
@@ -84,6 +80,8 @@ enum {
   PROP_CHOICE
 };
 
+G_DEFINE_TYPE_WITH_PRIVATE (GMountOperation, g_mount_operation, G_TYPE_OBJECT)
+
 static void 
 g_mount_operation_set_property (GObject      *object,
                                 guint         prop_id,
@@ -243,8 +241,8 @@ show_processes (GMountOperation      *op,
 static void
 show_unmount_progress (GMountOperation *op,
                        const gchar     *message,
-                       guint64          time_left,
-                       guint64          bytes_left)
+                       gint64           time_left,
+                       gint64           bytes_left)
 {
   /* nothing to do */
 }
@@ -253,8 +251,6 @@ static void
 g_mount_operation_class_init (GMountOperationClass *klass)
 {
   GObjectClass *object_class;
-  
-  g_type_class_add_private (klass, sizeof (GMountOperationPrivate));
  
   object_class = G_OBJECT_CLASS (klass);
   object_class->finalize = g_mount_operation_finalize;
@@ -387,7 +383,8 @@ g_mount_operation_class_init (GMountOperationClass *klass)
    * GMountOperation::show-unmount-progress:
    * @op: a #GMountOperation:
    * @message: string containing a mesage to display to the user
-   * @time_left: the estimated time left before the operation completes, or -1
+   * @time_left: the estimated time left before the operation completes,
+   *     in microseconds, or -1
    * @bytes_left: the amount of bytes to be written before the operation
    *     completes (or -1 if such amount is not known), or zero if the operation
    *     is completed
@@ -408,6 +405,8 @@ g_mount_operation_class_init (GMountOperationClass *klass)
    * If the message contains a line break, the first line should be
    * presented as a heading. For example, it may be used as the
    * primary text in a #GtkMessageDialog.
+   *
+   * Since: 2.34
    */
   signals[SHOW_UNMOUNT_PROGRESS] =
     g_signal_new (I_("show-unmount-progress"),
@@ -416,7 +415,7 @@ g_mount_operation_class_init (GMountOperationClass *klass)
                   G_STRUCT_OFFSET (GMountOperationClass, show_unmount_progress),
                   NULL, NULL, NULL,
                   G_TYPE_NONE, 3,
-                  G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_UINT64);
+                  G_TYPE_STRING, G_TYPE_INT64, G_TYPE_INT64);
 
   /**
    * GMountOperation:username:
@@ -510,9 +509,7 @@ g_mount_operation_class_init (GMountOperationClass *klass)
 static void
 g_mount_operation_init (GMountOperation *operation)
 {
-  operation->priv = G_TYPE_INSTANCE_GET_PRIVATE (operation,
-                                                G_TYPE_MOUNT_OPERATION,
-                                                GMountOperationPrivate);
+  operation->priv = g_mount_operation_get_instance_private (operation);
 }
 
 /**