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

Functions

int deltacloud_get_realms (struct deltacloud_api *api, struct deltacloud_realm **realms)
int deltacloud_get_realm_by_id (struct deltacloud_api *api, const char *id, struct deltacloud_realm *realm)
void deltacloud_free_realm (struct deltacloud_realm *realm)
void deltacloud_free_realm_list (struct deltacloud_realm **realms)

Detailed Description


Function Documentation

void deltacloud_free_realm ( struct deltacloud_realm realm)

A function to free a deltacloud_realm structure initially allocated by deltacloud_get_realm_by_id().

Parameters:
[in]realmThe deltacloud_realm structure representing the realm
void deltacloud_free_realm_list ( struct deltacloud_realm **  realms)

A function to free a list of deltacloud_realm structures initially allocated by deltacloud_get_realms().

Parameters:
[in]realmsThe pointer to the head of the deltacloud_realm list
int deltacloud_get_realm_by_id ( struct deltacloud_api api,
const char *  id,
struct deltacloud_realm realm 
)

A function to look up a particular realm by id. The caller is expected to free the deltacloud_realm structure using deltacloud_free_realm().

Parameters:
[in]apiThe deltacloud_api structure representing the connection
[in]idThe realm ID to look for
[out]realmThe deltacloud_realm structure to fill in if the ID is found
Returns:
0 on success, -1 if the realm cannot be found or on error
int deltacloud_get_realms ( struct deltacloud_api api,
struct deltacloud_realm **  realms 
)

A function to get a linked list of all of the realms. The caller is expected to free the list using deltacloud_free_realm_list().

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