/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: tty.proto */

#ifndef PROTOBUF_C_tty_2eproto__INCLUDED
#define PROTOBUF_C_tty_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif

#include "opts.pb-c.h"
#include "fown.pb-c.h"

typedef struct WinsizeEntry WinsizeEntry;
typedef struct TermiosEntry TermiosEntry;
typedef struct TtyPtyEntry TtyPtyEntry;
typedef struct TtyDataEntry TtyDataEntry;
typedef struct TtyInfoEntry TtyInfoEntry;
typedef struct TtyFileEntry TtyFileEntry;


/* --- enums --- */

typedef enum _TtyType {
  TTY_TYPE__UNKNOWN = 0,
  TTY_TYPE__PTY = 1,
  TTY_TYPE__CONSOLE = 2,
  TTY_TYPE__VT = 3,
  TTY_TYPE__CTTY = 4,
  TTY_TYPE__EXT_TTY = 5,
  TTY_TYPE__SERIAL = 6
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(TTY_TYPE)
} TtyType;

/* --- messages --- */

struct  WinsizeEntry
{
  ProtobufCMessage base;
  uint32_t ws_row;
  uint32_t ws_col;
  uint32_t ws_xpixel;
  uint32_t ws_ypixel;
};
#define WINSIZE_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&winsize_entry__descriptor) \
, 0, 0, 0, 0 }


struct  TermiosEntry
{
  ProtobufCMessage base;
  uint32_t c_iflag;
  uint32_t c_oflag;
  uint32_t c_cflag;
  uint32_t c_lflag;
  uint32_t c_line;
  uint32_t c_ispeed;
  uint32_t c_ospeed;
  size_t n_c_cc;
  uint32_t *c_cc;
};
#define TERMIOS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&termios_entry__descriptor) \
, 0, 0, 0, 0, 0, 0, 0, 0,NULL }


struct  TtyPtyEntry
{
  ProtobufCMessage base;
  uint32_t index;
};
#define TTY_PTY_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&tty_pty_entry__descriptor) \
, 0 }


struct  TtyDataEntry
{
  ProtobufCMessage base;
  uint32_t tty_id;
  ProtobufCBinaryData data;
};
#define TTY_DATA_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&tty_data_entry__descriptor) \
, 0, {0,NULL} }


struct  TtyInfoEntry
{
  ProtobufCMessage base;
  uint32_t id;
  TtyType type;
  /*
   * Unix98 PTY only 
   */
  protobuf_c_boolean locked;
  protobuf_c_boolean exclusive;
  /*
   * Unix98 PTY only 
   */
  protobuf_c_boolean packet_mode;
  uint32_t sid;
  uint32_t pgrp;
  /*
   * Convenient for printing errors and such, with this
   * device encoded we can figure out major and minor
   * numbers.
   */
  uint32_t rdev;
  TermiosEntry *termios;
  TermiosEntry *termios_locked;
  WinsizeEntry *winsize;
  /*
   * These are optional fields which presence depends on
   * TTY type.
   */
  TtyPtyEntry *pty;
  protobuf_c_boolean has_dev;
  uint32_t dev;
  protobuf_c_boolean has_uid;
  uint32_t uid;
  protobuf_c_boolean has_gid;
  uint32_t gid;
};
#define TTY_INFO_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&tty_info_entry__descriptor) \
, 0, TTY_TYPE__UNKNOWN, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0 }


struct  TtyFileEntry
{
  ProtobufCMessage base;
  uint32_t id;
  uint32_t tty_info_id;
  uint32_t flags;
  FownEntry *fown;
  /*
   * optional sint32		mnt_id		= 5 [default = 0];
   */
  protobuf_c_boolean has_regf_id;
  uint32_t regf_id;
};
#define TTY_FILE_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&tty_file_entry__descriptor) \
, 0, 0, 0, NULL, 0, 0 }


/* WinsizeEntry methods */
void   winsize_entry__init
                     (WinsizeEntry         *message);
size_t winsize_entry__get_packed_size
                     (const WinsizeEntry   *message);
size_t winsize_entry__pack
                     (const WinsizeEntry   *message,
                      uint8_t             *out);
size_t winsize_entry__pack_to_buffer
                     (const WinsizeEntry   *message,
                      ProtobufCBuffer     *buffer);
