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

LogAccessTest.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 
00025 
00026 #ifndef LOG_ACCESS_TEST_H
00027 #define LOG_ACCESS_TEST_H
00028 
00029 #include "LogAccess.h"
00030 
00031 /*-------------------------------------------------------------------------
00032   LogAccessTest
00033 
00034   This class is used to test the logging system standalone from the proxy
00035   by generating random data for the fields.
00036   -------------------------------------------------------------------------*/
00037 
00038 class LogAccessTest:public LogAccess
00039 {
00040 public:
00041   LogAccessTest();
00042   virtual ~ LogAccessTest();
00043 
00044   void init()
00045   {
00046   }
00047 
00048   //
00049   // client -> proxy fields
00050   //
00051   virtual int marshal_client_host_ip(char *);   // INT
00052   virtual int marshal_client_auth_user_name(char *);    // STR
00053   // marshal_client_req_timestamp_sec is non-virtual!
00054   virtual int marshal_client_req_text(char *);  // STR
00055   virtual int marshal_client_req_http_method(char *);   // INT
00056   virtual int marshal_client_req_url(char *);   // STR
00057   virtual int marshal_client_req_http_version(char *);  // INT
00058   virtual int marshal_client_req_header_len(char *);    // INT
00059   virtual int marshal_client_req_body_len(char *);      // INT
00060   virtual int marshal_client_finish_status_code(char *);        // INT
00061 
00062   //
00063   // proxy -> client fields
00064   //
00065   virtual int marshal_proxy_resp_content_type(char *);  // STR
00066   virtual int marshal_proxy_resp_squid_len(char *);     // INT
00067   virtual int marshal_proxy_resp_content_len(char *);   // INT
00068   virtual int marshal_proxy_resp_status_code(char *);   // INT
00069   virtual int marshal_proxy_resp_header_len(char *);    // INT
00070   virtual int marshal_proxy_finish_status_code(char *); // INT
00071   virtual int marshal_cache_result_code(char *);        // INT
00072 
00073   //
00074   // proxy -> server fields
00075   //
00076   virtual int marshal_proxy_req_header_len(char *);     // INT
00077   virtual int marshal_proxy_req_body_len(char *);       // INT
00078   virtual int marshal_proxy_hierarchy_route(char *);    // INT
00079 
00080   //
00081   // server -> proxy fields
00082   //
00083   virtual int marshal_server_host_ip(char *);   // INT
00084   virtual int marshal_server_host_name(char *); // STR
00085   virtual int marshal_server_resp_status_code(char *);  // INT
00086   virtual int marshal_server_resp_content_len(char *);  // INT
00087   virtual int marshal_server_resp_header_len(char *);   // INT
00088 
00089   //
00090   // other fields
00091   //
00092   virtual int marshal_transfer_time_ms(char *); // INT
00093 
00094   //
00095   // named fields from within a http header
00096   //
00097   virtual int marshal_http_header_field(char *header_symbol, char *field, char *buf);
00098 
00099 private:
00100 
00101   // -- member functions that are not allowed --
00102   LogAccessTest(const LogAccessTest & rhs);
00103   LogAccessTest & operator=(LogAccessTest & rhs);
00104 };
00105 
00106 #endif

Generated by  doxygen 1.7.1