[gnome-settings-daemon/gnome-3-8] housekeeping: Make some functions public to allow debugging
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-8] housekeeping: Make some functions public to allow debugging
- Date: Mon, 19 May 2014 15:04:44 +0000 (UTC)
commit 094c8da235896db4a97f3a742c3def7f4c753f1a
Author: Bastien Nocera <hadess hadess net>
Date: Fri May 16 16:38:57 2014 +0200
housekeeping: Make some functions public to allow debugging
plugins/housekeeping/gsd-disk-space.c | 19 +++----------------
plugins/housekeeping/gsd-disk-space.h | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+), 16 deletions(-)
---
diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
index 94dc715..951074d 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -270,18 +270,7 @@ out:
return should_purge;
}
-typedef struct {
- gint ref_count;
- GFile *file;
- GCancellable *cancellable;
- GDateTime *old;
- gboolean dry_run;
- gboolean trash;
- gchar *name;
- gint depth;
-} DeleteData;
-
-static DeleteData *
+DeleteData *
delete_data_new (GFile *file,
GCancellable *cancellable,
GDateTime *old,
@@ -311,7 +300,7 @@ delete_data_ref (DeleteData *data)
return data;
}
-static void
+void
delete_data_unref (DeleteData *data)
{
data->ref_count -= 1;
@@ -326,8 +315,6 @@ delete_data_unref (DeleteData *data)
g_free (data);
}
-static void delete_recursively_by_age (DeleteData *data);
-
static void
delete_batch (GObject *source,
GAsyncResult *res,
@@ -427,7 +414,7 @@ delete_subdir (GObject *source,
delete_data_unref (data);
}
-static void
+void
delete_recursively_by_age (DeleteData *data)
{
if (data->trash && (data->depth == 1) &&
diff --git a/plugins/housekeeping/gsd-disk-space.h b/plugins/housekeeping/gsd-disk-space.h
index 8f2d5d9..1f84bd3 100644
--- a/plugins/housekeeping/gsd-disk-space.h
+++ b/plugins/housekeeping/gsd-disk-space.h
@@ -28,6 +28,26 @@
G_BEGIN_DECLS
+typedef struct {
+ gint ref_count;
+ GFile *file;
+ GCancellable *cancellable;
+ GDateTime *old;
+ gboolean dry_run;
+ gboolean trash;
+ gchar *name;
+ gint depth;
+} DeleteData;
+
+void delete_data_unref (DeleteData *data);
+DeleteData *delete_data_new (GFile *file,
+ GCancellable *cancellable,
+ GDateTime *old,
+ gboolean dry_run,
+ gboolean trash,
+ gint depth);
+void delete_recursively_by_age (DeleteData *data);
+
void gsd_ldsm_setup (gboolean check_now);
void gsd_ldsm_clean (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]