libdeltacloud 0.9
|
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "common.h"
#include "key.h"
Functions | |
int | deltacloud_get_keys (struct deltacloud_api *api, struct deltacloud_key **keys) |
int | deltacloud_create_key (struct deltacloud_api *api, const char *name, struct deltacloud_create_parameter *params, int params_length) |
int | deltacloud_key_destroy (struct deltacloud_api *api, struct deltacloud_key *key) |
int | deltacloud_get_key_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_key *key) |
void | deltacloud_free_key (struct deltacloud_key *key) |
void | deltacloud_free_key_list (struct deltacloud_key **keys) |
int deltacloud_create_key | ( | struct deltacloud_api * | api, |
const char * | name, | ||
struct deltacloud_create_parameter * | params, | ||
int | params_length | ||
) |
A function to create a new key.
[in] | api | The deltacloud_api structure representing the connection |
[in] | name | The name to give to the new key |
[in] | params | An array of deltacloud_create_parameter structures that represent any optional parameters to pass into the create call |
[in] | params_length | An integer describing the length of the params array |
void deltacloud_free_key | ( | struct deltacloud_key * | key | ) |
A function to free a deltacloud_key structure initially allocated by deltacloud_get_key_by_id().
[in] | key | The deltacloud_key structure representing the key |
void deltacloud_free_key_list | ( | struct deltacloud_key ** | keys | ) |
A function to free a list of deltacloud_key structures initially allocated by deltacloud_get_keys().
[in] | keys | The pointer to the head of the deltacloud_key list |
int deltacloud_get_key_by_id | ( | struct deltacloud_api * | api, |
const char * | id, | ||
struct deltacloud_key * | key | ||
) |
A function to look up a particular key by id. The caller is expected to free the deltacloud_key structure using deltacloud_free_key().
[in] | api | The deltacloud_api structure representing the connection |
[in] | id | The key ID to look for |
[out] | key | The deltacloud_key structure to fill in if the ID is found |
int deltacloud_get_keys | ( | struct deltacloud_api * | api, |
struct deltacloud_key ** | keys | ||
) |
A function to get a linked list of all of the keys. The caller is expected to free the list using deltacloud_free_key_list().
[in] | api | The deltacloud_api structure representing this connection |
[out] | keys | A pointer to the deltacloud_key structure to hold the list of keys |
int deltacloud_key_destroy | ( | struct deltacloud_api * | api, |
struct deltacloud_key * | key | ||
) |
A function to destroy a key.
[in] | api | The deltacloud_api structure representing the connection |
[in] | key | The deltacloud_key structure representing the key |