summaryrefslogtreecommitdiffstats
path: root/mailnews/news/src/nntpCore.h
blob: e09f72f2cbda921aa01dd978f31a114f15f3d3c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef _NNTPCore_H__
#define _NNTPCore_H__

#define NEWS_MSGS_URL       "chrome://messenger/locale/news.properties"

// The following string constants are protocol strings. I'm defining them as macros here
// so I don't have to sprinkle all of the strings throughout the protocol.
#define NNTP_CMD_LIST_EXTENSIONS    "LIST EXTENSIONS" CRLF
#define NNTP_CMD_MODE_READER      "MODE READER" CRLF
#define NNTP_CMD_LIST_SEARCHES      "LIST SEARCHES" CRLF
#define NNTP_CMD_LIST_SEARCH_FIELDS     "LIST SRCHFIELDS" CRLF
#define NNTP_CMD_GET_PROPERTIES         "GET" CRLF
#define NNTP_CMD_LIST_SUBSCRIPTIONS     "LIST SUBSCRIPTIONS" CRLF
#define NNTP_CMD_POST        "POST" CRLF
#define NNTP_CMD_QUIT        "QUIT" CRLF

// end of protocol strings

#define MK_NNTP_RESPONSE_HELP 100

#define MK_NNTP_RESPONSE_POSTING_ALLOWED 200
#define MK_NNTP_RESPONSE_POSTING_DENIED 201

#define MK_NNTP_RESPONSE_DISCONTINUED 400

#define MK_NNTP_RESPONSE_COMMAND_UNKNOWN 500
#define MK_NNTP_RESPONSE_SYNTAX_ERROR 501
#define MK_NNTP_RESPONSE_PERMISSION_DENIED 502
#define MK_NNTP_RESPONSE_SERVER_ERROR 503

#define MK_NNTP_RESPONSE_ARTICLE_BOTH 220
#define MK_NNTP_RESPONSE_ARTICLE_HEAD 221
#define MK_NNTP_RESPONSE_ARTICLE_BODY 222
#define MK_NNTP_RESPONSE_ARTICLE_NONE 223
#define MK_NNTP_RESPONSE_ARTICLE_NO_GROUP 412
#define MK_NNTP_RESPONSE_ARTICLE_NO_CURRENT 420
#define MK_NNTP_RESPONSE_ARTICLE_NONEXIST 423
#define MK_NNTP_RESPONSE_ARTICLE_NOTFOUND 430

#define MK_NNTP_RESPONSE_GROUP_SELECTED   211
#define MK_NNTP_RESPONSE_GROUP_NO_GROUP   411

#define MK_NNTP_RESPONSE_IHAVE_OK         235
#define MK_NNTP_RESPONSE_IHAVE_ARTICLE    335
#define MK_NNTP_RESPONSE_IHAVE_NOT_WANTED 435
#define MK_NNTP_RESPONSE_IHAVE_FAILED     436
#define MK_NNTP_RESPONSE_IHAVE_REJECTED   437

#define MK_NNTP_RESPONSE_LAST_OK          223
#define MK_NNTP_RESPONSE_LAST_NO_GROUP    412
#define MK_NNTP_RESPONSE_LAST_NO_CURRENT  420
#define MK_NNTP_RESPONSE_LAST_NO_ARTICLE  422

#define MK_NNTP_RESPONSE_LIST_OK          215

#define MK_NNTP_RESPONSE_NEWGROUPS_OK     231

#define MK_NNTP_RESPONSE_NEWNEWS_OK       230

#define MK_NNTP_RESPONSE_NEXT_OK          223
#define MK_NNTP_RESPONSE_NEXT_NO_GROUP    412
#define MK_NNTP_RESPONSE_NEXT_NO_CURRENT  420
#define MK_NNTP_RESPONSE_NEXT_NO_ARTICLE  421

#define MK_NNTP_RESPONSE_POST_OK          240
#define MK_NNTP_RESPONSE_POST_SEND_NOW    340
#define MK_NNTP_RESPONSE_POST_DENIED      440
#define MK_NNTP_RESPONSE_POST_FAILED      441

#define MK_NNTP_RESPONSE_QUIT_OK          205

#define MK_NNTP_RESPONSE_SLAVE_OK         202

#define MK_NNTP_RESPONSE_CHECK_NO_ARTICLE 238
#define MK_NNTP_RESPONSE_CHECK_NO_ACCEPT  400
#define MK_NNTP_RESPONSE_CHECK_LATER      431
#define MK_NNTP_RESPONSE_CHECK_DONT_SEND  438
#define MK_NNTP_RESPONSE_CHECK_DENIED     480
#define MK_NNTP_RESPONSE_CHECK_ERROR      500

