/src/mozilla-central/toolkit/components/places/VisitInfo.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | #include "VisitInfo.h" |
6 | | #include "nsIURI.h" |
7 | | |
8 | | namespace mozilla { |
9 | | namespace places { |
10 | | |
11 | | //////////////////////////////////////////////////////////////////////////////// |
12 | | //// VisitInfo |
13 | | |
14 | | VisitInfo::VisitInfo(int64_t aVisitId, |
15 | | PRTime aVisitDate, |
16 | | uint32_t aTransitionType, |
17 | | already_AddRefed<nsIURI> aReferrer) |
18 | | : mVisitId(aVisitId) |
19 | | , mVisitDate(aVisitDate) |
20 | | , mTransitionType(aTransitionType) |
21 | | , mReferrer(aReferrer) |
22 | 0 | { |
23 | 0 | } |
24 | | |
25 | | VisitInfo::~VisitInfo() |
26 | 0 | { |
27 | 0 | } |
28 | | |
29 | | //////////////////////////////////////////////////////////////////////////////// |
30 | | //// mozIVisitInfo |
31 | | |
32 | | NS_IMETHODIMP |
33 | | VisitInfo::GetVisitId(int64_t* _visitId) |
34 | 0 | { |
35 | 0 | *_visitId = mVisitId; |
36 | 0 | return NS_OK; |
37 | 0 | } |
38 | | |
39 | | NS_IMETHODIMP |
40 | | VisitInfo::GetVisitDate(PRTime* _visitDate) |
41 | 0 | { |
42 | 0 | *_visitDate = mVisitDate; |
43 | 0 | return NS_OK; |
44 | 0 | } |
45 | | |
46 | | NS_IMETHODIMP |
47 | | VisitInfo::GetTransitionType(uint32_t* _transitionType) |
48 | 0 | { |
49 | 0 | *_transitionType = mTransitionType; |
50 | 0 | return NS_OK; |
51 | 0 | } |
52 | | |
53 | | NS_IMETHODIMP |
54 | | VisitInfo::GetReferrerURI(nsIURI** _referrer) |
55 | 0 | { |
56 | 0 | NS_IF_ADDREF(*_referrer = mReferrer); |
57 | 0 | return NS_OK; |
58 | 0 | } |
59 | | |
60 | | //////////////////////////////////////////////////////////////////////////////// |
61 | | //// nsISupports |
62 | | |
63 | | NS_IMPL_ISUPPORTS( |
64 | | VisitInfo |
65 | | , mozIVisitInfo |
66 | | ) |
67 | | |
68 | | } // namespace places |
69 | | } // namespace mozilla |