/****************************************************************************
**  SIONLIB     http://www.fz-juelich.de/jsc/sionlib                       **
*****************************************************************************
**  Copyright (c) 2008-2018                                                **
**  Forschungszentrum Juelich, Juelich Supercomputing Centre               **
**                                                                         **
**  See the file COPYRIGHT in the package base directory for details       **
****************************************************************************/

#ifndef SION_SION_ENUMS_H
#define SION_SION_ENUMS_H

/// \defgroup constants Constants
/// @{
/// \ingroup common
/// \brief Constants for use throughout the SIONlib API

typedef enum { SION_LOWLEVEL_API_C, SION_LOWLEVEL_API_POSIX } sion_lowlevel_api;

typedef enum { SION_OPEN_READ, SION_OPEN_WRITE } sion_open_mode;

typedef enum {
  SION_KEYVAL_MODE_DEFAULT,
  SION_KEYVAL_MODE_INLINE,
  SION_KEYVAL_MODE_META,
  SION_KEYVAL_MODE_HASH,
  SION_KEYVAL_MODE_UNKNOWN,
  SION_KEYVAL_MODE_NONE
} sion_keyval_mode;

/// \brief determines how offsets are interpreted for seek operations
typedef enum {
  /// \brief interpret the offset relative to the beginning of the file
  SION_SEEK_BEGIN = 0,
  /// \brief interpret the offset relative to the current position in the file
  SION_SEEK_CURRENT,
  /// \brief interpret the offset relative to the end of the file
  SION_SEEK_END,
  /// \brief interpret the offset relative to the beginning of the current chunk
  SION_SEEK_CHUNK_BEGIN,
  /// \brief interpret the offset relative to the end of the current chunk
  SION_SEEK_CHUNK_END,
} sion_seek_mode;

/// @}

#endif
