/*
 * Please do not edit this file.
 * It was generated using rpcgen.
 */

#include "nisdb_priv.h"
/* We store the data in XDR form in the database. So we could
   generate the most important functions with help of rpcgen. */

bool_t
xdr_xdb_type (XDR *xdrs, xdb_type *objp)
{
  if (!xdr_enum (xdrs, (enum_t *) objp))
    return FALSE;
  return TRUE;
}
/* This is the header for all database files. */

bool_t
xdr_xdb_header (XDR *xdrs, xdb_header *objp)
{
  if (!xdr_string (xdrs, &objp->identifier, ~0))
    return FALSE;
  if (!xdr_uint32_t (xdrs, &objp->vers))
    return FALSE;
  if (!xdr_bool (xdrs, &objp->log_present))
    return FALSE;
  if (!xdr_xdb_type (xdrs, &objp->type))
    return FALSE;
  if (!xdr_uint32_t (xdrs, &objp->header_size))
    return FALSE;
  return TRUE;
}
/* What should we do with the log entry ? Add or delete. */

bool_t
xdr_xdb_logaction (XDR *xdrs, xdb_logaction *objp)
{
  if (!xdr_enum (xdrs, (enum_t *) objp))
    return FALSE;
  return TRUE;
}

bool_t
xdr_xdb_logentry (XDR *xdrs, xdb_logentry *objp)
{
  if (!xdr_xdb_logaction (xdrs, &objp->action))
    return FALSE;
  if (!xdr_uint32_t (xdrs, &objp->hashkey))
    return FALSE;
  if (!xdr_string (xdrs, &objp->table_name, ~0))
    return FALSE;
  if (!xdr_string (xdrs, &objp->table_path, ~0))
    return FALSE;
  return TRUE;
}
