Back to index

lightning-sunbird  0.9+nobinonly
nsINntpIncomingServer.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; 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 #include "nsISupports.idl"
00039 
00040 interface nsIFileSpec;
00041 interface nsIMsgNewsFolder;
00042 interface nsINNTPProtocol;
00043 interface nsIURI;
00044 interface nsIMsgWindow;
00045 
00046 [scriptable, uuid(6200a8d1-21ac-4d28-926f-f9d7ea9d7bf7)]
00047 interface nsINntpIncomingServer : nsISupports {
00048     /* the on-disk path to the newsrc file for this server */
00049     attribute nsIFileSpec newsrcFilePath;
00050 
00051     /* the newsrc root path (the directories all the newsrc files live) */
00052     attribute nsIFileSpec newsrcRootPath;
00053     
00054     /* ask the user before downloading more than maxArticles? */
00055     attribute boolean notifyOn;
00056 
00057     /* the max articles to download */
00058     attribute long maxArticles;
00059 
00060     /* when we don't download all, do we mark the rest read? */
00061     attribute boolean markOldRead;
00062 
00063     /* abbreviate the newsgroup names in the folder pane? */
00064     attribute boolean abbreviate;
00065 
00066     /* do we use a single login per server or do we login per group */
00067     attribute boolean singleSignon;
00068 
00072     attribute ACString charset;
00073 
00074     /* the server keeps track of all the newsgroups we are subscribed to */
00075     void addNewsgroup(in AString name);
00076     void removeNewsgroup(in AString name);
00077 
00078     void writeNewsrcFile();
00079 
00080     attribute boolean newsrcHasChanged;
00081 
00082     attribute long maximumConnectionsNumber;
00083 
00084     readonly attribute long numGroupsNeedingCounts;
00085     readonly attribute nsISupports firstGroupNeedingCounts;
00086 
00087     void displaySubscribedGroup(in nsIMsgNewsFolder msgFolder,
00088                                 in long firstMessage, in long lastMessage,
00089                                 in long totalMessages);
00090 
00091 
00092     void getNntpConnection(in nsIURI url, in nsIMsgWindow window,
00093                            out nsINNTPProtocol aNntpConnection);
00094     void removeConnection(in nsINNTPProtocol aNntpConnection);
00095 
00096     /* used for auto subscribing */
00097     boolean containsNewsgroup(in AUTF8String name);
00098     void subscribeToNewsgroup(in AUTF8String name);
00099 
00100     /* used for the subscribe dialog.
00101        name is encoded in |charset|  (attribute declared above) */
00102     [noscript] void addNewsgroupToList(in string name);
00103 
00104     attribute boolean supportsExtensions;
00105     void addExtension(in string extension);
00106     boolean queryExtension(in string extension);
00107 
00108     attribute boolean postingAllowed;
00109     attribute boolean pushAuth;
00110     attribute unsigned long lastUpdatedTime;
00111     
00112     void addPropertyForGet(in string name, in string value);
00113     string queryPropertyForGet(in string name);
00114     
00115     void addSearchableGroup(in AString name);
00116     boolean querySearchableGroup(in AString name);
00117     
00118     void addSearchableHeader(in string headerName);
00119     boolean querySearchableHeader(in string headerName);
00120 
00121     nsIMsgNewsFolder findGroup(in AUTF8String name);
00122 
00123     readonly attribute AUTF8String firstGroupNeedingExtraInfo;
00124     void setGroupNeedsExtraInfo(in AUTF8String name, in boolean needsExtraInfo);
00125 
00126     void groupNotFound(in nsIMsgWindow window, in AString group,
00127                        in boolean opening);
00128 
00129     void setPrettyNameForGroup(in AString name, in AString prettyName);
00130 
00131     // user has successfully authenticated in this session.
00132     // Used to decide whether to throw away the user's password
00133     attribute boolean userAuthenticated; 
00134 };