mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-28 11:27:32 +09:00
WebUSB pt.3
This commit is contained in:
parent
c68c8eb0b7
commit
83e4aee77c
7 changed files with 54 additions and 17 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#define mozilla_dom_USBConfiguration_h
|
||||
|
||||
#include "mozilla/dom/Nullable.h"
|
||||
#include "mozilla/dom/DOMString.h"
|
||||
#include "mozilla/dom/USBInterface.h"
|
||||
#include "mozilla/dom/USBBinding.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
@ -21,7 +22,11 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(USBConfiguration)
|
||||
nsISupports* GetParentObject() const { return mOwner; }
|
||||
uint8_t ConfigurationValue() const { return mValue; }
|
||||
void GetConfigurationName(Nullable<nsString>& aValue) const { aValue = mName; }
|
||||
void GetConfigurationName(DOMString& aValue) const
|
||||
{
|
||||
if (mName.IsNull()) aValue.SetNull();
|
||||
else aValue.SetOwnedString(mName.Value());
|
||||
}
|
||||
void GetInterfaces(nsTArray<RefPtr<USBInterface>>& aValue) const { aValue = mInterfaces; }
|
||||
JSObject* WrapObject(JSContext*, JS::Handle<JSObject*>) override;
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue