Contexts

## Contexts Contexts — Photo contexts |

## Synopsis

                        flickcurl_context;
    enum                flickcurl_context_type;
    const char *        flickcurl_get_context_type_field_label
                                                            (flickcurl_context_type type);
    void                flickcurl_free_context              (flickcurl_context *context);
    void                flickcurl_free_contexts             (flickcurl_context **contexts);

## Description

Photo contexts

## Details

### flickcurl_context

    typedef struct {
      flickcurl_context_type type;
      char* id;
      char* secret; /* may be NULL */
      int server;   /* may be 0 */
      int farm;     /* may be 0 */
      char* title;  /* may be NULL */
      char* url;    /* may be NULL */
      char* thumb;  /* may be NULL */
    } flickcurl_context;

Photo use context.

flickcurl_context_type `type`; | Type of context
char *`id`; | ID
char *`secret`; | secret
int `server`; | server
int `farm`; | farm
char *`title`; | use title
char *`url`; | url
char *`thumb`; | thumbnail

### enum flickcurl_context_type

    typedef enum {
      FLICKCURL_CONTEXT_NONE,
      FLICKCURL_CONTEXT_SET,  /* other thing is a set */
      FLICKCURL_CONTEXT_POOL, /* other thing is a pool */
      FLICKCURL_CONTEXT_PREV, /* other thing is a previous photo */
      FLICKCURL_CONTEXT_NEXT, /* other thing is a next photo */
      FLICKCURL_CONTEXT_LAST = FLICKCURL_CONTEXT_NEXT
    } flickcurl_context_type;

Types of photo context: relationship between photo and another item

`FLICKCURL_CONTEXT_NONE` | internal
`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_LAST` | internal offset to last in enum list

### flickcurl_get_context_type_field_label ()

    const char *        flickcurl_get_context_type_field_label
                                                            (flickcurl_context_type type);

Get label for context type

`type` : | context type
Returns : | label string or NULL if none valid

### flickcurl_free_context ()

    void                flickcurl_free_context              (flickcurl_context *context);

Destructor for context object

`context` : | context object

### flickcurl_free_contexts ()

    void                flickcurl_free_contexts             (flickcurl_context **contexts);

Destructor for array of context object

`contexts` : | context object array