Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / midi / MIDIPortInterface.h
blob360750e6e5cd0f0874e861afe3c1290e9d53ee70
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 {
13 class MIDIPortInfo;
14 /**
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 {
20 public:
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();
33 protected:
34 virtual ~MIDIPortInterface();
35 nsString mId;
36 nsString mName;
37 nsString mManufacturer;
38 nsString mVersion;
39 bool mSysexEnabled;
40 MIDIPortType mType;
41 MIDIPortDeviceState mDeviceState;
42 MIDIPortConnectionState mConnectionState;
43 bool mShuttingDown;
46 } // namespace mozilla::dom
48 #endif // mozilla_dom_MIDIPortInterface_h