/*
 * 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;
using System.Net;

/**
 * The class <code>NFSv2ProtocolClient</code> implements the client stub proxy
 * for the NFS_PROGRAM remote program. It provides method stubs
 * which, when called, in turn call the appropriate remote method (procedure).
 */
namespace NFSLibrary.Protocols.V2.RPC
{
    public class NFSv2ProtocolClient : OncRpcClientStub
    {

        /**
         * Constructs a <code>NFSv2ProtocolClient</code> client stub proxy object
         * from which the NFS_PROGRAM remote program can be accessed.
         * @param host Internet address of host where to contact the remote program.
         * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be
         *   used for ONC/RPC calls.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public NFSv2ProtocolClient(IPAddress host, int protocol)
            : base(host, NFSv2Protocol.NFS_PROGRAM, 2, 0, protocol, true)
        {
        }

        public NFSv2ProtocolClient(IPAddress host, int protocol, bool useSecurePort)
            : base(host, NFSv2Protocol.NFS_PROGRAM, 2, 0, protocol, useSecurePort)
        {
        }
       
        /**
         * Constructs a <code>NFSv2ProtocolClient</code> client stub proxy object
         * from which the NFS_PROGRAM remote program can be accessed.
         * @param host Internet address of host where to contact the remote program.
         * @param port Port number at host where the remote program can be reached.
         * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be
         *   used for ONC/RPC calls.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public NFSv2ProtocolClient(IPAddress host, int port, int protocol)
            : base(host, NFSv2Protocol.NFS_PROGRAM, 2, port, protocol, true)
        {
        }

        /**
         * Constructs a <code>NFSv2ProtocolClient</code> client stub proxy object
         * from which the NFS_PROGRAM remote program can be accessed.
         * @param client ONC/RPC client connection object implementing a particular
         *   protocol.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public NFSv2ProtocolClient(OncRpcClient client)
            : base(client)
        {
        }

        /**
         * Constructs a <code>NFSv2ProtocolClient</code> client stub proxy object
         * from which the NFS_PROGRAM remote program can be accessed.
         * @param host Internet address of host where to contact the remote program.
         * @param program Remote program number.
         * @param version Remote program version number.
         * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be
         *   used for ONC/RPC calls.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public NFSv2ProtocolClient(IPAddress host, int program, int version, int protocol)
            : base(host, program, version, 0, protocol, true)
        {
        }

        /**
         * Constructs a <code>NFSv2ProtocolClient</code> client stub proxy object
         * from which the NFS_PROGRAM remote program can be accessed.
         * @param host Internet address of host where to contact the remote program.
         * @param program Remote program number.
         * @param version Remote program version number.
         * @param port Port number at host where the remote program can be reached.
         * @param protocol {@link org.acplt.oncrpc.OncRpcProtocols Protocol} to be
         *   used for ONC/RPC calls.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public NFSv2ProtocolClient(IPAddress host, int program, int version, int port, int protocol)
            : base(host, program, version, port, protocol, true)
        {
        }

        public NFSv2ProtocolClient(IPAddress host, int program, int version, int port, int protocol, bool useSecurePort)
            : base(host, program, version, port, protocol, useSecurePort)
        {
        }

        /**
         * Call remote procedure NFSPROC_NULL_2.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public void NFSPROC_NULL()
        {
            XdrVoid args_ = XdrVoid.XDR_VOID;
            XdrVoid result_ = XdrVoid.XDR_VOID;

            client.call(NFSv2Protocol.NFSPROC_NULL, NFSv2Protocol.NFS_VERSION, args_, result_);
        }

        /**
         * Call remote procedure NFSPROC_GETATTR_2.
         * @param arg1 parameter (of type nfshandle) to the remote procedure call.
         * @return Result from remote procedure call (of type attrstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public FileStatus NFSPROC_GETATTR(NFSHandle arg1)
        {
            FileStatus result_ = new FileStatus();

            client.call(NFSv2Protocol.NFSPROC_GETATTR, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_SETATTR_2.
         * @param arg1 parameter (of type sattrargs) to the remote procedure call.
         * @return Result from remote procedure call (of type attrstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public FileStatus NFSPROC_SETATTR(FileArguments arg1)
        {
            FileStatus result_ = new FileStatus();

            client.call(NFSv2Protocol.NFSPROC_SETATTR, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_ROOT_2.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public void NFSPROC_ROOT()
        {
            XdrVoid args_ = XdrVoid.XDR_VOID;
            XdrVoid result_ = XdrVoid.XDR_VOID;

            client.call(NFSv2Protocol.NFSPROC_ROOT, NFSv2Protocol.NFS_VERSION, args_, result_);
        }

        /**
         * Call remote procedure NFSPROC_LOOKUP_2.
         * @param arg1 parameter (of type diropargs) to the remote procedure call.
         * @return Result from remote procedure call (of type diropres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public ItemOperationStatus NFSPROC_LOOKUP(ItemOperationArguments arg1)
        {
            ItemOperationStatus result_ = new ItemOperationStatus();

            client.call(NFSv2Protocol.NFSPROC_LOOKUP, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_READLINK_2.
         * @param arg1 parameter (of type nfshandle) to the remote procedure call.
         * @return Result from remote procedure call (of type readlinkres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public LinkStatus NFSPROC_READLINK(NFSHandle arg1)
        {
            LinkStatus result_ = new LinkStatus();

            client.call(NFSv2Protocol.NFSPROC_READLINK, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_READ_2.
         * @param arg1 parameter (of type readargs) to the remote procedure call.
         * @return Result from remote procedure call (of type readres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public ReadStatus NFSPROC_READ(ReadArguments arg1)
        {
            ReadStatus result_ = new ReadStatus();

            client.call(NFSv2Protocol.NFSPROC_READ, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_WRITECACHE_2.
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public void NFSPROC_WRITECACHE()
        {
            XdrVoid args_ = XdrVoid.XDR_VOID;
            XdrVoid result_ = XdrVoid.XDR_VOID;

            client.call(NFSv2Protocol.NFSPROC_WRITECACHE, NFSv2Protocol.NFS_VERSION, args_, result_);
        }

        /**
         * Call remote procedure NFSPROC_WRITE_2.
         * @param arg1 parameter (of type writeargs) to the remote procedure call.
         * @return Result from remote procedure call (of type attrstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public FileStatus NFSPROC_WRITE(WriteArguments arg1)
        {
            FileStatus result_ = new FileStatus();

            client.call(NFSv2Protocol.NFSPROC_WRITE, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_CREATE_2.
         * @param arg1 parameter (of type createargs) to the remote procedure call.
         * @return Result from remote procedure call (of type diropres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public ItemOperationStatus NFSPROC_CREATE(CreateArguments arg1)
        {
            ItemOperationStatus result_ = new ItemOperationStatus();

            client.call(NFSv2Protocol.NFSPROC_CREATE, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_REMOVE_2.
         * @param arg1 parameter (of type diropargs) to the remote procedure call.
         * @return Result from remote procedure call (of type nfsstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public int NFSPROC_REMOVE(ItemOperationArguments arg1)
        {
            XdrInt result_ = new XdrInt();

            client.call(NFSv2Protocol.NFSPROC_REMOVE, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_.intValue();
        }

        /**
         * Call remote procedure NFSPROC_RENAME_2.
         * @param arg1 parameter (of type renameargs) to the remote procedure call.
         * @return Result from remote procedure call (of type nfsstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public int NFSPROC_RENAME(RenameArguments arg1)
        {
            XdrInt result_ = new XdrInt();

            client.call(NFSv2Protocol.NFSPROC_RENAME, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_.intValue();
        }

        /**
         * Call remote procedure NFSPROC_LINK_2.
         * @param arg1 parameter (of type linkargs) to the remote procedure call.
         * @return Result from remote procedure call (of type nfsstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public int NFSPROC_LINK(LinkArguments arg1)
        {
            XdrInt result_ = new XdrInt();

            client.call(NFSv2Protocol.NFSPROC_LINK, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_.intValue();
        }

        /**
         * Call remote procedure NFSPROC_SYMLINK_2.
         * @param arg1 parameter (of type symlinkargs) to the remote procedure call.
         * @return Result from remote procedure call (of type nfsstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public int NFSPROC_SYMLINK(SymlinkArguments arg1)
        {
            XdrInt result_ = new XdrInt();

            client.call(NFSv2Protocol.NFSPROC_SYMLINK, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_.intValue();
        }

        /**
         * Call remote procedure NFSPROC_MKDIR_2.
         * @param arg1 parameter (of type createargs) to the remote procedure call.
         * @return Result from remote procedure call (of type diropres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public ItemOperationStatus NFSPROC_MKDIR(CreateArguments arg1)
        {
            ItemOperationStatus result_ = new ItemOperationStatus();

            client.call(NFSv2Protocol.NFSPROC_MKDIR, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_RMDIR_2.
         * @param arg1 parameter (of type diropargs) to the remote procedure call.
         * @return Result from remote procedure call (of type nfsstat).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public int NFSPROC_RMDIR(ItemOperationArguments arg1)
        {
            XdrInt result_ = new XdrInt();

            client.call(NFSv2Protocol.NFSPROC_RMDIR, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_.intValue();
        }

        /**
         * Call remote procedure NFSPROC_READDIR_2.
         * @param arg1 parameter (of type readdirargs) to the remote procedure call.
         * @return Result from remote procedure call (of type readdirres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public ItemStatus NFSPROC_READDIR(ItemArguments arg1)
        {
            ItemStatus result_ = new ItemStatus();

            client.call(NFSv2Protocol.NFSPROC_READDIR, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

        /**
         * Call remote procedure NFSPROC_STATFS_2.
         * @param arg1 parameter (of type nfshandle) to the remote procedure call.
         * @return Result from remote procedure call (of type statfsres).
         * @throws OncRpcException if an ONC/RPC error occurs.
         * @throws IOException if an I/O error occurs.
         */
        public FSStatStatus NFSPROC_STATFS(NFSHandle arg1)
        {
            FSStatStatus result_ = new FSStatStatus();

            client.call(NFSv2Protocol.NFSPROC_STATFS, NFSv2Protocol.NFS_VERSION, arg1, result_);

            return result_;
        }

    }
    // End of NFSv2ProtocolClient.cs
}