From e078a2887cf2dc61da49ce302324ff1485f95af9 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 1 Oct 2012 20:59:12 +0000 Subject: Added non-working code for an attempt at FTP --- Noddybox.WindowsPhone.FTP/NetException.cs | 84 +++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Noddybox.WindowsPhone.FTP/NetException.cs (limited to 'Noddybox.WindowsPhone.FTP/NetException.cs') diff --git a/Noddybox.WindowsPhone.FTP/NetException.cs b/Noddybox.WindowsPhone.FTP/NetException.cs new file mode 100644 index 0000000..119c241 --- /dev/null +++ b/Noddybox.WindowsPhone.FTP/NetException.cs @@ -0,0 +1,84 @@ +// This file is part of the Noddybox.WindowsPhone C# suite. +// +// Noddybox.Emulation is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Noddybox.Emulation is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Noddybox.Emulation. If not, see . +// +// Copyright (c) 2012 Ian Cowburn +// +using System; + +namespace Noddybox.WindowsPhone.Net +{ + /// + /// Exception raised for internal problems. + /// + public class NetException : System.Exception + { + /// + /// The types of error that can be raised + /// + public enum Type + { + /// + /// A server replied with no code in the first reply line + /// + ALL_NoReplyCode, + + /// + /// The local IP address could not be found (note that all + /// the routines use the first available IP when onew must + /// be chosen). + /// + ALL_NoLocalIP, + + /// + /// An uncompleted feature was used + /// + ALL_NotImplemented, + + /// + /// The FTP server does not support passive connections + /// + FTP_NoPassive, + + /// + /// The FTP server had a problem accepting our local port + /// info + /// + FTP_NonPassiveProblem, + + /// + /// Given a bad address by the server + /// + FTP_BadReplyAddress + }; + + /// + /// Default constructor - initializes all fields to default values + /// + public NetException(Type e) + { + m_code=e; + } + + /// + /// Gets the cause of the error + /// + public Type Error + { + get {return m_code;} + } + + private Type m_code; + } +} -- cgit v1.2.3