/*
 * Automatically generated by jrpcgen 1.0.7 on 29.11.2012
 * jrpcgen is part of the "Remote Tea.Net" ONC/RPC package for C#
 * See http://remotetea.sourceforge.net for details
 */
using NFSLibrary.Protocols.Commons;
using org.acplt.oncrpc;

namespace NFSLibrary.Protocols.V2.RPC
{
    public class Entry : XdrAble
    {
        private int _fileid; /* fileid is not long on on NFSV1&NFSV2. this value is long NFSV3 and later... */
        private Name _name;
        private NFSCookie _cookie;
        private Entry _nextentry;

        public Entry()
        { }

        public Entry(XdrDecodingStream xdr)
        { xdrDecode(xdr); }

        public void xdrEncode(XdrEncodingStream xdr)
        {
            Entry _this = this;

            do
            {
                xdr.xdrEncodeInt(_this._fileid);

                _this._name.xdrEncode(xdr);
                _this._cookie.xdrEncode(xdr);
                _this = _this._nextentry;

                xdr.xdrEncodeBoolean(_this != null);
            } while (_this != null);
        }

        public void xdrDecode(XdrDecodingStream xdr)
        {
            Entry _this = this;
            Entry _next;

            do
            {
                _this._fileid = xdr.xdrDecodeInt();
                _this._name = new Name(xdr);
                _this._cookie = new NFSCookie(xdr);
                _next = xdr.xdrDecodeBoolean() ? new Entry() : null;
                _this._nextentry = _next;
                _this = _next;
            } while (_this != null);
        }

        public int FileID
        {
            get
            { return this._fileid; }
        }

        public Name Name
        {
            get
            { return this._name; }
        }

        public NFSCookie Cookie
        {
            get
            { return this._cookie; }
        }

        public Entry NextEntry
        {
            get
            { return this._nextentry; }
        }
    }
    // End of entry.cs
}