Move GFileAttributeValue to a private header, as its sort of ugly.

2007-12-14  Alexander Larsson  <alexl@redhat.com>

	* Makefile.am:
        * gfileattribute.[ch]:
        * gfileattribute-priv.h:
	Move GFileAttributeValue to a private header, as
	its sort of ugly.
	
        * gfile.[ch]:
	Make set_attribute take a type + a pointer instead
	of a GFileAttributeValue.
	
        * gfileinfo.[ch]:
	Fix up for above changes.
	Add g_file_info_get_attribute_data to get
	all info in one call, g_file_info_get_attribute_status
	to get the status and g_file_info_get_attribute_as_string.
	
        * gio.symbols:
        * glocalfile.c:
        * glocalfileinfo.[ch]:
	Update for changes
	
        * gunixmounts.c:
	Make _guess_type static.


svn path=/trunk/; revision=6129
This commit is contained in:
Alexander Larsson
2007-12-14 15:56:56 +00:00
committed by Alexander Larsson
parent 2ceae92eeb
commit f506365079
14 changed files with 455 additions and 282 deletions

View File

@@ -85,30 +85,6 @@ typedef enum {
G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING
} GFileAttributeStatus;
#define G_FILE_ATTRIBUTE_VALUE_INIT {0}
/**
* GFileAttributeValue:
* @type: a #GFileAttributeType.
* @status: a #GFileAttributeStatus.
*
* Contains the value data for the Key-Value pair.
**/
typedef struct {
GFileAttributeType type : 8;
GFileAttributeStatus status : 8;
union {
gboolean boolean;
gint32 int32;
guint32 uint32;
gint64 int64;
guint64 uint64;
char *string;
GQuark quark;
GObject *obj;
} u;
} GFileAttributeValue;
/**
* GFileAttributeInfo:
* @name: the name of the attribute.
@@ -136,41 +112,6 @@ typedef struct {
int n_infos;
} GFileAttributeInfoList;
GFileAttributeValue *g_file_attribute_value_new (void);
void g_file_attribute_value_free (GFileAttributeValue *attr);
void g_file_attribute_value_clear (GFileAttributeValue *attr);
void g_file_attribute_value_set (GFileAttributeValue *attr,
const GFileAttributeValue *new_value);
GFileAttributeValue *g_file_attribute_value_dup (const GFileAttributeValue *other);
char * g_file_attribute_value_as_string (const GFileAttributeValue *attr);
const char * g_file_attribute_value_get_string (const GFileAttributeValue *attr);
const char * g_file_attribute_value_get_byte_string (const GFileAttributeValue *attr);
gboolean g_file_attribute_value_get_boolean (const GFileAttributeValue *attr);
guint32 g_file_attribute_value_get_uint32 (const GFileAttributeValue *attr);
gint32 g_file_attribute_value_get_int32 (const GFileAttributeValue *attr);
guint64 g_file_attribute_value_get_uint64 (const GFileAttributeValue *attr);
gint64 g_file_attribute_value_get_int64 (const GFileAttributeValue *attr);
GObject * g_file_attribute_value_get_object (const GFileAttributeValue *attr);
void g_file_attribute_value_set_string (GFileAttributeValue *attr,
const char *string);
void g_file_attribute_value_set_byte_string (GFileAttributeValue *attr,
const char *string);
void g_file_attribute_value_set_boolean (GFileAttributeValue *attr,
gboolean value);
void g_file_attribute_value_set_uint32 (GFileAttributeValue *attr,
guint32 value);
void g_file_attribute_value_set_int32 (GFileAttributeValue *attr,
gint32 value);
void g_file_attribute_value_set_uint64 (GFileAttributeValue *attr,
guint64 value);
void g_file_attribute_value_set_int64 (GFileAttributeValue *attr,
gint64 value);
void g_file_attribute_value_set_object (GFileAttributeValue *attr,
GObject *obj);
GFileAttributeInfoList * g_file_attribute_info_list_new (void);
GFileAttributeInfoList * g_file_attribute_info_list_ref (GFileAttributeInfoList *list);
void g_file_attribute_info_list_unref (GFileAttributeInfoList *list);