toolkit/components/places/PlaceInfo.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:1570c2fb5095
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
21 class PlaceInfo MOZ_FINAL : public mozIPlaceInfo
22 {
23 public:
24 NS_DECL_ISUPPORTS
25 NS_DECL_MOZIPLACEINFO
26
27 typedef nsTArray< nsCOMPtr<mozIVisitInfo> > VisitsArray;
28
29 PlaceInfo(int64_t aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
30 const nsString& aTitle, int64_t aFrecency);
31 PlaceInfo(int64_t aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
32 const nsString& aTitle, int64_t aFrecency,
33 const VisitsArray& aVisits);
34
35 private:
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__

mercurial