mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1058669 - Expand NS_IMPL_GETSET macro in nsDirIndex. r=mayhemer
This commit is contained in:
parent
565b752a56
commit
0f1762f547
@ -4,7 +4,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDirIndex.h"
|
||||
#include "nsISupportsObsolete.h"
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsDirIndex,
|
||||
nsIDirIndex)
|
||||
@ -16,9 +15,23 @@ nsDirIndex::nsDirIndex() : mType(TYPE_UNKNOWN),
|
||||
|
||||
nsDirIndex::~nsDirIndex() {}
|
||||
|
||||
NS_IMPL_GETSET(nsDirIndex, Type, uint32_t, mType)
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::GetType(uint32_t* aType)
|
||||
{
|
||||
if (!aType) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
// GETSET macros for modern strings would be nice...
|
||||
*aType = mType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::SetType(uint32_t aType)
|
||||
{
|
||||
mType = aType;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::GetContentType(char* *aContentType) {
|
||||
@ -65,6 +78,38 @@ nsDirIndex::SetDescription(const char16_t* aDescription) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMPL_GETSET(nsDirIndex, Size, int64_t, mSize)
|
||||
NS_IMPL_GETSET(nsDirIndex, LastModified, PRTime, mLastModified)
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::GetSize(int64_t* aSize)
|
||||
{
|
||||
if (!aSize) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aSize = mSize;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::SetSize(int64_t aSize)
|
||||
{
|
||||
mSize = aSize;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::GetLastModified(PRTime* aLastModified)
|
||||
{
|
||||
if (!aLastModified) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aLastModified = mLastModified;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDirIndex::SetLastModified(PRTime aLastModified)
|
||||
{
|
||||
mLastModified = aLastModified;
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user