1 /** @file
2 
3   A brief file description
4 
5   @section license License
6 
7   Licensed to the Apache Software Foundation (ASF) under one
8   or more contributor license agreements.  See the NOTICE file
9   distributed with this work for additional information
10   regarding copyright ownership.  The ASF licenses this file
11   to you under the Apache License, Version 2.0 (the
12   "License"); you may not use this file except in compliance
13   with the License.  You may obtain a copy of the License at
14 
15       http://www.apache.org/licenses/LICENSE-2.0
16 
17   Unless required by applicable law or agreed to in writing, software
18   distributed under the License is distributed on an "AS IS" BASIS,
19   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20   See the License for the specific language governing permissions and
21   limitations under the License.
22  */
23 
24 /**
25  * Remap plugin processor
26  **/
27 #pragma once
28 
29 #include "I_EventSystem.h"
30 #include "RemapPlugins.h"
31 #include "RemapPluginInfo.h"
32 #include "ReverseProxy.h"
33 
34 #define EVENT_REMAP_START (REMAP_EVENT_EVENTS_START + 0)
35 #define EVENT_REMAP_ERROR (REMAP_EVENT_EVENTS_START + 1)
36 #define EVENT_REMAP_COMPLETE (REMAP_EVENT_EVENTS_START + 2)
37 
38 class RemapProcessor
39 {
40 public:
RemapProcessor()41   RemapProcessor() {}
~RemapProcessor()42   ~RemapProcessor() {}
43   bool setup_for_remap(HttpTransact::State *s, UrlRewrite *table);
44   bool finish_remap(HttpTransact::State *s, UrlRewrite *table);
45 
46   Action *perform_remap(Continuation *cont, HttpTransact::State *s);
47   bool LessThan(HttpTransact::State *, HttpTransact::State *);
48 };
49 
50 /**
51  * the global remapProcessor that everyone uses
52  **/
53 extern RemapProcessor remapProcessor;
54