1 #ifndef _MIDI_ENDPOINT_H 2 #define _MIDI_ENDPOINT_H 3 4 #ifndef _BE_BUILD_H 5 #include <BeBuild.h> 6 #endif 7 #include <Midi2Defs.h> 8 #include <OS.h> 9 10 #include <String.h> 11 12 class BMidiList; 13 class BList; 14 15 class BMidiProducer; 16 class BMidiConsumer; 17 18 class BMidiList; 19 20 // dynamic_cast<BMidiProducer*> (ptr_to_endpoint) 21 22 class BMidiEndpoint 23 { 24 public: 25 const char *Name() const; 26 void SetName(const char *name); 27 28 int32 ID() const; 29 30 bool IsProducer() const; 31 bool IsConsumer() const; 32 bool IsRemote() const; 33 bool IsLocal() const; 34 bool IsPersistent() const; 35 bool IsValid() const; 36 37 status_t Release(); 38 status_t Acquire(); 39 40 status_t SetProperties(const BMessage *props); 41 status_t GetProperties(BMessage *props) const; 42 43 status_t Register(void); 44 status_t Unregister(void); 45 46 private: 47 friend class BMidiRoster; 48 friend class BMidiProducer; 49 friend class BMidiConsumer; 50 friend class BMidiLocalProducer; 51 friend class BMidiLocalConsumer; 52 friend class BMidiList; 53 54 BMidiEndpoint(const char *name); 55 virtual ~BMidiEndpoint(); 56 BMidiEndpoint(const BMidiEndpoint &) {} 57 BMidiEndpoint& operator=(const BMidiEndpoint &) { return *this; } 58 59 virtual void _Reserved1(); 60 virtual void _Reserved2(); 61 virtual void _Reserved3(); 62 virtual void _Reserved4(); 63 virtual void _Reserved5(); 64 virtual void _Reserved6(); 65 virtual void _Reserved7(); 66 virtual void _Reserved8(); 67 68 int32 fID; 69 BString fName; 70 status_t fStatus; 71 72 int32 fFlags; 73 int32 fRefCount; 74 75 uint32 _reserved[4]; 76 }; 77 78 #endif 79