2002-12-31 17:25:02 +03:00
|
|
|
|
2002-10-23 17:24:57 +04:00
|
|
|
#ifndef _MIDI_ENDPOINT_H
|
|
|
|
#define _MIDI_ENDPOINT_H
|
|
|
|
|
|
|
|
#include <BeBuild.h>
|
2006-06-16 03:41:26 +04:00
|
|
|
#include <Message.h>
|
2002-10-23 17:24:57 +04:00
|
|
|
#include <Midi2Defs.h>
|
|
|
|
#include <OS.h>
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
class BMidiProducer;
|
|
|
|
class BMidiConsumer;
|
|
|
|
|
2004-05-13 14:55:10 +04:00
|
|
|
namespace BPrivate { class BMidiRosterLooper; }
|
|
|
|
|
2002-10-23 17:24:57 +04:00
|
|
|
class BMidiEndpoint
|
|
|
|
{
|
|
|
|
public:
|
2002-12-31 17:25:02 +03:00
|
|
|
|
|
|
|
const char* Name() const;
|
|
|
|
void SetName(const char* name);
|
2002-10-23 17:24:57 +04:00
|
|
|
|
|
|
|
int32 ID() const;
|
|
|
|
|
|
|
|
bool IsProducer() const;
|
|
|
|
bool IsConsumer() const;
|
|
|
|
bool IsRemote() const;
|
|
|
|
bool IsLocal() const;
|
|
|
|
bool IsPersistent() const;
|
|
|
|
bool IsValid() const;
|
|
|
|
|
|
|
|
status_t Release();
|
|
|
|
status_t Acquire();
|
|
|
|
|
2002-12-31 17:25:02 +03:00
|
|
|
status_t SetProperties(const BMessage* properties);
|
|
|
|
status_t GetProperties(BMessage* properties) const;
|
2002-10-23 17:24:57 +04:00
|
|
|
|
2006-09-13 17:30:33 +04:00
|
|
|
status_t Register();
|
|
|
|
status_t Unregister();
|
2002-10-23 17:24:57 +04:00
|
|
|
|
|
|
|
private:
|
2002-12-31 17:25:02 +03:00
|
|
|
|
2002-10-23 17:24:57 +04:00
|
|
|
friend class BMidiConsumer;
|
|
|
|
friend class BMidiLocalConsumer;
|
2002-12-31 17:25:02 +03:00
|
|
|
friend class BMidiLocalProducer;
|
|
|
|
friend class BMidiProducer;
|
|
|
|
friend class BMidiRoster;
|
2004-05-13 14:55:10 +04:00
|
|
|
friend class BPrivate::BMidiRosterLooper;
|
2002-10-23 17:24:57 +04:00
|
|
|
|
2002-12-31 17:25:02 +03:00
|
|
|
BMidiEndpoint(const char* name);
|
2002-10-23 17:24:57 +04:00
|
|
|
virtual ~BMidiEndpoint();
|
2002-12-31 17:25:02 +03:00
|
|
|
|
2002-10-23 17:24:57 +04:00
|
|
|
virtual void _Reserved1();
|
|
|
|
virtual void _Reserved2();
|
|
|
|
virtual void _Reserved3();
|
|
|
|
virtual void _Reserved4();
|
|
|
|
virtual void _Reserved5();
|
|
|
|
virtual void _Reserved6();
|
|
|
|
virtual void _Reserved7();
|
|
|
|
virtual void _Reserved8();
|
|
|
|
|
2002-12-31 17:25:02 +03:00
|
|
|
status_t SendRegisterRequest(bool);
|
|
|
|
status_t SendChangeRequest(BMessage*);
|
|
|
|
|
|
|
|
bool IsRegistered() const;
|
|
|
|
bool LockLooper() const;
|
|
|
|
void UnlockLooper() const;
|
|
|
|
|
2006-06-16 19:38:29 +04:00
|
|
|
int32 fId;
|
|
|
|
BString fName;
|
|
|
|
int32 fRefCount;
|
2006-06-17 18:04:46 +04:00
|
|
|
BMessage *fProperties;
|
2006-06-16 19:38:29 +04:00
|
|
|
bool fIsLocal;
|
|
|
|
bool fIsConsumer;
|
|
|
|
bool fIsRegistered;
|
|
|
|
bool fIsAlive;
|
2002-10-23 17:24:57 +04:00
|
|
|
|
|
|
|
uint32 _reserved[4];
|
|
|
|
};
|
|
|
|
|
2002-12-31 17:25:02 +03:00
|
|
|
#endif // _MIDI_ENDPOINT_H
|