1  /*
   2   * \brief  ROM session interface
   3   * \author Norman Feske
   4   * \date   2006-07-06
   5   *
   6   * A ROM session corresponds to an open file. The file
   7   * name is specified as an argument on session creation.
   8   */

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

  16  
  17  #ifndef _INCLUDE__ROM_SESSION__ROM_SESSION_H_
  18  #define _INCLUDE__ROM_SESSION__ROM_SESSION_H_
  19  
  20  #include <dataspace/capability.h>
  21  
  22  namespace Genode {
  23  
  24     typedef Typed_capability<Dataspace, Dataspace_capability> Rom_dataspace_capability;
  25  
  26     class Rom_session
  27     {
  28        protected:
  29  
  30           enum Opcode { DATASPACE };

  31  
  32        public:
  33  
  34           static const char *service_name() { return "ROM"; }
  35  
  36           virtual ~Rom_session() { }
  37  
  38           /**
  39            * Request dataspace containing the ROM session data
  40            *
  41            * \return  capability to ROM dataspace
  42            *
  43            * The capability may be invalid.
  44            */

  45           virtual Rom_dataspace_capability dataspace() = 0;

  46     }
;

  47  }

  48  
  49  #endif /* _INCLUDE__ROM_SESSION__ROM_SESSION_H_ */