summaryrefslogtreecommitdiff
path: root/netwerk/base/ARefBase.h
blob: 0b2726c43c977b7dcdc58bda928c630227fd56d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_net_ARefBase_h
#define mozilla_net_ARefBase_h

#include "nscore.h"

namespace mozilla { namespace net {

// This is an abstract class that can be pointed to by either
// nsCOMPtr or nsRefPtr. nsHttpConnectionMgr uses it for generic
// objects that need to be reference counted - similiar to nsISupports
// but it may or may not be xpcom.

class ARefBase
{
public:
  ARefBase() {}
  virtual ~ARefBase() {}

  NS_IMETHOD_ (MozExternalRefCountType) AddRef() = 0;
  NS_IMETHOD_ (MozExternalRefCountType) Release() = 0;
};

} // namespace net
} // namespace mozilla

#endif