toolkit/components/places/PlaceInfo.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/places/PlaceInfo.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef mozilla_places_PlaceInfo_h__
     1.9 +#define mozilla_places_PlaceInfo_h__
    1.10 +
    1.11 +#include "mozIAsyncHistory.h"
    1.12 +#include "nsString.h"
    1.13 +#include "nsTArray.h"
    1.14 +#include "nsAutoPtr.h"
    1.15 +#include "mozilla/Attributes.h"
    1.16 +
    1.17 +class nsIURI;
    1.18 +class mozIVisitInfo;
    1.19 +
    1.20 +namespace mozilla {
    1.21 +namespace places {
    1.22 +
    1.23 +
    1.24 +class PlaceInfo MOZ_FINAL : public mozIPlaceInfo
    1.25 +{
    1.26 +public:
    1.27 +  NS_DECL_ISUPPORTS
    1.28 +  NS_DECL_MOZIPLACEINFO
    1.29 +
    1.30 +  typedef nsTArray< nsCOMPtr<mozIVisitInfo> > VisitsArray;
    1.31 +
    1.32 +  PlaceInfo(int64_t aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
    1.33 +            const nsString& aTitle, int64_t aFrecency);
    1.34 +  PlaceInfo(int64_t aId, const nsCString& aGUID, already_AddRefed<nsIURI> aURI,
    1.35 +            const nsString& aTitle, int64_t aFrecency,
    1.36 +            const VisitsArray& aVisits);
    1.37 +
    1.38 +private:
    1.39 +  const int64_t mId;
    1.40 +  const nsCString mGUID;
    1.41 +  nsCOMPtr<nsIURI> mURI;
    1.42 +  const nsString mTitle;
    1.43 +  const int64_t mFrecency;
    1.44 +  const VisitsArray mVisits;
    1.45 +  bool mVisitsAvailable;
    1.46 +};
    1.47 +
    1.48 +} // namespace places
    1.49 +} // namespace mozilla
    1.50 +
    1.51 +#endif // mozilla_places_PlaceInfo_h__

mercurial