rename nsIMsgNewsHost -> nsINNTPHost and start adding old MSG_NewsHost methods

This commit is contained in:
alecf%netscape.com 1999-01-12 20:36:37 +00:00
Родитель a6d0606fd7
Коммит 0896af4b37
7 изменённых файлов: 273 добавлений и 3 удалений

Просмотреть файл

@ -24,7 +24,7 @@ include $(DEPTH)/config/autoconf.mk
EXPORTS= \
nsINNTPNewsgroupList.h \
nsIMsgNewsHost.h \
nsINNTPHost.h \
nsIMsgNewsgroup.h \
nsIMsgOfflineNewsState.h \
nsINNTPArticleList.h \

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -7,6 +7,9 @@
#include "nsISupports.h" /* interface nsISupports */
#include "nsIMsgNewsgroup.h" /* interface nsIMsgNewsgroup */
#include "nsIMsgHost.h" /* interface nsIMsgHost */
#include "nsINNTPNewsgroupList.h" /* interface nsINNTPNewsgroupList */
#include "nsINNTPHost.h" /* interface nsINNTPHost */
/* starting interface nsINNTPArticleList */

Просмотреть файл

@ -21,12 +21,12 @@
/* the XPIDL compiler doesn't like including this file?
* I think it's because this file include another file
* I had to change the type below to a string temporarily */
/* #include "nsIMsgNewsHost.idl" */
#include "nsINNTPHost.idl"
[object, uuid(921AC214-96B5-11d2-B7EB-00805F05FFA5)]
interface nsINNTPArticleList : nsISupports {
void Init(in /* nsIMsgNewsHost */ string newsHost,
void Init(in /* nsINNTPHost */ string newsHost,
in nsIMsgNewsgroup newsgroup);
void AddArticleKey(in long key);
void FinishAddingArticleKeys();

Просмотреть файл

@ -0,0 +1,133 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsINNTPHost.idl
*/
#ifndef __gen_nsINNTPHost_h__
#define __gen_nsINNTPHost_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsIMsgNewsgroup.h" /* interface nsIMsgNewsgroup */
#include "nsIMsgHost.h" /* interface nsIMsgHost */
#include "nsINNTPNewsgroupList.h" /* interface nsINNTPNewsgroupList */
/* starting interface nsINNTPHost */
/* {ADFB3740-AA57-11d2-B7ED-00805F05FFA5} */
#define NS_INNTPHOST_IID_STR "ADFB3740-AA57-11d2-B7ED-00805F05FFA5"
#define NS_INNTPHOST_IID \
{0xADFB3740, 0xAA57, 0x11d2, \
{ 0xB7, 0xED, 0x00, 0x80, 0x5F, 0x05, 0xFF, 0xA5 }}
class nsINNTPHost : public nsIMsgHost {
private:
void operator delete(void *); // NOT TO BE IMPLEMENTED
public:
static const nsIID& IID() {
static nsIID iid = NS_INNTPHOST_IID;
return iid;
}
/* <IDL> */
NS_IMETHOD IsSupportsExtensions(PRBool *aIsSupportsExtensions) = 0;
NS_IMETHOD SetSupportsExtensions(PRBool aSupportsExtensions) = 0;
/* <IDL> */
NS_IMETHOD AddExtension(const char *extension) = 0;
/* <IDL> */
NS_IMETHOD QueryExtension(const char *extension, PRBool *_retval) = 0;
/* <IDL> */
NS_IMETHOD IsPostingAllowed(PRBool *aIsPostingAllowed) = 0;
NS_IMETHOD SetPostingAllowed(PRBool aPostingAllowed) = 0;
/* <IDL> */
NS_IMETHOD IsPushAuth(PRBool *aIsPushAuth) = 0;
NS_IMETHOD SetPushAuth(PRBool aPushAuth) = 0;
/* <IDL> */
NS_IMETHOD GetLastUpdatedTime(PRInt64 *aLastUpdatedTime) = 0;
NS_IMETHOD SetLastUpdatedTime(PRInt64 aLastUpdatedTime) = 0;
/* <IDL> */
NS_IMETHOD GetNewsgroupList(nsINNTPNewsgroupList * *aNewsgroupList) = 0;
NS_IMETHOD SetNewsgroupList(nsINNTPNewsgroupList * aNewsgroupList) = 0;
/* <IDL> */
NS_IMETHOD AddPropertyForGet(const char *name, const char *value) = 0;
/* <IDL> */
NS_IMETHOD AddSearchableGroup(const char *groupname) = 0;
/* <IDL> */
NS_IMETHOD AddProfileGroup(const char *responseText) = 0;
/* <IDL> */
NS_IMETHOD AddSearchableHeader(const char *headerName) = 0;
/* <IDL> */
NS_IMETHOD AddSubscribedNewsgroup(const char *url) = 0;
/* <IDL> */
NS_IMETHOD GroupNotFound(const char *group, PRBool opening) = 0;
/* <IDL> */
NS_IMETHOD AddNewNewsgroup(const char *groupname, PRInt32 first, PRInt32 last, const char *flags, PRBool xactiveFlags) = 0;
/* <IDL> */
NS_IMETHOD GetNumGroupsNeedingCounts(PRInt32 *_retval) = 0;
/* <IDL> */
NS_IMETHOD GetFirstGroupNeedingCounts(char **_retval) = 0;
/* <IDL> */
NS_IMETHOD DisplaySubscribedGroup(const char *groupname, PRInt32 first_message, PRInt32 last_message, PRInt32 total_messages, PRBool visit_now) = 0;
/* <IDL> */
NS_IMETHOD GetFirstGroupNeedingExtraInfo(nsIMsgNewsgroup **_retval) = 0;
/* <IDL> */
NS_IMETHOD SetGroupNeedsExtraInfo(const char *groupname, PRBool needsExtraInfo) = 0;
/* <IDL> */
NS_IMETHOD GetNewsGroupAndNumberOfID(const char *message_id, nsIMsgNewsgroup **group, PRUint32 *message_number) = 0;
/* <IDL> */
NS_IMETHOD SetPrettyName(const char *groupName, const char *prettyName) = 0;
/* <IDL> */
NS_IMETHOD LoadNewsrc() = 0;
/* <IDL> */
NS_IMETHOD WriteNewsrc() = 0;
/* <IDL> */
NS_IMETHOD WriteIfDirty() = 0;
/* <IDL> */
NS_IMETHOD MarkDirty() = 0;
/* <IDL> */
NS_IMETHOD GetNewsRCFilename(char * *aNewsRCFilename) = 0;
NS_IMETHOD SetNewsRCFilename(char * aNewsRCFilename) = 0;
/* <IDL> */
NS_IMETHOD FindGroup(const char *name, nsIMsgNewsgroup **_retval) = 0;
/* <IDL> */
NS_IMETHOD AddGroup(const char *groupname, nsIMsgNewsgroup **_retval) = 0;
/* <IDL> */
NS_IMETHOD RemoveGroup(const char *groupName) = 0;
/* <IDL> */
NS_IMETHOD GetDbDirName(char * *aDbDirName) = 0;
NS_IMETHOD SetDbDirName(char * aDbDirName) = 0;
/* <IDL> */
NS_IMETHOD GetGroupList(char **_retval) = 0;
};
#endif /* __gen_nsINNTPHost_h__ */

Просмотреть файл

@ -0,0 +1,134 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIMsgHost.idl"
#include "nsINNTPNewsgroupList.idl"
#include "nsIMsgNewsgroup.idl"
[object, uuid(ADFB3740-AA57-11d2-B7ED-00805F05FFA5)]
interface nsINNTPHost : nsIMsgHost {
attribute boolean supportsExtensions;
void AddExtension(in string extension);
boolean QueryExtension(in string extension);
attribute boolean postingAllowed;
attribute boolean pushAuth;
attribute long long lastUpdatedTime;
attribute nsINNTPNewsgroupList newsgroupList;
/* libnet callbacks for Dredd NNTP extensions
* please document if you know how these work
*/
void AddPropertyForGet(in string name, in string value);
void AddSearchableGroup(in string groupname);
void AddProfileGroup(in string responseText);
void AddSearchableHeader(in string headerName);
/* going away */
void AddSubscribedNewsgroup(in string url);
/* In response to an NNTP GROUP command, the server said
* the group doesn't exist
*/
void GroupNotFound(in string group, in boolean opening);
/* Tell the subscribe pane about a new newsgroup we noticed. */
/* XXX should xactive flags be a long? */
void AddNewNewsgroup(in string groupname,
in long first, in long last,
in string flags, in boolean xactiveFlags);
/* formerly GetNewsRCCount() */
/* After displaying a list of newsgroups, we need the NNTP module to go and
run "GROUP" commands for the ones for which we don't know the unread
article count. This function returns a count of how many groups we think
we're going to need this for (so we can display progress in a reasonable
way).
*/
long GetNumGroupsNeedingCounts();
/* formerly GetNewsRCGroup() */
/* Gets the name of the next group that we want to get article counts for.
MSG_DisplaySubscribedGroup() should get called with this group before
this call happens again. */
string GetFirstGroupNeedingCounts();
/* In response to a "news://host/" URL; this is called once for each group
that was returned by MSG_GetNewsRCGroup(), after the NNTP GROUP
command has been run. It's also called whenever we actually visit the
group (the user clicks on the newsgroup line), in case the data has
changed since the initial passthrough. The "nowvisiting" parameter
is TRUE in the latter case, FALSE otherwise. */
void DisplaySubscribedGroup(in string groupname,
in long first_message, in long last_message,
in long total_messages,
in boolean visit_now);
nsIMsgNewsgroup GetFirstGroupNeedingExtraInfo();
void SetGroupNeedsExtraInfo(in string groupname, in boolean needsExtraInfo);
/* News servers work better if you ask for message numbers instead of IDs.
So, the NNTP module asks us what the group and number of an ID is with
this. If we don't know, we return 0 for both. If the pane is not a
thead or message pane, this routine will fail.
*/
void GetNewsGroupAndNumberOfID(in string message_id,
out nsIMsgNewsgroup group,
out unsigned long message_number);
void SetPrettyName(in string groupName, in string prettyName);
/* Go load the newsrc for this host. Creates the subscribed hosts as
children of the given MSG_FolderInfo. */
void LoadNewsrc();
/* Write out the newsrc for this host right now. In general, either
MarkDirty() or WriteIfDirty() should be called instead. */
void WriteNewsrc();
/* Write out the newsrc for this host right now, if anything has changed
in it. */
void WriteIfDirty();
/* Note that something has changed, and we need to rewrite the newsrc file
for this host at some point. */
void MarkDirty();
attribute string newsRCFilename;
nsIMsgNewsgroup FindGroup(in string name);
nsIMsgNewsgroup AddGroup(in string groupname
/* , msg_GroupRecord *inGroupRecord */ );
void RemoveGroup(in string groupName);
/* I thought COM allowed us to override methods.. */
/* void RemoveGroup(in nsIMsgNewsgroup group); */
/* Name of directory to store newsgroup
databases in. This needs to have
"/groupname" appended to it, and the
whole thing can be passed to the XP_File
stuff with a type of xpXoverCache.
*/
attribute string dbDirName;
/* this should actually return a list of strings..how to do in XPIDL? */
string GetGroupList();
};