shell-util: Add a helper method for saving files from HTTP

Unfortunately, gjs cannot handle binary C strings directly from
gobject-introspection. Add a simple workaround method in C to help
us save random files from the web.

https://bugzilla.gnome.org/show_bug.cgi?id=653989
This commit is contained in:
Jasper St. Pierre
2011-06-27 20:17:27 -04:00
parent ed46390bbc
commit a6dfe20348
2 changed files with 28 additions and 0 deletions

View File

@ -5,6 +5,7 @@
#include <gio/gio.h>
#include <clutter/clutter.h>
#include <libsoup/soup.h>
G_BEGIN_DECLS
@ -25,6 +26,10 @@ char *shell_util_format_date (const char *format,
ClutterModifierType
shell_get_event_state (ClutterEvent *event);
void shell_write_soup_message_to_stream (GOutputStream *stream,
SoupMessage *message,
GError **error);
gboolean shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error);