/* Generated from vldb.xg */
#ifndef _VLDB_
#define _VLDB_

#include <atypes.h>
#include <rx/rx.h>
#include <rx/rx_null.h>
#define VLDB_MAXNAMELEN 65

#define VLDB_MAXNAMELEN_SIZE 0
#define MAXNSERVERS 8

#define MAXNSERVERS_SIZE 0
#define MAX_NUMBER_OPCODES 30

#define MAX_NUMBER_OPCODES_SIZE 0
#define MAXTYPES 3

#define MAXTYPES_SIZE 0
#define MAXSERVERID 30

#define MAXSERVERID_SIZE 0
#define HASHSIZE 8191

#define HASHSIZE_SIZE 0
#define DEFAULTBULK 10000

#define DEFAULTBULK_SIZE 0
typedef struct {
unsigned len;
char *val;
} bulk;

char *ydr_encode_bulk(bulk *o, char *ptr);
char *ydr_decode_bulk(bulk *o, char *ptr);
#define RWVOL 0

#define RWVOL_SIZE 0
#define ROVOL 1

#define ROVOL_SIZE 0
#define BACKVOL 2

#define BACKVOL_SIZE 0
#define VLSF_NEWREPSITE 1

#define VLSF_NEWREPSITE_SIZE 0
#define VLSF_ROVOL 2

#define VLSF_ROVOL_SIZE 0
#define VLSF_RWVOL 4

#define VLSF_RWVOL_SIZE 0
#define VLSF_BACKVOL 8

#define VLSF_BACKVOL_SIZE 0
#define VLF_RWEXISTS 4096

#define VLF_RWEXISTS_SIZE 0
#define VLF_ROEXISTS 8192

#define VLF_ROEXISTS_SIZE 0
#define VLF_BOEXISTS 16384

#define VLF_BOEXISTS_SIZE 0
#define VLF_BACKEXISTS 16384

#define VLF_BACKEXISTS_SIZE 0
#define VL_IDEXIST 363520

#define VL_IDEXIST_SIZE 0
#define VL_IO 363521

#define VL_IO_SIZE 0
#define VL_NAMEEXIST 363522

#define VL_NAMEEXIST_SIZE 0
#define VL_CREATEFAIL 363523

#define VL_CREATEFAIL_SIZE 0
#define VL_NOENT 363524

#define VL_NOENT_SIZE 0
#define VL_EMPTY 363525

#define VL_EMPTY_SIZE 0
#define VL_ENTDELETED 363526

#define VL_ENTDELETED_SIZE 0
#define VL_BADNAME 363527

#define VL_BADNAME_SIZE 0
#define VL_BADINDEX 363528

#define VL_BADINDEX_SIZE 0
#define VL_BADVOLTYPE 363529

#define VL_BADVOLTYPE_SIZE 0
#define VL_BADPARTITION 363530

#define VL_BADPARTITION_SIZE 0
#define VL_BADSERVER 363531

#define VL_BADSERVER_SIZE 0
#define VL_REPSFULL 363532

#define VL_REPSFULL_SIZE 0
#define VL_NOREPSERVER 363533

#define VL_NOREPSERVER_SIZE 0
#define VL_DUPREPSERVER 363534

#define VL_DUPREPSERVER_SIZE 0
#define VL_RWNOTFOUND 363535

#define VL_RWNOTFOUND_SIZE 0
#define VL_BADREFCOUNT 363536

#define VL_BADREFCOUNT_SIZE 0
#define VL_SIZEEXCEEDED 363537

#define VL_SIZEEXCEEDED_SIZE 0
#define VL_BADENTRY 363538

#define VL_BADENTRY_SIZE 0
#define VL_BADVOLIDBUMP 363539

#define VL_BADVOLIDBUMP_SIZE 0
#define VL_IDALREADHASED 363540

#define VL_IDALREADHASED_SIZE 0
#define VL_ENTRYLOCKED 363541

