Where is documentation?

Created by Alex Rousskov
Keywords:

Current documentation consists of the following resources:

* brief notes on e-cap.org,
* searchable Questions on this site;
* documented source code APIs (see below),
* adapter samples (see below),
* and open source production adapters such as eCAP ClamAV adapter.

It is clearly not very detailed, but it is often sufficient for adapter implementation.

APIs: libecap source code tarball contains the library sources which define eCAP API. Most of the public methods have telling names, comments describing their purpose, or both. For example, here is the part of the adapter transaction API in libecap-0.0.3/src/libecap/adapter/xaction.h that controls adapted body exchange with the host side of the transaction:

  // adapted body transmission control
  virtual void abDiscard() = 0; // host will not look at ab at all
  virtual void abMake() = 0; // host may look at ab
  virtual void abMakeMore() = 0; // host must have more ab
  virtual void abStopMaking() = 0; // host no longer needs ab
  virtual void abPause() {} // ignored by default
  virtual void abResume() {}; // ignored iff abPause is

If you combine the above with overview notes on the e-cap.org site and sample adapters that implement these methods, you should be able to see the whole picture and the specific hooks that make eCAP tick.

Adapter samples: For example, the "modifying" eCAP adapter sample is an example of how the message body may be examined (and modified). You can start with the sample and use documented source to reshape it into the adapter you need. Most of the hooks you need are already used by that sample adapter. You just need to use them differently. If you are stuck, please ask specific questions here.

Better documentation contributions are welcomed.