ARefBase.h 872 B

123456789101112131415161718192021222324252627282930313233
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_net_ARefBase_h
  6. #define mozilla_net_ARefBase_h
  7. #include "nscore.h"
  8. namespace mozilla { namespace net {
  9. // This is an abstract class that can be pointed to by either
  10. // nsCOMPtr or nsRefPtr. nsHttpConnectionMgr uses it for generic
  11. // objects that need to be reference counted - similiar to nsISupports
  12. // but it may or may not be xpcom.
  13. class ARefBase
  14. {
  15. public:
  16. ARefBase() {}
  17. virtual ~ARefBase() {}
  18. NS_IMETHOD_ (MozExternalRefCountType) AddRef() = 0;
  19. NS_IMETHOD_ (MozExternalRefCountType) Release() = 0;
  20. };
  21. } // namespace net
  22. } // namespace mozilla
  23. #endif