Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2009-02-15 13:51:48 (GMT)
committer Christian Persch <chpe@src.gnome.org>2009-02-15 13:51:48 (GMT)
commit9a9e42bd0d8922c844d439b143524254ee5441b2 (patch)
tree2deef496c62126526e53ea6da85400c96190626f /libdocument
parenteb04fe50682005da212c0c796ea3fa589d744212 (diff)
More docs
svn path=/trunk/; revision=3441
Diffstat (limited to 'libdocument')
-rw-r--r--libdocument/ev-file-helpers.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
index 7659562..2546fe7 100644
--- a/libdocument/ev-file-helpers.c
+++ b/libdocument/ev-file-helpers.c
@@ -391,6 +391,24 @@ compression_run (const gchar *uri,
return uri_dst;
}
+/**
+ * ev_file_uncompress:
+ * @uri: a file URI
+ * @type: the compression type
+ * @error: a #GError location to store an error, or %NULL
+ *
+ * Uncompresses the file at @uri.
+ *
+ * If @type is %EV_COMPRESSION_NONE, it does nothing and returns %NULL.
+ *
+ * Otherwise, it returns the filename of a
+ * temporary file containing the decompressed data from the file at @uri.
+ * On error it returns %NULL and fills in @error.
+ *
+ * It is the caller's responsibility to unlink the temp file after use.
+ *
+ * Returns: a newly allocated string URI, or %NULL on error
+ */
gchar *
ev_file_uncompress (const gchar *uri,
EvCompressionType type,
@@ -401,6 +419,25 @@ ev_file_uncompress (const gchar *uri,
return compression_run (uri, type, FALSE, error);
}
+/**
+ * ev_file_compress:
+ * @uri: a file URI
+ * @type: the compression type
+ * @error: a #GError location to store an error, or %NULL
+ *
+ * Compresses the file at @uri.
+
+ * If @type is %EV_COMPRESSION_NONE, it does nothing and returns %NULL.
+ *
+ * Otherwise, it returns the filename of a
+ * temporary file containing the compressed data from the file at @uri.
+ *
+ * On error it returns %NULL and fills in @error.
+ *
+ * It is the caller's responsibility to unlink the temp file after use.
+ *
+ * Returns: a newly allocated string URI, or %NULL on error
+ */
gchar *
ev_file_compress (const gchar *uri,
EvCompressionType type,