1 /** 2 * @file MidiProducer.cpp 3 * 4 * @author Matthijs Hollemans 5 * @author Jerome Leveque 6 */ 7 8 #include "debug.h" 9 #include "MidiProducer.h" 10 #include "MidiEndpoint.h" 11 12 //------------------------------------------------------------------------------ 13 14 status_t BMidiProducer::Connect(BMidiConsumer* toObject) 15 { 16 /* 17 if (toObject != NULL) 18 { 19 if (fConnections->Add(toObject) == true) 20 { 21 fConnectionCount++; 22 } 23 } 24 BMidiRoster *roster = BMidiRoster::MidiRoster(); 25 return roster->Connect(this, toObject); 26 */ 27 return B_ERROR; 28 } 29 30 //------------------------------------------------------------------------------ 31 32 status_t BMidiProducer::Disconnect(BMidiConsumer* toObject) 33 { 34 /* 35 if (toObject != NULL) 36 { 37 if (fConnections->Remove(toObject) == true) 38 { 39 fConnectionCount--; 40 BMidiRoster *roster = BMidiRoster::MidiRoster(); 41 return roster->Disconnect(this, toObject); 42 } 43 } 44 */ 45 return B_ERROR; 46 } 47 48 //------------------------------------------------------------------------------ 49 50 bool BMidiProducer::IsConnected(BMidiConsumer* toObject) const 51 { 52 // return fConnections->IsIn(toObject); 53 return false; 54 } 55 56 //------------------------------------------------------------------------------ 57 58 BList* BMidiProducer::Connections() const 59 { 60 // return fConnections; 61 return NULL; 62 } 63 64 //------------------------------------------------------------------------------ 65 66 BMidiProducer::BMidiProducer(const char* name) 67 : BMidiEndpoint(name) 68 { 69 /* 70 fConnections = new BMidiList(); 71 fConnectionCount = 1; 72 fLock = BLocker("BMidiProducer Lock"); 73 */ 74 } 75 76 //------------------------------------------------------------------------------ 77 78 BMidiProducer::~BMidiProducer() 79 { 80 UNIMPLEMENTED 81 } 82 83 //------------------------------------------------------------------------------ 84 85 void BMidiProducer::_Reserved1() { } 86 void BMidiProducer::_Reserved2() { } 87 void BMidiProducer::_Reserved3() { } 88 void BMidiProducer::_Reserved4() { } 89 void BMidiProducer::_Reserved5() { } 90 void BMidiProducer::_Reserved6() { } 91 void BMidiProducer::_Reserved7() { } 92 void BMidiProducer::_Reserved8() { } 93 94 //------------------------------------------------------------------------------ 95 96