First pass at XPFC migration to Free Source repo

This commit is contained in:
spider%netscape.com 1998-09-03 19:38:52 +00:00
parent 12e0612d22
commit d5852852d6
17 changed files with 755 additions and 0 deletions

53
xpfc/command/Makefile Normal file
View File

@ -0,0 +1,53 @@
#! gmake
#
# 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.
#
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

53
xpfc/command/inc/Makefile Normal file
View File

@ -0,0 +1,53 @@
#! gmake
#
# 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.
#
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

View File

@ -0,0 +1,23 @@
#
# 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 = \
nsXPFCCommand.h \
nsXPFCActionCommand.h \
nsXPFCMethodInvokerCommand.h \
$(NULL)
PRIVATE_EXPORTS = \
$(NULL)
MODULE = xpfc
REQUIRES = raptor

View File

@ -0,0 +1,42 @@
/* -*- 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 nsXPFCActionCommand_h___
#define nsXPFCActionCommand_h___
#include "nsXPFCCommand.h"
#include "nsString.h"
class nsXPFCActionCommand : public nsXPFCCommand
{
public:
nsXPFCActionCommand();
NS_DECL_ISUPPORTS
NS_IMETHOD Init() ;
public:
nsString mAction;
protected:
~nsXPFCActionCommand();
};
#endif /* nsXPFCActionCommand_h___ */

View File

@ -0,0 +1,46 @@
/* -*- 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 nsXPFCCommand_h___
#define nsXPFCCommand_h___
#include "nsIXPFCCommand.h"
CLASS_EXPORT_XPFC nsXPFCCommand : public nsIXPFCCommand
{
public:
nsXPFCCommand();
NS_DECL_ISUPPORTS
NS_IMETHOD Init() ;
NS_IMETHOD Execute() ;
NS_IMETHOD SetReceiver(nsIXPFCCommandReceiver * aReceiver);
NS_IMETHOD_(nsIXPFCCommandReceiver *) GetReceiver();
protected:
~nsXPFCCommand();
private:
nsIXPFCCommandReceiver * mReceiver;
};
#endif /* nsXPFCCommand_h___ */

View File

@ -0,0 +1,44 @@
/* -*- 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 nsXPFCMethodInvokerCommand_h___
#define nsXPFCMethodInvokerCommand_h___
#include "nsXPFCCommand.h"
#include "nsString.h"
class nsXPFCMethodInvokerCommand : public nsXPFCCommand
{
public:
nsXPFCMethodInvokerCommand();
NS_DECL_ISUPPORTS
NS_IMETHOD Init() ;
public:
nsString mMethod;
nsString mParams;
nsString mReply;
protected:
~nsXPFCMethodInvokerCommand();
};
#endif /* nsXPFCMethodInvokerCommand_h___ */

15
xpfc/command/manifest.mn Normal file
View File

@ -0,0 +1,15 @@
#
# 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 = ../../../..
DIRS_EXPORT = public inc
DIRS_LIBS = src

View File

@ -0,0 +1,53 @@
#! gmake
#
# 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.
#
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

View File

@ -0,0 +1,23 @@
#
# 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 = \
nsIXPFCCommand.h \
nsIXPFCCommandReceiver.h \
$(NULL)
PRIVATE_EXPORTS = \
$(NULL)
MODULE = xpfc
REQUIRES = raptor

View File

@ -0,0 +1,48 @@
/* -*- 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 nsIXPFCCommand_h___
#define nsIXPFCCommand_h___
#include "nsxpfc.h"
#include "nsISupports.h"
class nsIXPFCCommandReceiver;
//2cfc9370-1f46-11d2-bed9-00805f8a8dbd
#define NS_IXPFC_COMMAND_IID \
{ 0x2cfc9370, 0x1f46, 0x11d2, \
{ 0xbe, 0xd9, 0x00, 0x80, 0x5f, 0x8a, 0x8d, 0xbd } }
CLASS_EXPORT_XPFC nsIXPFCCommand : public nsISupports
{
public:
NS_IMETHOD Init() = 0;
NS_IMETHOD Execute() = 0;
NS_IMETHOD SetReceiver(nsIXPFCCommandReceiver * aReceiver) = 0;
NS_IMETHOD_(nsIXPFCCommandReceiver *) GetReceiver() = 0;
};
#endif /* nsIXPFCCommand_h___ */

View File

@ -0,0 +1,43 @@
/* -*- 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 nsIXPFCCommandReceiver_h___
#define nsIXPFCCommandReceiver_h___
#include "nsISupports.h"
#include "nsIXPFCCommand.h"
class nsIXPFCCommand;
//2c4b94b0-1f48-11d2-bed9-00805f8a8dbd
#define NS_IXPFC_COMMANDRECEIVER_IID \
{ 0x2c4b94b0, 0x1f48, 0x11d2, \
{ 0xbe, 0xd9, 0x00, 0x80, 0x5f, 0x8a, 0x8d, 0xbd } }
class nsIXPFCCommandReceiver : public nsISupports
{
public:
NS_IMETHOD Init() = 0;
NS_IMETHOD Action(nsIXPFCCommand * aCommand) = 0;
};
#endif /* nsIXPFCCommandReceiver_h___ */

