After the helper C++ build migration we have a partial API for the helper tools. Some of them even make use of the #defined macros.

I managed to bungle and put the old-style debug() definition for helpers into the libcompat. It's now clear that this would be better suited in the API for helpers and non-squid tools.


What I'm looking at right now for the helpers is:
* some wrapper for main() that calls out to user functions for handling a line received and processing command line options.
 * some definition of the user functions required to do the above.
* some macros (as now) for performing OK/ERR etc feedback to squid. These take a char* parameter for additional key-pairs or messages. * the debug() call doing printf-style output as now but with automatic prefixing of helper name and PID (matching the kidN for cache.log) * standardizing the -d (debug on) and -h (help) parameters for all helpers compiled.


Does anyone have any advice about good ways to make a formal public API that the existing bundled helpers, and potentially third-parties could use when building C/C++ helpers for Squid?

ie things that must be one for versioning alterations over time.


Can we do it without a built library? ie only inlines, templates and macros?


Amos

Reply via email to