flickcurl.h   flickcurl.h 
skipping to change at line 45 skipping to change at line 45
#ifdef __APPLE_CC__ #ifdef __APPLE_CC__
/* OSX gcc cpp-precomp is broken */ /* OSX gcc cpp-precomp is broken */
#define FLICKCURL_DEPRECATED #define FLICKCURL_DEPRECATED
#else #else
#define FLICKCURL_DEPRECATED __attribute__((deprecated)) #define FLICKCURL_DEPRECATED __attribute__((deprecated))
#endif #endif
#else #else
#define FLICKCURL_DEPRECATED #define FLICKCURL_DEPRECATED
#endif #endif
/* /**
* flickcurl_field_value_type:
* @VALUE_TYPE_PHOTO_ID: photo ID
* @VALUE_TYPE_PHOTO_URI: photo URI
* @VALUE_TYPE_UNIXTIME: a unixtime
* @VALUE_TYPE_BOOLEAN: boolean
* @VALUE_TYPE_DATETIME: date time
* @VALUE_TYPE_FLOAT: floating point number
* @VALUE_TYPE_INTEGER: integer
* @VALUE_TYPE_STRING: string
* @VALUE_TYPE_URI: URI
* @VALUE_TYPE_PERSON_ID: person ID
* @VALUE_TYPE_NONE: internal
* @VALUE_TYPE_LAST: internal offset to last in enum list
*
* Field data types * Field data types
*/ */
typedef enum { typedef enum {
VALUE_TYPE_NONE, /* empty field */ VALUE_TYPE_NONE, /* empty field */
VALUE_TYPE_PHOTO_ID, /* internal */ VALUE_TYPE_PHOTO_ID, /* internal */
VALUE_TYPE_PHOTO_URI, /* internal */ VALUE_TYPE_PHOTO_URI, /* internal */
VALUE_TYPE_UNIXTIME, VALUE_TYPE_UNIXTIME,
VALUE_TYPE_BOOLEAN, VALUE_TYPE_BOOLEAN,
VALUE_TYPE_DATETIME, VALUE_TYPE_DATETIME,
VALUE_TYPE_FLOAT, VALUE_TYPE_FLOAT,
VALUE_TYPE_INTEGER, VALUE_TYPE_INTEGER,
VALUE_TYPE_STRING, VALUE_TYPE_STRING,
VALUE_TYPE_URI, VALUE_TYPE_URI,
VALUE_TYPE_PERSON_ID, /* internal */ VALUE_TYPE_PERSON_ID, /* internal */
VALUE_TYPE_LAST = VALUE_TYPE_PERSON_ID VALUE_TYPE_LAST = VALUE_TYPE_PERSON_ID
} flickcurl_field_value_type; } flickcurl_field_value_type;
/* /**
* flickcurl_photo_field_type:
* @PHOTO_FIELD_dateuploaded: date uploaded
* @PHOTO_FIELD_farm: farm number
* @PHOTO_FIELD_isfavorite: is favorite boolean
* @PHOTO_FIELD_license: license
* @PHOTO_FIELD_originalformat: original format
* @PHOTO_FIELD_rotation: rotation
* @PHOTO_FIELD_server: server
* @PHOTO_FIELD_dates_lastupdate: last update date
* @PHOTO_FIELD_dates_posted: posted date
* @PHOTO_FIELD_dates_taken: taken date
* @PHOTO_FIELD_dates_takengranularity: taken granularity
* @PHOTO_FIELD_description: description
* @PHOTO_FIELD_editability_canaddmeta: can add metadata boolean
* @PHOTO_FIELD_editability_cancomment: can comment boolean
* @PHOTO_FIELD_geoperms_iscontact: geo perms are for contacts
* @PHOTO_FIELD_geoperms_isfamily: geo perms are for family
* @PHOTO_FIELD_geoperms_isfriend: geo perms are for frind
* @PHOTO_FIELD_geoperms_ispublic: geo perms are for public
* @PHOTO_FIELD_location_accuracy: location accuracy
* @PHOTO_FIELD_location_latitude: location latitude
* @PHOTO_FIELD_location_longitude: location longitude
* @PHOTO_FIELD_owner_location: owner location
* @PHOTO_FIELD_owner_nsid: owner NSID
* @PHOTO_FIELD_owner_realname: owner real name
* @PHOTO_FIELD_owner_username: owner user name
* @PHOTO_FIELD_title: title
* @PHOTO_FIELD_visibility_isfamily: visibility is for family
* @PHOTO_FIELD_visibility_isfriend: visibility is for friend
* @PHOTO_FIELD_visibility_ispublic: visibility is for public
* @PHOTO_FIELD_secret: photo secret
* @PHOTO_FIELD_originalsecret: photo original secret
* @PHOTO_FIELD_location_neighborhood: location neighborhood
* @PHOTO_FIELD_location_locality: location locality
* @PHOTO_FIELD_location_county: location county
* @PHOTO_FIELD_location_region: location region
* @PHOTO_FIELD_location_country: location country
* @PHOTO_FIELD_location_placeid: location place ID
* @PHOTO_FIELD_neighborhood_placeid: neighborhood place ID
* @PHOTO_FIELD_locality_placeid: locality place ID
* @PHOTO_FIELD_county_placeid: county place ID
* @PHOTO_FIELD_region_placeid: region place ID
* @PHOTO_FIELD_country_placeid: country place ID
* @PHOTO_FIELD_none: internal
* @PHOTO_FIELD_FIRST: internal offset to first in enum list
* @PHOTO_FIELD_LAST: internal offset to last in enum list
*
* Fields of a flickcurl_photo* * Fields of a flickcurl_photo*
*/ */
typedef enum { typedef enum {
PHOTO_FIELD_none, PHOTO_FIELD_none,
PHOTO_FIELD_dateuploaded, PHOTO_FIELD_dateuploaded,
PHOTO_FIELD_farm, PHOTO_FIELD_farm,
PHOTO_FIELD_isfavorite, PHOTO_FIELD_isfavorite,
PHOTO_FIELD_license, PHOTO_FIELD_license,
PHOTO_FIELD_originalformat, PHOTO_FIELD_originalformat,
PHOTO_FIELD_rotation, PHOTO_FIELD_rotation,
skipping to change at line 114 skipping to change at line 175
PHOTO_FIELD_location_placeid, PHOTO_FIELD_location_placeid,
PHOTO_FIELD_neighborhood_placeid, PHOTO_FIELD_neighborhood_placeid,
PHOTO_FIELD_locality_placeid, PHOTO_FIELD_locality_placeid,
PHOTO_FIELD_county_placeid, PHOTO_FIELD_county_placeid,
PHOTO_FIELD_region_placeid, PHOTO_FIELD_region_placeid,
PHOTO_FIELD_country_placeid, PHOTO_FIELD_country_placeid,
PHOTO_FIELD_FIRST = PHOTO_FIELD_dateuploaded, PHOTO_FIELD_FIRST = PHOTO_FIELD_dateuploaded,
PHOTO_FIELD_LAST = PHOTO_FIELD_country_placeid, PHOTO_FIELD_LAST = PHOTO_FIELD_country_placeid,
} flickcurl_photo_field_type; } flickcurl_photo_field_type;
/* The main object type */ /**
* @flickcurl:
*
* Flickcurl session object created by flickcurl_new() and destroyed by fli
ckcurl_free()
*/
typedef struct flickcurl_s flickcurl; typedef struct flickcurl_s flickcurl;
/* Forward structure references */ /* Forward structure references */
struct flickcurl_s; struct flickcurl_s;
struct flickcurl_photo_s; struct flickcurl_photo_s;
/** /**
* flickcurl_arg: * flickcurl_arg:
* @name: Argument name * @name: Argument name
* @optional: boolean flag (non-0 true) if argument is optional * @optional: boolean flag (non-0 true) if argument is optional
skipping to change at line 143 skipping to change at line 208
} flickcurl_arg; } flickcurl_arg;
/** /**
* flickcurl_method: * flickcurl_method:
* @name: Method name * @name: Method name
* @needslogin: boolean flag (non-0 true) if method requires login * @needslogin: boolean flag (non-0 true) if method requires login
* @description: description of method * @description: description of method
* @response: example response (HTML) * @response: example response (HTML)
* @explanation: explanation of example response or NULL if missing * @explanation: explanation of example response or NULL if missing
* @args: method arguments * @args: method arguments
* @arg_count: number of arguments, may be 0 * @args_count: number of arguments, may be 0
* *
* An API method * An API method
*/ */
typedef struct flickcurl_method_s { typedef struct flickcurl_method_s {
char *name; char *name;
int needslogin; int needslogin;
char *description; char *description;
char *response; char *response;
char *explanation; char *explanation;
/* argument list */ /* argument list */
flickcurl_arg** args; flickcurl_arg** args;
int args_count; int args_count;
} flickcurl_method; } flickcurl_method;
/** /**
* flickcurl_activity_event: * flickcurl_activity_event:
* @type: activty event type
* @id: ID
* @user: user ID
* @username: user name
* @value: event value
* @date_added: date added
* *
* Comment or photo activity event * Comment or photo activity event
*/ */
typedef struct { typedef struct {
char *type; /* comment or note */ char *type; /* comment or note */
char *id; char *id;
char *user; char *user;
char *username; char *username;
char *value; char *value;
int date_added; int date_added;
} flickcurl_activity_event; } flickcurl_activity_event;
/**
* FLICKCURL_MAX_ACTIVITY_EVENTS:
*
* Max number of activity events.
*/
#define FLICKCURL_MAX_ACTIVITY_EVENTS 20 #define FLICKCURL_MAX_ACTIVITY_EVENTS 20
/** /**
* flickcurl_activity: * flickcurl_activity:
* @type: activity type photoset or photo
* @owner: owner NSID
* @owner_name: owner name
* @primary: primary
* @id: photo id
* @secret: photo secret
* @server: photo server
* @farm: photo farm
* @comments_old: old comments count
* @comments_new: new comments count
* @notes_old: old notes count
* @notes_new: new notes count
* @views: views count
* @comments: comments count
* @photos: photos count
* @faves: favourites count
* @more: more boolean flag
* @title: title of acitivty
* @events: array of events associated with this actiivty
* *
* Comments or photos item with activity * Comments or photos item with activity
*/ */
typedef struct { typedef struct {
char *type; /* photoset or photo */ char *type; /* photoset or photo */
char *owner; char *owner;
char *owner_name; char *owner_name;
char *primary; char *primary;
/* photo info: ID/secret/server/farm */ /* photo info: ID/secret/server/farm */
skipping to change at line 213 skipping to change at line 308
/* flags */ /* flags */
int more; int more;
char* title; char* title;
/* Array of events on this item */ /* Array of events on this item */
flickcurl_activity_event* events[FLICKCURL_MAX_ACTIVITY_EVENTS+1]; flickcurl_activity_event* events[FLICKCURL_MAX_ACTIVITY_EVENTS+1];
} flickcurl_activity; } flickcurl_activity;
/** /**
* flickcurl_comment: * flickcurl_comment:
* @name: Argument name * @id: comment ID
* @optional: boolean flag (non-0 true) if argument is optional * @author: author ID
* @description: description of argument (HTML) * @authorname: author name
* @datecreate: date of creation
* @permalink: permanent link of comment
* @text: comment text
* *
* A photo comment. * A photo comment.
*/ */
typedef struct flickcurl_comment_s { typedef struct flickcurl_comment_s {
char* id; char* id;
char* author; char* author;
char* authorname; char* authorname;
int datecreate; int datecreate;
char* permalink; char* permalink;
char* text; char* text;
skipping to change at line 271 skipping to change at line 369
* *
* A Photo Location. * A Photo Location.
*/ */
typedef struct typedef struct
{ {
double latitude; double latitude;
double longitude; double longitude;
int accuracy; int accuracy;
} flickcurl_location; } flickcurl_location;
/**
* flickcurl_place_type:
* @FLICKCURL_PLACE_LOCATION: a general location
* @FLICKCURL_PLACE_NEIGHBORHOOD: neighborhood (narrowest place)
* @FLICKCURL_PLACE_LOCALITY: locality
* @FLICKCURL_PLACE_COUNTY: county
* @FLICKCURL_PLACE_REGION: region
* @FLICKCURL_PLACE_COUNTRY: country (widest place)
* @FLICKCURL_PLACE_LAST: internal offset to last in enum list
*
* Place type
*/
typedef enum { typedef enum {
FLICKCURL_PLACE_LOCATION, FLICKCURL_PLACE_LOCATION,
FLICKCURL_PLACE_NEIGHBORHOOD, FLICKCURL_PLACE_NEIGHBORHOOD,
FLICKCURL_PLACE_LOCALITY, FLICKCURL_PLACE_LOCALITY,
FLICKCURL_PLACE_COUNTY, FLICKCURL_PLACE_COUNTY,
FLICKCURL_PLACE_REGION, FLICKCURL_PLACE_REGION,
FLICKCURL_PLACE_COUNTRY, FLICKCURL_PLACE_COUNTRY,
FLICKCURL_PLACE_LAST = FLICKCURL_PLACE_COUNTRY FLICKCURL_PLACE_LAST = FLICKCURL_PLACE_COUNTRY
} flickcurl_place_type; } flickcurl_place_type;
/** /**
* flickcurl_place: * flickcurl_place:
* @names: Array of place names * @names: Array of place names
* @ids: Array of place IDs * @ids: Array of place IDs
* @urls: Array of place urls. * @urls: Array of place urls.
* @type: Location type of index 0 (the location) usually
* FLICKCURL_PLACE_LOCATION but may be wider
* *
* A Place. * A Place.
* *
* Index 0 in the array is the location itself. flickcurl_get_place_type_la bel() * Index 0 in the array is the location itself. flickcurl_get_place_type_la bel()
* returns labels for the array indexes of type #flickcurl_place_type. * can give labels for the array indexes of type #flickcurl_place_type.
* *
*/ */
typedef struct typedef struct
{ {
char* names[FLICKCURL_PLACE_LAST+1]; char* names[FLICKCURL_PLACE_LAST+1];
char* ids[FLICKCURL_PLACE_LAST+1]; char* ids[FLICKCURL_PLACE_LAST+1];
char* urls[FLICKCURL_PLACE_LAST+1]; char* urls[FLICKCURL_PLACE_LAST+1];
flickcurl_place_type type;
} flickcurl_place; } flickcurl_place;
/** /**
* flickcurl_tag: * flickcurl_tag:
* @photo: Associated photo object if any * @photo: Associated photo object if any
* @id: tag identifier * @id: tag identifier
* @author: author (may be NULL) * @author: author (may be NULL)
* @authornamae: author real name (may be NULL) * @authorname: author real name (may be NULL)
* @raw: raw tag as user typed it (may be NULL, but if so @cooked must be n ot NULL) * @raw: raw tag as user typed it (may be NULL, but if so @cooked must be n ot NULL)
* @cooked: cooked tag (may be NULL, but if so @raw must not be NULL) * @cooked: cooked tag (may be NULL, but if so @raw must not be NULL)
* @machine_tag: boolean (non-0 true) if tag is a Machine Tag * @machine_tag: boolean (non-0 true) if tag is a Machine Tag
* @count: tag count in a histogram (or 0) * @count: tag count in a histogram (or 0)
* *
* A tag OR a posting of a tag about a photo by a user OR a tag in a histog ram * A tag OR a posting of a tag about a photo by a user OR a tag in a histog ram
* *
* Most of these fields may be NULL, 0 for numbers * Most of these fields may be NULL, 0 for numbers
* but not all. Either @raw or @cooked MUST appear. * but not all. Either @raw or @cooked MUST appear.
* *
skipping to change at line 329 skipping to change at line 442
struct flickcurl_photo_s* photo; struct flickcurl_photo_s* photo;
char* id; char* id;
char* author; char* author;
char* authorname; char* authorname;
char* raw; char* raw;
char* cooked; char* cooked;
int machine_tag; int machine_tag;
int count; int count;
} flickcurl_tag; } flickcurl_tag;
/**
* flickcurl_photo_field:
* @string: string field value
* @integer: integer field value
* @type: field type
*
* Field of a photo structure
*/
typedef struct { typedef struct {
char* string; char* string;
flickcurl_photo_field_type integer; flickcurl_photo_field_type integer;
flickcurl_field_value_type type; flickcurl_field_value_type type;
} flickcurl_photo_field; } flickcurl_photo_field;
/** /**
* flickcurl_photo: * flickcurl_photo:
* @id: photo ID * @id: photo ID
* @uri: photo page URI * @uri: photo page URI
skipping to change at line 381 skipping to change at line 502
/* license url or NULL if none */ /* license url or NULL if none */
char *url; char *url;
/* license name */ /* license name */
char *name; char *name;
} flickcurl_license; } flickcurl_license;
/** /**
* flickcurl_contact: * flickcurl_contact:
* @nsid: NSID * @nsid: NSID
* @username: user name * @username: user name
* @iconserver: * @iconserver: icon server
* @realname: * @realname: real name
* @is_friend: * @is_friend: is friend boolean
* @is_family: * @is_family: is family boolean
* @ignored: * @ignored: ignored
* *
* A contact. * A contact.
*/ */
typedef struct flickcurl_contact_s { typedef struct flickcurl_contact_s {
char *nsid; char *nsid;
char *username; char *username;
int iconserver; int iconserver;
char *realname; char *realname;
int is_friend; int is_friend;
int is_family; int is_family;
int ignored; int ignored;
} flickcurl_contact; } flickcurl_contact;
/* /**
* flickcurl_context_type:
* @FLICKCURL_CONTEXT_SET: context is a set
* @FLICKCURL_CONTEXT_POOL: context is a pool
* @FLICKCURL_CONTEXT_PREV: context is a previous photo
* @FLICKCURL_CONTEXT_NEXT: context is a next photo
* @FLICKCURL_CONTEXT_NONE: internal
* @FLICKCURL_CONTEXT_LAST: internal offset to last in enum list
*
* Types of photo context: relationship between photo and another item * Types of photo context: relationship between photo and another item
*/ */
typedef enum { typedef enum {
FLICKCURL_CONTEXT_NONE, FLICKCURL_CONTEXT_NONE,
FLICKCURL_CONTEXT_SET, /* other thing is a set */ FLICKCURL_CONTEXT_SET, /* other thing is a set */
FLICKCURL_CONTEXT_POOL, /* other thing is a pool */ FLICKCURL_CONTEXT_POOL, /* other thing is a pool */
FLICKCURL_CONTEXT_PREV, /* other thing is a previous photo */ FLICKCURL_CONTEXT_PREV, /* other thing is a previous photo */
FLICKCURL_CONTEXT_NEXT, /* other thing is a next photo */ FLICKCURL_CONTEXT_NEXT, /* other thing is a next photo */
FLICKCURL_CONTEXT_LAST = FLICKCURL_CONTEXT_NEXT FLICKCURL_CONTEXT_LAST = FLICKCURL_CONTEXT_NEXT
} flickcurl_context_type; } flickcurl_context_type;
/**
* flickcurl_context:
* @type: Type of context
* @id: ID
* @secret: secret
* @server: server
* @farm: farm
* @title: use title
* @url: url
* @thumb: thumbnail
*
* Photo use context.
*/
typedef struct { typedef struct {
flickcurl_context_type type; flickcurl_context_type type;
char* id; char* id;
char* secret; /* may be NULL */ char* secret; /* may be NULL */
int server; /* may be 0 */ int server; /* may be 0 */
int farm; /* may be 0 */ int farm; /* may be 0 */
char* title; /* may be NULL */ char* title; /* may be NULL */
char* url; /* may be NULL */ char* url; /* may be NULL */
char* thumb; /* may be NULL */ char* thumb; /* may be NULL */
} flickcurl_context; } flickcurl_context;
skipping to change at line 482 skipping to change at line 624
int members; int members;
int throttle_count; int throttle_count;
char* throttle_mode; char* throttle_mode;
int throttle_remaining; int throttle_remaining;
} flickcurl_group; } flickcurl_group;
/** /**
* flickcurl_blog: * flickcurl_blog:
* @id: ID * @id: ID
* @name: Group Name * @name: Group Name
* @needspassword: needs password * @needs_password: needs password
* @url: URL * @url: URL
* *
* A blog. * A blog.
*/ */
typedef struct { typedef struct {
char* id; char* id;
char* name; char* name;
int needs_password; int needs_password;
char* url; char* url;
} flickcurl_blog; } flickcurl_blog;
skipping to change at line 515 skipping to change at line 657
char* name; char* name;
char* path; char* path;
int count; int count;
struct flickcurl_category_s** categories; struct flickcurl_category_s** categories;
int categories_count; int categories_count;
flickcurl_group** groups; flickcurl_group** groups;
int groups_count; int groups_count;
}; };
typedef struct flickcurl_category_s flickcurl_category; typedef struct flickcurl_category_s flickcurl_category;
/* /**
* flickcurl_person_field_type:
* @PERSON_FIELD_isadmin: is admin field boolean
* @PERSON_FIELD_ispro: is pro field boolean
* @PERSON_FIELD_iconserver: icon server integer
* @PERSON_FIELD_iconfarm: icon farm integer
* @PERSON_FIELD_username: username
* @PERSON_FIELD_realname: real name
* @PERSON_FIELD_mbox_sha1sum: Email SHA1 sum
* @PERSON_FIELD_location: location
* @PERSON_FIELD_photosurl: photos URL
* @PERSON_FIELD_profileurl: profile URL
* @PERSON_FIELD_mobileurl: mobile URL
* @PERSON_FIELD_photos_firstdate: photos first date
* @PERSON_FIELD_photos_firstdatetaken: photos first date taken
* @PERSON_FIELD_photos_count: photos count
* @PERSON_FIELD_photos_views: photos views
* @PERSON_FIELD_favedate: favorite date
* @PERSON_FIELD_none: internal
* @PERSON_FIELD_FIRST: internal offset to first in enum list
* @PERSON_FIELD_LAST: internal offset to last in enum list
*
* Fields of a flickcurl_person* * Fields of a flickcurl_person*
*/ */
typedef enum { typedef enum {
PERSON_FIELD_none, PERSON_FIELD_none,
PERSON_FIELD_isadmin, /* boolean */ PERSON_FIELD_isadmin, /* boolean */
PERSON_FIELD_ispro, /* boolean */ PERSON_FIELD_ispro, /* boolean */
PERSON_FIELD_iconserver, /* integer */ PERSON_FIELD_iconserver, /* integer */
PERSON_FIELD_iconfarm, /* integer - not in API docs */ PERSON_FIELD_iconfarm, /* integer - not in API docs */
PERSON_FIELD_username, /* string */ PERSON_FIELD_username, /* string */
PERSON_FIELD_realname, /* string */ PERSON_FIELD_realname, /* string */
skipping to change at line 540 skipping to change at line 703
PERSON_FIELD_mobileurl, /* string - not in API docs */ PERSON_FIELD_mobileurl, /* string - not in API docs */
PERSON_FIELD_photos_firstdate, /* dateTime */ PERSON_FIELD_photos_firstdate, /* dateTime */
PERSON_FIELD_photos_firstdatetaken, /* dateTime */ PERSON_FIELD_photos_firstdatetaken, /* dateTime */
PERSON_FIELD_photos_count, /* integer */ PERSON_FIELD_photos_count, /* integer */
PERSON_FIELD_photos_views, /* integer - not in API docs */ PERSON_FIELD_photos_views, /* integer - not in API docs */
PERSON_FIELD_favedate, /* dateTime - flickr.photos.getFavori tes() */ PERSON_FIELD_favedate, /* dateTime - flickr.photos.getFavori tes() */
PERSON_FIELD_FIRST = PERSON_FIELD_isadmin, PERSON_FIELD_FIRST = PERSON_FIELD_isadmin,
PERSON_FIELD_LAST = PERSON_FIELD_favedate PERSON_FIELD_LAST = PERSON_FIELD_favedate
} flickcurl_person_field_type; } flickcurl_person_field_type;
/**
* flickcurl_person_field:
* @string: string field value
* @integer: integer field value
* @type: field type
*
* Field of a person structure
*/
typedef struct { typedef struct {
char* string; char* string;
flickcurl_person_field_type integer; flickcurl_person_field_type integer;
flickcurl_field_value_type type; flickcurl_field_value_type type;
} flickcurl_person_field; } flickcurl_person_field;
/** /**
* flickcurl_person: * flickcurl_person:
* @nsid: user NSID * @nsid: user NSID
* @fields: person fields * @fields: person fields
* *
* A flickr user. * A user.
*
*/ */
typedef struct { typedef struct {
char *nsid; char *nsid;
flickcurl_person_field fields[PERSON_FIELD_LAST + 1]; flickcurl_person_field fields[PERSON_FIELD_LAST + 1];
} flickcurl_person; } flickcurl_person;
/** /**
* flickcurl_upload_params: * flickcurl_upload_params:
* @photo_file: photo filename * @photo_file: photo filename
skipping to change at line 626 skipping to change at line 796
* @bbox: A comma-delimited list of 4 values defining the Bounding Box of t he area that will be searched. * @bbox: A comma-delimited list of 4 values defining the Bounding Box of t he area that will be searched.
* @accuracy: Recorded accuracy level of the location information. Current range is 1-16 * @accuracy: Recorded accuracy level of the location information. Current range is 1-16
* @safe_search: Safe search setting: 1 safe, 2 moderate, 3 restricted. * @safe_search: Safe search setting: 1 safe, 2 moderate, 3 restricted.
* @content_type: Content Type setting: 1 for photos only, 2 for screenshot s only, 3 for 'other' only, 4 for all types. (or NULL) * @content_type: Content Type setting: 1 for photos only, 2 for screenshot s only, 3 for 'other' only, 4 for all types. (or NULL)
* @machine_tags: Machine tag search syntax * @machine_tags: Machine tag search syntax
* @machine_tag_mode: Either 'any' for an OR combination of tags, or 'all' for an AND combination. Defaults to 'any' if not specified. * @machine_tag_mode: Either 'any' for an OR combination of tags, or 'all' for an AND combination. Defaults to 'any' if not specified.
* @group_id: The id of a group who's pool to search. If specified, only m atching photos posted to the group's pool will be returned. (or NULL) * @group_id: The id of a group who's pool to search. If specified, only m atching photos posted to the group's pool will be returned. (or NULL)
* @extras: A comma-delimited list of extra information to fetch for each r eturned record. Currently supported fields are: <code>license</code>, <code >date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <cod e>icon_server</code>, <code>original_format</code>, <code>last_update</code >, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>. (or NULL ) * @extras: A comma-delimited list of extra information to fetch for each r eturned record. Currently supported fields are: <code>license</code>, <code >date_upload</code>, <code>date_taken</code>, <code>owner_name</code>, <cod e>icon_server</code>, <code>original_format</code>, <code>last_update</code >, <code>geo</code>, <code>tags</code>, <code>machine_tags</code>. (or NULL )
* @per_page: Number of photos to return per page. If this argument is omit ted, it defaults to 100. The maximum allowed value is 500. (or NULL) * @per_page: Number of photos to return per page. If this argument is omit ted, it defaults to 100. The maximum allowed value is 500. (or NULL)
* @page: The page of results to return. If this argument is omitted, it de faults to 1. (or NULL) * @page: The page of results to return. If this argument is omitted, it de faults to 1. (or NULL)
* @place_id: A Flickr place id. (only used if bbox argument isn't present) . Experimental. Geo queries require some sort of limiting agent in order t o prevent the database from crying. This is basically like the check agains t "parameterless searches" for queries without a geo component. A tag, fo r instance, is considered a limiting agent as are user defined min_date_tak en and min_date_upload parameters &emdash; If no limiting factor is passed we return only photos added in the last 12 hours (though we may extend the limit in the future) (or NULL) * @place_id: A Flickr place id. (only used if bbox argument isn't present) . Experimental. Geo queries require some sort of limiting agent in order t o prevent the database from crying. This is basically like the check agains t "parameterless searches" for queries without a geo component. A tag, fo r instance, is considered a limiting agent as are user defined min_date_tak en and min_date_upload parameters - If no limiting factor is passed we retu rn only photos added in the last 12 hours (though we may extend the limit i n the future) (or NULL)
* *
* Search parameters for &flickcurl_photos_search() * Search parameters for flickcurl_photos_search()
*/ */
typedef struct { typedef struct {
char* user_id; char* user_id;
char* tags; char* tags;
char* tag_mode; char* tag_mode;
char* text; char* text;
int min_upload_date; int min_upload_date;
int max_upload_date; int max_upload_date;
char* min_taken_date; char* min_taken_date;
char* max_taken_date; char* max_taken_date;
skipping to change at line 750 skipping to change at line 920
int bandwidth_remainingkb; int bandwidth_remainingkb;
int filesize_maxbytes; int filesize_maxbytes;
int filesize_maxkb; int filesize_maxkb;
int sets_created; int sets_created;
char* sets_remaining; char* sets_remaining;
} flickcurl_user_upload_status; } flickcurl_user_upload_status;
/* callback handlers */ /* callback handlers */
/**
* flickcurl_message_handler
* @user_data: user data pointer
* @message: error message
*
* Flickcurl Message handler callback.
*/
typedef void (*flickcurl_message_handler)(void *user_data, const char *mess age); typedef void (*flickcurl_message_handler)(void *user_data, const char *mess age);
/**
* flickcurl_tag_handler
* @user_data: user data pointer
* @tag: tag
*
* Flickcurl Tag handler callback.
*/
typedef void (*flickcurl_tag_handler)(void *user_data, flickcurl_tag* tag); typedef void (*flickcurl_tag_handler)(void *user_data, flickcurl_tag* tag);
/* library constants */ /* library constants */
extern const char* const flickcurl_short_copyright_string; extern const char* const flickcurl_short_copyright_string;
extern const char* const flickcurl_copyright_string; extern const char* const flickcurl_copyright_string;
extern const char* const flickcurl_license_string; extern const char* const flickcurl_license_string;
extern const char* const flickcurl_home_url_string; extern const char* const flickcurl_home_url_string;
extern const char* const flickcurl_version_string; extern const char* const flickcurl_version_string;
/* library init - call once before creating anything */ /* library init - call once before creating anything */
void flickcurl_init(void); int flickcurl_init(void);
/* library cleanup - call once before exit */ /* library cleanup - call once before exit */
void flickcurl_finish(void); void flickcurl_finish(void);
/* flickcurl* object constructor */ /* flickcurl* object constructor */
flickcurl* flickcurl_new(void); flickcurl* flickcurl_new(void);
/* flickcurl* object destructor */ /* flickcurl* object destructor */
void flickcurl_free(flickcurl *fc); void flickcurl_free(flickcurl *fc);
/* flickcurl* object set methods */ /* flickcurl* object set methods */
skipping to change at line 809 skipping to change at line 995
void flickcurl_free_persons(flickcurl_person** persons); void flickcurl_free_persons(flickcurl_person** persons);
void flickcurl_free_context(flickcurl_context *context); void flickcurl_free_context(flickcurl_context *context);
void flickcurl_free_contexts(flickcurl_context** contexts); void flickcurl_free_contexts(flickcurl_context** contexts);
void flickcurl_free_perms(flickcurl_perms *perms); void flickcurl_free_perms(flickcurl_perms *perms);
void flickcurl_free_location(flickcurl_location *location); void flickcurl_free_location(flickcurl_location *location);
void flickcurl_free_exif(flickcurl_exif *exif); void flickcurl_free_exif(flickcurl_exif *exif);
void flickcurl_free_exifs(flickcurl_exif **exifs_object); void flickcurl_free_exifs(flickcurl_exif **exifs_object);
void flickcurl_free_ticket(flickcurl_ticket *ticket); void flickcurl_free_ticket(flickcurl_ticket *ticket);
void flickcurl_free_tickets(flickcurl_ticket **tickets_object); void flickcurl_free_tickets(flickcurl_ticket **tickets_object);
void flickcurl_free_user_upload_status(flickcurl_user_upload_status *u); void flickcurl_free_user_upload_status(flickcurl_user_upload_status *u);
void flickcurl_free_place(flickcurl_place* place);
void flickcurl_free_places(flickcurl_place** places_object);
/* utility methods */ /* utility methods */
/* get an image URL for a photo in some size */ /* get an image URL for a photo in some size */
char* flickcurl_photo_as_source_uri(flickcurl_photo *photo, const char c); char* flickcurl_photo_as_source_uri(flickcurl_photo *photo, const char c);
/* get labels for various field/types */ /* get labels for various field/types */
const char* flickcurl_get_photo_field_label(flickcurl_photo_field_type fiel d); const char* flickcurl_get_photo_field_label(flickcurl_photo_field_type fiel d);
const char* flickcurl_get_person_field_label(flickcurl_person_field_type fi eld); const char* flickcurl_get_person_field_label(flickcurl_person_field_type fi eld);
const char* flickcurl_get_field_value_type_label(flickcurl_field_value_type datatype); const char* flickcurl_get_field_value_type_label(flickcurl_field_value_type datatype);
const char* flickcurl_get_context_type_field_label(flickcurl_context_type t ype); const char* flickcurl_get_context_type_field_label(flickcurl_context_type t ype);
/* read a 'INI' style configuration file */ /**
* set_config_var_handler:
* @userdata: user data pointer
* @key: key
* @value: value
*
* Handler to get variables returned from an 'INI' style configuration file
*/
typedef void (*set_config_var_handler)(void* userdata, const char* key, con st char* value); typedef void (*set_config_var_handler)(void* userdata, const char* key, con st char* value);
int read_ini_config(const char* filename, const char* application, void* us er_data, set_config_var_handler handler); int read_ini_config(const char* filename, const char* application, void* us er_data, set_config_var_handler handler);
/* Flickr API calls */ /* Flickr API calls */
/* flickr.activity */ /* flickr.activity */
flickcurl_activity** flickcurl_activity_userComments(flickcurl* fc, int per _page, int page); flickcurl_activity** flickcurl_activity_userComments(flickcurl* fc, int per _page, int page);
flickcurl_activity** flickcurl_activity_userPhotos(flickcurl* fc, const cha r* timeframe, int per_page, int page); flickcurl_activity** flickcurl_activity_userPhotos(flickcurl* fc, const cha r* timeframe, int per_page, int page);
void flickcurl_free_activities(flickcurl_activity** activities); void flickcurl_free_activities(flickcurl_activity **activities_object);
/* flickr.auth */ /* flickr.auth */
char* flickcurl_auth_checkToken(flickcurl* fc, const char* token); char* flickcurl_auth_checkToken(flickcurl* fc, const char* token);
char* flickcurl_auth_getFrob(flickcurl* fc); char* flickcurl_auth_getFrob(flickcurl* fc);
char* flickcurl_auth_getFullToken(flickcurl* fc, const char* frob); char* flickcurl_auth_getFullToken(flickcurl* fc, const char* frob);
char* flickcurl_auth_getToken(flickcurl* fc, const char* frob); char* flickcurl_auth_getToken(flickcurl* fc, const char* frob);
/* flickr.blogs */ /* flickr.blogs */
flickcurl_blog** flickcurl_blogs_getList(flickcurl* fc); flickcurl_blog** flickcurl_blogs_getList(flickcurl* fc);
int flickcurl_blogs_postPhoto(flickcurl* fc, const char* blog_id, const cha r* photo_id, const char* title, const char* description, const char* blog_p assword); int flickcurl_blogs_postPhoto(flickcurl* fc, const char* blog_id, const cha r* photo_id, const char* title, const char* description, const char* blog_p assword);
skipping to change at line 883 skipping to change at line 1078
flickcurl_person* flickcurl_people_getInfo(flickcurl* fc, const char* user_ id); flickcurl_person* flickcurl_people_getInfo(flickcurl* fc, const char* user_ id);
flickcurl_group** flickcurl_people_getPublicGroups(flickcurl* fc, const cha r* user_id); flickcurl_group** flickcurl_people_getPublicGroups(flickcurl* fc, const cha r* user_id);
flickcurl_photo** flickcurl_people_getPublicPhotos(flickcurl* fc, const cha r* user_id, const char* extras, int per_page, int page); flickcurl_photo** flickcurl_people_getPublicPhotos(flickcurl* fc, const cha r* user_id, const char* extras, int per_page, int page);
flickcurl_user_upload_status* flickcurl_people_getUploadStatus(flickcurl* f c); flickcurl_user_upload_status* flickcurl_people_getUploadStatus(flickcurl* f c);
/* flickr.photos */ /* flickr.photos */
int flickcurl_photos_addTags(flickcurl* fc, const char* photo_id, const cha r* tags); int flickcurl_photos_addTags(flickcurl* fc, const char* photo_id, const cha r* tags);
int flickcurl_photos_delete(flickcurl* fc, const char* photo_id); int flickcurl_photos_delete(flickcurl* fc, const char* photo_id);
flickcurl_context** flickcurl_photos_getAllContexts(flickcurl* fc, const ch ar* photo_id); flickcurl_context** flickcurl_photos_getAllContexts(flickcurl* fc, const ch ar* photo_id);
flickcurl_photo** flickcurl_photos_getContactsPhotos(flickcurl* fc, int con tact_count, int just_friends, int single_photo, int include_self, const cha r* extras); flickcurl_photo** flickcurl_photos_getContactsPhotos(flickcurl* fc, int con tact_count, int just_friends, int single_photo, int include_self, const cha r* extras);
flickcurl_photo** flickcurl_photos_getContactsPublicPhotos(flickcurl* fc, c onst char* user_id, int count, int just_friends, int single_photo, int inc lude_self, const char* extras); flickcurl_photo** flickcurl_photos_getContactsPublicPhotos(flickcurl* fc, c onst char* user_id, int photo_count, int just_friends, int single_photo, i nt include_self, const char* extras);
flickcurl_context** flickcurl_photos_getContext(flickcurl* fc, const char* photo_id); flickcurl_context** flickcurl_photos_getContext(flickcurl* fc, const char* photo_id);
int** flickcurl_photos_getCounts(flickcurl* fc, const char** dates_array, c onst char** taken_dates_array); int** flickcurl_photos_getCounts(flickcurl* fc, const char** dates_array, c onst char** taken_dates_array);
flickcurl_exif** flickcurl_photos_getExif(flickcurl* fc, const char* photo_ id, const char* secret); flickcurl_exif** flickcurl_photos_getExif(flickcurl* fc, const char* photo_ id, const char* secret);
flickcurl_person** flickcurl_photos_getFavorites(flickcurl* fc, const char* photo_id, int page, int per_page); flickcurl_person** flickcurl_photos_getFavorites(flickcurl* fc, const char* photo_id, int page, int per_page);
flickcurl_photo* flickcurl_photos_getInfo(flickcurl *fc, const char* photo_ id); flickcurl_photo* flickcurl_photos_getInfo(flickcurl *fc, const char* photo_ id);
flickcurl_photo** flickcurl_photos_getNotInSet(flickcurl* fc, int min_uploa d_date, int max_upload_date, const char* min_taken_date, const char* max_ta ken_date, int privacy_filter, const char* extras, int per_page, int page); flickcurl_photo** flickcurl_photos_getNotInSet(flickcurl* fc, int min_uploa d_date, int max_upload_date, const char* min_taken_date, const char* max_ta ken_date, int privacy_filter, const char* extras, int per_page, int page);
flickcurl_perms* flickcurl_photos_getPerms(flickcurl* fc, const char* photo _id); flickcurl_perms* flickcurl_photos_getPerms(flickcurl* fc, const char* photo _id);
flickcurl_photo** flickcurl_photos_getRecent(flickcurl* fc, const char* ext ras, int per_page, int page); flickcurl_photo** flickcurl_photos_getRecent(flickcurl* fc, const char* ext ras, int per_page, int page);
flickcurl_size** flickcurl_photos_getSizes(flickcurl* fc, const char* photo _id); flickcurl_size** flickcurl_photos_getSizes(flickcurl* fc, const char* photo _id);
flickcurl_photo** flickcurl_photos_getUntagged(flickcurl* fc, int min_uploa d_date, int max_upload_date, const char* min_taken_date, const char* max_ta ken_date, int privacy_filter, const char* extras, int per_page, int page); flickcurl_photo** flickcurl_photos_getUntagged(flickcurl* fc, int min_uploa d_date, int max_upload_date, const char* min_taken_date, const char* max_ta ken_date, int privacy_filter, const char* extras, int per_page, int page);
skipping to change at line 907 skipping to change at line 1102
int flickcurl_photos_removeTag(flickcurl* fc, const char* tag_id); int flickcurl_photos_removeTag(flickcurl* fc, const char* tag_id);
flickcurl_photo** flickcurl_photos_search(flickcurl* fc, flickcurl_search_p arams* params); flickcurl_photo** flickcurl_photos_search(flickcurl* fc, flickcurl_search_p arams* params);
int flickcurl_photos_setContentType(flickcurl* fc, const char* photo_id, in t content_type); int flickcurl_photos_setContentType(flickcurl* fc, const char* photo_id, in t content_type);
int flickcurl_photos_setDates(flickcurl* fc, const char* photo_id, int date _posted, int date_taken, int date_taken_granularity); int flickcurl_photos_setDates(flickcurl* fc, const char* photo_id, int date _posted, int date_taken, int date_taken_granularity);
int flickcurl_photos_setMeta(flickcurl* fc, const char* photo_id, const cha r* title, const char* description); int flickcurl_photos_setMeta(flickcurl* fc, const char* photo_id, const cha r* title, const char* description);
int flickcurl_photos_setPerms(flickcurl* fc, const char* photo_id, flickcur l_perms* perms); int flickcurl_photos_setPerms(flickcurl* fc, const char* photo_id, flickcur l_perms* perms);
int flickcurl_photos_setSafetyLevel(flickcurl* fc, const char* photo_id, in t safety_level, int hidden); int flickcurl_photos_setSafetyLevel(flickcurl* fc, const char* photo_id, in t safety_level, int hidden);
int flickcurl_photos_setTags(flickcurl* fc, const char* photo_id, const cha r* tags); int flickcurl_photos_setTags(flickcurl* fc, const char* photo_id, const cha r* tags);
/* flickr.places */ /* flickr.places */
flickcurl_place** flickcurl_places_find(flickcurl* fc, const char* query);
flickcurl_place* flickcurl_places_findByLatLon(flickcurl* fc, double lat, d
ouble lon, int accuracy);
flickcurl_place* flickcurl_places_resolvePlaceId(flickcurl* fc, const char* place_id); flickcurl_place* flickcurl_places_resolvePlaceId(flickcurl* fc, const char* place_id);
flickcurl_place* flickcurl_places_resolvePlaceURL(flickcurl* fc, const char * url); flickcurl_place* flickcurl_places_resolvePlaceURL(flickcurl* fc, const char * url);
const char* flickcurl_get_place_type_label(flickcurl_place_type place_type) ; const char* flickcurl_get_place_type_label(flickcurl_place_type place_type) ;
void flickcurl_free_place(flickcurl_place* place); flickcurl_place_type flickcurl_get_place_type_by_label(const char* place_la bel);
/* flickr.contacts */ /* flickr.contacts */
void flickcurl_free_contact(flickcurl_contact *contact_object); void flickcurl_free_contact(flickcurl_contact *contact_object);
void flickcurl_free_contacts(flickcurl_contact **contacts_object); void flickcurl_free_contacts(flickcurl_contact **contacts_object);
flickcurl_contact** flickcurl_contacts_getList(flickcurl* fc, const char* f ilter, int page, int per_page); flickcurl_contact** flickcurl_contacts_getList(flickcurl* fc, const char* f ilter, int page, int per_page);
flickcurl_contact** flickcurl_contacts_getPublicList(flickcurl* fc, const c har* user_id, int page, int per_page); flickcurl_contact** flickcurl_contacts_getPublicList(flickcurl* fc, const c har* user_id, int page, int per_page);
/* flickr.photos.comments */ /* flickr.photos.comments */
void flickcurl_free_comment(flickcurl_comment *comment_object); void flickcurl_free_comment(flickcurl_comment *comment_object);
void flickcurl_free_comments(flickcurl_comment **comments_object); void flickcurl_free_comments(flickcurl_comment **comments_object);
skipping to change at line 1005 skipping to change at line 1202
FLICKCURL_DEPRECATED flickcurl_upload_status* flickcurl_photos_upload(flick curl* fc, const char* photo_file, const char *title, const char *descriptio n, const char *tags, int is_public, int is_friend, int is_family); FLICKCURL_DEPRECATED flickcurl_upload_status* flickcurl_photos_upload(flick curl* fc, const char* photo_file, const char *title, const char *descriptio n, const char *tags, int is_public, int is_friend, int is_family);
flickcurl_upload_status* flickcurl_photos_upload_params(flickcurl* fc, flic kcurl_upload_params* params); flickcurl_upload_status* flickcurl_photos_upload_params(flickcurl* fc, flic kcurl_upload_params* params);
flickcurl_upload_status* flickcurl_photos_replace(flickcurl* fc, const char * photo_file, const char *photo_id, int async); flickcurl_upload_status* flickcurl_photos_replace(flickcurl* fc, const char * photo_file, const char *photo_id, int async);
void flickcurl_free_upload_status(flickcurl_upload_status* status); void flickcurl_free_upload_status(flickcurl_upload_status* status);
FLICKCURL_DEPRECATED void flickcurl_upload_status_free(flickcurl_upload_sta tus* status); FLICKCURL_DEPRECATED void flickcurl_upload_status_free(flickcurl_upload_sta tus* status);
char* flickcurl_array_join(const char *array[], char delim); char* flickcurl_array_join(const char *array[], char delim);
char** flickcurl_array_split(const char *str, char delim); char** flickcurl_array_split(const char *str, char delim);
void flickcurl_array_free(char *array[]); void flickcurl_array_free(char *array[]);
/* ignore these */
/**
* FLICKCURL_DEPRECATED:
*
* deprecated
*/
/**
* flickcurl_category_s:
* @id: ignore
* @name: ignore
* @path: ignore
* @count: ignore
* @categories: ignore
* @categories_count: ignore
* @groups: ignore
* @groups_count: ignore
*
* category_s
*/
/**
* flickcurl_photo_s:
*
* photo_s
*/
/**
* flickcurl_s:
*
* flickcurl
*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 33 change blocks. 
26 lines changed or deleted 255 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/