aboutsummaryrefslogtreecommitdiff
path: root/src/fetch-file.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-01-27 15:57:39 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-01-27 15:57:39 -0500
commit759793a2dda77abd227921e119bb329271c36a55 (patch)
tree248c4ba64e9464f58a64c22c69f24a294ff16a84 /src/fetch-file.c
parent500000a82b6785e2bf7732ee87f36c6a44d2767c (diff)
parent6b2132fb4e700fe84a26adeac5126e8afbc507b3 (diff)
downloadayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.tar.gz
ayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.tar.bz2
ayatana-indicator-sound-759793a2dda77abd227921e119bb329271c36a55.zip
Import upstream version 0.5.7
Diffstat (limited to 'src/fetch-file.c')
-rw-r--r--src/fetch-file.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/src/fetch-file.c b/src/fetch-file.c
index 61a0c02..3a7fc9b 100644
--- a/src/fetch-file.c
+++ b/src/fetch-file.c
@@ -1,4 +1,4 @@
-/* fetch-file.c generated by valac 0.11.3, the Vala compiler
+/* fetch-file.c generated by valac 0.11.5, the Vala compiler
* generated from fetch-file.vala, do not modify */
/*
@@ -86,19 +86,17 @@ struct _FetchFileReadSomethingAsyncData {
FetchFile* self;
gssize size;
guint8* _tmp0_;
+ guint8* buffer;
gint buffer_length1;
gint _buffer_size_;
- guint8* _tmp1_;
- guint8* buffer;
gssize bufsize;
- gboolean _tmp2_;
+ gboolean _tmp1_;
+ gssize _tmp2_;
gssize _tmp3_;
- gssize _tmp4_;
- guint8* _tmp5_;
+ guint8* _tmp4_;
+ guint8* cpybuf;
gint cpybuf_length1;
gint _cpybuf_size_;
- guint8* _tmp6_;
- guint8* cpybuf;
GError * e;
GError * _inner_error_;
};
@@ -190,7 +188,7 @@ static gboolean fetch_file_fetch_data_co (FetchFileFetchDataData* data) {
data->_tmp0_ = g_file_read (data->self->priv->file, NULL, &data->_inner_error_);
data->_tmp1_ = data->_tmp0_;
if (data->_inner_error_ != NULL) {
- goto __catch13_g_error;
+ goto __catch14_g_error;
}
data->_tmp2_ = data->_tmp1_;
data->_tmp3_ = NULL;
@@ -200,15 +198,15 @@ static gboolean fetch_file_fetch_data_co (FetchFileFetchDataData* data) {
data->self->priv->stream = data->_tmp4_;
_g_object_unref0 (data->_tmp2_);
g_data_input_stream_set_byte_order (data->self->priv->stream, G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN);
- goto __finally13;
- __catch13_g_error:
+ goto __finally14;
+ __catch14_g_error:
{
data->e = data->_inner_error_;
data->_inner_error_ = NULL;
g_signal_emit_by_name (data->self, "failed");
_g_error_free0 (data->e);
}
- __finally13:
+ __finally14:
if (data->_inner_error_ != NULL) {
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);
g_clear_error (&data->_inner_error_);
@@ -271,55 +269,53 @@ static gboolean fetch_file_read_something_async_co (FetchFileReadSomethingAsyncD
data->size = (gssize) 1024;
data->_tmp0_ = NULL;
data->_tmp0_ = g_new0 (guint8, data->size);
- data->_tmp1_ = data->_tmp0_;
+ data->buffer = data->_tmp0_;
data->buffer_length1 = data->size;
- data->_buffer_size_ = data->buffer_length1;
- data->buffer = data->_tmp1_;
+ data->_buffer_size_ = data->size;
data->bufsize = (gssize) 1;
{
- data->_tmp2_ = TRUE;
+ data->_tmp1_ = TRUE;
while (TRUE) {
- if (!data->_tmp2_) {
+ if (!data->_tmp1_) {
if (!(data->bufsize > 0)) {
break;
}
}
- data->_tmp2_ = FALSE;
+ data->_tmp1_ = FALSE;
data->_state_ = 1;
g_input_stream_read_async ((GInputStream*) data->self->priv->stream, data->buffer, (gsize) data->buffer_length1, G_PRIORITY_DEFAULT, NULL, fetch_file_read_something_async_ready, data);
return FALSE;
_state_1:
- data->_tmp3_ = g_input_stream_read_finish ((GInputStream*) data->self->priv->stream, data->_res_, &data->_inner_error_);
- data->_tmp4_ = data->_tmp3_;
+ data->_tmp2_ = g_input_stream_read_finish ((GInputStream*) data->self->priv->stream, data->_res_, &data->_inner_error_);
+ data->_tmp3_ = data->_tmp2_;
if (data->_inner_error_ != NULL) {
- goto __catch14_g_error;
+ goto __catch15_g_error;
}
- data->bufsize = data->_tmp4_;
+ data->bufsize = data->_tmp3_;
if (data->bufsize < 1) {
break;
}
if (data->bufsize != data->size) {
- data->_tmp5_ = NULL;
- data->_tmp5_ = g_new0 (guint8, data->bufsize);
- data->_tmp6_ = data->_tmp5_;
+ data->_tmp4_ = NULL;
+ data->_tmp4_ = g_new0 (guint8, data->bufsize);
+ data->cpybuf = data->_tmp4_;
data->cpybuf_length1 = data->bufsize;
- data->_cpybuf_size_ = data->cpybuf_length1;
- data->cpybuf = data->_tmp6_;
+ data->_cpybuf_size_ = data->bufsize;
memcpy (data->cpybuf, data->buffer, (gsize) data->bufsize);
g_byte_array_append (data->self->priv->data, data->cpybuf, data->cpybuf_length1);
data->cpybuf = (g_free (data->cpybuf), NULL);
} else {
g_byte_array_append (data->self->priv->data, data->buffer, data->buffer_length1);
}
- goto __finally14;
- __catch14_g_error:
+ goto __finally15;
+ __catch15_g_error:
{
data->e = data->_inner_error_;
data->_inner_error_ = NULL;
g_signal_emit_by_name (data->self, "failed");
_g_error_free0 (data->e);
}
- __finally14:
+ __finally15:
if (data->_inner_error_ != NULL) {
data->buffer = (g_free (data->buffer), NULL);
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, data->_inner_error_->message, g_quark_to_string (data->_inner_error_->domain), data->_inner_error_->code);