00001 /* 00002 * libkarmaclient - A C Library to the Karmasphere Reputation Server 00003 * Copyright (C) 2006 Karmasphere <http://www.karmasphere.com/> 00004 * - Shevek <shevek@karmasphere.com> 00005 * - Dave Stewart <dave.stewart@karmasphere.com> 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00031 #ifndef INC_KS_RESPONSE_H 00032 #define INC_KS_RESPONSE_H 00033 00034 #include "ks_assoc.h" 00035 #include "ks_string.h" 00036 #include "ks_combination.h" 00037 #include "ks_fact.h" 00038 00042 typedef 00043 struct _ks_response_t { 00044 ks_base_t base; 00045 ks_assoc_t *response; 00046 ks_string_t *error; 00047 } ks_response_t; 00048 00049 ks_type_t *ks_response_type(void); 00050 ks_response_t *ks_response_bparse(const char *, int); 00051 void ks_response_free(ks_response_t *); 00052 00053 ks_string_t *ks_response_error(ks_response_t *); 00054 ks_string_t *ks_response_message(ks_response_t *); 00055 00056 ks_string_t *ks_response_id(ks_response_t *); 00057 long ks_response_time(ks_response_t *); 00058 00059 int ks_response_combinations_size(ks_response_t *); 00060 ks_assoc_t *ks_response_combinations(ks_response_t *e); 00061 ks_combination_t *ks_response_combination(ks_response_t *, 00062 const char *); 00063 00064 int ks_response_facts_length(ks_response_t *); 00065 ks_fact_t *ks_response_fact(ks_response_t *, int); 00066 00067 #endif
1.4.4