libdeltacloud 0.9
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <pthread.h>
#include "libdeltacloud.h"
#include "common.h"
#include "curl_action.h"
Functions | |
struct deltacloud_error * | deltacloud_get_last_error (void) |
const char * | deltacloud_get_last_error_string (void) |
int | deltacloud_initialize (struct deltacloud_api *api, char *url, char *user, char *password) |
int | deltacloud_prepare_parameter (struct deltacloud_create_parameter *param, const char *name, const char *value) |
struct deltacloud_create_parameter * | deltacloud_allocate_parameter (const char *name, const char *value) |
void | deltacloud_free_parameter_value (struct deltacloud_create_parameter *param) |
void | deltacloud_free_parameter (struct deltacloud_create_parameter *param) |
int | deltacloud_has_link (struct deltacloud_api *api, const char *name) |
void | deltacloud_free (struct deltacloud_api *api) |
struct deltacloud_create_parameter* deltacloud_allocate_parameter | ( | const char * | name, |
const char * | value | ||
) | [read] |
A function to allocate and prepare a deltacloud_create_parameter structure for use. A deltacloud_create_parameter structure is used as an optional input parameter to one of the deltacloud_create functions. It is up to the caller to free the structure with deltacloud_free_parameter().
[in] | name | The name to assign to the deltacloud_create_parameter structure |
[in] | value | The value to assign to the deltacloud_create_parameter structure |
void deltacloud_free | ( | struct deltacloud_api * | api | ) |
A function to free up a deltacloud_api structure originally configured through deltacloud_initialize().
[in] | api | The deltacloud_api structure to free |
void deltacloud_free_parameter | ( | struct deltacloud_create_parameter * | param | ) |
A function to free a deltacloud_create_parameter structure (typically allocated by deltacloud_allocate_parameter()).
[in] | param | The deltacloud_create_parameter to free |
void deltacloud_free_parameter_value | ( | struct deltacloud_create_parameter * | param | ) |
A function to free the memory assigned to a deltacloud_create_parameter structure (typically by deltacloud_prepare_parameter()).
[in] | param | The deltacloud_create_parameter structure to free memory from |
struct deltacloud_error* deltacloud_get_last_error | ( | void | ) | [read] |
A function to get a pointer to the deltacloud_error structure corresponding to the last failure. The results of this are undefined if no error occurred. As the pointer is to thread-local storage that libdeltacloud manages, the caller should not attempt to free the structure.
const char* deltacloud_get_last_error_string | ( | void | ) |
A function to get the details (as a string) corresponding to the last failure. The results of this are undefined if no error occurred. As the string is to thread-local storage that libdeltacloud manages, the caller should not attempt to free the string.
int deltacloud_has_link | ( | struct deltacloud_api * | api, |
const char * | name | ||
) |
A function to determine if the deltacloud_api structure contains a particular link. This can be used to determine if the deltacloud server on the other end supports certain features.
[in] | api | The deltacloud_api structure representing this connection |
[in] | name | The feature to find |
int deltacloud_initialize | ( | struct deltacloud_api * | api, |
char * | url, | ||
char * | user, | ||
char * | password | ||
) |
The main API entry point. All users of the library must call this function first to initialize the library. The caller must free the deltacloud_api structure using deltacloud_free() when finished.
[in,out] | api | The api structure |
[in] | url | The url to the deltacloud server |
[in] | user | The username required to connect to the deltacloud server |
[in] | password | The password required to connect to the deltacloud server |
int deltacloud_prepare_parameter | ( | struct deltacloud_create_parameter * | param, |
const char * | name, | ||
const char * | value | ||
) |
A function to prepare a deltacloud_create_parameter structure for use. A deltacloud_create_parameter structure is used as an optional input parameter to one of the deltacloud_create functions. It is up to the caller to free the memory allocated to the structure with deltacloud_free_parameter_value().
[in,out] | param | The deltacloud_create_parameter structure to prepare for use |
[in] | name | The name to assign to the deltacloud_create_parameter structure |
[in] | value | The value to assign to the deltacloud_create_parameter structure |