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
-
dict dictionary from which to produce the list of names **answer a 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
-
dict dictionary from which to fetch the data type name a name/key value to look up in the dictionary *answer data 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
-
dict dictionary from which to fetch the dictionary name a name/key value to look up in the dictionary **answer a 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
-
dict dictionary from which to fetch the list name a name/key value to look up in the dictionary **answer a 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
-
dict dictionary from which to fetch the bindata name a name/key value to look up in the dictionary **answer a 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
-
dict dictionary from which to fetch the integer name a name/key value to look up in the dictionary *answer the 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