hook gvariant vectors up to kdbus
[platform/upstream/glib.git] / gio / gfileinfo.h
index 27eccaa..cec8872 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  *
  * Author: Alexander Larsson <alexl@redhat.com>
  */
 
+#ifndef __G_FILE_INFO_H__
+#define __G_FILE_INFO_H__
+
 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
 #error "Only <gio/gio.h> can be included directly."
 #endif
 
-#ifndef __G_FILE_INFO_H__
-#define __G_FILE_INFO_H__
-
 #include <gio/giotypes.h>
 
 G_BEGIN_DECLS
@@ -129,7 +127,7 @@ typedef struct _GFileInfoClass   GFileInfoClass;
  * G_FILE_ATTRIBUTE_STANDARD_COPY_NAME:
  *
  * A key in the "standard" namespace for getting the copy name of the file.
- * The copy name is an optional version of the name. If availible its always
+ * The copy name is an optional version of the name. If available it's always
  * in UTF8, and corresponds directly to the original filename (only transcoded to
  * UTF8). This is useful if you want to copy the file to another filesystem that
  * might have a different encoding. If the filename is not a valid string in the
@@ -163,6 +161,17 @@ typedef struct _GFileInfoClass   GFileInfoClass;
 #define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon"                     /* object (GIcon) */
 
 /**
+ * G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON:
+ *
+ * A key in the "standard" namespace for getting the symbolic icon for the file.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
+ * The value for this key should contain a #GIcon.
+ *
+ * Since: 2.34
+ **/
+#define G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON "standard::symbolic-icon"   /* object (GIcon) */
+
+/**
  * G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE:
  *
  * A key in the "standard" namespace for getting the content type of the file.
@@ -192,14 +201,15 @@ typedef struct _GFileInfoClass   GFileInfoClass;
 #define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size"                     /* uint64 */
 
 /**
- * G_FILE_ATTRIBUTE_ALLOCATED_SIZE:
+ * G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE:
  *
  * A key in the "standard" namespace for getting the amount of disk space
  * that is consumed by the file (in bytes).  This will generally be larger
  * than the file size (due to block size overhead) but can occasionally be
  * smaller (for example, for sparse files).
- *
  * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ *
+ * Since: 2.20
  **/
 #define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */
 
@@ -363,6 +373,16 @@ typedef struct _GFileInfoClass   GFileInfoClass;
 #define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */
 
 /**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE:
+ *
+ * A key in the "mountable" namespace for getting the unix device file.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ *
+ * Since: 2.22
+ **/
+#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */
+
+/**
  * G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI:
  *
  * A key in the "mountable" namespace for getting the HAL UDI for the mountable
@@ -370,6 +390,68 @@ typedef struct _GFileInfoClass   GFileInfoClass;
  **/
 #define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi"         /* string */
 
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start"     /* boolean */
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started
+ * degraded.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED "mountable::can-start-degraded"     /* boolean */
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP "mountable::can-stop"      /* boolean */
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE:
+ *
+ * A key in the "mountable" namespace for getting the #GDriveStartStopType.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
+ *
+ * Since: 2.22
+ */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE "mountable::start-stop-type" /* uint32 (GDriveStartStopType) */
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL "mountable::can-poll"      /* boolean */
+
+/**
+ * G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC:
+ *
+ * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE)
+ * is automatically polled for media.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.22
+ */
+#define G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC "mountable::is-media-check-automatic"      /* boolean */
+
 /* Time attributes */
 
 /**
@@ -619,6 +701,21 @@ typedef struct _GFileInfoClass   GFileInfoClass;
  * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
  **/
 #define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed"         /* boolean */
+/**
+ * G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID:
+ *
+ * A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.
+ * This attribute is %TRUE if the thumbnail is up-to-date with the file it represents,
+ * and %FALSE if the file has been modified since the thumbnail was generated.
+ *
+ * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE,
+ * it indicates that thumbnailing may be attempted again and may succeed.
+ *
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
+ *
+ * Since: 2.40
+ */
+#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID "thumbnail::is-valid"        /* boolean */
 
 /* Preview */
 
