ZpjSkydriveEntry

ZpjSkydriveEntry — Abstract base class for file, folder and photo objects.

Synopsis

#include <zpj/zpj.h>

struct              ZpjSkydriveEntry;
struct              ZpjSkydriveEntryClass;
enum                ZpjSkydriveEntryType;
GDateTime *         zpj_skydrive_entry_get_created_time (ZpjSkydriveEntry *self);
const gchar *       zpj_skydrive_entry_get_description  (ZpjSkydriveEntry *self);
const gchar *       zpj_skydrive_entry_get_from_id      (ZpjSkydriveEntry *self);
const gchar *       zpj_skydrive_entry_get_from_name    (ZpjSkydriveEntry *self);
const gchar *       zpj_skydrive_entry_get_id           (ZpjSkydriveEntry *self);
const gchar *       zpj_skydrive_entry_get_name         (ZpjSkydriveEntry *self);
const gchar *       zpj_skydrive_entry_get_parent_id    (ZpjSkydriveEntry *self);
GDateTime *         zpj_skydrive_entry_get_updated_time (ZpjSkydriveEntry *self);
gboolean            zpj_skydrive_entry_is_folder        (ZpjSkydriveEntry *self);

Object Hierarchy

  GObject
   +----ZpjSkydriveEntry
         +----ZpjSkydriveFile
         +----ZpjSkydriveFolder

Properties

  "created-time"             GDateTime*            : Read
  "description"              gchar*                : Read
  "from-id"                  gchar*                : Read
  "from-name"                gchar*                : Read
  "id"                       gchar*                : Read
  "json"                     JsonNode*             : Write / Construct Only
  "name"                     gchar*                : Read
  "parent-id"                gchar*                : Read
  "type"                     ZpjSkydriveEntryType  : Read
  "updated-time"             GDateTime*            : Read

Description

ZpjSkydriveEntry is an abstract base class for Skydrive file, folder and photo objects.

Subclasses may implement ZpjSkydriveEntryClass.parse_json_node (should chain up to its parent class) to parse data specific to them in the JSON returned by the server.

Details

struct ZpjSkydriveEntry

struct ZpjSkydriveEntry;

The ZpjSkydriveEntry structure contains only private data and should only be accessed using the provided API.


struct ZpjSkydriveEntryClass

struct ZpjSkydriveEntryClass {
  GObjectClass parent_class;

  void    (*parse_json_node)    (ZpjSkydriveEntry *self, JsonNode *node);
};

Class structure for ZpjSkydriveEntry.

GObjectClass parent_class;

The parent class.

parse_json_node ()

Virtual function that subclasses may implement to parse data specific to them in the JSON returned by the server. Implementations must chain up to their parent classes.

enum ZpjSkydriveEntryType

typedef enum {
  ZPJ_SKYDRIVE_ENTRY_TYPE_FILE,
  ZPJ_SKYDRIVE_ENTRY_TYPE_FOLDER,
  ZPJ_SKYDRIVE_ENTRY_TYPE_PHOTO,
  ZPJ_SKYDRIVE_ENTRY_TYPE_INVALID
} ZpjSkydriveEntryType;

The types of Skydrive objects.

This enumeration can be expanded at a later date.

ZPJ_SKYDRIVE_ENTRY_TYPE_FILE

A file.

ZPJ_SKYDRIVE_ENTRY_TYPE_FOLDER

A folder.

ZPJ_SKYDRIVE_ENTRY_TYPE_PHOTO

A photo.

ZPJ_SKYDRIVE_ENTRY_TYPE_INVALID

Invalid or unknown object.

zpj_skydrive_entry_get_created_time ()

GDateTime *         zpj_skydrive_entry_get_created_time (ZpjSkydriveEntry *self);

Gets the time at which self was created. This is the value of the updated_time member in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

a GDateTime representing the time at which the entry was created. The returned time is owned by the ZpjSkydriveEntry and should not be unreferenced. [transfer none]

