Fix FreeBSD build.
[haiku.git] / headers / os / midi2 / MidiEndpoint.h
blob9c801fd7048576b9daa1597714594823a7d83fde
2 #ifndef _MIDI_ENDPOINT_H
3 #define _MIDI_ENDPOINT_H
5 #include <BeBuild.h>
6 #include <Message.h>
7 #include <Midi2Defs.h>
8 #include <OS.h>
9 #include <String.h>
11 class BMidiProducer;
12 class BMidiConsumer;
14 namespace BPrivate { class BMidiRosterLooper; }
16 class BMidiEndpoint
18 public:
20 const char *Name() const;
21 void SetName(const char *name);
23 int32 ID() const;
25 bool IsProducer() const;
26 bool IsConsumer() const;
27 bool IsRemote() const;
28 bool IsLocal() const;
29 bool IsPersistent() const;
30 bool IsValid() const;
32 status_t Release();
33 status_t Acquire();
35 status_t SetProperties(const BMessage *properties);
36 status_t GetProperties(BMessage *properties) const;
38 status_t Register();
39 status_t Unregister();
41 private:
43 friend class BMidiConsumer;
44 friend class BMidiLocalConsumer;
45 friend class BMidiLocalProducer;
46 friend class BMidiProducer;
47 friend class BMidiRoster;
48 friend class BPrivate::BMidiRosterLooper;
50 BMidiEndpoint(const char *name);
51 virtual ~BMidiEndpoint();
53 virtual void _Reserved1();
54 virtual void _Reserved2();
55 virtual void _Reserved3();
56 virtual void _Reserved4();
57 virtual void _Reserved5();
58 virtual void _Reserved6();
59 virtual void _Reserved7();
60 virtual void _Reserved8();
62 status_t SendRegisterRequest(bool);
63 status_t SendChangeRequest(BMessage *);
65 bool IsRegistered() const;
66 bool LockLooper() const;
67 void UnlockLooper() const;
69 int32 fId;
70 BString fName;
71 int32 fRefCount;
72 BMessage *fProperties;
73 bool fIsLocal;
74 bool fIsConsumer;
75 bool fIsRegistered;
76 bool fIsAlive;
78 uint32 _reserved[4];
81 #endif // _MIDI_ENDPOINT_H