1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is mozilla.org code.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 *
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38 #include "nsISupports.idl"
39 #include "nsIMsgFolder.idl"
40
41 interface nsIMsgWindow;
42 interface nsINntpIncomingServer;
43
44 [scriptable, uuid(B6333473-54DC-47C4-B179-3D4744946C95)]
45 interface nsIMsgNewsFolder : nsISupports {
46 attribute ACString groupUsername;
47 attribute ACString groupPassword;
48
49 readonly attribute AString unicodeName;
50 /**|rawName| is an 8-bit string to represent the name of a newsgroup used by
51 * a news server. It's offered for the convenience of callers so that they
52 * don't have to convert |unicodeName| to the server-side name when
53 * communicating with a news server. It's US-ASCII except for some
54 * 'stand-alone' Chinese news servers that use GB2312 for newsgroup names
55 * violating RFC 1036. For those servers, it's GB2312. However, it can be any
56 * other single and multibyte encoding in principle. The encoding of this
57 * string is stored in |nsINntpIncomingServer| because that's a server-wide
58 * property.
59 **/
60 [noscript] readonly attribute ACString rawName;
61 readonly attribute nsINntpIncomingServer nntpServer;
62 attribute boolean saveArticleOffline;
63
64 ACString getGroupPasswordWithUI(in AString aPromptString, in AString aPromptTitle, in nsIMsgWindow aMsgWindow);
65 ACString getGroupUsernameWithUI(in AString aPromptString, in AString aPromptTitle, in nsIMsgWindow aMsgWindow);
66
67 void forgetGroupUsername();
68 void forgetGroupPassword();
69
70 void moveFolder(in nsIMsgFolder aNewsgroupToMove, in nsIMsgFolder aRefNewsgroup, in PRInt32 aOrientation);
71
72 nsIMsgFolder addNewsgroup(in AUTF8String newsgroupName, in ACString setStr);
73
74 void setReadSetFromStr(in ACString setStr);
75
76 readonly attribute ACString newsrcLine;
77 readonly attribute ACString optionLines;
78 readonly attribute ACString unsubscribedNewsgroupLines;
79 void SetNewsrcHasChanged(in boolean newsrcHasChanged);
80 void updateSummaryFromNNTPInfo(in long oldest, in long youngest, in long total);
81 void removeMessage(in nsMsgKey key);
82 void cancelComplete();
83 void cancelFailed();
84
85 ACString getMessageIdForKey(in nsMsgKey key);
86
87 void getNextNMessages(in nsIMsgWindow aMsgWindow);
88 void notifyDownloadedLine(in string line, in nsMsgKey key);
89 void notifyFinishedDownloadinghdrs();
90 };