Result paging parameters

A search request returns a structure flickcurl_photos_list struct containing a list of results (in some format). This list can be paged - returning some of the results in one page followed by more results on a second page and so on. The number of results per-page and the page to return are configured as fields in a flickcurl_photos_list_params struct as fields per_page and page respectively. This struct must be initialised to default values with flickcurl_photos_list_params_init() which initialises the struct from a previously allocated piece of memory (or on the stack).

The per_page integer field records the maximum number of photo results to return in a single request. The page integer field records the particular page of results (each of size per_page) that should be returned, the first page is 1.

The following code fragment initialises the list parameters structure to the defaults and then sets it to return the first page of results and for each page to contain 10 photos maximum.

  flickcurl_photos_list_params list_params;


  list_params.per_page = 10; = 1;