flickcurl.h   flickcurl.h 
skipping to change at line 31 skipping to change at line 31
#ifndef FLICKCURL_H #ifndef FLICKCURL_H
#define FLICKCURL_H #define FLICKCURL_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* needed for xmlDocPtr */ /* needed for xmlDocPtr */
#include <libxml/tree.h> #include <libxml/tree.h>
/* Use gcc 3.1+ feature to allow marking of deprecated API calls.
* This gives a warning during compiling.
*/
#if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3
#ifdef __APPLE_CC__
/* OSX gcc cpp-precomp is broken */
#define FLICKCURL_DEPRECATED
#else
#define FLICKCURL_DEPRECATED __attribute__((deprecated))
#endif
#else
#define FLICKCURL_DEPRECATED
#endif
/* /*
* 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,
skipping to change at line 156 skipping to change at line 170
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;
} flickcurl_comment; } flickcurl_comment;
/** /**
* flickcurl_perms:
* @is_public: non-0 to set the photo to public else private
* @is_friend: non-0 to make the photo visible to friends when private
* @is_family: non-0 to make the photo visible to family when private
* @perm_comment: who can add comments to the photo and it's notes. one of:
0 nobody, 1 friends & family, 2 contacts, 3 everybody
* @perm_addmeta: who can add notes and tags to the photo. one of: 0 nobody
/ just the owner, 1 friends & family, 2 contacts, 3 everybody
*
* Permissions as used by flickcurl_photos_getPerms() and
* flickcurl_photos_setPerms().
*/
typedef struct
{
int is_public;
int is_friend;
int is_family;
int perm_comment;
int perm_addmeta;
} flickcurl_perms;
/**
* 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) * @authornamae: 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)
* *
skipping to change at line 227 skipping to change at line 261
*/ */
typedef struct { typedef struct {
/* license id */ /* license id */
int id; int id;
/* 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:
* @nsid: NSID
* @username: user name
* @iconserver:
* @realname:
* @is_friend:
* @is_family:
* @ignored:
*
* A contact.
*/
typedef struct flickcurl_contact_s {
char *nsid;
char *username;
int iconserver;
char *realname;
int is_friend;
int is_family;
int ignored;
} flickcurl_contact;
/* /*
* 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
skipping to change at line 294 skipping to change at line 350
* A flickr user. * A flickr 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:
* @photo_file: photo filename
* @title: title or NULL
* @description: description of photo (HTML) (or NULL)
* @tags: space-separated list of tags (or NULL)
* @is_public: is public photo boolean (non-0 true)
* @is_friend: is friend photo boolean (non-0 true)
* @is_family: is family photo boolean (non-0 true)
* @safety_level: 1=safe, 2=moderate, 3=restricted
* @content_type: 1=photo, 2=screenshot, 3=other/artwork
*
* Photo upload parameters
*/
typedef struct {
const char* photo_file;
const char *title;
const char *description;
const char *tags;
int is_public;
int is_friend;
int is_family;
int safety_level;
int content_type;
} flickcurl_upload_params;
/**
* flickcurl_upload_status: * flickcurl_upload_status:
* @photoid: photo ID that was uploaded/replaced (upload only) * @photoid: photo ID that was uploaded/replaced (upload only)
* @secret: secret of photo uploaded (replace only) * @secret: secret of photo uploaded (replace only)
* @originalsecret: secret of original photo (replace only) * @originalsecret: secret of original photo (replace only)
* @ticketid: ticket ID for asynchronous upload (replace only) * @ticketid: ticket ID for asynchronous upload (replace only)
* *
* An upload response. * An upload response.
* *
*/ */
typedef struct { typedef struct {
char *photoid; char *photoid;
char *secret; char *secret;
char *originalsecret; char *originalsecret;
char *ticketid; char *ticketid;
} flickcurl_upload_status; } flickcurl_upload_status;
/**
* flickcurl_search_params:
* @user_id: The NSID of the user who's photo to search (or "me" or NULL).
* @tags: A comma-delimited list of tags (or NULL)
* @tag_mode: Either 'any' for an OR combination of tags, or 'all' for an A
ND combination. Defaults to 'any' if not specified (or NULL)
* @text: Free text search (or NULL)
* @min_upload_date: Minimum upload date as a unix timestamp (or NULL)
* @max_upload_date: Maximum upload date as a unix timestamp (or NULL)
* @min_taken_date: Minimum taken date in the form of a mysql datetime (or
NULL)
* @max_taken_date: Maximum taken date in the form of a mysql datetime (or
NULL)
* @license: Comma-separated list of photo licenses (or NULL)
* @sort: The order in which to sort returned photos. Defaults to date-post
ed-desc. The possible values are: date-posted-asc, date-posted-desc, date-t
aken-asc, date-taken-desc, interestingness-desc, interestingness-asc, and r
elevance (or NULL)
* @privacy_filter: Return photos only matching a certain privacy level.
* @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
* @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)
* @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.
* @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
)
* @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)
*
* Search parameters for &flickcurl_photos_search()
*/
typedef struct {
char* user_id;
char* tags;
char* tag_mode;
char* text;
int min_upload_date;
int max_upload_date;
char* min_taken_date;
char* max_taken_date;
char* license;
char* sort;
char* privacy_filter;
char* bbox;
int accuracy;
int safe_search;
int content_type;
char* machine_tags;
char* machine_tag_mode;
char* group_id;
char* extras;
int per_page;
int page;
} flickcurl_search_params;
/* callback handlers */ /* callback handlers */
typedef void (*flickcurl_message_handler)(void *user_data, const char *mess age); typedef void (*flickcurl_message_handler)(void *user_data, const char *mess age);
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;
skipping to change at line 355 skipping to change at line 487
void flickcurl_set_xml_data(flickcurl *fc, xmlDocPtr doc); void flickcurl_set_xml_data(flickcurl *fc, xmlDocPtr doc);
/* flickcurl* object set methods */ /* flickcurl* object set methods */
const char* flickcurl_get_api_key(flickcurl *fc); const char* flickcurl_get_api_key(flickcurl *fc);
const char* flickcurl_get_shared_secret(flickcurl *fc); const char* flickcurl_get_shared_secret(flickcurl *fc);
const char* flickcurl_get_auth_token(flickcurl *fc); const char* flickcurl_get_auth_token(flickcurl *fc);
/* other flickcurl class destructors */ /* other flickcurl class destructors */
void flickcurl_free_tag(flickcurl_tag *t); void flickcurl_free_tag(flickcurl_tag *t);
void flickcurl_free_photo(flickcurl_photo *photo); void flickcurl_free_photo(flickcurl_photo *photo);
void flickcurl_free_photos(flickcurl_photo** photos);
/* void flickcurl_free_license(flickcurl_person *license); */ /* void flickcurl_free_license(flickcurl_person *license); */
void flickcurl_free_person(flickcurl_person *person); void flickcurl_free_person(flickcurl_person *person);
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);
/* 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);
skipping to change at line 393 skipping to change at line 527
/* flickr.people */ /* flickr.people */
char* flickcurl_people_findByEmail(flickcurl* fc, const char* email); char* flickcurl_people_findByEmail(flickcurl* fc, const char* email);
char* flickcurl_people_findByUsername(flickcurl* fc, const char* username); char* flickcurl_people_findByUsername(flickcurl* fc, const char* username);
flickcurl_person* flickcurl_people_getInfo(flickcurl* fc, const char* user_ id); flickcurl_person* flickcurl_people_getInfo(flickcurl* fc, const char* user_ id);
/* 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_context** flickcurl_photos_getContext(flickcurl* fc, const char* photo_id); flickcurl_context** flickcurl_photos_getContext(flickcurl* fc, const char* photo_id);
flickcurl_photo* flickcurl_photos_getInfo(flickcurl *fc, const char* photo_ id); flickcurl_photo* flickcurl_photos_getInfo(flickcurl *fc, const char* photo_ id);
flickcurl_perms* flickcurl_photos_getPerms(flickcurl* fc, const char* photo _id);
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);
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_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_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.contacts */
void flickcurl_free_contact(flickcurl_contact *contact_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_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);
char* flickcurl_photos_comments_addComment(flickcurl* fc, const char* photo _id, const char* comment_text); char* flickcurl_photos_comments_addComment(flickcurl* fc, const char* photo _id, const char* comment_text);
int flickcurl_photos_comments_deleteComment(flickcurl* fc, const char* comm ent_id); int flickcurl_photos_comments_deleteComment(flickcurl* fc, const char* comm ent_id);
int flickcurl_photos_comments_editComment(flickcurl* fc, const char* commen t_id, const char* comment_text); int flickcurl_photos_comments_editComment(flickcurl* fc, const char* commen t_id, const char* comment_text);
flickcurl_comment** flickcurl_photos_comments_getList(flickcurl* fc, const char* photo_id); flickcurl_comment** flickcurl_photos_comments_getList(flickcurl* fc, const char* photo_id);
/* flickr.photos.licenses */ /* flickr.photos.licenses */
flickcurl_license** flickcurl_photos_licenses_getInfo(flickcurl *fc); flickcurl_license** flickcurl_photos_licenses_getInfo(flickcurl *fc);
skipping to change at line 443 skipping to change at line 591
int flickcurl_test_echo(flickcurl* fc, const char* key, const char* value); int flickcurl_test_echo(flickcurl* fc, const char* key, const char* value);
/* flickr.urls */ /* flickr.urls */
char* flickcurl_urls_getGroup(flickcurl* fc, const char* group_id); char* flickcurl_urls_getGroup(flickcurl* fc, const char* group_id);
char* flickcurl_urls_getUserPhotos(flickcurl* fc, const char* user_id); char* flickcurl_urls_getUserPhotos(flickcurl* fc, const char* user_id);
char* flickcurl_urls_getUserProfile(flickcurl* fc, const char* user_id); char* flickcurl_urls_getUserProfile(flickcurl* fc, const char* user_id);
char* flickcurl_urls_lookupGroup(flickcurl* fc, const char* url); char* flickcurl_urls_lookupGroup(flickcurl* fc, const char* url);
char* flickcurl_urls_lookupUser(flickcurl* fc, const char* url); char* flickcurl_urls_lookupUser(flickcurl* fc, const char* url);
/* Upload API */ /* Upload API */
flickcurl_upload_status* flickcurl_photos_upload(flickcurl* fc, const char* FLICKCURL_DEPRECATED flickcurl_upload_status* flickcurl_photos_upload(flick
photo_file, const char *title, const char *description, const char *tags, curl* fc, const char* photo_file, const char *title, const char *descriptio
int is_public, int is_friend, int is_family); 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_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_upload_status_free(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);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 13 change blocks. 
4 lines changed or deleted 184 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/