flickcurl.h   flickcurl.h 
/* -*- Mode: c; c-basic-offset: 2 -*- /* -*- Mode: c; c-basic-offset: 2 -*-
* *
* flickcurl.h - Flickcurl API * flickcurl.h - Flickcurl API
* *
* Copyright (C) 2007-2009, David Beckett http://www.dajobe.org/ * Copyright (C) 2007-2010, David Beckett http://www.dajobe.org/
* *
* This file is licensed under the following three licenses as alternatives : * This file is licensed under the following three licenses as alternatives :
* 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
* 2. GNU General Public License (GPL) V2 or any newer version * 2. GNU General Public License (GPL) V2 or any newer version
* 3. Apache License, V2.0 or any newer version * 3. Apache License, V2.0 or any newer version
* *
* You may not use this file except in compliance with at least one of * You may not use this file except in compliance with at least one of
* the above three licenses. * the above three licenses.
* *
* See LICENSE.html or LICENSE.txt at the top of this package for the * See LICENSE.html or LICENSE.txt at the top of this package for the
skipping to change at line 174 skipping to change at line 174
* @PHOTO_FIELD_usage_candownload: can download * @PHOTO_FIELD_usage_candownload: can download
* @PHOTO_FIELD_usage_canblog: can blog * @PHOTO_FIELD_usage_canblog: can blog
* @PHOTO_FIELD_usage_canprint: can print * @PHOTO_FIELD_usage_canprint: can print
* @PHOTO_FIELD_owner_iconserver: server of owner's icon * @PHOTO_FIELD_owner_iconserver: server of owner's icon
* @PHOTO_FIELD_owner_iconfarm: farm of owner's icon * @PHOTO_FIELD_owner_iconfarm: farm of owner's icon
* @PHOTO_FIELD_original_width: original photo width * @PHOTO_FIELD_original_width: original photo width
* @PHOTO_FIELD_original_height: original photo height * @PHOTO_FIELD_original_height: original photo height
* @PHOTO_FIELD_views: number of photo views * @PHOTO_FIELD_views: number of photo views
* @PHOTO_FIELD_comments: number of photo comments * @PHOTO_FIELD_comments: number of photo comments
* @PHOTO_FIELD_favorites: number of photo favorites * @PHOTO_FIELD_favorites: number of photo favorites
* @PHOTO_FIELD_gallery_comment: comment on the photo when used in a galler y
* @PHOTO_FIELD_none: internal * @PHOTO_FIELD_none: internal
* @PHOTO_FIELD_FIRST: internal offset to first in enum list * @PHOTO_FIELD_FIRST: internal offset to first in enum list
* @PHOTO_FIELD_LAST: internal offset to last 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,
skipping to change at line 243 skipping to change at line 244
PHOTO_FIELD_usage_candownload, PHOTO_FIELD_usage_candownload,
PHOTO_FIELD_usage_canblog, PHOTO_FIELD_usage_canblog,
PHOTO_FIELD_usage_canprint, PHOTO_FIELD_usage_canprint,
PHOTO_FIELD_owner_iconserver, PHOTO_FIELD_owner_iconserver,
PHOTO_FIELD_owner_iconfarm, PHOTO_FIELD_owner_iconfarm,
PHOTO_FIELD_original_width, PHOTO_FIELD_original_width,
PHOTO_FIELD_original_height, PHOTO_FIELD_original_height,
PHOTO_FIELD_views, PHOTO_FIELD_views,
PHOTO_FIELD_comments, PHOTO_FIELD_comments,
PHOTO_FIELD_favorites, PHOTO_FIELD_favorites,
PHOTO_FIELD_gallery_comment,
PHOTO_FIELD_FIRST = PHOTO_FIELD_dateuploaded, PHOTO_FIELD_FIRST = PHOTO_FIELD_dateuploaded,
PHOTO_FIELD_LAST = PHOTO_FIELD_favorites PHOTO_FIELD_LAST = PHOTO_FIELD_gallery_comment
} flickcurl_photo_field_type; } flickcurl_photo_field_type;
/** /**
* flickcurl: * flickcurl:
* *
* Flickcurl session object created by flickcurl_new() and destroyed * Flickcurl session object created by flickcurl_new() and destroyed
* by flickcurl_free() * by flickcurl_free()
*/ */
typedef struct flickcurl_s flickcurl; typedef struct flickcurl_s flickcurl;
skipping to change at line 941 skipping to change at line 943
* @date_create: creation date of gallery * @date_create: creation date of gallery
* @date_update: update / last modified date of gallery * @date_update: update / last modified date of gallery
* @primary_photo: primary photo for the gallery * @primary_photo: primary photo for the gallery
* @count_photos: number of photos in the gallery * @count_photos: number of photos in the gallery
* @count_videos: number of photos in the gallery * @count_videos: number of photos in the gallery
* @title: Gallery title * @title: Gallery title
* @description: Gallery description * @description: Gallery description
* *
* A photo gallery. * A photo gallery.
* *
* The list of photos in the gallery is not curently available via the API. * The list of photos in the gallery is available via the API calls
* It should be flickr.galleries.getInfo() but that is does not exist * flickcurl_galleries_getPhotos() or
* at this date 2010-01-21. * flickcurl_galleries_getPhotos_params()
* *
*/ */
typedef struct { typedef struct {
char *id; char *id;
char *url; char *url;
char *owner; char *owner;
int date_create; int date_create;
int date_update; int date_update;
flickcurl_photo* primary_photo; flickcurl_photo* primary_photo;
int count_photos; int count_photos;
skipping to change at line 1443 skipping to change at line 1445
char *nsid; char *nsid;
char *username; char *username;
int iconserver; int iconserver;
int iconfarm; int iconfarm;
int member_type; int member_type;
} flickcurl_member; } flickcurl_member;
/* callback handlers */ /* callback handlers */
/** /**
* flickcurl_message_handler * flickcurl_message_handler:
* @user_data: user data pointer * @user_data: user data pointer
* @message: error message * @message: error message
* *
* Flickcurl Message handler callback. * 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 * flickcurl_tag_handler:
* @user_data: user data pointer * @user_data: user data pointer
* @tag: tag * @tag: tag
* *
* Flickcurl Tag handler callback. * 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);
/**
* flickcurl_curl_setopt_handler:
* @user_data: user data pointer
* @curl_handle: curl CURL* handle
*
* Flickcurl curl options handle callback.
*
* For use with flickcurl_set_curl_setopt_handler() to set curl
* handle options once Flickcurl has created the CURL* handle
* internally.
*
* NOTE: The type of @curl_handle is void* so that curl headers are
* optional when compiling against flickcurl.
*
* WARNING: This callback is called with two void args in the order
* curl handler user data, curl handle (CURL* pointer) - take care in
* getting them correct in implementation.
*
*/
typedef void (*flickcurl_curl_setopt_handler)(void *user_data, void *curl_h
andle);
/* library constants */ /* library constants */
FLICKCURL_API FLICKCURL_API
extern const char* const flickcurl_short_copyright_string; extern const char* const flickcurl_short_copyright_string;
FLICKCURL_API FLICKCURL_API
extern const char* const flickcurl_copyright_string; extern const char* const flickcurl_copyright_string;
FLICKCURL_API FLICKCURL_API
extern const char* const flickcurl_license_string; extern const char* const flickcurl_license_string;
FLICKCURL_API FLICKCURL_API
extern const char* const flickcurl_home_url_string; extern const char* const flickcurl_home_url_string;
FLICKCURL_API FLICKCURL_API
skipping to change at line 1489 skipping to change at line 1512
/* library init - call once before creating anything */ /* library init - call once before creating anything */
FLICKCURL_API FLICKCURL_API
int flickcurl_init(void); int flickcurl_init(void);
/* library cleanup - call once before exit */ /* library cleanup - call once before exit */
FLICKCURL_API FLICKCURL_API
void flickcurl_finish(void); void flickcurl_finish(void);
/* flickcurl* object constructor */ /* flickcurl* object constructor */
FLICKCURL_API FLICKCURL_API
flickcurl* flickcurl_new(void); flickcurl* flickcurl_new(void);
FLICKCURL_API
flickcurl* flickcurl_new_with_handle(void* curl_handle);
/* flickcurl* object destructor */ /* flickcurl* object destructor */
FLICKCURL_API FLICKCURL_API
void flickcurl_free(flickcurl *fc); void flickcurl_free(flickcurl *fc);
/* flickcurl* object set methods */ /* flickcurl* object set methods */
FLICKCURL_API FLICKCURL_API
void flickcurl_set_curl_setopt_handler(flickcurl *fc, flickcurl_curl_setopt
_handler curl_handler, void* curl_handler_data);
FLICKCURL_API
void flickcurl_set_service_uri(flickcurl *fc, const char *uri); void flickcurl_set_service_uri(flickcurl *fc, const char *uri);
FLICKCURL_API FLICKCURL_API
void flickcurl_set_upload_service_uri(flickcurl *fc, const char *uri); void flickcurl_set_upload_service_uri(flickcurl *fc, const char *uri);
FLICKCURL_API FLICKCURL_API
void flickcurl_set_replace_service_uri(flickcurl *fc, const char *uri); void flickcurl_set_replace_service_uri(flickcurl *fc, const char *uri);
FLICKCURL_API FLICKCURL_API
void flickcurl_set_api_key(flickcurl* fc, const char *api_key); void flickcurl_set_api_key(flickcurl* fc, const char *api_key);
FLICKCURL_API FLICKCURL_API
void flickcurl_set_auth_token(flickcurl *fc, const char* auth_token); void flickcurl_set_auth_token(flickcurl *fc, const char* auth_token);
FLICKCURL_API FLICKCURL_API
skipping to change at line 1544 skipping to change at line 1571
const char* flickcurl_get_shared_secret(flickcurl *fc); const char* flickcurl_get_shared_secret(flickcurl *fc);
FLICKCURL_API FLICKCURL_API
const char* flickcurl_get_auth_token(flickcurl *fc); const char* flickcurl_get_auth_token(flickcurl *fc);
/* other flickcurl class destructors */ /* other flickcurl class destructors */
FLICKCURL_API FLICKCURL_API
void flickcurl_free_collection(flickcurl_collection *collection); void flickcurl_free_collection(flickcurl_collection *collection);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_collections(flickcurl_collection** collections); void flickcurl_free_collections(flickcurl_collection** collections);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_gallery(flickcurl_gallery *gallery);
FLICKCURL_API
void flickcurl_free_tag_namespace(flickcurl_tag_namespace *tag_nspace); void flickcurl_free_tag_namespace(flickcurl_tag_namespace *tag_nspace);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_tag_namespaces(flickcurl_tag_namespace** tag_nspaces); void flickcurl_free_tag_namespaces(flickcurl_tag_namespace** tag_nspaces);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_tag(flickcurl_tag *t); void flickcurl_free_tag(flickcurl_tag *t);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_tag_clusters(flickcurl_tag_clusters *tcs); void flickcurl_free_tag_clusters(flickcurl_tag_clusters *tcs);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_photo(flickcurl_photo *photo); void flickcurl_free_photo(flickcurl_photo *photo);
FLICKCURL_API FLICKCURL_API
skipping to change at line 1727 skipping to change at line 1756
flickcurl_photo** flickcurl_favorites_getPublicList(flickcurl* fc, const ch ar* user_id, const char* extras, int per_page, int page); flickcurl_photo** flickcurl_favorites_getPublicList(flickcurl* fc, const ch ar* user_id, const char* extras, int per_page, int page);
FLICKCURL_API FLICKCURL_API
flickcurl_photos_list* flickcurl_favorites_getPublicList_params(flickcurl* fc, const char* user_id, flickcurl_photos_list_params* list_params); flickcurl_photos_list* flickcurl_favorites_getPublicList_params(flickcurl* fc, const char* user_id, flickcurl_photos_list_params* list_params);
FLICKCURL_API FLICKCURL_API
int flickcurl_favorites_remove(flickcurl* fc, const char* photo_id); int flickcurl_favorites_remove(flickcurl* fc, const char* photo_id);
/* flickr.galleries */ /* flickr.galleries */
FLICKCURL_API FLICKCURL_API
int flickcurl_galleries_addPhoto(flickcurl* fc, const char* gallery_id, con st char* photo_id, const char* comment_text); int flickcurl_galleries_addPhoto(flickcurl* fc, const char* gallery_id, con st char* photo_id, const char* comment_text);
FLICKCURL_API FLICKCURL_API
char* flickcurl_galleries_create(flickcurl* fc, const char* title, const ch
ar* description, const char* primary_photo_id, char** gallery_url_p);
FLICKCURL_API
int flickcurl_galleries_editMeta(flickcurl* fc, const char* gallery_id, con
st char* title, const char* description);
FLICKCURL_API
int flickcurl_galleries_editPhoto(flickcurl* fc, const char* gallery_id, co
nst char* photo_id, const char* new_comment);
FLICKCURL_API
int flickcurl_galleries_editPhotos(flickcurl* fc, const char* gallery_id, c
onst char* primary_photo_id, const char** photo_ids_array);
FLICKCURL_API
flickcurl_gallery* flickcurl_galleries_getInfo(flickcurl* fc, const char* g
allery_id);
FLICKCURL_API
flickcurl_gallery** flickcurl_galleries_getList(flickcurl* fc, const char* user_id, int per_page, int page); flickcurl_gallery** flickcurl_galleries_getList(flickcurl* fc, const char* user_id, int per_page, int page);
FLICKCURL_API FLICKCURL_API
flickcurl_gallery** flickcurl_galleries_getListForPhoto(flickcurl* fc, cons t char* photo_id, int per_page, int page); flickcurl_gallery** flickcurl_galleries_getListForPhoto(flickcurl* fc, cons t char* photo_id, int per_page, int page);
FLICKCURL_API FLICKCURL_API
flickcurl_photos_list* flickcurl_galleries_getPhotos_params(flickcurl* fc,
const char* gallery_id, flickcurl_photos_list_params* list_params);
FLICKCURL_API
flickcurl_photo** flickcurl_galleries_getPhotos(flickcurl* fc, const char*
gallery_id, const char* extras, int per_page, int page);
FLICKCURL_API
void flickcurl_free_galleries(flickcurl_gallery **galleries_object); void flickcurl_free_galleries(flickcurl_gallery **galleries_object);
/* flickr.groups */ /* flickr.groups */
FLICKCURL_API FLICKCURL_API
void flickcurl_free_category(flickcurl_category *category); void flickcurl_free_category(flickcurl_category *category);
FLICKCURL_API FLICKCURL_API
void flickcurl_free_categories(flickcurl_category **categories_object); void flickcurl_free_categories(flickcurl_category **categories_object);
FLICKCURL_API FLICKCURL_API
flickcurl_category* flickcurl_groups_browse(flickcurl* fc, int cat_id); flickcurl_category* flickcurl_groups_browse(flickcurl* fc, int cat_id);
FLICKCURL_API FLICKCURL_API
skipping to change at line 1809 skipping to change at line 1852
void flickcurl_free_sizes(flickcurl_size **sizes_object); void flickcurl_free_sizes(flickcurl_size **sizes_object);
/* flickr.people */ /* flickr.people */
FLICKCURL_API FLICKCURL_API
char* flickcurl_people_findByEmail(flickcurl* fc, const char* email); char* flickcurl_people_findByEmail(flickcurl* fc, const char* email);
FLICKCURL_API FLICKCURL_API
char* flickcurl_people_findByUsername(flickcurl* fc, const char* username); char* flickcurl_people_findByUsername(flickcurl* fc, const char* username);
FLICKCURL_API FLICKCURL_API
flickcurl_person* flickcurl_people_getInfo(flickcurl* fc, const char* user_ id); flickcurl_person* flickcurl_people_getInfo(flickcurl* fc, const char* user_ id);
FLICKCURL_API FLICKCURL_API
flickcurl_photos_list* flickcurl_people_getPhotos_params(flickcurl* fc, con
st char* user_id, int safe_search, const char* min_upload_date, const char*
max_upload_date, const char* min_taken_date, const char* max_taken_date, i
nt content_type, int privacy_filter, flickcurl_photos_list_params* list_par
ams);
FLICKCURL_API
flickcurl_photo** flickcurl_people_getPhotos(flickcurl* fc, const char* use
r_id, int safe_search, const char* min_upload_date, const char* max_upload_
date, const char* min_taken_date, const char* max_taken_date, int content_t
ype, int privacy_filter, const char* extras, int per_page, int page);
FLICKCURL_API
flickcurl_photos_list* flickcurl_people_getPhotosOf_params(flickcurl* fc, c onst char* user_id, flickcurl_photos_list_params* list_params); flickcurl_photos_list* flickcurl_people_getPhotosOf_params(flickcurl* fc, c onst char* user_id, flickcurl_photos_list_params* list_params);
FLICKCURL_API FLICKCURL_API
flickcurl_photo** flickcurl_people_getPhotosOf(flickcurl* fc, const char* u ser_id, const char* extras, int per_page, int page); flickcurl_photo** flickcurl_people_getPhotosOf(flickcurl* fc, const char* u ser_id, const char* extras, int per_page, int page);
FLICKCURL_API FLICKCURL_API
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_API FLICKCURL_API
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_API FLICKCURL_API
flickcurl_photos_list* flickcurl_people_getPublicPhotos_params(flickcurl* f c, const char* user_id, flickcurl_photos_list_params* list_params); flickcurl_photos_list* flickcurl_people_getPublicPhotos_params(flickcurl* f c, const char* user_id, flickcurl_photos_list_params* list_params);
FLICKCURL_API FLICKCURL_API
skipping to change at line 2152 skipping to change at line 2199
int flickcurl_test_null(flickcurl* fc); int flickcurl_test_null(flickcurl* fc);
/* flickr.urls */ /* flickr.urls */
FLICKCURL_API FLICKCURL_API
char* flickcurl_urls_getGroup(flickcurl* fc, const char* group_id); char* flickcurl_urls_getGroup(flickcurl* fc, const char* group_id);
FLICKCURL_API FLICKCURL_API
char* flickcurl_urls_getUserPhotos(flickcurl* fc, const char* user_id); char* flickcurl_urls_getUserPhotos(flickcurl* fc, const char* user_id);
FLICKCURL_API FLICKCURL_API
char* flickcurl_urls_getUserProfile(flickcurl* fc, const char* user_id); char* flickcurl_urls_getUserProfile(flickcurl* fc, const char* user_id);
FLICKCURL_API FLICKCURL_API
char* flickcurl_urls_lookupGallery(flickcurl* fc, const char* url);
FLICKCURL_API
char* flickcurl_urls_lookupGroup(flickcurl* fc, const char* url); char* flickcurl_urls_lookupGroup(flickcurl* fc, const char* url);
FLICKCURL_API FLICKCURL_API
char* flickcurl_urls_lookupUser(flickcurl* fc, const char* url); char* flickcurl_urls_lookupUser(flickcurl* fc, const char* url);
/* Upload API */ /* Upload API */
FLICKCURL_API FLICKCURL_API
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_API FLICKCURL_API
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_API FLICKCURL_API
 End of changes. 15 change blocks. 
7 lines changed or deleted 72 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/