#include "ks_assoc.h"
#include "ks_string.h"
#include "ks_combination.h"
#include "ks_fact.h"
Go to the source code of this file.
Data Structures | |
| struct | _ks_response_t |
Typedefs | |
| typedef _ks_response_t | ks_response_t |
Functions | |
| ks_type_t * | ks_response_type (void) |
| ks_response_t * | ks_response_bparse (const char *, int) |
| void | ks_response_free (ks_response_t *) |
| ks_string_t * | ks_response_error (ks_response_t *) |
| ks_string_t * | ks_response_message (ks_response_t *) |
| ks_string_t * | ks_response_id (ks_response_t *) |
| long | ks_response_time (ks_response_t *) |
| int | ks_response_combinations_size (ks_response_t *) |
| ks_assoc_t * | ks_response_combinations (ks_response_t *e) |
| ks_combination_t * | ks_response_combination (ks_response_t *, const char *) |
| int | ks_response_facts_length (ks_response_t *) |
| ks_fact_t * | ks_response_fact (ks_response_t *, int) |
Type and function declarations for the functions defined in ks_response.c. Do not include this file directly in your client. Instead, include the application header file, ks.h, which will include all the libkarmaclient header files for you.
Definition in file ks_response.h.
| typedef struct _ks_response_t ks_response_t |
libkarmaclient response type.
| ks_response_t* ks_response_bparse | ( | const char * | data, | |
| int | len | |||
| ) |
XXX
Definition at line 90 of file ks_response.c.
References _ks_response_t::error, ks_assoc_type(), ks_bparse(), KS_CAST, ks_error(), ks_string_type(), _ks_type_t::name, _ks_response_t::response, and _ks_base_t::type.
| ks_combination_t* ks_response_combination | ( | ks_response_t * | e, | |
| const char * | key | |||
| ) |
Get a specific combination result from ks_response_t (e).
| e | the ks_response_t to retrieve the combination result from. | |
| key | a '' terminated string which is the name of the combination result to retreive. |
Definition at line 250 of file ks_response.c.
References ks_assoc_get(), KS_CAST, and ks_response_combinations().
| ks_assoc_t* ks_response_combinations | ( | ks_response_t * | e | ) |
Get all the combinations in ks_response_t (e)
| e | the ks_response_t to retrieve the combinations from. |
Definition at line 226 of file ks_response.c.
References ks_assoc_get(), KS_CAST, and _ks_response_t::response.
Referenced by ks_response_combination(), and ks_response_combinations_size().
| int ks_response_combinations_size | ( | ks_response_t * | e | ) |
Get the number of combinations contained in ks_response_t (e)
| e | the ks_response_t to retrieve the number of combination results from. |
Definition at line 271 of file ks_response.c.
References ks_assoc_size(), and ks_response_combinations().
| ks_string_t* ks_response_error | ( | ks_response_t * | e | ) |
Returns the error string contained in the ks_response_t (e), which must not be NULL, and must point to a valid ks_response_t structure.
| e | the ks_response_t from which to get the error message. |
Definition at line 140 of file ks_response.c.
References _ks_response_t::error, ks_assoc_get(), ks_response_message(), ks_string_new(), and _ks_response_t::response.
| ks_fact_t* ks_response_fact | ( | ks_response_t * | e, | |
| int | idx | |||
| ) |
Get a specific fact contained in ks_response_t (e)
| e | the ks_response_t to retrieve a ks_fact_t from. | |
| idx | The index of the fact to retrieve. |
Definition at line 325 of file ks_response.c.
References ks_array_get().
| int ks_response_facts_length | ( | ks_response_t * | e | ) |
Get the number of facts contained in ks_response_t (e)
| e | the ks_response_t to retrieve the number of facts from. |
Definition at line 308 of file ks_response.c.
References ks_array_length().
| void ks_response_free | ( | ks_response_t * | e | ) |
Destroy a given ks_response_t and free all memory that has been allocated for it and any elements it contains.
| e | a pointer to the ks_response_t to be destroyed |
Definition at line 123 of file ks_response.c.
References _ks_response_t::error, ks_assoc_free(), ks_free(), ks_string_free(), and _ks_response_t::response.
Referenced by main().
| ks_string_t* ks_response_id | ( | ks_response_t * | e | ) |
Get the response id of ks_response_t (e).
| e | the ks_response_t to get the id for. |
Definition at line 184 of file ks_response.c.
References ks_assoc_get(), KS_CAST, and _ks_response_t::response.
Referenced by ks_socket_recv().
| ks_string_t* ks_response_message | ( | ks_response_t * | e | ) |
Returns the message string contained in the ks_response_t (e)
| e | the ks_response_t from which to get the message. |
Definition at line 169 of file ks_response.c.
References ks_assoc_get(), KS_CAST, and _ks_response_t::response.
Referenced by ks_response_error().
| long ks_response_time | ( | ks_response_t * | e | ) |
Get the query time from ks_response_t (e)
| e | the ks_response_t containing the query time. |
Definition at line 203 of file ks_response.c.
References ks_assoc_get(), KS_CAST, ks_number_get(), and _ks_response_t::response.
| ks_type_t* ks_response_type | ( | void | ) |
Get the metaclass for ks_response_t objects.
Definition at line 65 of file ks_response.c.
1.5.1