1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_MIDIPortInterface_h
8 #define mozilla_dom_MIDIPortInterface_h
10 #include "mozilla/dom/MIDIPortBinding.h"
12 namespace mozilla::dom
{
15 * Base class for MIDIPort Parent/Child Actors. Makes sure both sides of the
16 * MIDIPort IPC connection need to a synchronized set of info/state.
19 class MIDIPortInterface
{
21 MIDIPortInterface(const MIDIPortInfo
& aPortInfo
, bool aSysexEnabled
);
22 const nsString
& Id() const { return mId
; }
23 const nsString
& Name() const { return mName
; }
24 const nsString
& Manufacturer() const { return mManufacturer
; }
25 const nsString
& Version() const { return mVersion
; }
26 bool SysexEnabled() const { return mSysexEnabled
; }
27 MIDIPortType
Type() const { return mType
; }
28 MIDIPortDeviceState
DeviceState() const { return mDeviceState
; }
29 MIDIPortConnectionState
ConnectionState() const { return mConnectionState
; }
30 bool IsShutdown() const { return mShuttingDown
; }
31 virtual void Shutdown();
34 virtual ~MIDIPortInterface();
37 nsString mManufacturer
;
41 MIDIPortDeviceState mDeviceState
;
42 MIDIPortConnectionState mConnectionState
;
46 } // namespace mozilla::dom
48 #endif // mozilla_dom_MIDIPortInterface_h