Source code

Revision control

Other Tools

1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#ifndef mozilla_places_PlaceInfo_h__
6
#define mozilla_places_PlaceInfo_h__
7
8
#include "mozIAsyncHistory.h"
9
#include "nsString.h"
10
#include "nsTArray.h"
11
#include "nsAutoPtr.h"
12
#include "mozilla/Attributes.h"
13
14
class nsIURI;
15
class mozIVisitInfo;
16
17
namespace mozilla {
18
namespace places {
19
20
class PlaceInfo final : public mozIPlaceInfo {
21
public:
22
NS_DECL_ISUPPORTS
23
NS_DECL_MOZIPLACEINFO
24
25
typedef nsTArray<nsCOMPtr<mozIVisitInfo> > VisitsArray;
26
27
PlaceInfo(int64_t aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
28
const nsString& aTitle, int64_t aFrecency);
29
PlaceInfo(int64_t aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
30
const nsString& aTitle, int64_t aFrecency,
31
const VisitsArray& aVisits);
32
33
private:
34
~PlaceInfo() {}
35
36
const int64_t mId;
37
const nsCString mGUID;
38
nsCOMPtr<nsIURI> mURI;
39
const nsString mTitle;
40
const int64_t mFrecency;
41
const VisitsArray mVisits;
42
bool mVisitsAvailable;
43
};
44
45
} // namespace places
46
} // namespace mozilla
47
48
#endif // mozilla_places_PlaceInfo_h__