#define VL_ENTRYLOCKED_SIZE 0
#define VL_BADVOLOPER 363542

#define VL_BADVOLOPER_SIZE 0
#define VL_BADRELLOCKTYPE 363543

#define VL_BADRELLOCKTYPE_SIZE 0
#define VL_RERELEASE 363544

#define VL_RERELEASE_SIZE 0
#define VL_BADSERVERFLAG 363545

#define VL_BADSERVERFLAG_SIZE 0
#define VL_PERM 363546

#define VL_PERM_SIZE 0
#define VL_NOMEM 363547

#define VL_NOMEM_SIZE 0
struct vldbentry {
     char name[ 65 ];
     int32_t volumeType;
     int32_t nServers;
     int32_t serverNumber[ 8 ];
     int32_t serverPartition[ 8 ];
     int32_t serverFlags[ 8 ];
     u_int32_t volumeId[ 3 ];
     int32_t cloneId;
     int32_t flags;
};
typedef struct vldbentry vldbentry;

#define VLDBENTRY_SIZE 384
char *ydr_encode_vldbentry(vldbentry *o, char *ptr);
char *ydr_decode_vldbentry(vldbentry *o, char *ptr);
struct vital_vlheader {
     int32_t vldbversion;
     int32_t headersize;
     int32_t feePtr;
     int32_t eofPtr;
     int32_t allocs;
     int32_t frees;
     int32_t MaxVolumeId;
     int32_t totalEntries[ 3 ];
};
typedef struct vital_vlheader vital_vlheader;

#define VITAL_VLHEADER_SIZE 40
char *ydr_encode_vital_vlheader(vital_vlheader *o, char *ptr);
char *ydr_decode_vital_vlheader(vital_vlheader *o, char *ptr);
struct VldbUpdateEntry {
     u_int32_t Mask;
     char name[ 65 ];
     int32_t volumeType;
     int32_t flags;
     u_int32_t ReadOnlyId;
     u_int32_t BackupId;
     int32_t cloneid;
     int32_t nModifiedRepsites;
     u_int32_t RepsitesMask[ 8 ];
     int32_t RepsitesTargetServer[ 8 ];
     int32_t RepsitesTargetPart[ 8 ];
     int32_t RepsitesNewServer[ 8 ];
     int32_t RepsitesNewPart[ 8 ];
     int32_t RepsitesNewFlags[ 8 ];
};
typedef struct VldbUpdateEntry VldbUpdateEntry;

#define VLDBUPDATEENTRY_SIZE 480
char *ydr_encode_VldbUpdateEntry(VldbUpdateEntry *o, char *ptr);
char *ydr_decode_VldbUpdateEntry(VldbUpdateEntry *o, char *ptr);
struct VldbListByAttributes {
     u_int32_t Mask;
     int32_t server;
     int32_t partition;
     int32_t volumetype;
     int32_t volumeid;
     int32_t flag;
};
typedef struct VldbListByAttributes VldbListByAttributes;

#define VLDBLISTBYATTRIBUTES_SIZE 24
char *ydr_encode_VldbListByAttributes(VldbListByAttributes *o, char *ptr);
char *ydr_decode_VldbListByAttributes(VldbListByAttributes *o, char *ptr);
struct vldstats {
     u_int32_t start_time;
     int32_t requests[ 30 ];
     int32_t aborts[ 30 ];
     int32_t reserved[ 5 ];
};
typedef struct vldstats vldstats;

#define VLDSTATS_SIZE 264
char *ydr_encode_vldstats(vldstats *o, char *ptr);
char *ydr_decode_vldstats(vldstats *o, char *ptr);
typedef struct {
unsigned len;
struct vldbentry *val;
} bulkentries;

char *ydr_encode_bulkentries(bulkentries *o, char *ptr);
char *ydr_decode_bulkentries(bulkentries *o, char *ptr);

#endif /* VLDB */