54
xpfc/command/src/Makefile Normal file
View File

@ -0,0 +1,54 @@
#! gmake
#
# 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.
#
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
include config.mk
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(GDEPTH)/gconfig/ruleset.mk
include $(GDEPTH)/gconfig/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

View File

@ -0,0 +1,25 @@
#
# 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 = command
LIBRARY_VERSION = 10
ARCHIVE_ONLY = 1
TARGETS = $(LIBRARY)

View File

@ -0,0 +1,27 @@
#
# 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 = \
nsXPFCCommand.cpp \
nsXPFCActionCommand.cpp \
nsXPFCMethodInvokerCommand.cpp \
$(NULL)
REQUIRES = xpcom raptor

View File

@ -0,0 +1,72 @@
/* -*- 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 "nscore.h"
#include "nsXPFCActionCommand.h"
#include "nsxpfcCIID.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kXPFCCommandIID, NS_IXPFC_COMMAND_IID);
nsXPFCActionCommand :: nsXPFCActionCommand()
{
NS_INIT_REFCNT();
}
nsXPFCActionCommand :: ~nsXPFCActionCommand()
{
}
NS_IMPL_ADDREF(nsXPFCActionCommand)
NS_IMPL_RELEASE(nsXPFCActionCommand)
nsresult nsXPFCActionCommand::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kClassIID, kXPFCCommandIID);
static NS_DEFINE_IID(kXPFCActionCommandCID, NS_XPFC_ACTION_COMMAND_CID);
if (aIID.Equals(kClassIID)) {
*aInstancePtr = (void*) this;
AddRef();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void*) (this);
AddRef();
return NS_OK;
}
if (aIID.Equals(kXPFCActionCommandCID)) {
*aInstancePtr = (void*)(nsXPFCActionCommand *) (this);
AddRef();
return NS_OK;
}
return (NS_NOINTERFACE);
}
nsresult nsXPFCActionCommand::Init()
{
return NS_OK;
}

View File

@ -0,0 +1,61 @@
/* -*- 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 "nscore.h"
#include "nsXPFCCommand.h"
#include "nsxpfcCIID.h"
#include "nsIXPFCCommandReceiver.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kXPFCCommandIID, NS_IXPFC_COMMAND_IID);
nsXPFCCommand :: nsXPFCCommand()
{
NS_INIT_REFCNT();
mReceiver = nsnull;
}
nsXPFCCommand :: ~nsXPFCCommand()
{
mReceiver = nsnull;
}
NS_IMPL_ADDREF(nsXPFCCommand)
NS_IMPL_RELEASE(nsXPFCCommand)
NS_IMPL_QUERY_INTERFACE(nsXPFCCommand, kXPFCCommandIID)
nsresult nsXPFCCommand::Init()
{
return NS_OK;
}
nsresult nsXPFCCommand::Execute()
{
return (mReceiver->Action(this));
}
nsIXPFCCommandReceiver * nsXPFCCommand::GetReceiver()
{
return (mReceiver);
}
nsresult nsXPFCCommand::SetReceiver(nsIXPFCCommandReceiver * aReceiver)
{
mReceiver = aReceiver;
return (NS_OK);
}

View File

@ -0,0 +1,73 @@
/* -*- 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 "nscore.h"
#include "nsXPFCMethodInvokerCommand.h"
#include "nsxpfcCIID.h"
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kXPFCCommandIID, NS_IXPFC_COMMAND_IID);
nsXPFCMethodInvokerCommand :: nsXPFCMethodInvokerCommand()
{
NS_INIT_REFCNT();
mReply.Truncate(0);
}
nsXPFCMethodInvokerCommand :: ~nsXPFCMethodInvokerCommand()
{
}
NS_IMPL_ADDREF(nsXPFCMethodInvokerCommand)
NS_IMPL_RELEASE(nsXPFCMethodInvokerCommand)
nsresult nsXPFCMethodInvokerCommand::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kClassIID, kXPFCCommandIID);
static NS_DEFINE_IID(kXPFCMethodInvokerCommandCID, NS_XPFC_METHODINVOKER_COMMAND_CID);
if (aIID.Equals(kClassIID)) {
*aInstancePtr = (void*) this;
AddRef();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void*) (this);
AddRef();
return NS_OK;
}
if (aIID.Equals(kXPFCMethodInvokerCommandCID)) {
*aInstancePtr = (void*)(nsXPFCMethodInvokerCommand *) (this);
AddRef();
return NS_OK;
}
return (NS_NOINTERFACE);
}
nsresult nsXPFCMethodInvokerCommand::Init()
{
return NS_OK;
}