incoming nntp server work

git-svn-id: svn://10.0.0.236/trunk@28402 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com
1999-04-21 02:48:30 +00:00
parent 83452468ad
commit fedcec9336
4 changed files with 175 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsINntpIncomingServer.idl
*/
#ifndef __gen_nsINntpIncomingServer_h__
#define __gen_nsINntpIncomingServer_h__
#include "nsISupports.h" /* interface nsISupports */
#include "nsID.h" /* interface nsID */
#ifdef XPIDL_JS_STUBS
#include "jsapi.h"
#endif
/* starting interface: nsINntpIncomingServer */
/* {21ea0654-f773-11d2-8aec-004005263078} */
#define NS_INNTPINCOMINGSERVER_IID_STR "21ea0654-f773-11d2-8aec-004005263078"
#define NS_INNTPINCOMINGSERVER_IID \
{0x21ea0654, 0xf773, 0x11d2, \
{ 0x8a, 0xec, 0x00, 0x40, 0x05, 0x26, 0x30, 0x78 }}
class nsINntpIncomingServer : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_INNTPINCOMINGSERVER_IID)
/* attribute string rootFolderPath; */
NS_IMETHOD GetRootFolderPath(char * *aRootFolderPath) = 0;
NS_IMETHOD SetRootFolderPath(char * aRootFolderPath) = 0;
#ifdef XPIDL_JS_STUBS
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsINntpIncomingServer *priv);
#endif
};
#endif /* __gen_nsINntpIncomingServer_h__ */

View File

@@ -0,0 +1,28 @@
/* -*- Mode: IDL; 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.
*/
#include "nsISupports.idl"
[object, uuid(21ea0654-f773-11d2-8aec-004005263078)]
interface nsINntpIncomingServer : nsISupports {
attribute string rootFolderPath;
};

View File

@@ -0,0 +1,78 @@
/* -*- 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.
*/
#include "nsINntpIncomingServer.h"
#include "nsNntpIncomingServer.h"
#include "nsMsgIncomingServer.h"
#include "nsIPref.h"
#include "prmem.h"
#include "plstr.h"
/* get some implementation from nsMsgIncomingServer */
class nsNntpIncomingServer : public nsMsgIncomingServer,
public nsINntpIncomingServer
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsNntpIncomingServer();
virtual ~nsNntpIncomingServer();
NS_IMETHOD GetRootFolderPath(char **);
NS_IMETHOD SetRootFolderPath(char *);
private:
char *m_rootFolderPath;
};
NS_IMPL_ISUPPORTS_INHERITED(nsNntpIncomingServer,
nsMsgIncomingServer,
nsINntpIncomingServer);
nsNntpIncomingServer::nsNntpIncomingServer() :
m_rootFolderPath(0)
{
NS_INIT_REFCNT();
}
nsNntpIncomingServer::~nsNntpIncomingServer()
{
PR_FREEIF(m_rootFolderPath);
}
NS_IMPL_SERVERPREF_STR(nsNntpIncomingServer,
RootFolderPath,
"directory")
nsresult NS_NewNntpIncomingServer(const nsIID& iid,
void **result)
{
nsNntpIncomingServer *server;
if (!result) return NS_ERROR_NULL_POINTER;
server = new nsNntpIncomingServer();
return server->QueryInterface(iid, result);
}

View File

@@ -0,0 +1,32 @@
/* -*- 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 __nsNntpIncomingServer_h
#define __nsNntpIncomingServer_h
#include "nsINntpIncomingServer.h"
#include "nscore.h"
NS_BEGIN_EXTERN_C
nsresult
NS_NewNntpIncomingServer(const nsIID& iid, void **result);
NS_END_EXTERN_C
#endif