add declarations for factories

This commit is contained in:
alecf%netscape.com 1999-01-26 23:17:39 +00:00
Родитель 34845beb96
Коммит 3e75b8c0d2
4 изменённых файлов: 80 добавлений и 3 удалений

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

@ -0,0 +1,33 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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.
*/
#ifndef __nsNNTPCategoryContainer_h
#define __nsNNTPCategoryContainer_h
#include "nsINNTPCategoryContainer.h"
#include "nsINNTPNewsgroup.h"
NS_BEGIN_EXTERN_C
nsresult
NS_NewCategoryContainerFromNewsgroup(nsINNTPCategoryContainer **,
nsINNTPNewsgroup* );
NS_END_EXTERN_C
#endif

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

@ -22,7 +22,10 @@
#include "nntpCore.h"
#include "nsINNTPHost.h"
#include "nsINNTPCategory.h"
#include "nsINNTPCategoryContainer.h"
#include "nsNNTPCategoryContainer.h"
#include "nsNNTPHost.h"
#include "nsNNTPArticleSet.h"
@ -30,6 +33,8 @@
#include "nsMsgPtrArray.h"
#include "nsINNTPNewsgroup.h"
#include "nsNNTPNewsgroup.h"
#include "nsIMsgFolder.h"
/* for XP_FilePerm */
@ -1863,14 +1868,14 @@ nsNNTPHost::RemoveGroup (const nsINNTPNewsgroup *newsInfo)
{
PRBool subscribed;
if (!newsInfo) return NS_ERROR_NULL_POINTER;
nsresult rv = newsInfo->GetSubscribed(&subscribed);
nsresult rv = ((nsINNTPNewsgroup *)newsInfo)->GetSubscribed(&subscribed);
if (NS_SUCCEEDED(rv) && subscribed)
{
newsInfo->SetSubscribed(PR_FALSE);
((nsINNTPNewsgroup *)newsInfo)->SetSubscribed(PR_FALSE);
#ifdef HAVE_MASTER
m_master->BroadcastFolderDeleted (newsInfo);
#endif
nsIMsgFolder* newsFolder = getFolderFor(newsInfo);
nsIMsgFolder* newsFolder = getFolderFor((nsINNTPNewsgroup*)newsInfo);
if (newsFolder) {
m_hostinfo->RemoveSubfolder(newsFolder);
NS_RELEASE(newsFolder);

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

@ -0,0 +1,37 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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.
*/
#ifndef __nsNNTPNewsgroup_h
#define __nsNNTPNewsgroup_h
#include "nsINNTPNewsgroup.h"
#include "nsNNTPArticleSet.h"
NS_BEGIN_EXTERN_C
nsresult
NS_NewNewsgroup(nsINNTPNewsgroup **info,
char *line,
nsNNTPArticleSet *set,
PRBool subscribed,
nsINNTPHost *host,
int depth);
NS_END_EXTERN_C
#endif

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

@ -84,6 +84,7 @@ class nsNNTPNewsgroupList : public nsINNTPNewsgroupList
{
public:
nsNNTPNewsgroupList(nsINNTPHost *, nsINNTPNewsgroup*);
nsNNTPNewsgroupList();
virtual ~nsNNTPNewsgroupList();
static void operator delete(void *);
NS_DECL_ISUPPORTS;
@ -107,6 +108,7 @@ public:
private:
NS_METHOD Init(nsINNTPHost *, nsINNTPNewsgroup*);
NS_METHOD InitNewsgroupList(const char *url, const char *groupName);
NS_METHOD CleanUp();