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 00025 /**************************************************************************** 00026 00027 ICPProcessor.h 00028 00029 00030 ****************************************************************************/ 00031 00032 #ifndef _ICPProcessor_h_ 00033 #define _ICPProcessor_h_ 00034 #include "P_EventSystem.h" 00035 #include "URL.h" 00036 #include "ICPevents.h" 00037 00038 //###################################################### 00039 // State definitions for "proxy.config.icp.enabled" 00040 //###################################################### 00041 #define ICP_MODE_OFF 0 00042 #define ICP_MODE_RECEIVE_ONLY 1 00043 #define ICP_MODE_SEND_RECEIVE 2 00044 00045 extern void initialize_thread_for_icp(EThread * e); 00046 class ICPProcessor; 00047 00048 //*************************************************************************** 00049 // External Interface to ICP 00050 // Calling Sequence: 00051 // ================= 00052 // void icpProcessor.start() 00053 // Returns: 00054 // None. 00055 // 00056 // Action * icpProcessor.ICPQuery(Continuation *, URL *) 00057 // Returns: 00058 // Invokes continuation handleEvent(ICPreturn_t, struct sockaddr_in *) 00059 // where ICPreturn_t is ICP_LOOKUP_FOUND or ICP_LOOKUP_FAILED and 00060 // struct sockaddr_in (ip,port) is host containing URL data. 00061 //*************************************************************************** 00062 class ICPProcessorExt 00063 { 00064 public: 00065 ICPProcessorExt(ICPProcessor *); 00066 ~ICPProcessorExt(); 00067 00068 // Exported interfaces 00069 void start(); 00070 Action *ICPQuery(Continuation *, URL *); 00071 00072 private: 00073 ICPProcessor * _ICPpr; 00074 }; 00075 00076 extern ICPProcessorExt icpProcessor; 00077 00078 // End of ICPProcessor.h 00079 00080 #endif // _ICPProcessor_h_