zpj_skydrive_entry_get_description ()

const gchar *       zpj_skydrive_entry_get_description  (ZpjSkydriveEntry *self);

Gets the description of self. This is the value of the description member in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

description of the entry. This string is owned by the ZpjSkydriveEntry and should not be modified or freed. [transfer none]

zpj_skydrive_entry_get_from_id ()

const gchar *       zpj_skydrive_entry_get_from_id      (ZpjSkydriveEntry *self);

Gets the ID of the user who created or uploaded self. This is part of the from object in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

ID of the user who created the entry. This string is by the ZpjSkydriveEntry and should not be modified or freed. [transfer none]

zpj_skydrive_entry_get_from_name ()

const gchar *       zpj_skydrive_entry_get_from_name    (ZpjSkydriveEntry *self);

Gets the name of the user who created or uploaded self. This is part of the from object in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

name of the user who created the entry. This string is by the ZpjSkydriveEntry and should not be modified or freed. [transfer none]

zpj_skydrive_entry_get_id ()

const gchar *       zpj_skydrive_entry_get_id           (ZpjSkydriveEntry *self);

Gets the ID of self. This is the value of the id member in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

the entry's ID. This string is owned by the ZpjSkydriveEntry and should not be modified or freed. [transfer none]

zpj_skydrive_entry_get_name ()

const gchar *       zpj_skydrive_entry_get_name         (ZpjSkydriveEntry *self);

Gets the name of self. This is the value of the name member in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

name of the entry. This string is owned by the ZpjSkydriveEntry and should not be modified or freed. [transfer none]

zpj_skydrive_entry_get_parent_id ()

const gchar *       zpj_skydrive_entry_get_parent_id    (ZpjSkydriveEntry *self);

Gets the ID of the folder containing self. This is the value of the parent_id member in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

ID of the parent folder. This string is owned by the ZpjSkydriveEntry and should not be modified or freed. [transfer none]

zpj_skydrive_entry_get_updated_time ()

GDateTime *         zpj_skydrive_entry_get_updated_time (ZpjSkydriveEntry *self);

Gets the time at which self was last updated. This is the value of the updated_time member in the JSON returned by the server.

self :

A ZpjSkydriveEntry.

Returns :

a GDateTime representing the time at which the entry was last updated. The returned time is owned by the ZpjSkydriveEntry and should not be unreferenced. [transfer none]

zpj_skydrive_entry_is_folder ()

gboolean            zpj_skydrive_entry_is_folder        (ZpjSkydriveEntry *self);

Whether self is a folder.

self :

A ZpjSkydriveEntry.

Returns :

TRUE if the entry is a folder.

Property Details

The "created-time" property

  "created-time"             GDateTime*            : Read

The date and time when the entry was created.


The "description" property

  "description"              gchar*                : Read

A brief description of this entry.

Default value: NULL


The "from-id" property

  "from-id"                  gchar*                : Read

The ID of the user created this entry.

Default value: NULL


The "from-name" property

  "from-name"                gchar*                : Read

The name of the user created this entry.

Default value: NULL


The "id" property

  "id"                       gchar*                : Read

Unique identifier corresponding to this entry.

Default value: NULL


The "json" property

  "json"                     JsonNode*             : Write / Construct Only

The JSON node representing this entry.


The "name" property

  "name"                     gchar*                : Read

Human readable name of this entry.

Default value: NULL


The "parent-id" property

  "parent-id"                gchar*                : Read

Unique identifier corresponding to the parent entry.

Default value: NULL


The "type" property

  "type"                     ZpjSkydriveEntryType  : Read

Indicates whether this entry is a file or a entry.

Default value: ZPJ_SKYDRIVE_ENTRY_TYPE_INVALID


The "updated-time" property

  "updated-time"             GDateTime*            : Read

The date and time when the entry was last updated.