libwww_req.h

00001 /* File:      libwww_req.h
00002 ** Author(s): kifer
00003 ** Contact:   xsb-contact@cs.sunysb.edu
00004 ** 
00005 ** Copyright (C) The Research Foundation of SUNY, 2000
00006 ** 
00007 ** XSB is free software; you can redistribute it and/or modify it under the
00008 ** terms of the GNU Library General Public License as published by the Free
00009 ** Software Foundation; either version 2 of the License, or (at your option)
00010 ** any later version.
00011 ** 
00012 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
00013 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014 ** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
00015 ** more details.
00016 ** 
00017 ** You should have received a copy of the GNU Library General Public License
00018 ** along with XSB; if not, write to the Free Software Foundation,
00019 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00020 **
00021 ** $Id: libwww_req.h,v 1.1 2000/05/20 06:56:17 kifer Exp $
00022 ** 
00023 */
00024 
00025 /* included defs for libwww_request.c only */
00026 /* this file is named libwww_req.h instead of libwww_request.h to avoid
00027    conflict with libwww_request.H on windows, which is case-blind */
00028 
00029 
00030 
00031 //PRIVATE int total_number_of_requests;
00032 //PRIVATE int event_loop_runnung;
00033 PRIVATE int timeout_value;
00034 
00035 #define SELECTED_TAGS_TBL_SIZE      29
00036 #define SUPPRESSED_TAGS_TBL_SIZE    41
00037 #define STRIPPED_TAGS_TBL_SIZE      37
00038 
00039 #define DEFAULT_TIMEOUT           5000  /* 5 sec */
00040 
00041 
00042 PRIVATE REQUEST_CONTEXT *set_request_context(HTRequest *request,
00043                                              prolog_term req_term,
00044                                              int req_id);
00045 PRIVATE void free_request_context (REQUEST_CONTEXT *context);
00046 
00047 PRIVATE int printer (const char * fmt, va_list pArgs);
00048 PRIVATE int tracer (const char * fmt, va_list pArgs);
00049 PRIVATE BOOL libwww_send_credentials(HTRequest * request, HTAlertOpcode op,
00050                                      int msgnum, const char * dfault,
00051                                      void * input, HTAlertPar * reply);
00052 PRIVATE AUTHENTICATION *find_credentials(AUTHENTICATION *auth_info,char *realm);
00053 PRIVATE void release_libwww_request(HTRequest *request);
00054 PRIVATE char *extract_uri(prolog_term req_term, HTRequest *req, int req_id);
00055 PRIVATE void get_request_params(prolog_term req_term, HTRequest *req);
00056 PRIVATE HTAssocList *get_form_params(prolog_term form_params, int request_id);
00057 PRIVATE REQUEST_TYPE get_request_type(prolog_term req_term, int request_id);
00058 
00059 PRIVATE void free_htable(HASH_TABLE *htable);
00060 PRIVATE void init_htable(HASH_TABLE *htable, int size, REQUEST_TYPE type);
00061 PRIVATE void init_tag_table(prolog_term tag_list, HASH_TABLE *tag_tbl);
00062 
00063 
00064 PRIVATE void setup_request_structure (prolog_term req_term, int req_id);
00065 PRIVATE int request_termination_handler(HTRequest    *request,
00066                                         HTResponse   *response,
00067                                         void       *param,
00068                                         int          status);
00069 
00070 PRIVATE int handle_dependent_termination(HTRequest   *request,
00071                                          HTResponse  *response,
00072                                          void         *param,
00073                                          int          status);
00074 PRIVATE void libwww_abort_all(char *msg, ...);
00075 PRIVATE void setup_callbacks(REQUEST_TYPE type);
00076 PRIVATE void extract_request_headers(HTRequest *request);
00077 PRIVATE int timer_cbf(HTTimer *timer, void *param, HTEventType type);
00078 
00079 typedef struct userdata USERDATA;
00080 struct userdata {
00081   DELETE_USERDATA *       delete_method;
00082   int                     status;          /* this is used to carry status into
00083                                               delete_userData */
00084 };

Generated on Wed Jul 26 13:30:45 2006 for XSB by  doxygen 1.4.5