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 00028 ICPlog.h 00029 00030 00031 ****************************************************************************/ 00032 00033 #ifndef _ICPlog_h_ 00034 #define _ICPlog_h_ 00035 00036 #include "HTTP.h" 00037 00038 // 00039 // Logging object which encapsulates ICP query info required 00040 // by the new logging subsystem to produce squid access log 00041 // data for ICP queries. 00042 // 00043 class ICPlog 00044 { 00045 public: 00046 inline ICPlog(ICPPeerReadCont::PeerReadData * s) 00047 { 00048 _s = s; 00049 } 00050 ~ICPlog() 00051 { 00052 } 00053 ink_hrtime GetElapsedTime(); 00054 sockaddr const* GetClientIP(); 00055 in_port_t GetClientPort(); 00056 SquidLogCode GetAction(); 00057 const char *GetCode(); 00058 int GetSize(); 00059 const char *GetMethod(); 00060 const char *GetURI(); 00061 const char *GetIdent(); 00062 SquidHierarchyCode GetHierarchy(); 00063 const char *GetFromHost(); 00064 const char *GetContentType(); 00065 00066 private: 00067 ICPPeerReadCont::PeerReadData * _s; 00068 }; 00069 00070 // End of ICPlog.h 00071 00072 #endif // _ICPlog_h_