/src/mozilla-central/netwerk/streamconv/converters/nsDirIndex.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
3 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | | |
6 | | #include "nsDirIndex.h" |
7 | | |
8 | | NS_IMPL_ISUPPORTS(nsDirIndex, |
9 | | nsIDirIndex) |
10 | | |
11 | | nsDirIndex::nsDirIndex() : mType(TYPE_UNKNOWN), |
12 | | mSize(UINT64_MAX), |
13 | | mLastModified(-1LL) |
14 | 0 | { |
15 | 0 | } |
16 | | |
17 | | NS_IMETHODIMP |
18 | | nsDirIndex::GetType(uint32_t* aType) |
19 | 0 | { |
20 | 0 | NS_ENSURE_ARG_POINTER(aType); |
21 | 0 |
|
22 | 0 | *aType = mType; |
23 | 0 | return NS_OK; |
24 | 0 | } |
25 | | |
26 | | NS_IMETHODIMP |
27 | | nsDirIndex::SetType(uint32_t aType) |
28 | 0 | { |
29 | 0 | mType = aType; |
30 | 0 | return NS_OK; |
31 | 0 | } |
32 | | |
33 | | NS_IMETHODIMP |
34 | | nsDirIndex::GetContentType(nsACString& aContentType) |
35 | 0 | { |
36 | 0 | aContentType = mContentType; |
37 | 0 | return NS_OK; |
38 | 0 | } |
39 | | |
40 | | NS_IMETHODIMP |
41 | | nsDirIndex::SetContentType(const nsACString& aContentType) |
42 | 0 | { |
43 | 0 | mContentType = aContentType; |
44 | 0 | return NS_OK; |
45 | 0 | } |
46 | | |
47 | | NS_IMETHODIMP |
48 | | nsDirIndex::GetLocation(nsACString& aLocation) |
49 | 0 | { |
50 | 0 | aLocation = mLocation; |
51 | 0 | return NS_OK; |
52 | 0 | } |
53 | | |
54 | | NS_IMETHODIMP |
55 | | nsDirIndex::SetLocation(const nsACString& aLocation) |
56 | 0 | { |
57 | 0 | mLocation = aLocation; |
58 | 0 | return NS_OK; |
59 | 0 | } |
60 | | |
61 | | NS_IMETHODIMP |
62 | | nsDirIndex::GetDescription(nsAString& aDescription) |
63 | 0 | { |
64 | 0 | aDescription = mDescription; |
65 | 0 | return NS_OK; |
66 | 0 | } |
67 | | |
68 | | NS_IMETHODIMP |
69 | | nsDirIndex::SetDescription(const nsAString& aDescription) |
70 | 0 | { |
71 | 0 | mDescription = aDescription; |
72 | 0 | return NS_OK; |
73 | 0 | } |
74 | | |
75 | | NS_IMETHODIMP |
76 | | nsDirIndex::GetSize(int64_t* aSize) |
77 | 0 | { |
78 | 0 | NS_ENSURE_ARG_POINTER(aSize); |
79 | 0 |
|
80 | 0 | *aSize = mSize; |
81 | 0 | return NS_OK; |
82 | 0 | } |
83 | | |
84 | | NS_IMETHODIMP |
85 | | nsDirIndex::SetSize(int64_t aSize) |
86 | 0 | { |
87 | 0 | mSize = aSize; |
88 | 0 | return NS_OK; |
89 | 0 | } |
90 | | |
91 | | NS_IMETHODIMP |
92 | | nsDirIndex::GetLastModified(PRTime* aLastModified) |
93 | 0 | { |
94 | 0 | NS_ENSURE_ARG_POINTER(aLastModified); |
95 | 0 |
|
96 | 0 | *aLastModified = mLastModified; |
97 | 0 | return NS_OK; |
98 | 0 | } |
99 | | |
100 | | NS_IMETHODIMP |
101 | | nsDirIndex::SetLastModified(PRTime aLastModified) |
102 | 0 | { |
103 | 0 | mLastModified = aLastModified; |
104 | 0 | return NS_OK; |
105 | 0 | } |