]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_liblog.cc
Improved const-correctness of ALE-driven APIs (#904)
[thirdparty/squid.git] / src / tests / stub_liblog.cc
1 /*
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #include "squid.h"
10 #include "fde.h"
11 #include "log/File.h"
12
13 #define STUB_API "log/liblog.la"
14 #include "tests/STUB.h"
15
16 // XXX: these should be moved to a log/ *.h file
17 #include "AccessLogEntry.h"
18 /*
19 AccessLogEntry::~AccessLogEntry() {STUB}
20 void AccessLogEntry::getLogClientIp(char *, size_t) const STUB
21 SBuf AccessLogEntry::getLogMethod() const STUB_RETVAL(SBuf())
22 #if USE_OPENSSL
23 AccessLogEntry::SslDetails::SslDetails() {STUB}
24 #endif
25 */
26 void accessLogLogTo(CustomLog *, const AccessLogEntry::Pointer &, ACLChecklist *) STUB
27 void accessLogLog(const AccessLogEntry::Pointer &, ACLChecklist *) STUB
28 void accessLogRotate(void) STUB
29 void accessLogClose(void) STUB
30 void accessLogInit(void) STUB
31 const char *accessLogTime(time_t) STUB_RETVAL(nullptr)
32
33 #include "log/access_log.h"
34 void fvdbCountVia(const SBuf &) STUB
35 #if HEADERS_LOG
36 void headersLog(int, int, const HttpRequestMethod &, void *) STUB
37 #endif
38
39 #include "log/Config.h"
40 namespace Log
41 {
42 void LogConfig::parseFormats() STUB
43 LogConfig TheConfig;
44 }
45
46 #include "log/FormattedLog.h"
47 bool FormattedLog::usesDaemon() const STUB_RETVAL(false)
48
49 #include "log/File.h"
50 CBDATA_CLASS_INIT(Logfile);
51 Logfile::Logfile(const char *) {STUB}
52 //void Logfile::f_linestart(Logfile *) STUB
53 //void Logfile::f_linewrite(Logfile *, const char *, size_t) STUB
54 //void Logfile::f_lineend(Logfile *) STUB
55 //void Logfile::f_flush(Logfile *) STUB
56 //void Logfile::f_rotate(Logfile *, const int16_t) STUB
57 //void Logfile::f_close(Logfile *) STUB
58 Logfile *logfileOpen(const char *, size_t, int) STUB_RETVAL(nullptr)
59 void logfileClose(Logfile *) STUB
60 void logfileRotate(Logfile *, int16_t) STUB
61 void logfileWrite(Logfile *, const char *, size_t) STUB
62 void logfileFlush(Logfile *) STUB
63 void logfilePrintf(Logfile *, const char *, ...) STUB
64 void logfileLineStart(Logfile *) STUB
65 void logfileLineEnd(Logfile *) STUB
66
67 #include "log/Formats.h"
68 namespace Log
69 {
70 namespace Format
71 {
72 void SquidNative(const AccessLogEntryPointer &, Logfile *) STUB
73 void SquidIcap(const AccessLogEntryPointer &, Logfile *) STUB
74 void SquidUserAgent(const AccessLogEntryPointer &, Logfile *) STUB
75 void SquidReferer(const AccessLogEntryPointer &, Logfile *) STUB
76 void SquidCustom(const AccessLogEntryPointer &, CustomLog *) STUB
77 void HttpdCommon(const AccessLogEntryPointer &, Logfile *) STUB
78 void HttpdCombined(const AccessLogEntryPointer &, Logfile *) STUB
79 }
80 }
81
82 #include "log/ModDaemon.h"
83 int logfile_mod_daemon_open(Logfile *, const char *, size_t, int) STUB_RETVAL(0)
84
85 #include "log/ModStdio.h"
86 int logfile_mod_stdio_open(Logfile *, const char *, size_t, int) STUB_RETVAL(0)
87
88 #include "log/ModSyslog.h"
89 int logfile_mod_syslog_open(Logfile *, const char *, size_t, int) STUB_RETVAL(0)
90
91 #include "log/ModUdp.h"
92 int logfile_mod_udp_open(Logfile *, const char *, size_t, int) STUB_RETVAL(0)
93
94 #include "log/TcpLogger.h"
95 namespace Log
96 {
97 CBDATA_CLASS_INIT(TcpLogger);
98 int TcpLogger::Open(Logfile *, const char *, size_t, int) STUB_RETVAL(0)
99
100 /*
101 protected:
102 TcpLogger(size_t, bool, Ip::Address);
103 virtual ~TcpLogger();
104 void endGracefully();
105 void logRecord(const char *buf, size_t len);
106 void flush();
107 virtual void start() STUB
108 virtual bool doneAll() const STUB_RETVAL(true)
109 virtual void swanSong() STUB
110 */
111 }
112