GDataDocumentsProperty

GDataDocumentsProperty — GData Documents property object

Stability Level

Unstable, unless otherwise indicated

Functions

Properties

gchar * etag Read / Write / Construct Only
gchar * key Read / Write
gchar * value Read / Write
gchar * visibility Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GDataParsable
        ╰── GDataDocumentsProperty

Implemented Interfaces

GDataDocumentsProperty implements GDataComparable.

Includes

#include <gdata/gdata-property.h>

Description

GDataDocumentsProperty is a subclass of GDataParsable and represents a Google Drive Property Resource on a file object.

It allows applications to store additional metadata on a file, such as tags, IDs from other data stores, viewing preferences etc. Properties can be used to share metadata between applications, for example, in a workflow application.

Each GDataDocumentsProperty is characterized by a key-value pair (where value is optional, and takes empty string "" by default) and a visibility parameter. The visibility can take values "PUBLIC" for public properties and "PRIVATE" for private properties (default). Private properties are accessible only by the application which set them, but public properties can be read/written by other applications as well.

Functions

gdata_documents_property_new ()

GDataDocumentsProperty *
gdata_documents_property_new (const gchar *key);

Creates a new GDataEntry with the given ID and default properties.

Parameters

key

the property's key

 

Returns

a new GDataDocumentsProperty; unref with g_object_unref().

[transfer full]

Since: 0.17.11


gdata_documents_property_get_key ()

const gchar *
gdata_documents_property_get_key (GDataDocumentsProperty *self);

Returns the key of the property. This will never be NULL or an empty string ("").

Parameters

Returns

the property's key.

[transfer none]

Since: 0.17.11


gdata_documents_property_get_etag ()

const gchar *
gdata_documents_property_get_etag (GDataDocumentsProperty *self);

Returns the ETag of the property.

Parameters

Returns

the property's ETag. The ETag will never be empty; it's either NULL or a valid ETag.

[transfer none]

Since: 0.17.11


gdata_documents_property_get_value ()

const gchar *
gdata_documents_property_get_value (GDataDocumentsProperty *self);

Returns the value of the property.

In the case that this value is NULL, the Property Resource corresponding to self will be deleted from the properties array on a file's metadata, whereas in the case that it's empty string (""), it will be set as it is.

Parameters

Returns

the property's value. This can be NULL or empty.

[nullable]

Since: 0.17.11


gdata_documents_property_set_value ()

void
gdata_documents_property_set_value (GDataDocumentsProperty *self,
                                    const gchar *value);

Sets “value” to value , corresponding to the key.

In the case that value is NULL, the Property Resource corresponding to self will be deleted from the properties array on a file's metadata, whereas in the case that it's empty string (""), it will be set as it is.

Parameters

self

a GDataDocumentsProperty

 

value

the new value of the property.

[allow-none]

Since: 0.17.11


gdata_documents_property_get_visibility ()

const gchar *
gdata_documents_property_get_visibility
                               (GDataDocumentsProperty *self);

Returns the visibility status of the property.

Parameters

Returns

GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC if the GDataDocumentsProperty is publicly visible to other apps, GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE if the GDataDocumentsProperty is restricted to the application which created it.

Since: 0.17.11


gdata_documents_property_set_visibility ()

void
gdata_documents_property_set_visibility
                               (GDataDocumentsProperty *self,
                                const gchar *visibility);

Sets “visibility” to GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC for public properties and GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE for private properties (default).

Parameters

self

a GDataDocumentsProperty

 

visibility

the new visibility status of the property

 

Since: 0.17.11

Types and Values

GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC

#define GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PUBLIC "PUBLIC"

The GDataDocumentsProperty having the visibility set to TRUE corresponds to having the visibility property on a Drive Property Resource set to "PUBLIC". This makes the Property Resource visible to other apps.

Since: 0.17.11


GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE

#define GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE "PRIVATE"

The GDataDocumentsProperty having the visibility set to FALSE (default) corresponds to having the visibility property on a Drive Property Resource set to "PRIVATE". This makes the Property Resource accessible only by the app that created it.

Since: 0.17.11


GDataDocumentsProperty

typedef struct _GDataDocumentsProperty GDataDocumentsProperty;

All the fields in the GDataDocumentsProperty structure are private and should never be accessed directly.

Since: 0.17.11


GDataDocumentsPropertyClass

typedef struct {
} GDataDocumentsPropertyClass;

All the fields in the GDataDocumentsPropertyClass structure are private and should never be accessed directly.

Since: 0.17.11

Property Details

The “etag” property

  “etag”                     gchar *

ETag of the property.

For more information, see the Properties Resource

Flags: Read / Write / Construct Only

Default value: NULL

Since: 0.17.11


The “key” property

  “key”                      gchar *

The key of this property.

For more information, see the Properties Resource

Flags: Read / Write

Default value: NULL

Since: 0.17.11


The “value” property

  “value”                    gchar *

The value of this property. By default, it takes the an empty string ("").

For more information, see the Properties Resource

Flags: Read / Write

Default value: NULL

Since: 0.17.11


The “visibility” property

  “visibility”               gchar *

The visibility status of this property. The default value of visibility is PRIVATE on a Drive Properties Resource object, hence “visibility” is GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE by default. A private property restricts its visibility to only the app which created it.

For more information, see the Properties Resource

Flags: Read / Write

Default value: NULL

Since: 0.17.11