libdeltacloud 0.9
Functions
src/driver.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include "common.h"
#include "driver.h"

Functions

int deltacloud_get_drivers (struct deltacloud_api *api, struct deltacloud_driver **drivers)
int deltacloud_get_driver_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_driver *driver)
void deltacloud_free_driver (struct deltacloud_driver *driver)
void deltacloud_free_driver_list (struct deltacloud_driver **drivers)

Detailed Description


Function Documentation

void deltacloud_free_driver ( struct deltacloud_driver driver)

A function to free a deltacloud_driver structure initially allocated by deltacloud_get_driver_by_id().

Parameters:
[in]driverThe deltacloud_driver structure representing the driver
void deltacloud_free_driver_list ( struct deltacloud_driver **  drivers)

A function to free a list of deltacloud_driver structures initially allocated by deltacloud_get_drivers().

Parameters:
[in]driversThe pointer to the head of the deltacloud_driver list
int deltacloud_get_driver_by_id ( struct deltacloud_api api,
const char *  id,
struct deltacloud_driver driver 
)

A function to look up a particular driver by id. The caller is expected to free the deltacloud_driver structure using deltacloud_free_driver().

Parameters:
[in]apiThe deltacloud_api structure representing the connection
[in]idThe driver ID to look for
[out]driverThe deltacloud_driver structure to fill in if the ID is found
Returns:
0 on success, -1 if the driver cannot be found or on error
int deltacloud_get_drivers ( struct deltacloud_api api,
struct deltacloud_driver **  drivers 
)

A function to get a linked list of all of the drivers supported. The caller is expected to free the list using deltacloud_free_driver_list().

Parameters:
[in]apiThe deltacloud_api structure representing this connection
[out]driversA pointer to the deltacloud_driver structure to hold the list of drivers
Returns:
0 on success, -1 on error
 All Data Structures Files Functions Variables