From 3569d43900da6ccd6095f014d1eda95f7728cdb2 Mon Sep 17 00:00:00 2001 From: mahlzeit Date: Tue, 31 Dec 2002 14:26:15 +0000 Subject: [PATCH] Checkin of the sources for midi2 kit milestone 1. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2336 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/midi/protocol.h | 89 +++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 headers/private/midi/protocol.h diff --git a/headers/private/midi/protocol.h b/headers/private/midi/protocol.h new file mode 100644 index 0000000000..78bd7ecf01 --- /dev/null +++ b/headers/private/midi/protocol.h @@ -0,0 +1,89 @@ +/** + * @file protocol.h + * + * Definitions for the communications protocol between + * libmidi2.so and the midi_server. + * + * @author Matthijs Hollemans + */ + +#ifndef MIDI_PROTOCOL_H +#define MIDI_PROTOCOL_H + +/** MIME signature of the midi_server application. */ +#define MIDI_SERVER_SIGNATURE "application/x-vnd.OpenBeOS.midi-server" + +/** Timeout for delivering and responding to messages (microseconds). */ +#define TIMEOUT 2000000 + +/** Received when a new app starts using the Midi Kit. */ +#define MSG_REGISTER_APP 'Mapp' + +/** Sent when we have completed a "register app" request. */ +#define MSG_APP_REGISTERED 'mAPP' + +/** Received when an app creates a new local endpoint. */ +#define MSG_CREATE_ENDPOINT 'Mnew' + +/** + * Sent to all other applications when an app creates a + * new endpoint. Also sent when an application registers + * with the midi_server (MSG_REGISTER_APP). + */ +#define MSG_ENDPOINT_CREATED 'mNEW' + +/** Received when an app deletes a local endpoint. */ +#define MSG_DELETE_ENDPOINT 'Mdel' + +/** + * The midi_server sends this message to itself when an app + * dies and its endpoints must be removed from the roster. + */ +#define MSG_PURGE_ENDPOINT 'Mdie' + +/** + * Sent to all applications when an endpoint is deleted, + * either by the app that owned it, or by the midi_server + * if the owner app has died. + */ +#define MSG_ENDPOINT_DELETED 'mDEL' + +/** + * Received when an app changes the attributes of one + * of its local endpoints. + */ +#define MSG_CHANGE_ENDPOINT 'Mchg' + +/** + * Sent to all other applications when an app changes + * the attributes of one of its local endpoints. + */ +#define MSG_ENDPOINT_CHANGED 'mCHG' + +/** + * Received when an app wants to establish a connection + * between a producer and a consumer. + */ +#define MSG_CONNECT_ENDPOINTS 'Mcon' + +/** + * Sent to all other applications when an app establishes + * a connection between a producer and a consumer. Like + * MSG_ENDPOINT_CREATED, this notification is also sent to + * applications when they register with the midi_server. + */ +#define MSG_ENDPOINTS_CONNECTED 'mCON' + +/** + * Received when an app wants to break a connection + * between a producer and a consumer. + */ +#define MSG_DISCONNECT_ENDPOINTS 'Mdis' + +/** + * Sent to all other applications when an app breaks + * a connection between a producer and a consumer. + */ +#define MSG_ENDPOINTS_DISCONNECTED 'mDIS' + +#endif // MIDI_PROTOCOL_H