WIP: Initial Layer interface

This commit is contained in:
spider%netscape.com 1998-09-15 19:09:36 +00:00
parent 2b7b3bf1a5
commit 97a60cf601
19 changed files with 813 additions and 3 deletions

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,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 = \
$(NULL)
PRIVATE_EXPORTS = \
nsLayer.h \
nsLayerCollection.h \
nsCoreCIID.h \
$(NULL)
MODULE = trex
REQUIRES = raptor

View File

@ -0,0 +1,37 @@
/* -*- 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 nsCoreCIID_h__
#define nsCoreCIID_h__
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsRepository.h"
// d4797370-4cc8-11d2-924a-00805f8a7ab6
#define NS_LAYER_CID \
{ 0xd4797370, 0x4cc8, 0x11d2, \
{0x92, 0x4a, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6} }
// dabe52d0-4ccb-11d2-924a-00805f8a7ab6
#define NS_LAYER_COLLECTION_CID \
{ 0xdabe52d0, 0x4ccb, 0x11d2, \
{0x92, 0x4a, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6} }
#endif

View File

@ -0,0 +1,37 @@
/* -*- 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 nsLayer_h___
#define nsLayer_h___
#include "nsILayer.h"
class nsLayer : public nsILayer
{
public:
nsLayer(nsISupports* outer);
~nsLayer();
NS_DECL_ISUPPORTS
NS_IMETHOD Init();
};
#endif //nsLayer_h___

View File

@ -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 nsLayerCollection_h___
#define nsLayerCollection_h___
#include "nsILayer.h"
#include "nsILayerCollection.h"
class nsLayerCollection : public nsILayerCollection,
nsILayer
{
public:
nsLayerCollection(nsISupports* outer);
~nsLayerCollection();
NS_DECL_ISUPPORTS
NS_IMETHOD Init();
};
#endif //nsLayerCollection_h___

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 = \
nsILayer.h \
nsILayerCollection.h \
$(NULL)
PRIVATE_EXPORTS = \
$(NULL)
MODULE = trex
REQUIRES = raptor shell

View File

@ -0,0 +1,37 @@
/* -*- 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 nsILayer_h___
#define nsILayer_h___
#include "nsISupports.h"
//5482d0d0-4cca-11d2-924a-00805f8a7ab6
#define NS_ILAYER_IID \
{ 0x5482d0d0, 0x4cca, 0x11d2, \
{ 0x92, 0x4a, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6 } }
class nsILayer : public nsISupports
{
public:
NS_IMETHOD Init() = 0;
};
#endif /* nsILayer */

View File

@ -0,0 +1,37 @@
/* -*- 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 nsILayerCollection_h___
#define nsILayerCollection_h___
#include "nsISupports.h"
//91cd3b90-4ccb-11d2-924a-00805f8a7ab6
#define NS_ILAYER_COLLECTION_IID \
{ 0x91cd3b90, 0x4ccb, 0x11d2, \
{ 0x92, 0x4a, 0x00, 0x80, 0x5f, 0x8a, 0x7a, 0xb6 } }
class nsILayerCollection : public nsISupports
{
public:
NS_IMETHOD Init() = 0;
};
#endif /* nsILayerCollection */

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,36 @@
#
# 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 -I$(GDEPTH)/include
LD_LIBS += \
raptorbase \
raptorhtmlpars \
$(NATIVE_JULIAN_DLL) \
xpcom$(MOZ_BITS) \
nsfmt$(MOZ_BITS)30 \
nsuni$(MOZ_BITS)30 \
nscck$(MOZ_BITS)30 \
nsjpn$(MOZ_BITS)30 \
nscnv$(MOZ_BITS)30 \
nssb$(MOZ_BITS)30 \
$(NATIVE_RAPTOR_WIDGET) \
xpcom$(MOZ_BITS) \
$(XP_REG_LIB)
LIBRARY_NAME = calcore
LIBRARY_VERSION = 10
EXTRA_LIBS += $(NSPR_LIBS)

View File

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

View File

