mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
75 lines
1.6 KiB
C++
75 lines
1.6 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
|
|
#include "mozilla/dom/Directory.h"
|
|
#include "mozilla/dom/DirectoryBinding.h"
|
|
|
|
#include "nsStringGlue.h"
|
|
|
|
// Resolve the name collision of Microsoft's API name with macros defined in
|
|
// Windows header files. Undefine the macro of CreateDirectory to avoid
|
|
// Directory#CreateDirectory being replaced by Directory#CreateDirectoryW.
|
|
#ifdef CreateDirectory
|
|
#undef CreateDirectory
|
|
#endif
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(Directory)
|
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(Directory)
|
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(Directory)
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Directory)
|
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
|
NS_INTERFACE_MAP_END
|
|
|
|
Directory::Directory()
|
|
{
|
|
SetIsDOMBinding();
|
|
}
|
|
|
|
Directory::~Directory()
|
|
{
|
|
}
|
|
|
|
nsPIDOMWindow*
|
|
Directory::GetParentObject() const
|
|
{
|
|
// TODO
|
|
return nullptr;
|
|
}
|
|
|
|
JSObject*
|
|
Directory::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
|
{
|
|
return DirectoryBinding::Wrap(aCx, aScope, this);
|
|
}
|
|
|
|
void
|
|
Directory::GetName(nsString& aRetval) const
|
|
{
|
|
aRetval.Truncate();
|
|
// TODO
|
|
}
|
|
|
|
already_AddRefed<Promise>
|
|
Directory::CreateDirectory(const nsAString& aPath)
|
|
{
|
|
// TODO
|
|
return nullptr;
|
|
}
|
|
|
|
already_AddRefed<Promise>
|
|
Directory::Get(const nsAString& aPath)
|
|
{
|
|
// TODO
|
|
return nullptr;
|
|
}
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|