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

#ifndef PROTOBUF_C_rtty_2eproto__INCLUDED
#define PROTOBUF_C_rtty_2eproto__INCLUDED

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

PROTOBUF_C__BEGIN_DECLS

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


typedef struct _RttyMessage RttyMessage;
typedef struct _RttyMessage__File RttyMessage__File;
typedef struct _RttyMessage__EnvEntry RttyMessage__EnvEntry;


/* --- enums --- */

typedef enum _RttyMessage__Type {
  RTTY_MESSAGE__TYPE__UNKNOWN = 0,
  RTTY_MESSAGE__TYPE__LOGIN = 1,
  RTTY_MESSAGE__TYPE__LOGINACK = 2,
  RTTY_MESSAGE__TYPE__LOGOUT = 3,
  RTTY_MESSAGE__TYPE__TTY = 4,
  RTTY_MESSAGE__TYPE__UPFILE = 5,
  RTTY_MESSAGE__TYPE__DOWNFILE = 6,
  RTTY_MESSAGE__TYPE__COMMAND = 7,
  RTTY_MESSAGE__TYPE__WINSIZE = 8
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(RTTY_MESSAGE__TYPE)
} RttyMessage__Type;
typedef enum _RttyMessage__LoginCode {
  RTTY_MESSAGE__LOGIN_CODE__OK = 0,
  RTTY_MESSAGE__LOGIN_CODE__OFFLINE = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(RTTY_MESSAGE__LOGIN_CODE)
} RttyMessage__LoginCode;
typedef enum _RttyMessage__FileCode {
  RTTY_MESSAGE__FILE_CODE__START = 0,
  RTTY_MESSAGE__FILE_CODE__RATELIMIT = 1,
  RTTY_MESSAGE__FILE_CODE__FILEDATA = 2,
  RTTY_MESSAGE__FILE_CODE__CANCELED = 3,
  RTTY_MESSAGE__FILE_CODE__END = 4
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(RTTY_MESSAGE__FILE_CODE)
} RttyMessage__FileCode;
typedef enum _RttyMessage__CommandErr {
  RTTY_MESSAGE__COMMAND_ERR__NONE = 0,
  RTTY_MESSAGE__COMMAND_ERR__TIMEOUT = 1,
  RTTY_MESSAGE__COMMAND_ERR__NOTFOUND = 2,
  RTTY_MESSAGE__COMMAND_ERR__READ = 3,
  RTTY_MESSAGE__COMMAND_ERR__PERMISSION = 4,
  RTTY_MESSAGE__COMMAND_ERR__SYSCALL = 5,
  RTTY_MESSAGE__COMMAND_ERR__DEV_OFFLINE = 6,
  RTTY_MESSAGE__COMMAND_ERR__CMD_REQUIRED = 7,
  RTTY_MESSAGE__COMMAND_ERR__DEVID_REQUIRED = 8
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(RTTY_MESSAGE__COMMAND_ERR)
} RttyMessage__CommandErr;

/* --- messages --- */

struct  _RttyMessage__File
{
  ProtobufCMessage base;
  char *name;
  protobuf_c_boolean has_dir;
  protobuf_c_boolean dir;
  protobuf_c_boolean has_mtime;
  uint64_t mtime;
  protobuf_c_boolean has_size;
  uint64_t size;
};
#define RTTY_MESSAGE__FILE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&rtty_message__file__descriptor) \
    , NULL, 0,0, 0,0, 0,0 }


struct  _RttyMessage__EnvEntry
{
  ProtobufCMessage base;
  char *key;
  char *value;
};
#define RTTY_MESSAGE__ENV_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&rtty_message__env_entry__descriptor) \
    , NULL, NULL }


struct  _RttyMessage
{
  ProtobufCMessage base;
  protobuf_c_boolean has_version;
  uint32_t version;
  protobuf_c_boolean has_type;
  RttyMessage__Type type;
  char *sid;
  protobuf_c_boolean has_code;
  int32_t code;
  protobuf_c_boolean has_data;
  ProtobufCBinaryData data;
  char *name;
  protobuf_c_boolean has_size;
  uint32_t size;
  protobuf_c_boolean has_id;
  uint32_t id;
  protobuf_c_boolean has_err;
  int32_t err;
  char *username;
  char *password;
  char *std_out;
  char *std_err;
  size_t n_params;
  char **params;
  size_t n_env;
  RttyMessage__EnvEntry **env;
  size_t n_filelist;
  RttyMessage__File **filelist;
  protobuf_c_boolean has_cols;
  uint32_t cols;
  protobuf_c_boolean has_rows;
  uint32_t rows;
};
#define RTTY_MESSAGE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&rtty_message__descriptor) \
    , 0,0, 0,0, NULL, 0,0, 0,{0,NULL}, NULL, 0,0, 0,0, 0,0, NULL, NULL, NULL, NULL, 0,NULL, 0,NULL, 0,NULL, 0,0, 0,0 }


/* RttyMessage__File methods */
void   rtty_message__file__init
                     (RttyMessage__File         *message);
/* RttyMessage__EnvEntry methods */
void   rtty_message__env_entry__init
                     (RttyMessage__EnvEntry         *message);
/* RttyMessage methods */
void   rtty_message__init
                     (RttyMessage         *message);
size_t rtty_message__get_packed_size
                     (const RttyMessage   *message);
size_t rtty_message__pack
                     (const RttyMessage   *message,
                      uint8_t             *out);
size_t rtty_message__pack_to_buffer
                     (const RttyMessage   *message,
                      ProtobufCBuffer     *buffer);
RttyMessage *
       rtty_message__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   rtty_message__free_unpacked
                     (RttyMessage *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*RttyMessage__File_Closure)
                 (const RttyMessage__File *message,
                  void *closure_data);
typedef void (*RttyMessage__EnvEntry_Closure)
                 (const RttyMessage__EnvEntry *message,
                  void *closure_data);
typedef void (*RttyMessage_Closure)
                 (const RttyMessage *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor rtty_message__descriptor;
extern const ProtobufCMessageDescriptor rtty_message__file__descriptor;
extern const ProtobufCMessageDescriptor rtty_message__env_entry__descriptor;
extern const ProtobufCEnumDescriptor    rtty_message__type__descriptor;
extern const ProtobufCEnumDescriptor    rtty_message__login_code__descriptor;
extern const ProtobufCEnumDescriptor    rtty_message__file_code__descriptor;
extern const ProtobufCEnumDescriptor    rtty_message__command_err__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_rtty_2eproto__INCLUDED */
