1  /*
   2   * \brief  Log text output session interface
   3   * \author Norman Feske
   4   * \date   2006-09-15
   5   */

   6  
   7  /*
   8   * Copyright (C) 2006-2010 Genode Labs GmbH
   9   *
  10   * This file is part of the Genode OS framework, which is distributed
  11   * under the terms of the GNU General Public License version 2.
  12   */

  13  
  14  #ifndef _INCLUDE__LOG_SESSION__LOG_SESSION_H_
  15  #define _INCLUDE__LOG_SESSION__LOG_SESSION_H_
  16  
  17  #include <base/capability.h>
  18  #include <base/stdint.h>
  19  
  20  namespace Genode {
  21  
  22     class Log_session
  23     {
  24        protected:
  25  
  26           enum Opcode { WRITE };

  27  
  28        public:
  29  
  30           static const char *service_name() { return "LOG"; }
  31  
  32           virtual ~Log_session() { }
  33  
  34           /**
  35            * Output null-terminated string
  36            *
  37            * \return  number of written characters
  38            *
  39            * The `string` argument may be a NULL pointer. The implementation
  40            * of the interface must deal with it.
  41            */

  42           virtual size_t write(const char *string) = 0;

  43     }
;

  44  }

  45  
  46  #endif /* _INCLUDE__LOG_SESSION__LOG_SESSION_H_ */