diff options
author | Alexander Larsson <alexl@src.gnome.org> | 2007-09-13 14:37:07 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2007-09-13 14:37:07 +0000 |
commit | 2e5602d922a5786055731801d3d758a83ae6f919 (patch) | |
tree | 4eac34c26fd770a81a55360d608e511c5d182d20 /common | |
parent | bbe26666ddb78cc67d0df6cffb85edab76db7847 (diff) | |
download | gvfs-2e5602d922a5786055731801d3d758a83ae6f919.tar.gz |
Add flags for FileAttributeInfo
Original git commit by Alexander Larsson <alexl@redhat.com> at 1185533313 +0200
svn path=/trunk/; revision=721
Diffstat (limited to 'common')
-rw-r--r-- | common/gvfsdaemonprotocol.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/common/gvfsdaemonprotocol.c b/common/gvfsdaemonprotocol.c index 4993d6d8..92713c5b 100644 --- a/common/gvfsdaemonprotocol.c +++ b/common/gvfsdaemonprotocol.c @@ -419,7 +419,7 @@ _g_dbus_get_attribute_info_list (DBusMessageIter *iter, GFileAttributeInfoList *list; DBusMessageIter array_iter, struct_iter; const char *name; - dbus_uint32_t type; + dbus_uint32_t type, flags; if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_ARRAY || dbus_message_iter_get_element_type (iter) != DBUS_TYPE_STRUCT) @@ -444,7 +444,14 @@ _g_dbus_get_attribute_info_list (DBusMessageIter *iter, if (dbus_message_iter_get_arg_type (&struct_iter) == DBUS_TYPE_UINT32) { dbus_message_iter_get_basic (&struct_iter, &type); - g_file_attribute_info_list_add (list, name, type); + dbus_message_iter_next (&struct_iter); + + if (dbus_message_iter_get_arg_type (&struct_iter) == DBUS_TYPE_UINT32) + { + dbus_message_iter_get_basic (&struct_iter, &flags); + + g_file_attribute_info_list_add (list, name, type, flags); + } } } @@ -460,13 +467,14 @@ _g_dbus_append_attribute_info_list (DBusMessageIter *iter, { DBusMessageIter array_iter, struct_iter; int i; - dbus_uint32_t dbus_type; + dbus_uint32_t dbus_type, dbus_flags; if (!dbus_message_iter_open_container (iter, DBUS_TYPE_ARRAY, DBUS_STRUCT_BEGIN_CHAR_AS_STRING DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_UINT32_AS_STRING + DBUS_TYPE_UINT32_AS_STRING DBUS_STRUCT_END_CHAR_AS_STRING, &array_iter)) _g_dbus_oom (); @@ -476,6 +484,7 @@ _g_dbus_append_attribute_info_list (DBusMessageIter *iter, if (!dbus_message_iter_open_container (&array_iter, DBUS_TYPE_STRUCT, DBUS_TYPE_STRING_AS_STRING + DBUS_TYPE_UINT32_AS_STRING DBUS_TYPE_UINT32_AS_STRING, &struct_iter)) _g_dbus_oom (); @@ -489,6 +498,11 @@ _g_dbus_append_attribute_info_list (DBusMessageIter *iter, DBUS_TYPE_UINT32, &dbus_type)) _g_dbus_oom (); + dbus_flags = list->infos[i].flags; + if (!dbus_message_iter_append_basic (&struct_iter, + DBUS_TYPE_UINT32, &dbus_flags)) + _g_dbus_oom (); + if (!dbus_message_iter_close_container (&array_iter, &struct_iter)) _g_dbus_oom (); } |