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