@@ -656,6 +753,17 @@ typedef struct _GFileInfoClass   GFileInfoClass;
 #define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free"                       /* uint64 */
 
 /**
+ * G_FILE_ATTRIBUTE_FILESYSTEM_USED:
+ *
+ * A key in the "filesystem" namespace for getting the number of bytes of used on the
+ * file system. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_UINT64.
+ *
+ * Since: 2.32
+ */
+#define G_FILE_ATTRIBUTE_FILESYSTEM_USED "filesystem::used"                       /* uint64 */
+
+/**
  * G_FILE_ATTRIBUTE_FILESYSTEM_TYPE:
  *
  * A key in the "filesystem" namespace for getting the file system's type.
@@ -710,134 +818,252 @@ typedef struct _GFileInfoClass   GFileInfoClass;
  **/
 #define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count"     /* uint32 */
 
+/**
+ * G_FILE_ATTRIBUTE_TRASH_ORIG_PATH:
+ *
+ * A key in the "trash" namespace.  When requested against
+ * items in "trash:///", will return the original path to the file before it
+ * was trashed. Corresponding #GFileAttributeType is
+ * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
+ *
+ * Since: 2.24.
+ **/
+#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path"     /* byte string */
+
+/**
+ * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE:
+ *
+ * A key in the "trash" namespace.  When requested against
+ * items in "trash:///", will return the date and time when the file
+ * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss.
+ * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
+ *
+ * Since: 2.24.
+ **/
+#define G_FILE_ATTRIBUTE_TRASH_DELETION_DATE "trash::deletion-date"  /* string */
+
+GLIB_AVAILABLE_IN_ALL
 GType              g_file_info_get_type                  (void) G_GNUC_CONST;
 
+GLIB_AVAILABLE_IN_ALL
 GFileInfo *        g_file_info_new                       (void);
+GLIB_AVAILABLE_IN_ALL
 GFileInfo *        g_file_info_dup                       (GFileInfo  *other);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_copy_into                 (GFileInfo  *src_info,
                                                          GFileInfo  *dest_info);
