/*
 * 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.V3.RPC
{
    public enum StableHow
    {
        UNSTABLE = 0,
        DATA_SYNC = 1,
        FILE_SYNC = 2
    }

    public class WriteAccessOK : XdrAble
    {
        private WritingData _file_wcc;
        private int _count;
        private StableHow _committed;
        private byte[] _verf;

        public WriteAccessOK()
        { }

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

        public void xdrEncode(XdrEncodingStream xdr)
        {
            this._file_wcc.xdrEncode(xdr);
            xdr.xdrEncodeInt(this._count);
            xdr.xdrEncodeInt((int)this._committed);
            xdr.xdrEncodeOpaque(this._verf, NFSv3Protocol.NFS3_WRITEVERFSIZE);
        }

        public void xdrDecode(XdrDecodingStream xdr)
        {
            this._file_wcc = new WritingData(xdr);
            this._count = xdr.xdrDecodeInt();
            this._committed = (StableHow)xdr.xdrDecodeInt();
            this._verf = xdr.xdrDecodeOpaque(NFSv3Protocol.NFS3_WRITEVERFSIZE);
        }

        public WritingData Data
        {
            get
            { return this._file_wcc; }
        }

        public int Count
        {
            get
            { return this._count; }
        }

        public StableHow Committed
        {
            get
            { return this._committed; }
        }

        public byte[] Verification
        {
            get
            { return this._verf; }
        }
    }

    public class WriteAccessFAIL : XdrAble
    {
        private WritingData _dir_wcc;

        public WriteAccessFAIL()
        { }

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

        public void xdrEncode(XdrEncodingStream xdr)
        { this._dir_wcc.xdrEncode(xdr); }

        public void xdrDecode(XdrDecodingStream xdr)
        { this._dir_wcc = new WritingData(xdr); }

        public WritingData Data
        {
            get
            { return this._dir_wcc; }
        }
    }
    // End of WRITE3res.cs
}