flickcurl.h | flickcurl.h | |||
---|---|---|---|---|
skipping to change at line 85 | skipping to change at line 85 | |||
* @VALUE_TYPE_DATETIME: date time | * @VALUE_TYPE_DATETIME: date time | |||
* @VALUE_TYPE_FLOAT: floating point number | * @VALUE_TYPE_FLOAT: floating point number | |||
* @VALUE_TYPE_INTEGER: integer | * @VALUE_TYPE_INTEGER: integer | |||
* @VALUE_TYPE_STRING: string | * @VALUE_TYPE_STRING: string | |||
* @VALUE_TYPE_URI: URI | * @VALUE_TYPE_URI: URI | |||
* @VALUE_TYPE_PERSON_ID: person ID | * @VALUE_TYPE_PERSON_ID: person ID | |||
* @VALUE_TYPE_PHOTO_ID: internal | * @VALUE_TYPE_PHOTO_ID: internal | |||
* @VALUE_TYPE_PHOTO_URI: internal | * @VALUE_TYPE_PHOTO_URI: internal | |||
* @VALUE_TYPE_MEDIA_TYPE: internal | * @VALUE_TYPE_MEDIA_TYPE: internal | |||
* @VALUE_TYPE_NONE: internal | * @VALUE_TYPE_NONE: internal | |||
* @VALUE_TYPE_TAG_STRING: internal | ||||
* @VALUE_TYPE_LAST: internal offset to last in enum list | * @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_MEDIA_TYPE, /* internal */ | VALUE_TYPE_MEDIA_TYPE, /* internal */ | |||
VALUE_TYPE_LAST = VALUE_TYPE_MEDIA_TYPE | VALUE_TYPE_TAG_STRING, /* internal */ | |||
VALUE_TYPE_LAST = VALUE_TYPE_TAG_STRING | ||||
} flickcurl_field_value_type; | } flickcurl_field_value_type; | |||
/** | /** | |||
* flickcurl_photo_field_type: | * flickcurl_photo_field_type: | |||
* @PHOTO_FIELD_dateuploaded: date uploaded | * @PHOTO_FIELD_dateuploaded: date uploaded | |||
* @PHOTO_FIELD_farm: farm number | * @PHOTO_FIELD_farm: farm number | |||
* @PHOTO_FIELD_isfavorite: is favorite boolean | * @PHOTO_FIELD_isfavorite: is favorite boolean | |||
* @PHOTO_FIELD_license: license | * @PHOTO_FIELD_license: license | |||
* @PHOTO_FIELD_originalformat: original format | * @PHOTO_FIELD_originalformat: original format | |||
* @PHOTO_FIELD_rotation: rotation | * @PHOTO_FIELD_rotation: rotation | |||
skipping to change at line 161 | skipping to change at line 163 | |||
* @PHOTO_FIELD_location_woeid: location WOE ID | * @PHOTO_FIELD_location_woeid: location WOE ID | |||
* @PHOTO_FIELD_neighbourhood_woeid: neighborhood WOE ID | * @PHOTO_FIELD_neighbourhood_woeid: neighborhood WOE ID | |||
* @PHOTO_FIELD_neighborhood_woeid: deprecated | * @PHOTO_FIELD_neighborhood_woeid: deprecated | |||
* @PHOTO_FIELD_locality_woeid: locality WOE ID | * @PHOTO_FIELD_locality_woeid: locality WOE ID | |||
* @PHOTO_FIELD_county_woeid: county WOE ID | * @PHOTO_FIELD_county_woeid: county WOE ID | |||
* @PHOTO_FIELD_region_woeid: region WOE ID | * @PHOTO_FIELD_region_woeid: region WOE ID | |||
* @PHOTO_FIELD_country_woeid: country WOE ID | * @PHOTO_FIELD_country_woeid: country WOE ID | |||
* @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_iconfarm: farm of owner's icon | ||||
* @PHOTO_FIELD_original_width: original photo width | ||||
* @PHOTO_FIELD_original_height: original photo height | ||||
* @PHOTO_FIELD_views: number of photo views | ||||
* @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 223 | skipping to change at line 230 | |||
PHOTO_FIELD_location_woeid, | PHOTO_FIELD_location_woeid, | |||
PHOTO_FIELD_neighbourhood_woeid, | PHOTO_FIELD_neighbourhood_woeid, | |||
PHOTO_FIELD_neighborhood_woeid = PHOTO_FIELD_neighbourhood_woeid, | PHOTO_FIELD_neighborhood_woeid = PHOTO_FIELD_neighbourhood_woeid, | |||
PHOTO_FIELD_locality_woeid, | PHOTO_FIELD_locality_woeid, | |||
PHOTO_FIELD_county_woeid, | PHOTO_FIELD_county_woeid, | |||
PHOTO_FIELD_region_woeid, | PHOTO_FIELD_region_woeid, | |||
PHOTO_FIELD_country_woeid, | PHOTO_FIELD_country_woeid, | |||
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_iconfarm, | ||||
PHOTO_FIELD_original_width, | ||||
PHOTO_FIELD_original_height, | ||||
PHOTO_FIELD_views, | ||||
PHOTO_FIELD_FIRST = PHOTO_FIELD_dateuploaded, | PHOTO_FIELD_FIRST = PHOTO_FIELD_dateuploaded, | |||
PHOTO_FIELD_LAST = PHOTO_FIELD_usage_canprint | PHOTO_FIELD_LAST = PHOTO_FIELD_views | |||
} 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 541 | skipping to change at line 553 | |||
* @type: Location type of index 0 (the location) usually | * @type: Location type of index 0 (the location) usually | |||
* FLICKCURL_PLACE_LOCATION but may be wider | * FLICKCURL_PLACE_LOCATION but may be wider | |||
* @woe_ids: Array of WOE IDs | * @woe_ids: Array of WOE IDs | |||
* @location: location for this place | * @location: location for this place | |||
* @count: count of photos (when used for flickcurl_places_placesForUser() ) | * @count: count of photos (when used for flickcurl_places_placesForUser() ) | |||
* @shapedata: DEPRECATED for @shape->data: XML string of <shapedata> element and content elements when present (or NULL) | * @shapedata: DEPRECATED for @shape->data: XML string of <shapedata> element and content elements when present (or NULL) | |||
* @shapedata_length: DEPRECATED for @shape->data_length: size of @shapedat e string | * @shapedata_length: DEPRECATED for @shape->data_length: size of @shapedat e string | |||
* @shapefile_urls: DEPRECATED for @shape->file_urls: NULL-terminated array of pointers to shapefile URLs when present (or NULL) | * @shapefile_urls: DEPRECATED for @shape->file_urls: NULL-terminated array of pointers to shapefile URLs when present (or NULL) | |||
* @shapefile_urls_count: DEPRECATED for @shape->file_urls_count: number of entries in @shapefile_urls array | * @shapefile_urls_count: DEPRECATED for @shape->file_urls_count: number of entries in @shapefile_urls array | |||
* @shape: shapefile data (inline data and shapefile urls) | * @shape: shapefile data (inline data and shapefile urls) | |||
* @timezone: timezone of location in 'zoneinfo' format such as “Europe/Par is”. | ||||
* | * | |||
* 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() | |||
* can give 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]; | |||
skipping to change at line 564 | skipping to change at line 577 | |||
flickcurl_location location; | flickcurl_location location; | |||
int count; | int count; | |||
/* DEPRECATED shapefile fields; now are pointers into @shape */ | /* DEPRECATED shapefile fields; now are pointers into @shape */ | |||
char* shapedata; | char* shapedata; | |||
size_t shapedata_length; | size_t shapedata_length; | |||
char** shapefile_urls; | char** shapefile_urls; | |||
int shapefile_urls_count; | int shapefile_urls_count; | |||
struct flickcurl_shapedata_s* shape; | struct flickcurl_shapedata_s* shape; | |||
char* timezone; | ||||
} flickcurl_place; | } flickcurl_place; | |||
/** | /** | |||
* flickcurl_shapedata: | * flickcurl_shapedata: | |||
* @created: creation date as a UNIX timestamp | * @created: creation date as a UNIX timestamp | |||
* @alpha: Alpha value | * @alpha: Alpha value | |||
* @points: Number of points | * @points: Number of points | |||
* @edges: Number of edges | * @edges: Number of edges | |||
* @data: XML string of <shapedata> element and content elements when present (or NULL) | * @data: XML string of <shapedata> element and content elements when present (or NULL) | |||
* @data_length: size of @shapedate string | * @data_length: size of @shapedate string | |||
* @file_urls: NULL-terminated array of pointers to shapefile URLs when pre sent (or NULL) | * @file_urls: NULL-terminated array of pointers to shapefile URLs when pre sent (or NULL) | |||
* @file_urls_count: number of entries in @shapefile_urls array | * @file_urls_count: number of entries in @shapefile_urls array | |||
* @is_donuthole: non-0 if shape IS a donut (a hole) | ||||
* @has_donuthole: non-0 if shape HAS a donut inside it and it is worth cal | ||||
ling places.getShapeHistory on it / flickcurl_places_getShapeHistory() | ||||
* | * | |||
* Shape data for a place. | * Shape data for a place. | |||
* | * | |||
**/ | **/ | |||
typedef struct flickcurl_shapedata_s { | typedef struct flickcurl_shapedata_s { | |||
int created; | int created; | |||
double alpha; | double alpha; | |||
int points; | int points; | |||
int edges; | int edges; | |||
char* data; | char* data; | |||
size_t data_length; | size_t data_length; | |||
char** file_urls; | char** file_urls; | |||
int file_urls_count; | int file_urls_count; | |||
int is_donuthole; | ||||
int has_donuthole; | ||||
} flickcurl_shapedata; | } flickcurl_shapedata; | |||
/** | /** | |||
* 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) | |||
* @authorname: 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) | |||
skipping to change at line 1068 | skipping to change at line 1086 | |||
* @license: Comma-separated list of photo licenses (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) | * @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. | * @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. | * @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>, <code>o_ dims</code>, <code>views</code>, <code>media</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 - 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) | * @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) | |||
* @media: "photos" or "videos" (or NULL) | * @media: "photos" or "videos" (or NULL) | |||
* @has_geo: non-0 if a photo has been geotagged (or 0) | * @has_geo: non-0 if a photo has been geotagged (or 0) | |||
* @lat: A valid latitude, in decimal format, for doing radial geo queries (or ignored if radius is 0.0) | * @lat: A valid latitude, in decimal format, for doing radial geo queries (or ignored if radius is 0.0) | |||
* @lon: A valid longitude, in decimal format, for doing radial geo queries (or ignored if radius is 0.0) | * @lon: A valid longitude, in decimal format, for doing radial geo queries (or ignored if radius is 0.0) | |||
* @radius: A valid radius used for geo queries, greater than zero and less than 20 miles (or 32 kilometers), for use with point-based geo queries. Th e default value is 5 (km) (or 0.0 for not used) | * @radius: A valid radius used for geo queries, greater than zero and less than 20 miles (or 32 kilometers), for use with point-based geo queries. Th e default value is 5 (km) (or 0.0 for not used) | |||
* @radius_units: The unit of measure when doing radial geo queries. Valid options are "mi" (miles) and "km" (kilometers). The default is "km" (or NUL L) | * @radius_units: The unit of measure when doing radial geo queries. Valid options are "mi" (miles) and "km" (kilometers). The default is "km" (or NUL L) | |||
* @contacts: (Experimental) Requires @user_id field be set and limits quer ies to photos beloing to that user's photos. Valid arguments are 'all' or 'ff' for just friends and family. | * @contacts: (Experimental) Requires @user_id field be set and limits quer ies to photos beloing to that user's photos. Valid arguments are 'all' or 'ff' for just friends and family. | |||
* @woe_id: A 32-bit identifier that uniquely represents spatial entities. (not used if bbox argument is present). Same restrictions as @place_id (or <0) | ||||
* | * | |||
* 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; | |||
skipping to change at line 1112 | skipping to change at line 1131 | |||
int per_page; | int per_page; | |||
int page; | int page; | |||
char* place_id; | char* place_id; | |||
char* media; | char* media; | |||
int has_geo; | int has_geo; | |||
double lat; | double lat; | |||
double lon; | double lon; | |||
double radius; | double radius; | |||
char* radius_units; | char* radius_units; | |||
char* contacts; | char* contacts; | |||
int woe_id; | ||||
} flickcurl_search_params; | } flickcurl_search_params; | |||
/** | /** | |||
* flickcurl_photoset: | * flickcurl_photoset: | |||
* @id: photoset ID | * @id: photoset ID | |||
* @primary: primary photo ID | * @primary: primary photo ID | |||
* @secret: secret | * @secret: secret | |||
* @server: server | * @server: server | |||
* @farm: farm | * @farm: farm | |||
* @photos_count: count of photos in set | * @photos_count: count of photos in set | |||
skipping to change at line 1445 | skipping to change at line 1465 | |||
void flickcurl_free_video(flickcurl_video *video); | void flickcurl_free_video(flickcurl_video *video); | |||
FLICKCURL_API | FLICKCURL_API | |||
void flickcurl_free_tag_predicate_value(flickcurl_tag_predicate_value* tag_ pv); | void flickcurl_free_tag_predicate_value(flickcurl_tag_predicate_value* tag_ pv); | |||
FLICKCURL_API | FLICKCURL_API | |||
void flickcurl_free_tag_predicate_values(flickcurl_tag_predicate_value **ta g_pvs); | void flickcurl_free_tag_predicate_values(flickcurl_tag_predicate_value **ta g_pvs); | |||
/* utility methods */ | /* utility methods */ | |||
/* get an image URL for a photo in some size */ | /* get an image URL for a photo in some size */ | |||
FLICKCURL_API | FLICKCURL_API | |||
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 a page URL for a photo */ | ||||
FLICKCURL_API | ||||
char* flickcurl_photo_as_page_uri(flickcurl_photo *photo); | ||||
/* get a owner icon URL for a photo */ | ||||
FLICKCURL_API | ||||
char* flickcurl_user_icon_uri(int farm, int server, char *nsid); | ||||
FLICKCURL_API | ||||
char* flickcurl_photo_as_user_icon_uri(flickcurl_photo *photo); | ||||
/* get labels for various field/types */ | /* get labels for various field/types */ | |||
FLICKCURL_API | FLICKCURL_API | |||
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); | |||
FLICKCURL_API | FLICKCURL_API | |||
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); | |||
FLICKCURL_API | FLICKCURL_API | |||
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); | |||
FLICKCURL_API | FLICKCURL_API | |||
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); | |||
End of changes. 13 change blocks. | ||||
3 lines changed or deleted | 33 lines changed or added | |||