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

Functions

int deltacloud_get_hardware_profiles (struct deltacloud_api *api, struct deltacloud_hardware_profile **profiles)
int deltacloud_get_hardware_profile_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_hardware_profile *profile)
void deltacloud_free_hardware_profile (struct deltacloud_hardware_profile *profile)
void deltacloud_free_hardware_profile_list (struct deltacloud_hardware_profile **profiles)

Detailed Description


Function Documentation

void deltacloud_free_hardware_profile ( struct deltacloud_hardware_profile profile)

A function to free a deltacloud_hardware_profile structure initially allocated by deltacloud_get_hardware_profile_by_id().

Parameters:
[in]profileThe deltacloud_hardware_profile structure representing the hardware profile
void deltacloud_free_hardware_profile_list ( struct deltacloud_hardware_profile **  profiles)

A function to free a list of deltacloud_hardware_profile structures initially allocated by deltacloud_get_hardware_profiles().

Parameters:
[in]profilesThe pointer to the head of the deltacloud_hardware_profile list
int deltacloud_get_hardware_profile_by_id ( struct deltacloud_api api,
const char *  id,
struct deltacloud_hardware_profile profile 
)

A function to look up a particular hardware profile by id. The caller is expected to free the deltacloud_hardware_profile structure using deltacloud_free_hardware_profile().

Parameters:
[in]apiThe deltacloud_api structure representing the connection
[in]idThe hardware_profile ID to look for
[out]profileThe deltacloud_hardware_profile structure to fill in if the ID is found
Returns:
0 on success, -1 if the hardware profile cannot be found or on error
int deltacloud_get_hardware_profiles ( struct deltacloud_api api,
struct deltacloud_hardware_profile **  profiles 
)

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

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