Main Page | Data Structures | Directories | File List | Data Fields | Globals

ks_bquery.h

Go to the documentation of this file.
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 
00022 #ifndef INC_KS_BQUERY_H
00023 #define INC_KS_BQUERY_H
00024 
00025 #include "ks_array.h"
00026 #include "ks_number.h"
00027 #include "ks_string.h"
00028 
00029 
00036 #define KS_IDT_IP4                              0
00037 #define KS_IDT_IP4_ADDRESS              0                       /* deprecated */
00038 
00045 #define KS_IDT_IP6                              1
00046 #define KS_IDT_IP6_ADDRESS              1                       /* deprecated */
00047 
00054 #define KS_IDT_DOMAIN                   2
00055 #define KS_IDT_DOMAIN_NAME              2                       /* deprecated */
00056 
00063 #define KS_IDT_EMAIL                    3
00064 #define KS_IDT_EMAIL_ADDRESS    3                       /* deprecated */
00065 
00071 #define KS_IDT_URL                              4
00072 #define KS_IDT_URI                              4                       /* deprecated */
00073 
00074 
00075 
00076 #define KS_FL_FACTS                             1
00077 
00078 #define KS_COMBINER_DEFAULT             "default"       /* deprecated */
00079 
00080 
00082 #define KS_QUERY_HOST_DEFAULT   "query.karmasphere.com"
00083 #define KS_SLAVE_HOST_DEFAULT   "query.karmasphere.com" /* deprecated */
00084 
00085 #define KS_QUERY_PORT_DEFAULT   "8666"
00086 #define KS_SLAVE_PORT_DEFAULT   "8666"                                  /* deprecated */
00087 
00088 
00091 #define KS_TAG_SMTP_CLIENT_IP                   "smtp.client-ip"
00092 
00094 #define KS_TAG_SMTP_ENV_HELO                    "smtp.env.helo"
00095 
00097 #define KS_TAG_SMTP_ENV_MAIL_FROM               "smtp.env.mail-from"
00098 
00100 #define KS_TAG_SMTP_ENV_RCPT_TO                 "smtp.env.rcpt-to"
00101 
00103 #define KS_TAG_SMTP_HEADER_FROM_ADDRESS "smtp.header.from.address"
00104 
00118 typedef
00119 struct _ks_bquery_t {
00120         ks_base_t        base;
00121         ks_array_t       feeds;        
00122         ks_array_t       composites;   
00123         ks_array_t       combiners;    
00124         ks_array_t       identities;   
00125         ks_number_t      flags;        
00126         ks_string_t *principal;    
00127         ks_string_t *credentials;  
00128         ks_string_t     *id;           
00129 } ks_bquery_t;
00130 
00131 /*
00132 typedef
00133 struct _ks_bresponse_t {
00134 } ks_bresponse_t;
00135 */
00136 
00137 ks_type_t       *ks_bquery_type(void);
00138 ks_bquery_t     *ks_bquery_new(void);
00139 void             ks_bquery_free(ks_bquery_t *);
00140 
00141 void             ks_bquery_feed_add(ks_bquery_t *, const char *);
00142 void             ks_bquery_composite_add(ks_bquery_t *, const char *);
00143 void             ks_bquery_combiner_add(ks_bquery_t *, const char *);
00144 void             ks_bquery_identity_add(ks_bquery_t *, const char *, int);
00145 void             ks_bquery_identity_add_tagged(ks_bquery_t *,
00146                                 const char *, int, const char *);
00147 void             ks_bquery_id_set(ks_bquery_t *, const char *, size_t);
00148 ks_string_t *ks_bquery_id_get(ks_bquery_t *);
00149 void             ks_bquery_flags_set(ks_bquery_t *, long);
00150 int                      ks_bquery_has_auth(ks_bquery_t *);
00151 void             ks_bquery_set_auth(ks_bquery_t *, const char *, const char *);
00152 
00153 ks_string_t     *ks_bquery_packet(ks_bquery_t *);
00154 
00155 #endif

Generated on Tue Aug 7 21:11:30 2007 for libkarmaclient by  doxygen 1.4.4