Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #if !defined (_REMAPPLUGININFO_h_)
00025 #define _REMAPPLUGININFO_h_
00026 #include "libts.h"
00027 #include "api/ts/ts.h"
00028 #include "api/ts/remap.h"
00029 
00030 #define TSREMAP_FUNCNAME_INIT "TSRemapInit"
00031 #define TSREMAP_FUNCNAME_DONE "TSRemapDone"
00032 #define TSREMAP_FUNCNAME_NEW_INSTANCE "TSRemapNewInstance"
00033 #define TSREMAP_FUNCNAME_DELETE_INSTANCE "TSRemapDeleteInstance"
00034 #define TSREMAP_FUNCNAME_DO_REMAP "TSRemapDoRemap"
00035 #define TSREMAP_FUNCNAME_OS_RESPONSE "TSRemapOSResponse"
00036 
00037 class url_mapping;
00038 
00039 
00040 
00041 
00042 class remap_plugin_info
00043 {
00044 public:
00045   typedef TSReturnCode _tsremap_init(TSRemapInterface* api_info, char* errbuf, int errbuf_size);
00046   typedef void _tsremap_done(void);
00047   typedef TSReturnCode _tsremap_new_instance(int argc, char* argv[], void** ih, char* errbuf, int errbuf_size);
00048   typedef void _tsremap_delete_instance(void*);
00049   typedef TSRemapStatus _tsremap_do_remap(void* ih, TSHttpTxn rh, TSRemapRequestInfo* rri);
00050   typedef void _tsremap_os_response(void* ih, TSHttpTxn rh, int os_response_type);
00051 
00052   remap_plugin_info *next;
00053   char *path;
00054   int path_size;
00055   void *dlh;                    
00056   _tsremap_init *fp_tsremap_init;
00057   _tsremap_done *fp_tsremap_done;
00058   _tsremap_new_instance *fp_tsremap_new_instance;
00059   _tsremap_delete_instance *fp_tsremap_delete_instance;
00060   _tsremap_do_remap *fp_tsremap_do_remap;
00061   _tsremap_os_response *fp_tsremap_os_response;
00062 
00063   remap_plugin_info(char *_path);
00064   ~remap_plugin_info();
00065 
00066   remap_plugin_info *find_by_path(char *_path);
00067   void add_to_list(remap_plugin_info * pi);
00068   void delete_my_list();
00069 };
00070 
00071 
00072 
00073 
00074 
00075 
00076 struct host_hdr_info
00077 {
00078   const char *request_host;
00079   int host_len;
00080   int request_port;
00081 };
00082 
00083 
00084 #endif