Back to index

lightning-sunbird  0.9+nobinonly
nntpCore.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #ifndef _NNTPCore_H__
00039 #define _NNTPCore_H__
00040 
00041 #define NEWS_MSGS_URL       "chrome://messenger/locale/news.properties"
00042 
00043 // The following string constants are protocol strings. I'm defining them as macros here
00044 // so I don't have to sprinkle all of the strings throughout the protocol. 
00045 #define NNTP_CMD_LIST_EXTENSIONS          "LIST EXTENSIONS" CRLF
00046 #define NNTP_CMD_MODE_READER                     "MODE READER" CRLF
00047 #define NNTP_CMD_LIST_SEARCHES                   "LIST SEARCHES" CRLF
00048 #define NNTP_CMD_LIST_SEARCH_FIELDS              "LIST SRCHFIELDS" CRLF
00049 #define NNTP_CMD_GET_PROPERTIES                  "GET" CRLF
00050 #define NNTP_CMD_LIST_SUBSCRIPTIONS              "LIST SUBSCRIPTIONS" CRLF
00051 #define NNTP_CMD_POST                            "POST" CRLF
00052 #define NNTP_CMD_QUIT                            "QUIT" CRLF
00053 
00054 // end of protocol strings
00055 
00056 #define MK_NNTP_RESPONSE_HELP 100
00057 
00058 #define MK_NNTP_RESPONSE_POSTING_ALLOWED 200
00059 #define MK_NNTP_RESPONSE_POSTING_DENIED 201
00060 
00061 #define MK_NNTP_RESPONSE_DISCONTINUED 400
00062 
00063 #define MK_NNTP_RESPONSE_COMMAND_UNKNOWN 500
00064 #define MK_NNTP_RESPONSE_SYNTAX_ERROR 501
00065 #define MK_NNTP_RESPONSE_PERMISSION_DENIED 502
00066 #define MK_NNTP_RESPONSE_SERVER_ERROR 503
00067 
00068 #define MK_NNTP_RESPONSE_ARTICLE_BOTH 220
00069 #define MK_NNTP_RESPONSE_ARTICLE_HEAD 221
00070 #define MK_NNTP_RESPONSE_ARTICLE_BODY 222
00071 #define MK_NNTP_RESPONSE_ARTICLE_NONE 223
00072 #define MK_NNTP_RESPONSE_ARTICLE_NO_GROUP 412
00073 #define MK_NNTP_RESPONSE_ARTICLE_NO_CURRENT 420
00074 #define MK_NNTP_RESPONSE_ARTICLE_NONEXIST 423
00075 #define MK_NNTP_RESPONSE_ARTICLE_NOTFOUND 430
00076 
00077 #define MK_NNTP_RESPONSE_GROUP_SELECTED   211
00078 #define MK_NNTP_RESPONSE_GROUP_NO_GROUP   411
00079 
00080 #define MK_NNTP_RESPONSE_IHAVE_OK         235
00081 #define MK_NNTP_RESPONSE_IHAVE_ARTICLE    335
00082 #define MK_NNTP_RESPONSE_IHAVE_NOT_WANTED 435
00083 #define MK_NNTP_RESPONSE_IHAVE_FAILED     436
00084 #define MK_NNTP_RESPONSE_IHAVE_REJECTED   437
00085 
00086 #define MK_NNTP_RESPONSE_LAST_OK          223
00087 #define MK_NNTP_RESPONSE_LAST_NO_GROUP    412
00088 #define MK_NNTP_RESPONSE_LAST_NO_CURRENT  420
00089 #define MK_NNTP_RESPONSE_LAST_NO_ARTICLE  422
00090 
00091 #define MK_NNTP_RESPONSE_LIST_OK          215
00092 
00093 #define MK_NNTP_RESPONSE_NEWGROUPS_OK     231
00094 
00095 #define MK_NNTP_RESPONSE_NEWNEWS_OK       230
00096 
00097 #define MK_NNTP_RESPONSE_NEXT_OK          223
00098 #define MK_NNTP_RESPONSE_NEXT_NO_GROUP    412
00099 #define MK_NNTP_RESPONSE_NEXT_NO_CURRENT  420
00100 #define MK_NNTP_RESPONSE_NEXT_NO_ARTICLE  421
00101 
00102 #define MK_NNTP_RESPONSE_POST_OK          240
00103 #define MK_NNTP_RESPONSE_POST_SEND_NOW    340
00104 #define MK_NNTP_RESPONSE_POST_DENIED      440
00105 #define MK_NNTP_RESPONSE_POST_FAILED      441
00106 
00107 #define MK_NNTP_RESPONSE_QUIT_OK          205
00108 
00109 #define MK_NNTP_RESPONSE_SLAVE_OK         202
00110 
00111 #define MK_NNTP_RESPONSE_CHECK_NO_ARTICLE 238
00112 #define MK_NNTP_RESPONSE_CHECK_NO_ACCEPT  400
00113 #define MK_NNTP_RESPONSE_CHECK_LATER      431
00114 #define MK_NNTP_RESPONSE_CHECK_DONT_SEND  438
00115 #define MK_NNTP_RESPONSE_CHECK_DENIED     480
00116 #define MK_NNTP_RESPONSE_CHECK_ERROR      500
00117 
00118 #define MK_NNTP_RESPONSE_XHDR_OK          221
00119 #define MK_NNTP_RESPONSE_XHDR_NO_GROUP    412
00120 #define MK_NNTP_RESPONSE_XHDR_NO_CURRENT  420
00121 #define MK_NNTP_RESPONSE_XHDR_NO_ARTICLE  430
00122 #define MK_NNTP_RESPONSE_XHDR_DENIED      502
00123 
00124 #define MK_NNTP_RESPONSE_XOVER_OK         224
00125 #define MK_NNTP_RESPONSE_XOVER_NO_GROUP   412
00126 #define MK_NNTP_RESPONSE_XOVER_NO_CURRENT 420
00127 #define MK_NNTP_RESPONSE_XOVER_DENIED     502
00128 
00129 #define MK_NNTP_RESPONSE_XPAT_OK          221
00130 #define MK_NNTP_RESPONSE_XPAT_NO_ARTICLE  430
00131 #define MK_NNTP_RESPONSE_XPAT_DENIED      502
00132 
00133 #define MK_NNTP_RESPONSE_AUTHINFO_OK      281
00134 #define MK_NNTP_RESPONSE_AUTHINFO_CONT    381
00135 #define MK_NNTP_RESPONSE_AUTHINFO_REQUIRE 480
00136 #define MK_NNTP_RESPONSE_AUTHINFO_REJECT  482
00137 #define MK_NNTP_RESPONSE_AUTHINFO_DENIED  502
00138 
00139 #define MK_NNTP_RESPONSE_
00140 
00141 #define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_OK      250
00142 #define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_CONT    350
00143 #define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_REQUIRE 450
00144 #define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_REJECT  452
00145 
00146 #define MK_NNTP_RESPONSE_TYPE_INFO    1
00147 #define MK_NNTP_RESPONSE_TYPE_OK      2
00148 #define MK_NNTP_RESPONSE_TYPE_CONT    3
00149 #define MK_NNTP_RESPONSE_TYPE_CANNOT  4
00150 #define MK_NNTP_RESPONSE_TYPE_ERROR   5
00151 
00152 #define MK_NNTP_RESPONSE_TYPE(x) (x/100)
00153 
00154 // the following used to be defined in allxpstr.h. Until we find a new values for these, 
00155 // I'm defining them here because I don't want to link against xplib.lib...(mscott)
00156 
00157 #define MK_DATA_LOADED             1
00158 #define MK_EMPTY_NEWS_LIST  -227
00159 #define MK_INTERRUPTED             -201
00160 #define MK_MALFORMED_URL_ERROR     -209
00161 #define MK_NEWS_ERROR_FMT          -430
00162 #define MK_NNTP_CANCEL_CONFIRM     -426
00163 #define MK_NNTP_CANCEL_DISALLOWED -427
00164 #define MK_NNTP_NOT_CANCELLED    -429
00165 #define MK_OUT_OF_MEMORY            -207
00166 #define XP_CONFIRM_SAVE_NEWSGROUPS               -1
00167 #define XP_HTML_ARTICLE_EXPIRED                         -1
00168 #define XP_HTML_NEWS_ERROR                              -1
00169 #define XP_PROGRESS_READ_NEWSGROUPINFO            1
00170 #define XP_PROGRESS_RECEIVE_ARTICLE                      1
00171 #define XP_PROGRESS_RECEIVE_LISTARTICLES   1
00172 #define XP_PROGRESS_RECEIVE_NEWSGROUP             1
00173 #define XP_PROGRESS_SORT_ARTICLES              1
00174 #define XP_PROGRESS_READ_NEWSGROUP_COUNTS  1
00175 #define XP_THERMO_PERCENT_FORM                           1
00176 #define XP_PROMPT_ENTER_USERNAME                  1
00177 #define MK_BAD_NNTP_CONNECTION                     -216
00178 #define MK_NNTP_AUTH_FAILED                     -260
00179 #define MK_NNTP_ERROR_MESSAGE                   -304
00180 #define MK_NNTP_NEWSGROUP_SCAN_ERROR        -305
00181 #define MK_NNTP_SERVER_ERROR                    -217
00182 #define MK_NNTP_SERVER_NOT_CONFIGURED     -307
00183 #define MK_TCP_READ_ERROR                          -252
00184 #define MK_TCP_WRITE_ERROR                         -236
00185 #define MK_NNTP_CANCEL_ERROR                       -428
00186 #define XP_CONNECT_NEWS_HOST_CONTACTED_WAITING_FOR_REPLY  1
00187 #define XP_PLEASE_ENTER_A_PASSWORD_FOR_NEWS_SERVER_ACCESS 1
00188 #define XP_GARBAGE_COLLECTING                                                  1
00189 #define XP_MESSAGE_SENT_WAITING_NEWS_REPLY                              1
00190 #define MK_MSG_DELIV_NEWS                                                      1
00191 #define MK_MSG_COLLABRA_DISABLED                                        1
00192 #define MK_MSG_EXPIRE_NEWS_ARTICLES                                         1
00193 #define MK_MSG_HTML_IMAP_NO_CACHED_BODY                                 1
00194 #define MK_MSG_CANT_MOVE_FOLDER                                                1
00195 
00196 #endif /* NNTPCore_H__ */