diff --git a/gio/ChangeLog b/gio/ChangeLog index 015084556..ddbace754 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,12 @@ +2007-12-12 Alexander Larsson + + * gfileattribute.c: + * gfileinfo.[ch]: + * glocalfile.c: + * glocalfileinfo.c: + Make attribute namespace separator "::" instead of ":". + Use - instead of _ as separator in attribute names. + 2007-12-12 Alexander Larsson * gbufferedinputstream.h: diff --git a/gio/gfileattribute.c b/gio/gfileattribute.c index 45ccae360..2044cfdbd 100644 --- a/gio/gfileattribute.c +++ b/gio/gfileattribute.c @@ -121,65 +121,65 @@ * * Enum ValueNamespace:KeyValue Type * - * %G_FILE_ATTRIBUTE_STD_TYPEstd:typeuint32 (#GFileType) - * %G_FILE_ATTRIBUTE_STD_IS_HIDDENstd:is_hiddenboolean - * %G_FILE_ATTRIBUTE_STD_IS_BACKUPstd:is_backupboolean - * %G_FILE_ATTRIBUTE_STD_IS_SYMLINKstd:is_symlinkboolean - * %G_FILE_ATTRIBUTE_STD_IS_VIRTUALstd:is_virtualboolean - * %G_FILE_ATTRIBUTE_STD_NAMEstd:namebyte string - * %G_FILE_ATTRIBUTE_STD_DISPLAY_NAMEstd:display_namestring - * %G_FILE_ATTRIBUTE_STD_EDIT_NAMEstd:edit_namestring - * %G_FILE_ATTRIBUTE_STD_ICONstd:iconobject (#GIcon) - * %G_FILE_ATTRIBUTE_STD_CONTENT_TYPEstd:content_typestring - * %G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPEstd:fast_content_typestring - * %G_FILE_ATTRIBUTE_STD_SIZEstd:sizeuint64 - * %G_FILE_ATTRIBUTE_STD_SYMLINK_TARGETstd:symlink_targetbyte string - * %G_FILE_ATTRIBUTE_STD_TARGET_URIstd:target_uristring - * %G_FILE_ATTRIBUTE_STD_SORT_ORDERstd:sort_orderint32 - * %G_FILE_ATTRIBUTE_ETAG_VALUEetag:valuestring - * %G_FILE_ATTRIBUTE_ID_FILEid:filestring - * %G_FILE_ATTRIBUTE_ID_FSid:fsstring - * %G_FILE_ATTRIBUTE_ACCESS_CAN_READaccess:can_readboolean - * %G_FILE_ATTRIBUTE_ACCESS_CAN_WRITEaccess:can_writeboolean - * %G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTEaccess:can_executeboolean - * %G_FILE_ATTRIBUTE_ACCESS_CAN_DELETEaccess:can_deleteboolean - * %G_FILE_ATTRIBUTE_ACCESS_CAN_TRASHaccess:can_trashboolean - * %G_FILE_ATTRIBUTE_ACCESS_CAN_RENAMEaccess:can_renameboolean - * %G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNTmountable:can_mountboolean - * %G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNTmountable:can_unmountboolean - * %G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECTmountable:can_ejectboolean - * %G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICEmountable:unix_deviceuint32 - * %G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDImountable:hal_udistring - * %G_FILE_ATTRIBUTE_TIME_MODIFIEDtime:modifieduint64 - * %G_FILE_ATTRIBUTE_TIME_MODIFIED_USECtime:modified_usecuint32 - * %G_FILE_ATTRIBUTE_TIME_ACCESStime:accessuint64 - * %G_FILE_ATTRIBUTE_TIME_ACCESS_USECtime:access_usecuint32 - * %G_FILE_ATTRIBUTE_TIME_CHANGEDtime:changeduint64 - * %G_FILE_ATTRIBUTE_TIME_CHANGED_USECtime:changed_usecuint32 - * %G_FILE_ATTRIBUTE_TIME_CREATEDtime:createduint64 - * %G_FILE_ATTRIBUTE_TIME_CREATED_USECtime:created_usecuint32 - * %G_FILE_ATTRIBUTE_UNIX_DEVICEunix:deviceuint32 - * %G_FILE_ATTRIBUTE_UNIX_INODEunix:inodeuint64 - * %G_FILE_ATTRIBUTE_UNIX_MODEunix:modeuint32 - * %G_FILE_ATTRIBUTE_UNIX_NLINKunix:nlinkuint32 - * %G_FILE_ATTRIBUTE_UNIX_UIDunix:uiduint32 - * %G_FILE_ATTRIBUTE_UNIX_GIDunix:giduint32 - * %G_FILE_ATTRIBUTE_UNIX_RDEVunix:rdevuint32 - * %G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZEunix:block_sizeuint32 - * %G_FILE_ATTRIBUTE_UNIX_BLOCKSunix:blocksuint64 - * %G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINTunix:is_mountpointboolean - * %G_FILE_ATTRIBUTE_DOS_IS_ARCHIVEdos:is_archiveboolean - * %G_FILE_ATTRIBUTE_DOS_IS_SYSTEMdos:is_systemboolean - * %G_FILE_ATTRIBUTE_OWNER_USERowner:userstring - * %G_FILE_ATTRIBUTE_OWNER_USER_REALowner:user_realstring - * %G_FILE_ATTRIBUTE_OWNER_GROUPowner:groupstring - * %G_FILE_ATTRIBUTE_THUMBNAIL_PATHthumbnail:pathbytestring - * %G_FILE_ATTRIBUTE_THUMBNAILING_FAILEDthumbnail:failedboolean - * %G_FILE_ATTRIBUTE_FS_SIZEfs:sizeuint64 - * %G_FILE_ATTRIBUTE_FS_FREEfs:freeuint64 - * %G_FILE_ATTRIBUTE_FS_TYPEfs:typestring - * %G_FILE_ATTRIBUTE_FS_READONLYfs:readonlyboolean - * %G_FILE_ATTRIBUTE_GVFS_BACKENDgvfs:backendstring + * %G_FILE_ATTRIBUTE_STD_TYPEstd::typeuint32 (#GFileType) + * %G_FILE_ATTRIBUTE_STD_IS_HIDDENstd::is-hiddenboolean + * %G_FILE_ATTRIBUTE_STD_IS_BACKUPstd::is-backupboolean + * %G_FILE_ATTRIBUTE_STD_IS_SYMLINKstd::is-symlinkboolean + * %G_FILE_ATTRIBUTE_STD_IS_VIRTUALstd::is-virtualboolean + * %G_FILE_ATTRIBUTE_STD_NAMEstd::namebyte string + * %G_FILE_ATTRIBUTE_STD_DISPLAY_NAMEstd::display-namestring + * %G_FILE_ATTRIBUTE_STD_EDIT_NAMEstd::edit-namestring + * %G_FILE_ATTRIBUTE_STD_ICONstd::iconobject (#GIcon) + * %G_FILE_ATTRIBUTE_STD_CONTENT_TYPEstd::content-typestring + * %G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPEstd::fast-content-typestring + * %G_FILE_ATTRIBUTE_STD_SIZEstd::sizeuint64 + * %G_FILE_ATTRIBUTE_STD_SYMLINK_TARGETstd::symlink-targetbyte string + * %G_FILE_ATTRIBUTE_STD_TARGET_URIstd::target-uristring + * %G_FILE_ATTRIBUTE_STD_SORT_ORDERstd::sort-orderint32 + * %G_FILE_ATTRIBUTE_ETAG_VALUEetag::valuestring + * %G_FILE_ATTRIBUTE_ID_FILEid::filestring + * %G_FILE_ATTRIBUTE_ID_FSid::fsstring + * %G_FILE_ATTRIBUTE_ACCESS_CAN_READaccess::can-readboolean + * %G_FILE_ATTRIBUTE_ACCESS_CAN_WRITEaccess::can-writeboolean + * %G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTEaccess::can-executeboolean + * %G_FILE_ATTRIBUTE_ACCESS_CAN_DELETEaccess::can-deleteboolean + * %G_FILE_ATTRIBUTE_ACCESS_CAN_TRASHaccess::can-trashboolean + * %G_FILE_ATTRIBUTE_ACCESS_CAN_RENAMEaccess::can-renameboolean + * %G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNTmountable::can-mountboolean + * %G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNTmountable::can-unmountboolean + * %G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECTmountable::can-ejectboolean + * %G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICEmountable::unix-deviceuint32 + * %G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDImountable::hal-udistring + * %G_FILE_ATTRIBUTE_TIME_MODIFIEDtime::modifieduint64 + * %G_FILE_ATTRIBUTE_TIME_MODIFIED_USECtime::modified-usecuint32 + * %G_FILE_ATTRIBUTE_TIME_ACCESStime::accessuint64 + * %G_FILE_ATTRIBUTE_TIME_ACCESS_USECtime::access-usecuint32 + * %G_FILE_ATTRIBUTE_TIME_CHANGEDtime::changeduint64 + * %G_FILE_ATTRIBUTE_TIME_CHANGED_USECtime::changed-usecuint32 + * %G_FILE_ATTRIBUTE_TIME_CREATEDtime::createduint64 + * %G_FILE_ATTRIBUTE_TIME_CREATED_USECtime::created-usecuint32 + * %G_FILE_ATTRIBUTE_UNIX_DEVICEunix::deviceuint32 + * %G_FILE_ATTRIBUTE_UNIX_INODEunix::inodeuint64 + * %G_FILE_ATTRIBUTE_UNIX_MODEunix::modeuint32 + * %G_FILE_ATTRIBUTE_UNIX_NLINKunix::nlinkuint32 + * %G_FILE_ATTRIBUTE_UNIX_UIDunix::uiduint32 + * %G_FILE_ATTRIBUTE_UNIX_GIDunix::giduint32 + * %G_FILE_ATTRIBUTE_UNIX_RDEVunix::rdevuint32 + * %G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZEunix::block-sizeuint32 + * %G_FILE_ATTRIBUTE_UNIX_BLOCKSunix::blocksuint64 + * %G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINTunix::is-mountpointboolean + * %G_FILE_ATTRIBUTE_DOS_IS_ARCHIVEdos::is-archiveboolean + * %G_FILE_ATTRIBUTE_DOS_IS_SYSTEMdos::is-systemboolean + * %G_FILE_ATTRIBUTE_OWNER_USERowner::userstring + * %G_FILE_ATTRIBUTE_OWNER_USER_REALowner::user-realstring + * %G_FILE_ATTRIBUTE_OWNER_GROUPowner::groupstring + * %G_FILE_ATTRIBUTE_THUMBNAIL_PATHthumbnail::pathbytestring + * %G_FILE_ATTRIBUTE_THUMBNAILING_FAILEDthumbnail::failedboolean + * %G_FILE_ATTRIBUTE_FS_SIZEfs::sizeuint64 + * %G_FILE_ATTRIBUTE_FS_FREEfs::freeuint64 + * %G_FILE_ATTRIBUTE_FS_TYPEfs::typestring + * %G_FILE_ATTRIBUTE_FS_READONLYfs::readonlyboolean + * %G_FILE_ATTRIBUTE_GVFS_BACKENDgvfs::backendstring * * **/ diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c index 4c574b580..385e0bdb5 100644 --- a/gio/gfileinfo.c +++ b/gio/gfileinfo.c @@ -177,7 +177,7 @@ lookup_attribute (const char *attribute) return attr_id; } - colon = strchr (attribute, ':'); + colon = strstr (attribute, "::"); if (colon) ns = g_strndup (attribute, colon - attribute); else @@ -1756,10 +1756,10 @@ matcher_add (GFileAttributeMatcher *matcher, * automatically destroyed. * * The @attribute string should be formatted with specific keys separated - * from namespaces with a colon. Several "namespace:key" strings may be - * concatenated with a single comma (e.g. "std:type,std:is_hidden"). + * from namespaces with a double colon. Several "namespace::key" strings may be + * concatenated with a single comma (e.g. "std::type,std::is-hidden"). * The wildcard "*" may be used to match all keys and namespaces, or - * "namespace:*" will match all keys in a given namespace. + * "namespace::*" will match all keys in a given namespace. * * Examples of strings to use: * @@ -1768,8 +1768,8 @@ matcher_add (GFileAttributeMatcher *matcher, * Matcher String Matches * * "*"matches all attributes. - * "std:is_hidden"matches only the key is_hidden in the std namespace. - * "std:type,unix:*"matches the type key in the std namespace and all keys in the unix + * "std::is-hidden"matches only the key is-hidden in the std namespace. + * "std::type,unix::*"matches the type key in the std namespace and all keys in the unix * namespace. * *
@@ -1800,11 +1800,11 @@ g_file_attribute_matcher_new (const char *attributes) { guint32 id, mask; - colon = strchr (split[i], ':'); + colon = strstr (split[i], "::"); if (colon != NULL && - !(colon[1] == 0 || - (colon[1] == '*' && - colon[2] == 0))) + !(colon[2] == 0 || + (colon[2] == '*' && + colon[3] == 0))) { id = lookup_attribute (split[i]); mask = 0xffffffff; @@ -1975,7 +1975,7 @@ g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher, * * Checks if the matcher will match all of the keys in a given namespace. * This will always return %TRUE if a wildcard character is in use (e.g. if - * matcher was created with "std:*" and @ns is "std", or if matcher was created + * matcher was created with "std::*" and @ns is "std", or if matcher was created * using "*" and namespace is anything.) * * TODO: this is awkwardly worded. diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h index 7633fc39b..1614d125d 100644 --- a/gio/gfileinfo.h +++ b/gio/gfileinfo.h @@ -84,7 +84,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * The value for this key should contain a #GFileType. **/ -#define G_FILE_ATTRIBUTE_STD_TYPE "std:type" /* uint32 (GFileType) */ +#define G_FILE_ATTRIBUTE_STD_TYPE "std::type" /* uint32 (GFileType) */ /** * G_FILE_ATTRIBUTE_STD_IS_HIDDEN: @@ -92,7 +92,7 @@ typedef enum { * A key in the "std" namespace for checking if a file is hidden. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_STD_IS_HIDDEN "std:is_hidden" /* boolean */ +#define G_FILE_ATTRIBUTE_STD_IS_HIDDEN "std::is-hidden" /* boolean */ /** * G_FILE_ATTRIBUTE_STD_IS_BACKUP: @@ -100,7 +100,7 @@ typedef enum { * A key in the "std" namespace for checking if a file is a backup file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_STD_IS_BACKUP "std:is_backup" /* boolean */ +#define G_FILE_ATTRIBUTE_STD_IS_BACKUP "std::is-backup" /* boolean */ /** * G_FILE_ATTRIBUTE_STD_IS_SYMLINK: @@ -110,7 +110,7 @@ typedef enum { * to get the type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_STD_IS_SYMLINK "std:is_symlink" /* boolean */ +#define G_FILE_ATTRIBUTE_STD_IS_SYMLINK "std::is-symlink" /* boolean */ /** * G_FILE_ATTRIBUTE_STD_IS_VIRTUAL: @@ -118,7 +118,7 @@ typedef enum { * A key in the "std" namespace for checking if a file is virtual. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_STD_IS_VIRTUAL "std:is_virtual" /* boolean */ +#define G_FILE_ATTRIBUTE_STD_IS_VIRTUAL "std::is-virtual" /* boolean */ /** * G_FILE_ATTRIBUTE_STD_NAME: @@ -130,7 +130,7 @@ typedef enum { * name in a user interface. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. **/ -#define G_FILE_ATTRIBUTE_STD_NAME "std:name" /* byte string */ +#define G_FILE_ATTRIBUTE_STD_NAME "std::name" /* byte string */ /** * G_FILE_ATTRIBUTE_STD_DISPLAY_NAME: @@ -140,7 +140,7 @@ typedef enum { * the UI. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_STD_DISPLAY_NAME "std:display_name" /* string */ +#define G_FILE_ATTRIBUTE_STD_DISPLAY_NAME "std::display-name" /* string */ /** * G_FILE_ATTRIBUTE_STD_EDIT_NAME: @@ -153,7 +153,7 @@ typedef enum { * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_STD_EDIT_NAME "std:edit_name" /* string */ +#define G_FILE_ATTRIBUTE_STD_EDIT_NAME "std::edit-name" /* string */ /** * G_FILE_ATTRIBUTE_STD_COPY_NAME: @@ -167,7 +167,7 @@ typedef enum { * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_STD_COPY_NAME "std:copy_name" /* string */ +#define G_FILE_ATTRIBUTE_STD_COPY_NAME "std::copy-name" /* string */ /** * G_FILE_ATTRIBUTE_STD_ICON: @@ -176,7 +176,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. * The value for this key should contain a #GIcon. **/ -#define G_FILE_ATTRIBUTE_STD_ICON "std:icon" /* object (GIcon) */ +#define G_FILE_ATTRIBUTE_STD_ICON "std::icon" /* object (GIcon) */ /** * G_FILE_ATTRIBUTE_STD_CONTENT_TYPE: @@ -185,7 +185,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * The value for this key should contain a valid content type. **/ -#define G_FILE_ATTRIBUTE_STD_CONTENT_TYPE "std:content_type" /* string */ +#define G_FILE_ATTRIBUTE_STD_CONTENT_TYPE "std::content-type" /* string */ /** * G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE: @@ -197,7 +197,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * **/ -#define G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE "std:fast_content_type" /* string */ +#define G_FILE_ATTRIBUTE_STD_FAST_CONTENT_TYPE "std::fast-content-type" /* string */ /** * G_FILE_ATTRIBUTE_STD_SIZE: @@ -205,7 +205,7 @@ typedef enum { * A key in the "std" namespace for getting the file's size (in bytes). * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. **/ -#define G_FILE_ATTRIBUTE_STD_SIZE "std:size" /* uint64 */ +#define G_FILE_ATTRIBUTE_STD_SIZE "std::size" /* uint64 */ /** * G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET: @@ -214,7 +214,7 @@ typedef enum { * is a symlink. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. **/ -#define G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET "std:symlink_target" /* byte string */ +#define G_FILE_ATTRIBUTE_STD_SYMLINK_TARGET "std::symlink-target" /* byte string */ /** * G_FILE_ATTRIBUTE_STD_TARGET_URI: @@ -223,7 +223,7 @@ typedef enum { * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_STD_TARGET_URI "std:target_uri" /* string */ +#define G_FILE_ATTRIBUTE_STD_TARGET_URI "std::target-uri" /* string */ /** * G_FILE_ATTRIBUTE_STD_SORT_ORDER: @@ -235,7 +235,7 @@ typedef enum { * should be sorted first, and files without sort order as if sort order * was zero. **/ -#define G_FILE_ATTRIBUTE_STD_SORT_ORDER "std:sort_order" /* int32 */ +#define G_FILE_ATTRIBUTE_STD_SORT_ORDER "std::sort-order" /* int32 */ /* Entity tags, used to avoid missing updates on save */ @@ -246,7 +246,7 @@ typedef enum { * entity tag. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag:value" /* string */ +#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value" /* string */ /* File identifier, for e.g. avoiding loops when doing recursive * directory scanning @@ -260,7 +260,7 @@ typedef enum { * An example use would be during listing files, to avoid recursive * directory scanning. **/ -#define G_FILE_ATTRIBUTE_ID_FILE "id:file" /* string */ +#define G_FILE_ATTRIBUTE_ID_FILE "id::file" /* string */ /** * G_FILE_ATTRIBUTE_ID_FS: @@ -270,7 +270,7 @@ typedef enum { * An example use would be during listing files, to avoid recursive * directory scanning. **/ -#define G_FILE_ATTRIBUTE_ID_FS "id:fs" /* string */ +#define G_FILE_ATTRIBUTE_ID_FS "id::fs" /* string */ /* Calculated Access Rights for current user */ @@ -281,7 +281,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to read the file. **/ -#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access:can_read" /* boolean */ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read" /* boolean */ /** * G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE: @@ -290,7 +290,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to write to the file. **/ -#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access:can_write" /* boolean */ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write" /* boolean */ /** * G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE: @@ -299,7 +299,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to execute the file. **/ -#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access:can_execute" /* boolean */ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */ /** * G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE: @@ -308,7 +308,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to delete the file. **/ -#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access:can_delete" /* boolean */ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete" /* boolean */ /** * G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH: @@ -318,7 +318,7 @@ typedef enum { * This attribute will be %TRUE if the user is able to move the file to * the trash. **/ -#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access:can_trash" /* boolean */ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash" /* boolean */ /** * G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME: @@ -327,7 +327,7 @@ typedef enum { * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to rename the file. **/ -#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access:can_rename" /* boolean */ +#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename" /* boolean */ /* TODO: Should we have special version for directories? can_enumerate, etc */ @@ -339,7 +339,7 @@ typedef enum { * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable:can_mount" /* boolean */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount" /* boolean */ /** * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT: @@ -347,7 +347,7 @@ typedef enum { * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable:can_unmount" /* boolean */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */ /** * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT: @@ -355,7 +355,7 @@ typedef enum { * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable:can_eject" /* boolean */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject" /* boolean */ /** * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE: @@ -363,7 +363,7 @@ typedef enum { * A key in the "mountable" namespace for getting the unix device. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable:unix_device" /* uint32 */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */ /** * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI: @@ -371,7 +371,7 @@ typedef enum { * A key in the "mountable" namespace for getting the HAL UDI for the mountable * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable:hal_udi" /* string */ +#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi" /* string */ /* Time attributes */ @@ -383,7 +383,7 @@ typedef enum { * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the * file was modified. **/ -#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time:modified" /* uint64 */ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified" /* uint64 */ /** * G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC: @@ -393,7 +393,7 @@ typedef enum { * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time:modified_usec" /* uint32 */ +#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */ /** * G_FILE_ATTRIBUTE_TIME_ACCESS: @@ -403,7 +403,7 @@ typedef enum { * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the UNIX time since the * file was last accessed. **/ -#define G_FILE_ATTRIBUTE_TIME_ACCESS "time:access" /* uint64 */ +#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access" /* uint64 */ /** * G_FILE_ATTRIBUTE_TIME_ACCESS_USEC: @@ -413,7 +413,7 @@ typedef enum { * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time:access_usec" /* uint32 */ +#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec" /* uint32 */ /** * G_FILE_ATTRIBUTE_TIME_CHANGED: @@ -424,7 +424,7 @@ typedef enum { * * This corresponds to the traditional UNIX ctime. **/ -#define G_FILE_ATTRIBUTE_TIME_CHANGED "time:changed" /* uint64 */ +#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed" /* uint64 */ /** * G_FILE_ATTRIBUTE_TIME_CHANGED_USEC: @@ -434,7 +434,7 @@ typedef enum { * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time:changed_usec" /* uint32 */ +#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec" /* uint32 */ /** * G_FILE_ATTRIBUTE_TIME_CREATED: @@ -445,7 +445,7 @@ typedef enum { * * This corresponds to the NTFS ctime. **/ -#define G_FILE_ATTRIBUTE_TIME_CREATED "time:created" /* uint64 */ +#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created" /* uint64 */ /** * G_FILE_ATTRIBUTE_TIME_CREATED_USEC: @@ -455,7 +455,7 @@ typedef enum { * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time:created_usec" /* uint32 */ +#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec" /* uint32 */ /* Unix specific attributes */ @@ -467,7 +467,7 @@ typedef enum { * available for UNIX file systems. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix:device" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_INODE: @@ -476,7 +476,7 @@ typedef enum { * This attribute is only available for UNIX file systems. Corresponding * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. **/ -#define G_FILE_ATTRIBUTE_UNIX_INODE "unix:inode" /* uint64 */ +#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode" /* uint64 */ /** * G_FILE_ATTRIBUTE_UNIX_MODE: @@ -486,7 +486,7 @@ typedef enum { * documentation. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_MODE "unix:mode" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_NLINK: @@ -496,7 +496,7 @@ typedef enum { * for UNIX file systems. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix:nlink" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_UID: @@ -505,7 +505,7 @@ typedef enum { * This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_UID "unix:uid" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_GID: @@ -514,7 +514,7 @@ typedef enum { * This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_GID "unix:gid" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_RDEV: @@ -524,7 +524,7 @@ typedef enum { * is only available for UNIX file systems. Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix:rdev" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE: @@ -533,7 +533,7 @@ typedef enum { * system. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. **/ -#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix:block_size" /* uint32 */ +#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size" /* uint32 */ /** * G_FILE_ATTRIBUTE_UNIX_BLOCKS: @@ -542,7 +542,7 @@ typedef enum { * for the file. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. **/ -#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix:blocks" /* uint64 */ +#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks" /* uint64 */ /** * G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT: @@ -552,7 +552,7 @@ typedef enum { * point. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix:is_mountpoint" /* boolean */ +#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */ /* DOS specific attributes */ @@ -564,7 +564,7 @@ typedef enum { * is only available for DOS file systems. Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos:is_archive" /* boolean */ +#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive" /* boolean */ /** * G_FILE_ATTRIBUTE_DOS_IS_SYSTEM: @@ -574,7 +574,7 @@ typedef enum { * is only available for DOS file systems. Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos:is_system" /* boolean */ +#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system" /* boolean */ /* Owner attributes */ @@ -585,7 +585,7 @@ typedef enum { * file's owner. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_OWNER_USER "owner:user" /* string */ +#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user" /* string */ /** * G_FILE_ATTRIBUTE_OWNER_USER_REAL: @@ -594,7 +594,7 @@ typedef enum { * user that owns the file. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner:user_real" /* string */ +#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real" /* string */ /** * G_FILE_ATTRIBUTE_OWNER_GROUP: @@ -602,7 +602,7 @@ typedef enum { * A key in the "owner" namespace for getting the file owner's group. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner:group" /* string */ +#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group" /* string */ /* Thumbnails */ @@ -613,7 +613,7 @@ typedef enum { * image. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. **/ -#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail:path" /* bytestring */ +#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path" /* bytestring */ /** * G_FILE_ATTRIBUTE_THUMBNAILING_FAILED: * @@ -621,7 +621,7 @@ typedef enum { * This attribute is %TRUE if thumbnailing failed. Corresponding * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail:failed" /* boolean */ +#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed" /* boolean */ /* File system info (for g_file_get_filesystem_info) */ @@ -632,7 +632,7 @@ typedef enum { * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_UINT64. **/ -#define G_FILE_ATTRIBUTE_FS_SIZE "fs:size" /* uint64 */ +#define G_FILE_ATTRIBUTE_FS_SIZE "fs::size" /* uint64 */ /** * G_FILE_ATTRIBUTE_FS_FREE: @@ -641,7 +641,7 @@ typedef enum { * file system. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT64. **/ -#define G_FILE_ATTRIBUTE_FS_FREE "fs:free" /* uint64 */ +#define G_FILE_ATTRIBUTE_FS_FREE "fs::free" /* uint64 */ /** * G_FILE_ATTRIBUTE_FS_TYPE: @@ -649,7 +649,7 @@ typedef enum { * A key in the "fs" namespace for getting the file system's type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_FS_TYPE "fs:type" /* string */ +#define G_FILE_ATTRIBUTE_FS_TYPE "fs::type" /* string */ /** * G_FILE_ATTRIBUTE_FS_READONLY: @@ -658,7 +658,7 @@ typedef enum { * Is set to %TRUE if the file system is read only. Corresponding * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. **/ -#define G_FILE_ATTRIBUTE_FS_READONLY "fs:readonly" /* boolean */ +#define G_FILE_ATTRIBUTE_FS_READONLY "fs::readonly" /* boolean */ /** * G_FILE_ATTRIBUTE_GVFS_BACKEND: @@ -667,7 +667,7 @@ typedef enum { * GVFS backend in use. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. **/ -#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs:backend" /* string */ +#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend" /* string */ GType g_file_info_get_type (void) G_GNUC_CONST; diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 1afa66ea7..1cfaf0891 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -195,7 +195,7 @@ g_local_file_class_init (GLocalFileClass *klass) G_FILE_ATTRIBUTE_FLAGS_COPY_WITH_FILE | G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); g_file_attribute_info_list_add (list, - "xattr_sys", + "xattr-sys", G_FILE_ATTRIBUTE_TYPE_STRING, G_FILE_ATTRIBUTE_FLAGS_COPY_WHEN_MOVED); #endif diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 0a5e04c2f..c9d1a09f2 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -184,7 +184,7 @@ get_selinux_context (const char *path, #ifdef HAVE_SELINUX char *context; - if (!g_file_attribute_matcher_matches (attribute_matcher, "selinux:context")) + if (!g_file_attribute_matcher_matches (attribute_matcher, "selinux::context")) return; if (is_selinux_enabled ()) @@ -202,7 +202,7 @@ get_selinux_context (const char *path, if (context) { - g_file_info_set_attribute_string (info, "selinux:context", context); + g_file_info_set_attribute_string (info, "selinux::context", context); freecon(context); } } @@ -483,12 +483,12 @@ get_xattrs (const char *path, if (user) { escaped_attr = hex_escape_string (attr + 5, &free_escaped_attr); - gio_attr = g_strconcat ("xattr:", escaped_attr, NULL); + gio_attr = g_strconcat ("xattr::", escaped_attr, NULL); } else { escaped_attr = hex_escape_string (attr, &free_escaped_attr); - gio_attr = g_strconcat ("xattr_sys:", escaped_attr, NULL); + gio_attr = g_strconcat ("xattr-sys::", escaped_attr, NULL); } if (free_escaped_attr) @@ -597,7 +597,7 @@ get_xattrs_from_fd (int fd, if (user) all = g_file_attribute_matcher_enumerate_namespace (matcher, "xattr"); else - all = g_file_attribute_matcher_enumerate_namespace (matcher, "xattr_sys"); + all = g_file_attribute_matcher_enumerate_namespace (matcher, "xattr-sys"); if (all) { @@ -636,12 +636,12 @@ get_xattrs_from_fd (int fd, if (user) { escaped_attr = hex_escape_string (attr + 5, &free_escaped_attr); - gio_attr = g_strconcat ("xattr:", escaped_attr, NULL); + gio_attr = g_strconcat ("xattr::", escaped_attr, NULL); } else { escaped_attr = hex_escape_string (attr, &free_escaped_attr); - gio_attr = g_strconcat ("xattr_sys:", escaped_attr, NULL); + gio_attr = g_strconcat ("xattr-sys::", escaped_attr, NULL); } if (free_escaped_attr) @@ -721,14 +721,14 @@ set_xattr (char *filename, return FALSE; } - if (g_str_has_prefix (escaped_attribute, "xattr:")) + if (g_str_has_prefix (escaped_attribute, "xattr::")) { escaped_attribute += 6; is_user = TRUE; } else { - g_warn_if_fail (g_str_has_prefix (escaped_attribute, "xattr_sys:")); + g_warn_if_fail (g_str_has_prefix (escaped_attribute, "xattr-sys::")); escaped_attribute += 10; is_user = FALSE; } @@ -1971,9 +1971,9 @@ _g_local_file_info_set_attribute (char *filename, #endif #ifdef HAVE_XATTR - else if (g_str_has_prefix (attribute, "xattr:")) + else if (g_str_has_prefix (attribute, "xattr::")) return set_xattr (filename, attribute, value, error); - else if (g_str_has_prefix (attribute, "xattr_sys:")) + else if (g_str_has_prefix (attribute, "xattr-sys::")) return set_xattr (filename, attribute, value, error); #endif