]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/format/Format.h
1 #ifndef _SQUID_FORMAT_FORMAT_H
2 #define _SQUID_FORMAT_FORMAT_H
4 #include "base/RefCount.h"
5 #include "ConfigParser.h"
7 * Squid configuration allows users to define custom formats in
10 * - external ACL input
13 * These enumerations and classes define the API for parsing of
14 * format directives to define these patterns. Along with output
15 * functionality to produce formatted buffers.
19 typedef RefCount
<AccessLogEntry
> AccessLogEntryPointer
;
28 // XXX: inherit from linked list
32 Format(const char *name
);
35 /* very inefficent parser, but who cares, this needs to be simple */
36 /* First off, let's tokenize, we'll optimize in a second pass.
37 * A token can either be a %-prefixed sequence (usually a dynamic
38 * token but it can be an escaped sequence), or a string. */
39 bool parse(const char *def
);
41 /// assemble the state information into a formatted line.
42 void assemble(MemBuf
&mb
, const AccessLogEntryPointer
&al
, int logSequenceNumber
) const;
44 /// dump this whole list of formats into the provided StoreEntry
45 void dump(StoreEntry
* entry
, const char *directiveName
);
54 #endif /* _SQUID_FORMAT_FORMAT_H */