#ifndef LogAard_h
#define LogAard_h

#include <sys/types.h>

// Pure virtual base class describing the interface used to log the
// lowest level communications with the arduino. Implement some real
// derived class and register it with LibAard to do actual logging.

class LogAard {
public:

   LogAard();

   virtual
   ~LogAard();

      // Called immediately following read(). The rval value is the
      // return value from the read() call, buf and count are the buffer
      // and buffer size which was passed to read().
      //
      // The errno value should be valid on entry to LogRead and will
      // reflect the error code if the rval indicates an error occurred.
      //
      // The LogRead function should preserve the errno value on
      // exit.
      //
   virtual void
   LogRead(ssize_t rval, const void * buf, size_t count) = 0;

      // Much like LogRead(). The rval is the value returned by the
      // write() service, and buf and count were the args passed to write().
      //
   virtual void
   LogWrite(ssize_t rval, const void * buf, size_t count) = 0;
};

#endif // LogAard_h
