2008-02-29 Cosimo Cecchi <cosimoc@gnome.org>
[nautilus.git] / libnautilus-private / nautilus-progress-info.h
blobd017f33652ecddd7d5eb65ac19faa3db84fe4f37
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
3 nautilus-progress-info.h: file operation progress info.
5 Copyright (C) 2007 Red Hat, Inc.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public
18 License along with this program; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 Author: Alexander Larsson <alexl@redhat.com>
25 #ifndef NAUTILUS_PROGRESS_INFO_H
26 #define NAUTILUS_PROGRESS_INFO_H
28 #include <glib-object.h>
29 #include <gio/gio.h>
31 #define NAUTILUS_TYPE_PROGRESS_INFO (nautilus_progress_info_get_type ())
32 #define NAUTILUS_PROGRESS_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NAUTILUS_TYPE_PROGRESS_INFO, NautilusProgressInfo))
33 #define NAUTILUS_PROGRESS_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NAUTILUS_TYPE_PROGRESS_INFO, NautilusProgressInfoClass))
34 #define NAUTILUS_IS_PROGRESS_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NAUTILUS_TYPE_PROGRESS_INFO))
35 #define NAUTILUS_IS_PROGRESS_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NAUTILUS_TYPE_PROGRESS_INFO))
36 #define NAUTILUS_PROGRESS_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NAUTILUS_TYPE_PROGRESS_INFO, NautilusProgressInfoClass))
38 typedef struct _NautilusProgressInfo NautilusProgressInfo;
39 typedef struct _NautilusProgressInfoClass NautilusProgressInfoClass;
41 GType nautilus_progress_info_get_type (void) G_GNUC_CONST;
43 /* Signals:
44 "changed" - status or details changed
45 "progress-changed" - the percentage progress changed (or we pulsed if in activity_mode
46 "started" - emited on job start
47 "finished" - emitted when job is done
49 All signals are emitted from idles in main loop.
50 All methods are threadsafe.
53 NautilusProgressInfo *nautilus_progress_info_new (void);
55 GList * nautilus_get_all_progress_info (void);
57 char * nautilus_progress_info_get_status (NautilusProgressInfo *info);
58 char * nautilus_progress_info_get_details (NautilusProgressInfo *info);
59 double nautilus_progress_info_get_progress (NautilusProgressInfo *info);
60 GCancellable *nautilus_progress_info_get_cancellable (NautilusProgressInfo *info);
61 void nautilus_progress_info_cancel (NautilusProgressInfo *info);
62 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);
63 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);
64 gboolean nautilus_progress_info_get_is_paused (NautilusProgressInfo *info);
66 void nautilus_progress_info_start (NautilusProgressInfo *info);
67 void nautilus_progress_info_finish (NautilusProgressInfo *info);
68 void nautilus_progress_info_pause (NautilusProgressInfo *info);
69 void nautilus_progress_info_resume (NautilusProgressInfo *info);
70 void nautilus_progress_info_set_status (NautilusProgressInfo *info,
71 const char *status);
72 void nautilus_progress_info_take_status (NautilusProgressInfo *info,
73 char *status);
74 void nautilus_progress_info_set_details (NautilusProgressInfo *info,
75 const char *details);
76 void nautilus_progress_info_take_details (NautilusProgressInfo *info,
77 char *details);
78 void nautilus_progress_info_set_progress (NautilusProgressInfo *info,
79 double current,
80 double total);
81 void nautilus_progress_info_pulse_progress (NautilusProgressInfo *info);
85 #endif /* NAUTILUS_PROGRESS_INFO_H */