incoming nntp server work
git-svn-id: svn://10.0.0.236/trunk@28402 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
37
mozilla/mailnews/news/public/nsINntpIncomingServer.h
Normal file
37
mozilla/mailnews/news/public/nsINntpIncomingServer.h
Normal 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__ */
|
||||
28
mozilla/mailnews/news/public/nsINntpIncomingServer.idl
Normal file
28
mozilla/mailnews/news/public/nsINntpIncomingServer.idl
Normal 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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
78
mozilla/mailnews/news/src/nsNntpIncomingServer.cpp
Normal file
78
mozilla/mailnews/news/src/nsNntpIncomingServer.cpp
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
32
mozilla/mailnews/news/src/nsNntpIncomingServer.h
Normal file
32
mozilla/mailnews/news/src/nsNntpIncomingServer.h
Normal 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
|
||||
Reference in New Issue
Block a user