GFBGraphPhoto

GFBGraphPhoto — GFBGraph Photo node

Stability Level

Unstable, unless otherwise indicated

Object Hierarchy

  GObject
   +----GFBGraphNode
         +----GFBGraphPhoto

Implemented Interfaces

GFBGraphPhoto implements GFBGraphConnectable and JsonSerializable.

Properties

  "height"                   guint                 : Read / Write
  "images"                   gpointer              : Read / Write
  "name"                     gchar*                : Read / Write
  "source"                   gchar*                : Read / Write
  "width"                    guint                 : Read / Write

Details

struct GFBGraphPhoto

struct GFBGraphPhoto;

struct GFBGraphPhotoClass

struct GFBGraphPhotoClass {
        GFBGraphNodeClass parent_class;
};

struct GFBGraphPhotoImage

struct GFBGraphPhotoImage {
        guint  width;
        guint  height;
        gchar *source;
};

An struct with the information of a image.


gfbgraph_photo_new ()

GFBGraphPhoto *     gfbgraph_photo_new                  (void);

Creates a new GFBGraphPhoto.

Returns :

a new GFBGraphPhoto; unref with g_object_unref(). [transfer full]

gfbgraph_photo_new_from_id ()

GFBGraphPhoto *     gfbgraph_photo_new_from_id          (GFBGraphAuthorizer *authorizer,
                                                         const gchar *id,
                                                         GError **error);

Retrieves an photo node from the Facebook Graph with the give ID.

authorizer :

a GFBGraphAuthorizer.

id :

a const gchar with the photo ID.

error :

a GError or NULL. [allow-none]

Returns :

a new GFBGraphPhoto; unref with g_object_unref(). [transfer full]

gfbgraph_photo_download_default_size ()

GInputStream *      gfbgraph_photo_download_default_size
                                                        (GFBGraphPhoto *photo,
                                                         GFBGraphAuthorizer *authorizer,
                                                         GError **error);

Download the default sized photo pointed by photo, with a maximum width or height of 720px. The photo always is a JPEG.

photo :

a GFBGraphPhoto.

authorizer :

a GFBGraphAuthorizer.

error :

a GError or NULL. [allow-none]

Returns :

a GInputStream with the photo content or NULL in case of error. [transfer full]

gfbgraph_photo_get_name ()

const gchar *       gfbgraph_photo_get_name             (GFBGraphPhoto *photo);

photo :

a GFBGraphPhoto.

Returns :

the photo name, which is the comment given by the user so it would by larger, or NULL. [transfer none]

gfbgraph_photo_get_default_source_uri ()

const gchar *       gfbgraph_photo_get_default_source_uri
                                                        (GFBGraphPhoto *photo);

gfbgraph_photo_get_default_width ()

guint               gfbgraph_photo_get_default_width    (GFBGraphPhoto *photo);

gfbgraph_photo_get_default_height ()

guint               gfbgraph_photo_get_default_height   (GFBGraphPhoto *photo);

gfbgraph_photo_get_images ()

GList *             gfbgraph_photo_get_images           (GFBGraphPhoto *photo);

photo :

a GFBGraphPhoto.

Returns :

a GList of GFBGraphPhotoImage with the available photo sizes. [element-type GFBGraphPhotoImage][transfer none]

gfbgraph_photo_get_image_hires ()

const GFBGraphPhotoImage * gfbgraph_photo_get_image_hires
                                                        (GFBGraphPhoto *photo);

photo :

a GFBGraphPhoto.

Returns :

a GFBGraphPhotoImage with the higher resolution available of the photo. [transfer none]

gfbgraph_photo_get_image_near_width ()

const GFBGraphPhotoImage * gfbgraph_photo_get_image_near_width
                                                        (GFBGraphPhoto *photo,
                                                         guint width);

gfbgraph_photo_get_image_near_height ()

const GFBGraphPhotoImage * gfbgraph_photo_get_image_near_height
                                                        (GFBGraphPhoto *photo,
                                                         guint height);

Property Details

The "height" property

  "height"                   guint                 : Read / Write

The default photo height, up to 720px.

Default value: 0


The "images" property

  "images"                   gpointer              : Read / Write

A list with the available representations of the photo, in differents sizes


The "name" property

  "name"                     gchar*                : Read / Write

The name of the photo given by his owner.

Default value: ""


The "source" property

  "source"                   gchar*                : Read / Write

An URI for the photo, with a maximum width or height of 720px.

Default value: ""


The "width" property

  "width"                    guint                 : Read / Write

The default photo width, up to 720px.

Default value: 0