#define MK_NNTP_RESPONSE_XHDR_OK          221
#define MK_NNTP_RESPONSE_XHDR_NO_GROUP    412
#define MK_NNTP_RESPONSE_XHDR_NO_CURRENT  420
#define MK_NNTP_RESPONSE_XHDR_NO_ARTICLE  430
#define MK_NNTP_RESPONSE_XHDR_DENIED      502

#define MK_NNTP_RESPONSE_XOVER_OK         224
#define MK_NNTP_RESPONSE_XOVER_NO_GROUP   412
#define MK_NNTP_RESPONSE_XOVER_NO_CURRENT 420
#define MK_NNTP_RESPONSE_XOVER_DENIED     502

#define MK_NNTP_RESPONSE_XPAT_OK          221
#define MK_NNTP_RESPONSE_XPAT_NO_ARTICLE  430
#define MK_NNTP_RESPONSE_XPAT_DENIED      502

#define MK_NNTP_RESPONSE_AUTHINFO_OK      281
#define MK_NNTP_RESPONSE_AUTHINFO_CONT    381
#define MK_NNTP_RESPONSE_AUTHINFO_REQUIRE 480
#define MK_NNTP_RESPONSE_AUTHINFO_REJECT  482
#define MK_NNTP_RESPONSE_AUTHINFO_DENIED  502

#define MK_NNTP_RESPONSE_

#define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_OK      250
#define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_CONT    350
#define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_REQUIRE 450
#define MK_NNTP_RESPONSE_AUTHINFO_SIMPLE_REJECT  452

#define MK_NNTP_RESPONSE_TYPE_INFO    1
#define MK_NNTP_RESPONSE_TYPE_OK      2
#define MK_NNTP_RESPONSE_TYPE_CONT    3
#define MK_NNTP_RESPONSE_TYPE_CANNOT  4
#define MK_NNTP_RESPONSE_TYPE_ERROR   5

#define MK_NNTP_RESPONSE_TYPE(x) (x/100)

// the following used to be defined in allxpstr.h. Until we find a new values for these,
// I'm defining them here because I don't want to link against xplib.lib...(mscott)

#define MK_DATA_LOADED    1
#define MK_EMPTY_NEWS_LIST  -227
#define MK_INTERRUPTED    -201
#define MK_MALFORMED_URL_ERROR  -209
#define MK_NEWS_ERROR_FMT    -430
#define MK_NNTP_CANCEL_CONFIRM  -426
#define MK_NNTP_CANCEL_DISALLOWED -427
#define MK_NNTP_NOT_CANCELLED    -429
#define MK_OUT_OF_MEMORY     -207
#define XP_CONFIRM_SAVE_NEWSGROUPS      -1
#define XP_HTML_ARTICLE_EXPIRED        -1
#define XP_HTML_NEWS_ERROR          -1
#define XP_PROGRESS_READ_NEWSGROUPINFO     1
#define XP_PROGRESS_RECEIVE_ARTICLE       1
#define XP_PROGRESS_RECEIVE_LISTARTICLES   1
#define XP_PROGRESS_RECEIVE_NEWSGROUP     1
#define XP_PROGRESS_SORT_ARTICLES         1
#define XP_PROGRESS_READ_NEWSGROUP_COUNTS   1
#define XP_THERMO_PERCENT_FORM         1
#define XP_PROMPT_ENTER_USERNAME       1
#define MK_NNTP_AUTH_FAILED            -260
#define MK_NNTP_ERROR_MESSAGE          -304
#define MK_NNTP_NEWSGROUP_SCAN_ERROR    -305
#define MK_NNTP_SERVER_ERROR          -217
#define MK_NNTP_SERVER_NOT_CONFIGURED     -307
#define MK_TCP_READ_ERROR          -252
#define MK_TCP_WRITE_ERROR          -236
#define MK_NNTP_CANCEL_ERROR        -428
#define XP_CONNECT_NEWS_HOST_CONTACTED_WAITING_FOR_REPLY  1
#define XP_PLEASE_ENTER_A_PASSWORD_FOR_NEWS_SERVER_ACCESS 1
#define XP_GARBAGE_COLLECTING                1
#define XP_MESSAGE_SENT_WAITING_NEWS_REPLY          1
#define MK_MSG_DELIV_NEWS                  1
#define MK_MSG_COLLABRA_DISABLED              1
#define MK_MSG_EXPIRE_NEWS_ARTICLES                1
#define MK_MSG_HTML_IMAP_NO_CACHED_BODY            1
#define MK_MSG_CANT_MOVE_FOLDER                1

#endif /* NNTPCore_H__ */