]>
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"
6 * Squid configuration allows users to define custom formats in
12 * These enumerations and classes define the API for parsing of
13 * format directives to define these patterns. Along with output
14 * functionality to produce formatted buffers.
18 typedef RefCount
<AccessLogEntry
> AccessLogEntryPointer
;
27 // XXX: inherit from linked list
31 Format(const char *name
);
34 /* very inefficent parser, but who cares, this needs to be simple */
35 /* First off, let's tokenize, we'll optimize in a second pass.
36 * A token can either be a %-prefixed sequence (usually a dynamic
37 * token but it can be an escaped sequence), or a string. */
38 bool parse(const char *def
);
40 /// assemble the state information into a formatted line.
41 void assemble(MemBuf
&mb
, const AccessLogEntryPointer
&al
, int logSequenceNumber
) const;
43 /// dump this whole list of formats into the provided StoreEntry
44 void dump(StoreEntry
* entry
, const char *directiveName
);
53 #endif /* _SQUID_FORMAT_FORMAT_H */