getdns_dict_get functions

Functions

getdns_return_t getdns_dict_get_names (const getdns_dict *dict, getdns_list **answer)
 
getdns_return_t getdns_dict_get_data_type (const getdns_dict *dict, const char *name, getdns_data_type *answer)
 
getdns_return_t getdns_dict_get_dict (const getdns_dict *dict, const char *name, getdns_dict **answer)
 
getdns_return_t getdns_dict_get_list (const getdns_dict *dict, const char *name, getdns_list **answer)
 
getdns_return_t getdns_dict_get_bindata (const getdns_dict *dict, const char *name, getdns_bindata **answer)
 
getdns_return_t getdns_dict_get_int (const getdns_dict *dict, const char *name, uint32_t *answer)
 

Detailed Description

Function Documentation

getdns_return_t getdns_dict_get_names ( const getdns_dict dict,
getdns_list **  answer 
)

fetch a list of names from the dictionary, this list must be freed by the caller via a call to getdns_list_destroy

Parameters
dictdictionary from which to produce the list of names
**answera pointer to the new list will be assigned to *answer
Returns
GETDNS_RETURN_GOOD on success
GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or empty
getdns_return_t getdns_dict_get_data_type ( const getdns_dict dict,
const char *  name,
getdns_data_type answer 
)

fetch the data type for the data associated with the specified name

Parameters
dictdictionary from which to fetch the data type
namea name/key value to look up in the dictionary
*answerdata type will be stored at this address
Returns
GETDNS_RETURN_GOOD on success
GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or name does not exist
getdns_return_t getdns_dict_get_dict ( const getdns_dict dict,
const char *  name,
getdns_dict **  answer 
)

fetch the dictionary associated with the specified name, the dictionary should not be free()'d by the caller, it will be freed when the parent dictionary is free()'d

Parameters
dictdictionary from which to fetch the dictionary
namea name/key value to look up in the dictionary
**answera copy of the dictionary will be stored at this address
Returns
GETDNS_RETURN_GOOD on success
GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or name does not exist
getdns_return_t getdns_dict_get_list ( const getdns_dict dict,
const char *  name,
getdns_list **  answer 
)

fetch the list associated with the specified name the list should not be free()'d by the caller, when the dictionary is destroyed the list will also be destroyed

Parameters
dictdictionary from which to fetch the list
namea name/key value to look up in the dictionary
**answera copy of the list will be stored at this address
Returns
GETDNS_RETURN_GOOD on success
GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or name does not exist
getdns_return_t getdns_dict_get_bindata ( const getdns_dict dict,
const char *  name,
getdns_bindata **  answer 
)

fetch the bindata associated with the specified name, the bindata should not be free()'d by the caller

Parameters
dictdictionary from which to fetch the bindata
namea name/key value to look up in the dictionary
**answera copy of the bindata will be stored at this address
Returns
GETDNS_RETURN_GOOD on success
GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or name does not exist
getdns_return_t getdns_dict_get_int ( const getdns_dict dict,
const char *  name,
uint32_t *  answer 
)

fetch the integer value associated with the specified name

Parameters
dictdictionary from which to fetch the integer
namea name/key value to look up in the dictionary
*answerthe integer will be stored at this address
Returns
GETDNS_RETURN_GOOD on success
GETDNS_RETURN_NO_SUCH_DICT_NAME if dict is invalid or name does not exist