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