Removing old stream listener classes

This commit is contained in:
spider%netscape.com 1998-09-24 19:17:13 +00:00
parent 0eba525234
commit 010577136d
9 changed files with 0 additions and 451 deletions

View File

@ -1,53 +0,0 @@
#! 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

@ -1,53 +0,0 @@
#! 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

@ -1,21 +0,0 @@
#
# 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 = \
nsCalStreamListener.h \
$(NULL)
MODULE = trex
REQUIRES = raptor

View File

@ -1,59 +0,0 @@
/* -*- 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 nsCalStreamListener_h___
#define nsCalStreamListener_h___
#include "nscalexport.h"
#include "nsIStreamListener.h"
#include "nsCalendarWidget.h"
class nsCalStreamListener : public nsIStreamListener
{
public:
NS_DECL_ISUPPORTS
nsCalStreamListener();
virtual ~nsCalStreamListener();
NS_IMETHOD OnStartBinding(nsIURL * aURL, const char *aContentType);
NS_IMETHOD OnProgress(nsIURL* aURL, PRInt32 aProgress, PRInt32 aProgressMax);
NS_IMETHOD OnStatus(nsIURL* aURL, const nsString &aMsg) ;
NS_IMETHOD OnStopBinding(nsIURL * aURL,
PRInt32 aStatus,
const nsString &aMsg);
NS_IMETHOD GetBindInfo(nsIURL * aURL);
NS_IMETHOD OnDataAvailable(nsIURL * aURL,
nsIInputStream *aIStream,
PRInt32 aLength);
// XXX ACK - see nsCalendarWidget.cpp
NS_IMETHOD SetWidget(nsCalendarWidget * aWidget);
private:
nsCalendarWidget * mWidget ;
};
extern NS_CALENDAR nsresult NS_NewCalStreamListener(nsIStreamListener** aInstancePtrResult);
#endif /* nsCalStreamListener_h___ */

View File

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

View File

@ -1,53 +0,0 @@
#! 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

@ -1,24 +0,0 @@
#
# 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_CALENDAR -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include
LIBRARY_NAME = stream
LIBRARY_VERSION = 10
ARCHIVE_ONLY = 1
TARGETS = $(LIBRARY)

View File

@ -1,25 +0,0 @@
#
# 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 = trex
CPPSRCS = \
nsCalStreamListener.cpp \
$(NULL)
REQUIRES = xpcom raptor trex julian nls netlib xpfc pref js

View File

@ -1,148 +0,0 @@
/* -*- 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 "nsCalStreamListener.h"
#include "nsIDTD.h"
#include "nsCalendarShell.h"
#include "nsIPref.h"
#include "nscalstrings.h"
#include "nsxpfcCIID.h"
//b770bd50-1aab-11d2-9246-00805f8a7ab6
#define NS_ICALSTREAMLISTENER_IID \
{ 0xb770bd50, 0x1aab, 0x11d2, \
{ 0x92, 0x46, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6 } }
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kClassIID, NS_ICALSTREAMLISTENER_IID);
nsresult nsCalStreamListener::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
if (NULL == aInstancePtr) {
return NS_ERROR_NULL_POINTER;
}
if(aIID.Equals(kISupportsIID)) { //do IUnknown...
*aInstancePtr = (nsIDTD*)(this);
}
else if(aIID.Equals(kClassIID)) { //do this class...
*aInstancePtr = (nsCalStreamListener*)(this);
}
else {
*aInstancePtr=0;
return NS_NOINTERFACE;
}
((nsISupports*) *aInstancePtr)->AddRef();
return NS_OK;
}
NS_CALENDAR nsresult NS_NewCalStreamListener(nsIStreamListener** aInstancePtrResult)
{
nsCalStreamListener * it = new nsCalStreamListener();
if (it == 0) {
return NS_ERROR_OUT_OF_MEMORY;
}
return it->QueryInterface(kClassIID, (void **) aInstancePtrResult);
}
NS_IMPL_ADDREF(nsCalStreamListener)
NS_IMPL_RELEASE(nsCalStreamListener)
nsCalStreamListener::nsCalStreamListener()
{
NS_INIT_REFCNT();
mWidget = nsnull;
}
nsCalStreamListener::~nsCalStreamListener()
{
}
nsresult nsCalStreamListener::GetBindInfo(nsIURL * aURL)
{
return NS_OK;
}
nsresult nsCalStreamListener::OnDataAvailable(nsIURL * aURL,
nsIInputStream *aIStream,
PRInt32 aLength)
{
if (mWidget)
return (mWidget->GetParserStreamInterface()->OnDataAvailable(aURL,
aIStream,
aLength));
return NS_OK;
}
nsresult nsCalStreamListener::OnStartBinding(nsIURL * aURL,
const char *aContentType)
{
if (mWidget)
return (mWidget->GetParserStreamInterface()->OnStartBinding(aURL,aContentType));
return NS_OK;
}
nsresult nsCalStreamListener::OnStopBinding(nsIURL * aURL, PRInt32 aStatus, const nsString &aMsg)
{
#ifndef XP_UNIX
static PRUint32 done = 0 ;
// XXX Hack til get StreamManager in place
if (mWidget && done == 0)
{
nsresult res = mWidget->GetParserStreamInterface()->OnStopBinding(aURL, aStatus, aMsg);
char pUI[1024];
int i = 1024;
((nsCalendarShell *)mWidget->mCalendarShell)->mShellInstance->GetPreferences()->GetCharPref(CAL_STRING_PREF_JULIAN_UI_XML_CALENDAR,pUI,&i);
((nsCalendarShell *)mWidget->mCalendarShell)->mDocumentContainer->LoadURL(pUI,nsnull);
done = 1;
return res;
}
#endif
if (mWidget)
return (mWidget->GetParserStreamInterface()->OnStopBinding(aURL, aStatus, aMsg));
return NS_OK;
}
nsresult nsCalStreamListener::OnProgress(nsIURL* aURL, PRInt32 aProgress, PRInt32 aProgressMax)
{
return NS_OK;
}
nsresult nsCalStreamListener::OnStatus(nsIURL* aURL, const nsString &aMsg)
{
return NS_OK;
}
nsresult nsCalStreamListener::SetWidget(nsCalendarWidget * aWidget)
{
mWidget = aWidget;
return NS_OK;
}