• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

RemapPluginInfo.h

Go to the documentation of this file.
00001 /** @file
00002 
00003   A brief file description
00004 
00005   @section license License
00006 
00007   Licensed to the Apache Software Foundation (ASF) under one
00008   or more contributor license agreements.  See the NOTICE file
00009   distributed with this work for additional information
00010   regarding copyright ownership.  The ASF licenses this file
00011   to you under the Apache License, Version 2.0 (the
00012   "License"); you may not use this file except in compliance
00013   with the License.  You may obtain a copy of the License at
00014 
00015       http://www.apache.org/licenses/LICENSE-2.0
00016 
00017   Unless required by applicable law or agreed to in writing, software
00018   distributed under the License is distributed on an "AS IS" BASIS,
00019   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00020   See the License for the specific language governing permissions and
00021   limitations under the License.
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;                    /* "handle" for the dynamic library */
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  * struct host_hdr_info;
00074  * Used to store info about host header
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

Generated by  doxygen 1.7.1