@ -0,0 +1,156 @@
/* -*- 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 "nsIFactory.h"
#include "nsISupports.h"
#include "nsCoreCIID.h"
#include "nsLayer.h"
static NS_DEFINE_IID(kILayerIID, NS_ILAYER_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
static NS_DEFINE_IID(kCLayerCID, NS_LAYER_CID);
class nsCoreFactory : public nsIFactory
{
public:
// nsISupports methods
NS_IMETHOD QueryInterface(const nsIID &aIID,
void **aResult);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
// nsIFactory methods
NS_IMETHOD CreateInstance(nsISupports *aOuter,
const nsIID &aIID,
void **aResult);
NS_IMETHOD LockFactory(PRBool aLock);
nsCoreFactory(const nsCID &aClass);
~nsCoreFactory();
private:
nsrefcnt mRefCnt;
nsCID mClassID;
};
nsCoreFactory::nsCoreFactory(const nsCID &aClass)
{
mRefCnt = 0;
mClassID = aClass;
}
nsCoreFactory::~nsCoreFactory()
{
NS_ASSERTION(mRefCnt == 0, "non-zero refcnt at destruction");
}
nsresult nsCoreFactory::QueryInterface(const nsIID &aIID,
void **aResult)
{
if (aResult == NULL) {
return NS_ERROR_NULL_POINTER;
}
// Always NULL result, in case of failure
*aResult = NULL;
if (aIID.Equals(kISupportsIID)) {
*aResult = (void *)(nsISupports*)this;
} else if (aIID.Equals(kIFactoryIID)) {
*aResult = (void *)(nsIFactory*)this;
}
if (*aResult == NULL) {
return NS_NOINTERFACE;
}
AddRef(); // Increase reference count for caller
return NS_OK;
}
nsrefcnt nsCoreFactory::AddRef()
{
return ++mRefCnt;
}
nsrefcnt nsCoreFactory::Release()
{
if (--mRefCnt == 0) {
delete this;
return 0; // Don't access mRefCnt after deleting!
}
return mRefCnt;
}
nsresult nsCoreFactory::CreateInstance(nsISupports *aOuter,
const nsIID &aIID,
void **aResult)
{
if (aResult == NULL) {
return NS_ERROR_NULL_POINTER;
}
*aResult = NULL;
nsISupports *inst = nsnull;
if (mClassID.Equals(kCLayerCID)) {
inst = (nsISupports *)new nsLayer(aOuter);
}
if (inst == NULL) {
return NS_ERROR_OUT_OF_MEMORY;
}
nsresult res = inst->QueryInterface(aIID, aResult);
if (res != NS_OK) {
// We didn't get the right interface, so clean up
delete inst;
}
return res;
}
nsresult nsCoreFactory::LockFactory(PRBool aLock)
{
// Not implemented in simplest case.
return NS_OK;
}
// return the proper factory to the caller
extern "C" NS_EXPORT nsresult NSGetFactory(const nsCID &aClass, nsIFactory **aFactory)
{
if (nsnull == aFactory) {
return NS_ERROR_NULL_POINTER;
}
*aFactory = new nsCoreFactory(aClass);
if (nsnull == aFactory) {
return NS_ERROR_OUT_OF_MEMORY;
}
return (*aFactory)->QueryInterface(kIFactoryIID, (void**)aFactory);
}

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.
*/
#include <stdio.h>
#include "nsLayer.h"
static NS_DEFINE_IID(kILayerIID, NS_ILAYER_IID);
nsLayer::nsLayer(nsISupports* outer)
{
NS_INIT_REFCNT();
}
NS_IMPL_QUERY_INTERFACE(nsLayer, kILayerIID)
NS_IMPL_ADDREF(nsLayer)
NS_IMPL_RELEASE(nsLayer)
nsLayer::~nsLayer()
{
}
nsresult nsLayer::Init()
{
return (NS_OK);
}

View File

@ -0,0 +1,76 @@
/* -*- 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 <stdio.h>
#include "nsLayerCollection.h"
#include "nsCoreCIID.h"
static NS_DEFINE_IID(kILayerIID, NS_ILAYER_IID);
static NS_DEFINE_IID(kILayerCollectionIID, NS_ILAYER_COLLECTION_IID);
static NS_DEFINE_IID(kCLayerCollectionCID, NS_LAYER_COLLECTION_CID);
nsLayerCollection::nsLayerCollection(nsISupports* outer)
{
NS_INIT_REFCNT();
}
nsresult nsLayerCollection::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, kCLayerCollectionCID);
if (aIID.Equals(kClassIID)) {
*aInstancePtr = (void*) (nsLayerCollection *)this;
AddRef();
return NS_OK;
}
if (aIID.Equals(kILayerCollectionIID)) {
*aInstancePtr = (void*) (nsILayerCollection *)this;
AddRef();
return NS_OK;
}
if (aIID.Equals(kILayerIID)) {
*aInstancePtr = (void*) (nsILayer *)this;
AddRef();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void*) (this) ;
AddRef();
return NS_OK;
}
return (NS_NOINTERFACE);
}
NS_IMPL_ADDREF(nsLayerCollection)
NS_IMPL_RELEASE(nsLayerCollection)
nsLayerCollection::~nsLayerCollection()
{
}
nsresult nsLayerCollection::Init()
{
return (NS_OK);
}

View File

@ -10,5 +10,5 @@
GDEPTH = ../..
DEPTH = ../..
DIRS = util network parser ui shell test
DIRS = util network parser core ui shell test

View File

@ -48,6 +48,9 @@
#include "capi.h"
#include "nsICapi.h"
#include "nsCoreCIID.h"
#include "nsLayer.h"
/* for CAPI to work in general form */
#include "nsCapiCallbackReader.h"
#include "nsCalStreamReader.h"
@ -78,12 +81,16 @@ static NS_DEFINE_IID(kCXPFCObserverManagerCID, NS_XPFC_OBSERVERMANAGER_CID);
// hardcode names of dll's
#ifdef NS_WIN32
#define CAPI_DLL "calcapi10.dll"
#define CORE_DLL "calcore10.dll"
#else
#define CAPI_DLL "libcalcapi10.so"
#define CORE_DLL "libcalcore10.so"
#endif
static NS_DEFINE_IID(kCCapiLocalCID, NS_CAPI_LOCAL_CID);
static NS_DEFINE_IID(kCCapiCSTCID, NS_CAPI_CST_CID);
static NS_DEFINE_IID(kCCapiLocalCID, NS_CAPI_LOCAL_CID);
static NS_DEFINE_IID(kCCapiCSTCID, NS_CAPI_CST_CID);
static NS_DEFINE_IID(kCLayerCID, NS_LAYER_CID);
static NS_DEFINE_IID(kCLayerCollectionCID, NS_LAYER_COLLECTION_CID);
// All Application Must implement this function
nsresult NS_RegisterApplicationShellFactory()
@ -952,6 +959,9 @@ nsresult nsCalendarShell::RegisterFactories()
nsRepository::RegisterFactory(kCCapiLocalCID, CAPI_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCCapiCSTCID, CAPI_DLL, PR_FALSE, PR_FALSE);
// Register the Core Implementations
nsRepository::RegisterFactory(kCLayerCID, CORE_DLL, PR_FALSE, PR_FALSE);
nsRepository::RegisterFactory(kCLayerCollectionCID, CORE_DLL, PR_FALSE, PR_FALSE);
return NS_OK;
}