+GLIB_AVAILABLE_IN_ALL
 gboolean           g_file_info_has_attribute             (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
+gboolean           g_file_info_has_namespace             (GFileInfo  *info,
+                                                         const char *name_space);
+GLIB_AVAILABLE_IN_ALL
 char **            g_file_info_list_attributes           (GFileInfo  *info,
                                                          const char *name_space);
+GLIB_AVAILABLE_IN_ALL
 gboolean           g_file_info_get_attribute_data        (GFileInfo  *info,
                                                          const char *attribute,
                                                          GFileAttributeType *type,
                                                          gpointer   *value_pp,
                                                          GFileAttributeStatus *status);
+GLIB_AVAILABLE_IN_ALL
 GFileAttributeType g_file_info_get_attribute_type        (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_remove_attribute          (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 GFileAttributeStatus g_file_info_get_attribute_status    (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
+gboolean           g_file_info_set_attribute_status      (GFileInfo  *info,
+                                                         const char *attribute,
+                                                         GFileAttributeStatus status);
+GLIB_AVAILABLE_IN_ALL
 char *             g_file_info_get_attribute_as_string   (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 const char *       g_file_info_get_attribute_string      (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 const char *       g_file_info_get_attribute_byte_string (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 gboolean           g_file_info_get_attribute_boolean     (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 guint32            g_file_info_get_attribute_uint32      (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 gint32             g_file_info_get_attribute_int32       (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 guint64            g_file_info_get_attribute_uint64      (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 gint64             g_file_info_get_attribute_int64       (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
 GObject *          g_file_info_get_attribute_object      (GFileInfo  *info,
                                                          const char *attribute);
+GLIB_AVAILABLE_IN_ALL
+char **            g_file_info_get_attribute_stringv     (GFileInfo  *info,
+                                                         const char *attribute);
 
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute             (GFileInfo  *info,
                                                          const char *attribute,
                                                          GFileAttributeType type,
                                                          gpointer    value_p);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_string      (GFileInfo  *info,
                                                          const char *attribute,
                                                          const char *attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_byte_string (GFileInfo  *info,
                                                          const char *attribute,
                                                          const char *attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_boolean     (GFileInfo  *info,
                                                          const char *attribute,
                                                          gboolean    attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_uint32      (GFileInfo  *info,
                                                          const char *attribute,
                                                          guint32     attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_int32       (GFileInfo  *info,
                                                          const char *attribute,
                                                          gint32      attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_uint64      (GFileInfo  *info,
                                                          const char *attribute,
                                                          guint64     attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_int64       (GFileInfo  *info,
                                                          const char *attribute,
                                                          gint64      attr_value);
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_set_attribute_object      (GFileInfo  *info,
                                                          const char *attribute,
                                                          GObject    *attr_value);
+GLIB_AVAILABLE_IN_ALL
+void               g_file_info_set_attribute_stringv     (GFileInfo  *info,
+                                                         const char *attribute,
+                                                         char      **attr_value);
 
+GLIB_AVAILABLE_IN_ALL
 void               g_file_info_clear_status              (GFileInfo  *info);
 
 /* Helper getters: */
+GLIB_AVAILABLE_IN_2_36
+GDateTime *       g_file_info_get_deletion_date      (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 GFileType         g_file_info_get_file_type          (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 gboolean          g_file_info_get_is_hidden          (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 gboolean          g_file_info_get_is_backup          (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 gboolean          g_file_info_get_is_symlink         (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 const char *      g_file_info_get_name               (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 const char *      g_file_info_get_display_name       (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 const char *      g_file_info_get_edit_name          (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 GIcon *           g_file_info_get_icon               (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
+GIcon *           g_file_info_get_symbolic_icon      (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 const char *      g_file_info_get_content_type       (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 goffset           g_file_info_get_size               (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_get_modification_time  (GFileInfo         *info,
                                                      GTimeVal          *result);
+GLIB_AVAILABLE_IN_ALL
 const char *      g_file_info_get_symlink_target     (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 const char *      g_file_info_get_etag               (GFileInfo         *info);
+GLIB_AVAILABLE_IN_ALL
 gint32            g_file_info_get_sort_order         (GFileInfo         *info);
 
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_attribute_mask     (GFileInfo         *info,
                                                      GFileAttributeMatcher *mask);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_unset_attribute_mask   (GFileInfo         *info);
 
 /* Helper setters: */
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_file_type          (GFileInfo         *info,
                                                      GFileType          type);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_is_hidden          (GFileInfo         *info,
                                                      gboolean           is_hidden);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_is_symlink         (GFileInfo         *info,
                                                      gboolean           is_symlink);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_name               (GFileInfo         *info,
                                                      const char        *name);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_display_name       (GFileInfo         *info,
                                                      const char        *display_name);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_edit_name          (GFileInfo         *info,
                                                      const char        *edit_name);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_icon               (GFileInfo         *info,
                                                      GIcon             *icon);
+GLIB_AVAILABLE_IN_ALL
+void              g_file_info_set_symbolic_icon      (GFileInfo         *info,
+                                                     GIcon             *icon);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_content_type       (GFileInfo         *info,
                                                      const char        *content_type);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_size               (GFileInfo         *info,
                                                      goffset            size);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_modification_time  (GFileInfo         *info,
                                                      GTimeVal          *mtime);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_symlink_target     (GFileInfo         *info,
                                                      const char        *symlink_target);
+GLIB_AVAILABLE_IN_ALL
 void              g_file_info_set_sort_order         (GFileInfo         *info,
                                                      gint32             sort_order);
 
+#define G_TYPE_FILE_ATTRIBUTE_MATCHER (g_file_attribute_matcher_get_type ())
+GLIB_AVAILABLE_IN_ALL
+GType g_file_attribute_matcher_get_type (void) G_GNUC_CONST;
+
+GLIB_AVAILABLE_IN_ALL
 GFileAttributeMatcher *g_file_attribute_matcher_new            (const char            *attributes);
+GLIB_AVAILABLE_IN_ALL
 GFileAttributeMatcher *g_file_attribute_matcher_ref            (GFileAttributeMatcher *matcher);
+GLIB_AVAILABLE_IN_ALL
 void                   g_file_attribute_matcher_unref          (GFileAttributeMatcher *matcher);
+GLIB_AVAILABLE_IN_ALL
+GFileAttributeMatcher *g_file_attribute_matcher_subtract       (GFileAttributeMatcher *matcher,
+                                                                GFileAttributeMatcher *subtract);
+GLIB_AVAILABLE_IN_ALL
 gboolean               g_file_attribute_matcher_matches        (GFileAttributeMatcher *matcher,
                                                                const char            *attribute);
+GLIB_AVAILABLE_IN_ALL
 gboolean               g_file_attribute_matcher_matches_only   (GFileAttributeMatcher *matcher,
                                                                const char            *attribute);
+GLIB_AVAILABLE_IN_ALL
 gboolean               g_file_attribute_matcher_enumerate_namespace (GFileAttributeMatcher *matcher,
                                                                     const char            *ns);
+GLIB_AVAILABLE_IN_ALL
 const char *           g_file_attribute_matcher_enumerate_next (GFileAttributeMatcher *matcher);
+GLIB_AVAILABLE_IN_2_32
+char *                 g_file_attribute_matcher_to_string      (GFileAttributeMatcher *matcher);
 
 G_END_DECLS