1*1df1f394Smahlzeit 24614b80eSbeveloper #ifndef _MIDI_ENDPOINT_H 34614b80eSbeveloper #define _MIDI_ENDPOINT_H 44614b80eSbeveloper 54614b80eSbeveloper #include <BeBuild.h> 64614b80eSbeveloper #include <Midi2Defs.h> 74614b80eSbeveloper #include <OS.h> 84614b80eSbeveloper #include <String.h> 94614b80eSbeveloper 104614b80eSbeveloper class BMidiProducer; 114614b80eSbeveloper class BMidiConsumer; 124614b80eSbeveloper 134614b80eSbeveloper class BMidiEndpoint 144614b80eSbeveloper { 154614b80eSbeveloper public: 16*1df1f394Smahlzeit 174614b80eSbeveloper const char* Name() const; 184614b80eSbeveloper void SetName(const char* name); 194614b80eSbeveloper 204614b80eSbeveloper int32 ID() const; 214614b80eSbeveloper 224614b80eSbeveloper bool IsProducer() const; 234614b80eSbeveloper bool IsConsumer() const; 244614b80eSbeveloper bool IsRemote() const; 254614b80eSbeveloper bool IsLocal() const; 264614b80eSbeveloper bool IsPersistent() const; 274614b80eSbeveloper bool IsValid() const; 284614b80eSbeveloper 294614b80eSbeveloper status_t Release(); 304614b80eSbeveloper status_t Acquire(); 314614b80eSbeveloper 32*1df1f394Smahlzeit status_t SetProperties(const BMessage* properties); 33*1df1f394Smahlzeit status_t GetProperties(BMessage* properties) const; 344614b80eSbeveloper 354614b80eSbeveloper status_t Register(void); 364614b80eSbeveloper status_t Unregister(void); 374614b80eSbeveloper 384614b80eSbeveloper private: 39*1df1f394Smahlzeit 404614b80eSbeveloper friend class BMidiConsumer; 414614b80eSbeveloper friend class BMidiLocalConsumer; 42*1df1f394Smahlzeit friend class BMidiLocalProducer; 43*1df1f394Smahlzeit friend class BMidiProducer; 44*1df1f394Smahlzeit friend class BMidiRoster; 45*1df1f394Smahlzeit friend class BMidiRosterLooper; 464614b80eSbeveloper 474614b80eSbeveloper BMidiEndpoint(const char* name); 484614b80eSbeveloper virtual ~BMidiEndpoint(); 494614b80eSbeveloper 504614b80eSbeveloper virtual void _Reserved1(); 514614b80eSbeveloper virtual void _Reserved2(); 524614b80eSbeveloper virtual void _Reserved3(); 534614b80eSbeveloper virtual void _Reserved4(); 544614b80eSbeveloper virtual void _Reserved5(); 554614b80eSbeveloper virtual void _Reserved6(); 564614b80eSbeveloper virtual void _Reserved7(); 574614b80eSbeveloper virtual void _Reserved8(); 584614b80eSbeveloper 59*1df1f394Smahlzeit status_t SendRegisterRequest(bool); 60*1df1f394Smahlzeit status_t SendChangeRequest(BMessage*); 614614b80eSbeveloper 62*1df1f394Smahlzeit bool IsRegistered() const; 63*1df1f394Smahlzeit bool LockLooper() const; 64*1df1f394Smahlzeit void UnlockLooper() const; 65*1df1f394Smahlzeit 66*1df1f394Smahlzeit int32 id; 67*1df1f394Smahlzeit BString name; 68*1df1f394Smahlzeit int32 refCount; 69*1df1f394Smahlzeit BMessage* properties; 70*1df1f394Smahlzeit bool isLocal; 71*1df1f394Smahlzeit bool isConsumer; 72*1df1f394Smahlzeit bool isRegistered; 73*1df1f394Smahlzeit bool isAlive; 744614b80eSbeveloper 754614b80eSbeveloper uint32 _reserved[4]; 764614b80eSbeveloper }; 774614b80eSbeveloper 78*1df1f394Smahlzeit #endif // _MIDI_ENDPOINT_H 79