зеркало из https://github.com/mozilla/pjs.git
slight change to the way nsINNTPNewsgroupLists are used - NewsgroupLists are contained by folders, so we don't create them.
This commit is contained in:
Родитель
28c173dec2
Коммит
cafdfcbcab
|
@ -6,6 +6,7 @@
|
|||
#define __gen_nsINNTPNewsgroup_h__
|
||||
|
||||
#include "nsISupports.h" /* interface nsISupports */
|
||||
#include "nsINNTPNewsgroupList.h" /* interface nsINNTPNewsgroupList */
|
||||
|
||||
|
||||
/* starting interface nsINNTPNewsgroup */
|
||||
|
@ -61,6 +62,10 @@ class nsINNTPNewsgroup : public nsISupports {
|
|||
NS_IMETHOD GetWantNewTotals(PRBool *aWantNewTotals) = 0;
|
||||
NS_IMETHOD SetWantNewTotals(PRBool aWantNewTotals) = 0;
|
||||
|
||||
/* <IDL> */
|
||||
NS_IMETHOD GetNewsgroupList(nsINNTPNewsgroupList * *aNewsgroupList) = 0;
|
||||
NS_IMETHOD SetNewsgroupList(nsINNTPNewsgroupList * aNewsgroupList) = 0;
|
||||
|
||||
/* <IDL> */
|
||||
NS_IMETHOD UpdateSummaryFromNNTPInfo(PRInt32 oldest, PRInt32 youngest, PRInt32 total_messages) = 0;
|
||||
};
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsINNTPNewsgroupList.idl"
|
||||
|
||||
[object, uuid(1A39CD90-ACAF-11d2-B7EE-00805F05FFA5)]
|
||||
interface nsINNTPNewsgroup : nsISupports {
|
||||
|
@ -44,10 +45,12 @@ interface nsINNTPNewsgroup : nsISupports {
|
|||
|
||||
attribute boolean subscribed;
|
||||
attribute boolean wantNewTotals;
|
||||
attribute nsINNTPNewsgroupList newsgroupList;
|
||||
|
||||
void UpdateSummaryFromNNTPInfo(in long oldest,
|
||||
in long youngest,
|
||||
in long total_messages);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -790,16 +790,4 @@ nsNNTPNewsgroupList::ClearXOVERState()
|
|||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
NS_NewNewsgroupList(nsINNTPNewsgroupList **aNewsgroupList,
|
||||
nsINNTPHost *host,
|
||||
nsINNTPNewsgroup *newsgroup)
|
||||
{
|
||||
nsNNTPNewsgroupList *newsgroupList =
|
||||
new nsNNTPNewsgroupList(host, newsgroup);
|
||||
return newsgroupList->QueryInterface(nsINNTPNewsgroupList::IID(),
|
||||
(void **)aNewsgroupList);
|
||||
|
||||
}
|
||||
|
|
|
@ -311,10 +311,9 @@ PRInt32 nsNNTPProtocol::LoadURL(nsIURL * aURL)
|
|||
sscanf (colon+1, " %u ", &port);
|
||||
}
|
||||
|
||||
#ifdef UNREADY_CODE
|
||||
rv = NS_NewMsgNewsHost(m_newsHost, hostAndPort, bVal, port);
|
||||
#endif
|
||||
if (colon) *colon = ':';
|
||||
#ifdef UNREADY_CODE
|
||||
rv = NS_NewNNTPHost(m_newsHost, hostAndPort, bVal, port);
|
||||
|
||||
PR_ASSERT(NS_SUCCEEDED(rv));
|
||||
if (!NS_SUCCEEDED(rv))
|
||||
|
@ -322,6 +321,7 @@ PRInt32 nsNNTPProtocol::LoadURL(nsIURL * aURL)
|
|||
status = -1;
|
||||
goto FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (messageID && commandSpecificData && !PL_strcmp (commandSpecificData, "?cancel"))
|
||||
cancel = TRUE;
|
||||
|
@ -2618,13 +2618,11 @@ PRInt32 nsNNTPProtocol::FigureNextChunk()
|
|||
|
||||
m_articleNumber = m_firstArticle;
|
||||
|
||||
#ifdef UNREADY_CODE
|
||||
rv = NS_NewNewsgroupList(&m_newsgroupList,
|
||||
m_newsHost, m_newsgroup,
|
||||
m_firstArticle, m_lastArticle,
|
||||
m_firstPossibleArticle,
|
||||
m_lastPossibleArticle);
|
||||
#endif
|
||||
/* was MSG_InitXOVER() */
|
||||
rv = m_newsgroup->GetNewsgroupList(&m_newsgroupList);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = m_newsgroupList->InitXOVER(m_firstArticle, m_lastArticle);
|
||||
|
||||
/* convert nsresult->status */
|
||||
status = !NS_SUCCEEDED(rv);
|
||||
PR_FREEIF (host_and_port);
|
||||
|
|
Загрузка…
Ссылка в новой задаче