Frames | No Frames |
1: /* 2: * NNTPConstants.java 3: * Copyright (C) 2002 The free Software Foundation 4: * 5: * This file is part of GNU inetlib, a library. 6: * 7: * GNU inetlib is free software; you can redistribute it and/or modify 8: * it under the terms of the GNU General Public License as published by 9: * the Free Software Foundation; either version 2 of the License, or 10: * (at your option) any later version. 11: * 12: * GNU inetlib is distributed in the hope that it will be useful, 13: * but WITHOUT ANY WARRANTY; without even the implied warranty of 14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15: * GNU General Public License for more details. 16: * 17: * You should have received a copy of the GNU General Public License 18: * along with this library; if not, write to the Free Software 19: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20: * 21: * Linking this library statically or dynamically with other modules is 22: * making a combined work based on this library. Thus, the terms and 23: * conditions of the GNU General Public License cover the whole 24: * combination. 25: * 26: * As a special exception, the copyright holders of this library give you 27: * permission to link this library with independent modules to produce an 28: * executable, regardless of the license terms of these independent 29: * modules, and to copy and distribute the resulting executable under 30: * terms of your choice, provided that you also meet, for each linked 31: * independent module, the terms and conditions of the license of that 32: * module. An independent module is a module which is not derived from 33: * or based on this library. If you modify this library, you may extend 34: * this exception to your version of the library, but you are not 35: * obliged to do so. If you do not wish to do so, delete this 36: * exception statement from your version. 37: */ 38: 39: package gnu.inet.nntp; 40: 41: /** 42: * NNTP status response codes. 43: * 44: * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> 45: */ 46: public interface NNTPConstants 47: { 48: 49: /** 50: * Indicates a line of help text. 51: */ 52: public static final short HELP_TEXT = 100; 53: 54: /** 55: * Indicates a DATE response. 56: */ 57: public static final short DATE_OK = 111; 58: 59: /** 60: * Indicates that the server is ready and posting is allowed. 61: */ 62: public static final short POSTING_ALLOWED = 200; 63: 64: /** 65: * Indicates that the server is ready but posting is not allowed. 66: */ 67: public static final short NO_POSTING_ALLOWED = 201; 68: 69: /** 70: * Indicates that the server has noted the slave status of the connection. 71: */ 72: public static final short SLAVE_ACKNOWLEDGED = 202; 73: 74: /** 75: * Indicates that the server has accepted streaming mode. 76: */ 77: public static final short STREAMING_OK = 203; 78: 79: /** 80: * Indicates that the server is closing the connection. 81: */ 82: public static final short CLOSING_CONNECTION = 205; 83: 84: /** 85: * Indicates that the newsgroup was successfully selected. 86: * Format of the message is "<tt>n f l s</tt> xxx" 87: * (<tt>n</tt> = estimated number of articles in group, 88: * <tt>f</tt> = first article number in the group, 89: * <tt>l</tt> = last article number in the group, 90: * <tt>s</tt> = name of the group.) 91: */ 92: public static final short GROUP_SELECTED = 211; 93: 94: /** 95: * Indicates that a list of valid newsgroups follows. 96: * The format of each following line is "<tt>g l f p</tt>" 97: * (<tt>g</tt> = newsgroup name, 98: * <tt>l</tt> = last article number in group, 99: * <tt>f</tt> = first article number in group, 100: * <tt>p</tt> = 'y' if posting to the group is allowed, 101: * 'n' otherwise) 102: */ 103: public static final short LIST_FOLLOWS = 215; 104: 105: /** 106: * Indicates that the article has been retrieved. 107: * The head and body of the article follow. 108: */ 109: public static final short ARTICLE_FOLLOWS = 220; 110: 111: /** 112: * Indicates that the article has been retrieved. 113: * The head of the article follows. 114: */ 115: public static final short HEAD_FOLLOWS = 221; 116: 117: /** 118: * Indicates that the article has been retrieved. 119: * The body of the article follows. 120: */ 121: public static final short BODY_FOLLOWS = 222; 122: 123: /** 124: * Indicates that the article has been retrieved. 125: * The text of the article must be requested separately. 126: */ 127: public static final short ARTICLE_RETRIEVED = 223; 128: 129: /** 130: * Indicates that a listing of overview information follows. 131: */ 132: public static final short OVERVIEW_FOLLOWS = 224; 133: 134: /** 135: * Indicates that a list of new articles by message-id follows. 136: */ 137: public static final short NEWNEWS_LIST_FOLLOWS = 230; 138: 139: /** 140: * Indicates that a list of new newsgroups follows. 141: * This code is issued following a successful NEWGROUPS command. The 142: * format of the listing is the same as for code 215 (list follows). 143: */ 144: public static final short NEWGROUPS_LIST_FOLLOWS = 231; 145: 146: /** 147: * Indicates that the article was correctly transferred. 148: */ 149: public static final short ARTICLE_TRANSFERRED = 235; 150: 151: /** 152: * Indicates that the server does not have the specified article and would 153: * like it to be transferred via TAKETHIS. 154: */ 155: public static final short SEND_ARTICLE_VIA_TAKETHIS = 238; 156: 157: /** 158: * Indicates that the server accepted the article transferred by a 159: * TAKETHIS command. 160: */ 161: public static final short ARTICLE_TRANSFERRED_OK = 239; 162: 163: /** 164: * Indicates that the article was successfully posted. 165: */ 166: public static final short ARTICLE_POSTED = 240; 167: 168: /** 169: * Indicates success of an AUTHINFO SIMPLE transaction. 170: */ 171: public static final short AUTHINFO_SIMPLE_OK = 350; 172: 173: /** 174: * Indicates that AUTHINFO authentication was successful. 175: */ 176: public static final short AUTHINFO_OK = 281; 177: 178: /** 179: * Indicates that the article to be transferred should be sent by the 180: * client. It should end with a CRLF-dot-CRLF sequence, i.e. a dot on a 181: * line by itself. 182: */ 183: public static final short SEND_TRANSFER_ARTICLE = 335; 184: 185: /** 186: * Indicates that the article to be posted should be sent by the 187: * client. It should end with a CRLF-dot-CRLF sequence, i.e. a dot on a 188: * line by itself. 189: */ 190: public static final short SEND_ARTICLE = 340; 191: 192: /** 193: * Instructs the client to send a username/password pair according to the 194: * AUTHINFO SIMPLE specification. 195: */ 196: public static final short SEND_AUTHINFO_SIMPLE = 350; 197: 198: /** 199: * Indicates that the server is ready to accept the AUTHINFO password. 200: */ 201: public static final short SEND_AUTHINFOPASS = 381; 202: 203: /** 204: * Indicates that the service has been discontinued. 205: */ 206: public static final short SERVICE_DISCONTINUED = 400; 207: 208: /** 209: * Indicates that no such newsgroup exists. 210: */ 211: public static final short NO_SUCH_GROUP = 411; 212: 213: /** 214: * Indicates that no newsgroup has been selected. 215: */ 216: public static final short NO_GROUP_SELECTED = 412; 217: 218: /** 219: * Indicates that no article has been selected. 220: */ 221: public static final short NO_ARTICLE_SELECTED = 420; 222: 223: /** 224: * Indicates that there is no next article in this newsgroup. 225: */ 226: public static final short NO_NEXT_ARTICLE = 421; 227: 228: /** 229: * Indicates that there is no previous article in this newsgroup. 230: */ 231: public static final short NO_PREVIOUS_ARTICLE = 422; 232: 233: /** 234: * Indicates that no article with the specified number exists in this 235: * newsgroup. 236: */ 237: public static final short NO_SUCH_ARTICLE_NUMBER = 423; 238: 239: /** 240: * Indicates that the specified article could not be found. 241: */ 242: public static final short NO_SUCH_ARTICLE = 430; 243: 244: /** 245: * Indicates that the server is not currently in a state to accept an 246: * article, but may become so at a later stage. 247: */ 248: public static final short TRY_AGAIN_LATER = 431; 249: 250: /** 251: * Indicates that the server does not want the specified article. 252: * The client should not send the article. 253: */ 254: public static final short ARTICLE_NOT_WANTED = 435; 255: 256: /** 257: * Indicates that transfer of the specified article failed. 258: * The client should try to send the article again later. 259: */ 260: public static final short TRANSFER_FAILED = 436; 261: 262: /** 263: * Indicates that the specified article was rejected. 264: * The client should not attempt to send the article again. 265: */ 266: public static final short ARTICLE_REJECTED = 437; 267: 268: /** 269: * Indicates that the server already has the specified article, and 270: * therefore doesn't want it sent using TAKETHIS. 271: */ 272: public static final short ARTICLE_NOT_WANTED_VIA_TAKETHIS = 438; 273: 274: /** 275: * Indicates that an article transferred by a TAKETHIS command failed. 276: */ 277: public static final short ARTICLE_TRANSFER_FAILED = 439; 278: 279: /** 280: * Indicates that posting is not allowed. 281: */ 282: public static final short POSTING_NOT_ALLOWED = 440; 283: 284: /** 285: * Indicates that posting of the article failed. 286: * The client may attempt to post the article again. 287: */ 288: public static final short POSTING_FAILED = 441; 289: 290: /** 291: * Indicates that authentication via the AUTHINFO SIMPLE strategy is 292: * required. 293: */ 294: public static final short AUTHINFO_SIMPLE_REQUIRED = 450; 295: 296: /** 297: * Indicates an authentication failure using AUTHINFO SIMPLE. 298: */ 299: public static final short AUTHINFO_SIMPLE_DENIED = 452; 300: 301: /** 302: * Indicates that the client does not have the appropriate authorization 303: * to transfer an article. 304: */ 305: public static final short TRANSFER_PERMISSION_DENIED = 480; 306: 307: /** 308: * Indicates that an XGTITLE listing follows. 309: */ 310: public static final short XGTITLE_LIST_FOLLOWS = 481; 311: 312: /** 313: * Indicates the the authentication information supplied was not accepted 314: * by the server. 315: */ 316: public static final short AUTHINFO_REJECTED = 482; 317: 318: /** 319: * Indicates that the command sent by the client was not understood by the 320: * server. 321: */ 322: public static final short COMMAND_NOT_RECOGNIZED = 500; 323: 324: /** 325: * Indicates that the command sent by the client was not a valid NNTP 326: * command. 327: */ 328: public static final short SYNTAX_ERROR = 501; 329: 330: /** 331: * Indicates that access restrictions deny permission to execute the 332: * command sent by the client. 333: */ 334: public static final short PERMISSION_DENIED = 502; 335: 336: /** 337: * Indicates that the server was unable to perform the command due to an 338: * internal error. 339: */ 340: public static final short INTERNAL_ERROR = 503; 341: 342: // -- Client commands -- 343: 344: public static final String ARTICLE = "ARTICLE"; 345: public static final String AUTHINFO_USER = "AUTHINFO USER"; 346: public static final String AUTHINFO_PASS = "AUTHINFO PASS"; 347: public static final String AUTHINFO_SIMPLE = "AUTHINFO SIMPLE"; 348: public static final String AUTHINFO_GENERIC = "AUTHINFO GENERIC"; 349: public static final String BODY = "BODY"; 350: public static final String CHECK = "CHECK"; 351: public static final String DATE = "DATE"; 352: public static final String HEAD = "HEAD"; 353: public static final String STAT = "STAT"; 354: public static final String GROUP = "GROUP"; 355: public static final String HELP = "HELP"; 356: public static final String IHAVE = "IHAVE"; 357: public static final String LAST = "LAST"; 358: public static final String LIST = "LIST"; 359: public static final String LIST_ACTIVE = "LIST ACTIVE"; 360: public static final String LIST_ACTIVE_TIMES = "LIST ACTIVE.TIMES"; 361: public static final String LIST_DISTRIBUTIONS = "LIST DISTRIBUTIONS"; 362: public static final String LIST_DISTRIB_PATS = "LIST DISTRIB.PATS"; 363: public static final String LIST_NEWSGROUPS = "LIST NEWSGROUPS"; 364: public static final String LIST_OVERVIEW_FMT = "LIST OVERVIEW.FMT"; 365: public static final String LIST_SUBSCRIPTIONS = "LIST SUBSCRIPTIONS"; 366: public static final String LISTGROUP = "LISTGROUP"; 367: public static final String MODE_READER = "MODE READER"; 368: public static final String MODE_STREAM = "MODE STREAM"; 369: public static final String NEWGROUPS = "NEWGROUPS"; 370: public static final String NEWNEWS = "NEWNEWS"; 371: public static final String NEXT = "NEXT"; 372: public static final String POST = "POST"; 373: public static final String QUIT = "QUIT"; 374: public static final String SLAVE = "SLAVE"; 375: public static final String TAKETHIS = "TAKETHIS"; 376: public static final String XGTITLE = "XGTITLE"; 377: public static final String XHDR = "XHDR"; 378: public static final String XINDEX = "XINDEX"; 379: public static final String XOVER = "XOVER"; 380: public static final String XPAT = "XPAT"; 381: public static final String XPATH = "XPATH"; 382: public static final String XREPLIC = "XREPLIC"; 383: public static final String XROVER = "XROVER"; 384: 385: }