Adding support for SMTP Service to send Mail

This commit is contained in:
spider%netscape.com 1998-10-29 22:03:50 +00:00
Родитель f1ec836dd3
Коммит 885261dab7
15 изменённых файлов: 238 добавлений и 2 удалений

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

@ -44,6 +44,7 @@ AR_LIBS += \
toolkit \
widget \
xpfc_user \
xpfc_msg \
$(NULL)
OS_LIBS += $(GUI_LIBS) $(MATH_LIB)

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

@ -211,6 +211,12 @@
{ 0x667b7530, 0x33b5, 0x11d2, \
{ 0x92, 0x48, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6 } }
//e72e08e0-6f78-11d2-8dbc-00805f8a7ab6
#define NS_SMTP_SERVICE_CID \
{ 0xe72e08e0, 0x6f78, 0x11d2, \
{0x8d, 0xbc, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6} }
#endif

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

@ -51,6 +51,7 @@
#include "nsListLayout.h"
#include "nsXPFCObserver.h"
#include "nsXPFCObserverManager.h"
#include "nsSMTPService.h"
#include "nsXPFCSubject.h"
#include "nsXPFCCommand.h"
#include "nsXPFCCanvas.h"
@ -107,6 +108,7 @@ static NS_DEFINE_IID(kCXPFCModelUpdateCommand, NS_XPFC_MODELUPDATE_COMMAND_CI
static NS_DEFINE_IID(kCXPFCCommandServerCID, NS_XPFC_COMMAND_SERVER_CID);
static NS_DEFINE_IID(kCXPFCActionCommand, NS_XPFC_ACTION_COMMAND_CID);
static NS_DEFINE_IID(kCUserCID, NS_USER_CID);
static NS_DEFINE_IID(kCSMTPServiceCID, NS_SMTP_SERVICE_CID);
class nsxpfcFactory : public nsIFactory
{

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

@ -156,6 +156,8 @@ nsresult nsxpfcFactory::CreateInstance(nsISupports *aOuter,
inst = (nsISupports *)new nsXPFCCommand();
} else if (mClassID.Equals(kCXPFCCommandServerCID)) {
inst = (nsISupports *)new nsCommandServer();
} else if (mClassID.Equals(kCSMTPServiceCID)) {
inst = (nsISupports *)new nsSMTPService();
}
if (inst == NULL) {

0
xpfc/msg/inc/Makefile Normal file
Просмотреть файл

21
xpfc/msg/inc/manifest.mn Normal file
Просмотреть файл

@ -0,0 +1,21 @@
#
# CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
# NETSCAPE COMMUNICATIONS CORPORATION
# Copyright (C) 1996 Netscape Communications Corporation. All Rights
# Reserved. Use of this Source Code is subject to the terms of the
# applicable license agreement from Netscape Communications Corporation.
# The copyright notice(s) in this Source Code does not indicate actual or
# intended publication of this Source Code.
#
GDEPTH = ../../..
EXPORTS = \
$(NULL)
PRIVATE_EXPORTS = \
nsSMTPService.h \
$(NULL)
MODULE = xpfc
REQUIRES = raptor

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

@ -0,0 +1,39 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
#ifndef nsSMTPService_h___
#define nsSMTPService_h___
#include "nsISMTPService.h"
class nsSMTPService : public nsISMTPService
{
public:
nsSMTPService();
NS_DECL_ISUPPORTS
NS_IMETHOD Init() ;
NS_IMETHOD SendMail(nsString& aServer, nsString& aFrom, nsString& aTo, nsString& aSubject, nsString& aBody) ;
protected:
~nsSMTPService();
};
#endif /* nsSMTPService_h___ */

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

@ -10,7 +10,8 @@
GDEPTH = ../..
DEPTH = ../..
#DIRS_EXPORT = public inc
#DIRS_LIBS = src
DIRS = test
DIRS_EXPORT = public inc
DIRS_LIBS = src

0
xpfc/msg/public/Makefile Normal file
Просмотреть файл

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

@ -0,0 +1,22 @@
#
# CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
# NETSCAPE COMMUNICATIONS CORPORATION
# Copyright (C) 1996 Netscape Communications Corporation. All Rights
# Reserved. Use of this Source Code is subject to the terms of the
# applicable license agreement from Netscape Communications Corporation.
# The copyright notice(s) in this Source Code does not indicate actual or
# intended publication of this Source Code.
#
GDEPTH = ../../..
DEPTH = ../../..
EXPORTS = \
nsISMTPService.h \
$(NULL)
PRIVATE_EXPORTS = \
$(NULL)
MODULE = xpfc
REQUIRES = raptor

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

@ -0,0 +1,41 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
#ifndef nsISMTPService_h___
#define nsISMTPService_h___
#include "nsISupports.h"
#include "nsString.h"
//b64f8b50-6f77-11d2-8dbc-00805f8a7ab6
#define NS_ISMTP_SERVICE_IID \
{ 0xb64f8b50, 0x6f77, 0x11d2, \
{ 0x8d, 0xbc, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6 } }
class nsISMTPService : public nsISupports
{
public:
NS_IMETHOD Init() = 0;
NS_IMETHOD SendMail(nsString& aServer, nsString& aFrom, nsString& aTo, nsString& aSubject, nsString& aBody) = 0;
};
#endif /* nsISMTPService_h___ */

0
xpfc/msg/src/Makefile Normal file
Просмотреть файл

24
xpfc/msg/src/config.mk Normal file
Просмотреть файл

@ -0,0 +1,24 @@
#
# CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
# NETSCAPE COMMUNICATIONS CORPORATION
# Copyright © 1996, 1997 Netscape Communications Corporation. All Rights
# Reserved. Use of this Source Code is subject to the terms of the
# applicable license agreement from Netscape Communications Corporation.
# The copyright notice(s) in this Source Code does not indicate actual or
# intended publication of this Source Code.
#
#
# Override TARGETS variable so that only static libraries
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_XPFC -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include
LIBRARY_NAME = xpfc_msg
LIBRARY_VERSION = 10
ARCHIVE_ONLY = 1
TARGETS = $(LIBRARY)

25
xpfc/msg/src/manifest.mn Normal file
Просмотреть файл

@ -0,0 +1,25 @@
#
# CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF
# NETSCAPE COMMUNICATIONS CORPORATION
# Copyright (C) 1996 Netscape Communications Corporation. All Rights
# Reserved. Use of this Source Code is subject to the terms of the
# applicable license agreement from Netscape Communications Corporation.
# The copyright notice(s) in this Source Code does not indicate actual or
# intended publication of this Source Code.
#
GDEPTH = ../../..
EXPORTS = \
$(NULL)
PRIVATE_EXPORTS = \
$(NULL)
MODULE = xpfc
CPPSRCS = \
nsSMTPService.cpp \
$(NULL)
REQUIRES = xpcom raptor netlib

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

@ -0,0 +1,52 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsSMTPService.h"
#include "nsxpfcCIID.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kSMTPServiceIID, NS_ISMTP_SERVICE_IID);
nsSMTPService :: nsSMTPService()
{
NS_INIT_REFCNT();
}
nsSMTPService :: ~nsSMTPService()
{
}
NS_IMPL_ADDREF(nsSMTPService)
NS_IMPL_RELEASE(nsSMTPService)
NS_IMPL_QUERY_INTERFACE(nsSMTPService, kSMTPServiceIID)
nsresult nsSMTPService::Init()
{
return NS_OK;
}
nsresult nsSMTPService::SendMail(nsString& aServer,
nsString& aFrom,
nsString& aTo,
nsString& aSubject,
nsString& aBody)
{
return NS_OK;
}