libstoragemgmt_hash.h File Reference

#include "libstoragemgmt_common.h"
Include dependency graph for libstoragemgmt_hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

lsm_hash LSM_DLL_EXPORT * lsm_hash_alloc (void)
int LSM_DLL_EXPORT lsm_hash_free (lsm_hash *op)
int LSM_DLL_EXPORT lsm_hash_keys (lsm_hash *op, lsm_string_list **l)
const char LSM_DLL_EXPORT * lsm_hash_string_get (lsm_hash *op, const char *key)
int LSM_DLL_EXPORT lsm_hash_string_set (lsm_hash *op, const char *key, const char *value)
lsm_hash LSM_DLL_EXPORT * lsm_hash_copy (lsm_hash *src)

Function Documentation

lsm_hash LSM_DLL_EXPORT* lsm_hash_alloc ( void   ) 

Simple hash table which only stores character strings. Allocate storage for hash.

Returns:
Allocated record or NULL on memory allocation failure

Here is the caller graph for this function:

lsm_hash LSM_DLL_EXPORT* lsm_hash_copy ( lsm_hash src  ) 

Does a copy of an lsm_hash

Parameters:
src lsm_hash to copy
Returns:
NULL on error/memory allocation failure, else copy
int LSM_DLL_EXPORT lsm_hash_free ( lsm_hash op  ) 

Free a lsm hash

Parameters:
op Record to free.
Returns:
LSM_ERR_OK on success, else error reason.

Here is the caller graph for this function:

int LSM_DLL_EXPORT lsm_hash_keys ( lsm_hash op,
lsm_string_list **  l 
)

Get the list of 'keys' available in the hash

Parameters:
[in] op Valid optional data pointer
[out] l String list pointer
Returns:
LSM_ERR_OK on success, else error reason
const char LSM_DLL_EXPORT* lsm_hash_string_get ( lsm_hash op,
const char *  key 
)

Get the value of a key (string)

Parameters:
[in] op Valid optional data pointer
[in] key Key to retrieve value for
Returns:
Pointer to value, pointer valid until optional data memory gets released.
int LSM_DLL_EXPORT lsm_hash_string_set ( lsm_hash op,
const char *  key,
const char *  value 
)

Set the value of a key. Note: If key exists, it is replaced with new one.

Parameters:
[in] op Valid optional data pointer
[in] key Key to set value for (key is duped)
[in] value Value of new key (string is duped)
Returns:
LSM_ERR_OK on success, else error reason

Here is the caller graph for this function:


Generated on 9 Jul 2015 for libStorageMgmt by  doxygen 1.6.1