From fb1dadb0e56e7cb3617bbd975cfd7be3959ce090 Mon Sep 17 00:00:00 2001 From: "gagan%netscape.com" Date: Wed, 24 Mar 1999 06:51:33 +0000 Subject: [PATCH] Added the first checkin files for nsNetManager. This is the central equivalent of the Netlib service. This is just a place holder for now but I needed it to test the libwww stuff. git-svn-id: svn://10.0.0.236/trunk@24978 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nunet/base/src/nsNetManager.cpp | 37 ++++++++++++++++++ mozilla/nunet/base/src/nsNetManager.h | 51 +++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 mozilla/nunet/base/src/nsNetManager.cpp create mode 100644 mozilla/nunet/base/src/nsNetManager.h diff --git a/mozilla/nunet/base/src/nsNetManager.cpp b/mozilla/nunet/base/src/nsNetManager.cpp new file mode 100644 index 00000000000..1263d1678eb --- /dev/null +++ b/mozilla/nunet/base/src/nsNetManager.cpp @@ -0,0 +1,37 @@ +/* -*- 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 "nsNetManager.h" +// For now libwww is here. TODO move to the protocol handler. +//#include "WWWLib.h" + +nsNetManager::nsNetManager() +{ +// HTLibInit("NuNetlib", "1.0"); +} + +nsNetManager::~nsNetManager() +{ +// HTLibTerminate(); +} + +void +nsNetManager::Release() +{ + delete this; +} diff --git a/mozilla/nunet/base/src/nsNetManager.h b/mozilla/nunet/base/src/nsNetManager.h new file mode 100644 index 00000000000..6342b751780 --- /dev/null +++ b/mozilla/nunet/base/src/nsNetManager.h @@ -0,0 +1,51 @@ +/* -*- 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 _nsNetManager_h_ +#define _nsNetManager_h_ + +//#include "nsISupports.h" +/* + The nsNetManager class is the central service that + runs the core nunet architecture. It handles all + miscellaneous items like initializations, etc. + + //TODO add the list of things this class does. + -Gagan Saksena 03/23/99 +*/ + +class nsNetManager //: public nsISupports +{ + +public: + static nsNetManager* GetInstance(void) + { + static nsNetManager* pNetMgr = new nsNetManager(); + //pNetMgr->AddRef(); + return pNetMgr; + } + + void Release(void); + +protected: + nsNetManager(void); + virtual ~nsNetManager(); + +}; + +#endif /* _nsNetManager_h_ */