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

#include "cpFileContents.h"

bool_t
xdr_CPFileContentsVersion (XDR *xdrs, CPFileContentsVersion *objp)
{

	 if (!xdr_enum (xdrs, (enum_t *) objp))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_CPFileItem (XDR *xdrs, CPFileItem *objp)
{

	 if (!xdr_uint64 (xdrs, &objp->validFlags))
		 return FALSE;
	 if (!xdr_uint32 (xdrs, &objp->type))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->size))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->createTime))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->accessTime))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->writeTime))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->attrChangeTime))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->permissions))
		 return FALSE;
	 if (!xdr_uint64 (xdrs, &objp->attributes))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->cpName.cpName_val, (u_int *) &objp->cpName.cpName_len, ~0))
		 return FALSE;
	 if (!xdr_bytes (xdrs, (char **)&objp->content.content_val, (u_int *) &objp->content.content_len, ~0))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_CPFileContentsList (XDR *xdrs, CPFileContentsList *objp)
{

	 if (!xdr_uint64 (xdrs, &objp->totalFileSize))
		 return FALSE;
	 if (!xdr_array (xdrs, (char **)&objp->fileItem.fileItem_val, (u_int *) &objp->fileItem.fileItem_len, ~0,
		sizeof (CPFileItem), (xdrproc_t) xdr_CPFileItem))
		 return FALSE;
	return TRUE;
}

bool_t
xdr_CPFileContents (XDR *xdrs, CPFileContents *objp)
{

	 if (!xdr_CPFileContentsVersion (xdrs, &objp->ver))
		 return FALSE;
	switch (objp->ver) {
	case CP_FILE_CONTENTS_V1:
		 if (!xdr_pointer (xdrs, (char **)&objp->CPFileContents_u.fileContentsV1, sizeof (CPFileContentsList), (xdrproc_t) xdr_CPFileContentsList))
			 return FALSE;
		break;
	default:
		return FALSE;
	}
	return TRUE;
}