WinsizeEntry *
       winsize_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   winsize_entry__free_unpacked
                     (WinsizeEntry *message,
                      ProtobufCAllocator *allocator);
/* TermiosEntry methods */
void   termios_entry__init
                     (TermiosEntry         *message);
size_t termios_entry__get_packed_size
                     (const TermiosEntry   *message);
size_t termios_entry__pack
                     (const TermiosEntry   *message,
                      uint8_t             *out);
size_t termios_entry__pack_to_buffer
                     (const TermiosEntry   *message,
                      ProtobufCBuffer     *buffer);
TermiosEntry *
       termios_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   termios_entry__free_unpacked
                     (TermiosEntry *message,
                      ProtobufCAllocator *allocator);
/* TtyPtyEntry methods */
void   tty_pty_entry__init
                     (TtyPtyEntry         *message);
size_t tty_pty_entry__get_packed_size
                     (const TtyPtyEntry   *message);
size_t tty_pty_entry__pack
                     (const TtyPtyEntry   *message,
                      uint8_t             *out);
size_t tty_pty_entry__pack_to_buffer
                     (const TtyPtyEntry   *message,
                      ProtobufCBuffer     *buffer);
TtyPtyEntry *
       tty_pty_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   tty_pty_entry__free_unpacked
                     (TtyPtyEntry *message,
                      ProtobufCAllocator *allocator);
/* TtyDataEntry methods */
void   tty_data_entry__init
                     (TtyDataEntry         *message);
size_t tty_data_entry__get_packed_size
                     (const TtyDataEntry   *message);
size_t tty_data_entry__pack
                     (const TtyDataEntry   *message,
                      uint8_t             *out);
size_t tty_data_entry__pack_to_buffer
                     (const TtyDataEntry   *message,
                      ProtobufCBuffer     *buffer);
TtyDataEntry *
       tty_data_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   tty_data_entry__free_unpacked
                     (TtyDataEntry *message,
                      ProtobufCAllocator *allocator);
/* TtyInfoEntry methods */
void   tty_info_entry__init
                     (TtyInfoEntry         *message);
size_t tty_info_entry__get_packed_size
                     (const TtyInfoEntry   *message);
size_t tty_info_entry__pack
                     (const TtyInfoEntry   *message,
                      uint8_t             *out);
size_t tty_info_entry__pack_to_buffer
                     (const TtyInfoEntry   *message,
                      ProtobufCBuffer     *buffer);
TtyInfoEntry *
       tty_info_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   tty_info_entry__free_unpacked
                     (TtyInfoEntry *message,
                      ProtobufCAllocator *allocator);
/* TtyFileEntry methods */
void   tty_file_entry__init
                     (TtyFileEntry         *message);
size_t tty_file_entry__get_packed_size
                     (const TtyFileEntry   *message);
size_t tty_file_entry__pack
                     (const TtyFileEntry   *message,
                      uint8_t             *out);
size_t tty_file_entry__pack_to_buffer
                     (const TtyFileEntry   *message,
                      ProtobufCBuffer     *buffer);
TtyFileEntry *
       tty_file_entry__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   tty_file_entry__free_unpacked
                     (TtyFileEntry *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*WinsizeEntry_Closure)
                 (const WinsizeEntry *message,
                  void *closure_data);
typedef void (*TermiosEntry_Closure)
                 (const TermiosEntry *message,
                  void *closure_data);
typedef void (*TtyPtyEntry_Closure)
                 (const TtyPtyEntry *message,
                  void *closure_data);
typedef void (*TtyDataEntry_Closure)
                 (const TtyDataEntry *message,
                  void *closure_data);
typedef void (*TtyInfoEntry_Closure)
                 (const TtyInfoEntry *message,
                  void *closure_data);
typedef void (*TtyFileEntry_Closure)
                 (const TtyFileEntry *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCEnumDescriptor    tty_type__descriptor;
extern const ProtobufCMessageDescriptor winsize_entry__descriptor;
extern const ProtobufCMessageDescriptor termios_entry__descriptor;
extern const ProtobufCMessageDescriptor tty_pty_entry__descriptor;
extern const ProtobufCMessageDescriptor tty_data_entry__descriptor;
extern const ProtobufCMessageDescriptor tty_info_entry__descriptor;
extern const ProtobufCMessageDescriptor tty_file_entry__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_tty_2eproto__INCLUDED */
