diff --git a/src/servers/midi/MidiServerApp.cpp b/src/servers/midi/MidiServerApp.cpp index a039ecdc7b..e520907b08 100644 --- a/src/servers/midi/MidiServerApp.cpp +++ b/src/servers/midi/MidiServerApp.cpp @@ -10,18 +10,18 @@ #include "MidiServerApp.h" //------------------------------------------------------------------------------ -//Constructor + MidiServerApp::MidiServerApp() - : BApplication("application/x-vnd.obos-midi-roster") + : BApplication(MIDI_SERVER_SIGNATURE) { - roster = new BMidiRoster(); + //roster = new BMidiRoster(); } //------------------------------------------------------------------------------ -//Destructor -MidiRosterApp:: ~MidiRosterApp(void) -{//ToTest - delete EndPointList; + +MidiServerApp::~MidiServerApp(void) +{ + //delete endpoints; } //------------------------------------------------------------------------------ @@ -36,28 +36,29 @@ void MidiServerApp::AboutRequested() //------------------------------------------------------------------------------ -void MidiServerApp::MessageReceived(BMessage *msg) -{//ToDo +void MidiServerApp::MessageReceived(BMessage* msg) +{ switch (msg->what) { - default : BApplication::MessageReceived(msg); + default: super::MessageReceived(msg); break; } } //------------------------------------------------------------------------------ -int32 MidiServerApp::GetNextFreeID(void) -{//ToTest - return NextFreeID++; -} +/*int32 MidiServerApp::GetNextFreeID() +{ + return nextFreeID++; +}*/ //------------------------------------------------------------------------------ -BMidiEndpoint *MidiServerApp::NextEndPoint(int32 *id) -{//ToTest -int32 item = 0; -BMidiEndpoint *endpoint; - while ((endpoint = (BMidiEndpoint*)EndPointList->ItemAt(item)) != NULL) +/*BMidiEndpoint* MidiServerApp::NextEndPoint(int32* id) +{ + int32 item = 0; + BMidiEndpoint *endpoint; + + while ((endpoint = (BMidiEndpoint*) endpoints->ItemAt(item)) != NULL) { if (endpoint->ID() > *id) { @@ -67,32 +68,16 @@ BMidiEndpoint *endpoint; } item++; } -return NULL; -} + return NULL; +}*/ //------------------------------------------------------------------------------ -BMidiRoster *MidiServerApp::GetRoster() +/*BMidiRoster* MidiServerApp::GetRoster() { return roster; -} +}*/ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ //------------------------------------------------------------------------------ int main() diff --git a/src/servers/midi/MidiServerApp.h b/src/servers/midi/MidiServerApp.h index 69091a6551..63d618ab74 100644 --- a/src/servers/midi/MidiServerApp.h +++ b/src/servers/midi/MidiServerApp.h @@ -2,6 +2,7 @@ * @file MidiServerApp.h * * @author Matthijs Hollemans + * @author Jerome Leveque */ #ifndef MIDI_SERVER_APP_H @@ -9,6 +10,8 @@ #include +#define MIDI_SERVER_SIGNATURE "application/x-vnd.OpenBeOS-midi-server" + /** * The BApplication that drives the midi_server. */ @@ -16,20 +19,23 @@ class MidiServerApp : public BApplication { public: MidiServerApp(); + virtual ~MidiServerApp(); + virtual void AboutRequested(); + virtual void MessageReceived(BMessage* msg); - int32 GetNextFreeID(void); - BMidiEndpoint *NextEndPoint(int32 *id); - BMidiRoster *GetRoster(); - - void MessageReceived(BMessage *msg); - + //int32 GetNextFreeID(); + //BMidiEndpoint* NextEndPoint(int32* id); + //BMidiRoster* GetRoster(); private: - BList *EndPointList; - int32 NextFreeID; - BMidiRoster *roster; - + + /** Our superclass. */ + typedef BApplication super; + + //BList* endpoints; + //int32 nextFreeID; + //BMidiRoster* roster; }; #endif // MIDI_SERVER_APP_H diff --git a/src/servers/midi/midi_server.rsrc b/src/servers/midi/midi_server.rsrc deleted file mode 100644 index d105535221..0000000000 Binary files a/src/servers/midi/midi_server.rsrc and /dev/null differ