1 /** 2 (module summary) 3 4 Copyright: © 2012-2014 RejectedSoftware e.K. 5 License: Subject to the terms of the General Public License version 3, as written in the included LICENSE.txt file. 6 Authors: Sönke Ludwig 7 */ 8 module vibenews.nntp.status; 9 10 enum NNTPStatus { 11 helpText = 100, 12 timeFollows = 111, 13 debugOutput = 199, 14 serverReady = 200, 15 serverReadyNoPosting = 201, 16 slaveStatusNoted = 202, 17 closingConnection = 205, 18 groupSelected = 211, 19 groups = 215, 20 article = 220, 21 head = 221, 22 body_ = 222, 23 overviewFollows = 224, 24 newArticles = 230, 25 newGroups = 231, 26 articleTransferredOK = 235, 27 articlePostedOK = 240, 28 authAccepted = 281, 29 transferArticle = 340, 30 postArticle = 340, 31 moreAuthInfoRequired = 381, 32 continueWithTLS = 382, 33 serviceDiscontinued = 400, 34 noSuchGruop = 411, 35 noGroupSelected = 412, 36 noArticleSelected = 420, 37 badArticleNumber = 423, 38 badArticleId = 430, 39 dontSendArticle = 435, 40 transferFailed = 436, 41 articleRejected = 437, 42 postingNotAllowed = 440, 43 postingFailed = 441, 44 authRequired = 480, 45 authRejected = 482, 46 badCommand = 500, 47 commandSyntaxError = 501, 48 accessFailure = 502, 49 commandUnavailable = 502, 50 internalError = 503, 51 tlsFailed = 580, 52 53 // deprecated 54 HelpText = 100, 55 TimeFollows = 111, 56 DebugOutput = 199, 57 ServerReady = 200, 58 ServerReadyNoPosting = 201, 59 SlaveStatusNoted = 202, 60 ClosingConnection = 205, 61 GroupSelected = 211, 62 Groups = 215, 63 Article = 220, 64 Head = 221, 65 Body = 222, 66 OverviewFollows = 224, 67 NewArticles = 230, 68 NewGroups = 231, 69 ArticleTransferredOK = 235, 70 ArticlePostedOK = 240, 71 AuthAccepted = 281, 72 TransferArticle = 340, 73 PostArticle = 340, 74 MoreAuthInfoRequired = 381, 75 ContinueWithTLS = 382, 76 ServiceDiscontinued = 400, 77 NoSuchGruop = 411, 78 NoGroupSelected = 412, 79 NoArticleSelected = 420, 80 BadArticleNumber = 423, 81 BadArticleId = 430, 82 DontSendArticle = 435, 83 TransferFailed = 436, 84 ArticleRejected = 437, 85 PostingNotAllowed = 440, 86 PostingFailed = 441, 87 AuthRequired = 480, 88 AuthRejected = 482, 89 BadCommand = 500, 90 CommandSyntaxError = 501, 91 AccessFailure = 502, 92 CommandUnavailable = 502, 93 InternalError = 503, 94 TLSFailed = 580 95 } 96 97 deprecated alias NntpStatus = NNTPStatus; 98 99 100 class NNTPStatusException : Exception { 101 private { 102 NNTPStatus m_status; 103 string m_statusText; 104 } 105 106 this(NNTPStatus status, string text, Throwable next = null, string file = __FILE__, int line = __LINE__) 107 { 108 super(text, file, line, next); 109 m_status = status; 110 m_statusText = text; 111 } 112 113 @property NNTPStatus status() const { return m_status; } 114 @property string statusText() const { return m_statusText; } 115 } 116 117 deprecated alias NntpStatusException = NNTPStatusException;