2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2011-01-14 14:38:34 -08:00
|
|
|
|
|
|
|
#include "VisitInfo.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace places {
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//// VisitInfo
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
VisitInfo::VisitInfo(int64_t aVisitId,
|
2011-01-14 14:38:34 -08:00
|
|
|
PRTime aVisitDate,
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t aTransitionType,
|
2013-03-25 06:44:41 -07:00
|
|
|
already_AddRefed<nsIURI> aReferrer)
|
2011-01-14 14:38:34 -08:00
|
|
|
: mVisitId(aVisitId)
|
|
|
|
, mVisitDate(aVisitDate)
|
|
|
|
, mTransitionType(aTransitionType)
|
|
|
|
, mReferrer(aReferrer)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-06-23 15:40:02 -07:00
|
|
|
VisitInfo::~VisitInfo()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-01-14 14:38:34 -08:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//// mozIVisitInfo
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-08-22 08:56:38 -07:00
|
|
|
VisitInfo::GetVisitId(int64_t* _visitId)
|
2011-01-14 14:38:34 -08:00
|
|
|
{
|
|
|
|
*_visitId = mVisitId;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
VisitInfo::GetVisitDate(PRTime* _visitDate)
|
|
|
|
{
|
|
|
|
*_visitDate = mVisitDate;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-08-22 08:56:38 -07:00
|
|
|
VisitInfo::GetTransitionType(uint32_t* _transitionType)
|
2011-01-14 14:38:34 -08:00
|
|
|
{
|
|
|
|
*_transitionType = mTransitionType;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
VisitInfo::GetReferrerURI(nsIURI** _referrer)
|
|
|
|
{
|
|
|
|
NS_IF_ADDREF(*_referrer = mReferrer);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//// nsISupports
|
|
|
|
|
2014-04-27 00:06:00 -07:00
|
|
|
NS_IMPL_ISUPPORTS(
|
2011-01-14 14:38:34 -08:00
|
|
|
VisitInfo
|
|
|
|
, mozIVisitInfo
|
2011-01-20 11:14:35 -08:00
|
|
|
)
|
2011-01-14 14:38:34 -08:00
|
|
|
|
|
|
|
} // namespace places
|
|
|
|
} // namespace mozilla
|