Continue conversion to the new structure. I have some more ideas on the structure, but that will come in a next iteration.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18848 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Niels Sascha Reedijk
2006-09-14 21:44:35 +00:00
parent e20af02a1d
commit 770684cf94
6 changed files with 174 additions and 137 deletions
+1 -1
View File
@@ -50,7 +50,7 @@
<para> <para>
The old Midi Kit is slowly fading into obscurity. You may want to use the The old Midi Kit is slowly fading into obscurity. You may want to use the
<xref linkend="midi2"/> instead. Also note that the Haiku implementation <link linkend="midi2">MIDI 2 Kit</link> instead. Also note that the Haiku implementation
of the kit sometimes behaves differently than the one from BeOS R5 or what of the kit sometimes behaves differently than the one from BeOS R5 or what
the BeBook says, but usually for the better ;-) the BeBook says, but usually for the better ;-)
</para> </para>
+31 -26
View File
@@ -10,35 +10,40 @@
<!ENTITY midi2producer SYSTEM "midi2producer.xml"> <!ENTITY midi2producer SYSTEM "midi2producer.xml">
<!ENTITY midi2roster SYSTEM "midi2roster.xml"> <!ENTITY midi2roster SYSTEM "midi2roster.xml">
<!ENTITY bmidiroster "<link linkend='bmidiroster'><classname>BMidiRoster</classname></link>"> <!ENTITY BMidiRoster "<link linkend='bmidiroster'><classname>BMidiRoster</classname></link>">
<!ENTITY bmidiroster_register "<link linkend='bmidiroster_register'><function>Register()</function></link>"> <!ENTITY BMidiRoster_Register "<link linkend='bmidiroster_register'><function>Register()</function></link>">
<!ENTITY bmidiroster_unregister "<link linkend='bmidiroster_unregister'><function>Unregister()</function></link>"> <!ENTITY BMidiRoster_Unregister "<link linkend='bmidiroster_unregister'><function>Unregister()</function></link>">
<!ENTITY bmidiroster_startwatching "<link linkend='bmidiroster_startwatching'><function>StartWatching()</function></link>"> <!ENTITY BMidiRoster_StartWatching "<link linkend='bmidiroster_startwatching'><function>StartWatching()</function></link>">
<!ENTITY bmidiendpoint "<link linkend='bmidiendpoint'><classname>BMidiEndpoint</classname></link>"> <!ENTITY BMidiEndpoint "<link linkend='bmidiendpoint'><classname>BMidiEndpoint</classname></link>">
<!ENTITY bmidiendpoint_name "<link linkend='bmidiendpoint_name'><function>Name()</function></link>"> <!ENTITY BMidiEndpoint_Name "<link linkend='bmidiendpoint_name'><function>Name()</function></link>">
<!ENTITY bmidiendpoint_setname "<link linkend='bmidiendpoint_setname'><function>SetName()</function></link>"> <!ENTITY BMidiEndpoint_SetName "<link linkend='bmidiendpoint_setname'><function>SetName()</function></link>">
<!ENTITY bmidiendpoint_id "<link linkend='bmidiendpoint_id'><function>ID()</function></link>"> <!ENTITY BMidiEndpoint_ID "<link linkend='bmidiendpoint_id'><function>ID()</function></link>">
<!ENTITY bmidiendpoint_register "<link linkend='bmidiendpoint_register'><function>Register()</function></link>"> <!ENTITY BMidiEndpoint_Register "<link linkend='bmidiendpoint_register'><function>Register()</function></link>">
<!ENTITY bmidiendpoint_unregister "<link linkend='bmidiendpoint_unregister'><function>Unregister()</function></link>"> <!ENTITY BMidiEndpoint_Unregister "<link linkend='bmidiendpoint_unregister'><function>Unregister()</function></link>">
<!ENTITY bmidiendpoint_isproducer "<link linkend='bmidiendpoint_isproducer'><function>IsProducer()</function></link>"> <!ENTITY BMidiEndpoint_IsProducer "<link linkend='bmidiendpoint_isproducer'><function>IsProducer()</function></link>">
<!ENTITY bmidiendpoint_isconsumer "<link linkend='bmidiendpoint_isconsumer'><function>IsConsumer()</function></link>"> <!ENTITY BMidiEndpoint_IsConsumer "<link linkend='bmidiendpoint_isconsumer'><function>IsConsumer()</function></link>">
<!ENTITY bmidiendpoint_isremote "<link linkend='bmidiendpoint_isremote'><function>IsRemote()</function></link>"> <!ENTITY BMidiEndpoint_IsRemote "<link linkend='bmidiendpoint_isremote'><function>IsRemote()</function></link>">
<!ENTITY bmidiendpoint_islocal "<link linkend='bmidiendpoint_islocal'><function>IsLocal()</function></link>"> <!ENTITY BMidiEndpoint_IsLocal "<link linkend='bmidiendpoint_islocal'><function>IsLocal()</function></link>">
<!ENTITY bmidiendpoint_ispersistent "<link linkend='bmidiendpoint_ispersistent'><function>IsPersistent()</function></link>"> <!ENTITY BMidiEndpoint_IsPersistent "<link linkend='bmidiendpoint_ispersistent'><function>IsPersistent()</function></link>">
<!ENTITY bmidiendpoint_isvalid "<link linkend='bmidiendpoint_isvalid'><function>IsValid()</function></link>"> <!ENTITY BMidiEndpoint_IsValid "<link linkend='bmidiendpoint_isvalid'><function>IsValid()</function></link>">
<!ENTITY bmidiendpoint_Acquire "<link linkend='bmidiendpoint_acquire'><function>Acquire()</function></link>"> <!ENTITY BMidiEndpoint_Acquire "<link linkend='bmidiendpoint_acquire'><function>Acquire()</function></link>">
<!ENTITY bmidiendpoint_Release "<link linkend='bmidiendpoint_release'><function>Release()</function></link>"> <!ENTITY BMidiEndpoint_Release "<link linkend='bmidiendpoint_release'><function>Release()</function></link>">
<!ENTITY bmidiendpoint_SetProperties "<link linkend='bmidiendpoint_setproperties'><function>SetProperties()</function></link>"> <!ENTITY BMidiEndpoint_SetProperties "<link linkend='bmidiendpoint_setproperties'><function>SetProperties()</function></link>">
<!ENTITY bmidiendpoint_GetProperties "<link linkend='bmidiendpoint_getproperies'><function>GetProperties()</function></link>"> <!ENTITY BMidiEndpoint_GetProperties "<link linkend='bmidiendpoint_getproperties'><function>GetProperties()</function></link>">
<!ENTITY bmidilocalconsumer "<link linkend='midi2localconsumer'><classname>BMidiLocalConsumer</classname></link>"> <!ENTITY BMidiLocalConsumer "<link linkend='midi2localconsumer'><classname>BMidiLocalConsumer</classname></link>">
<!ENTITY bmidilocalconsumer_channelpressure "<link linkend='bmidilocalconsumer_channelpressure'><function>BMidiLocalConsumer</function></link>"> <!ENTITY BMidiLocalConsumer_ChannelPressure "<link linkend='bmidilocalconsumer_channelpressure'><function>BMidiLocalConsumer</function></link>">
<!ENTITY bmidilocalproducer "<link linkend='bmidilocalproducer'><classname>BMidiLocalProducer</classname></link>"> <!ENTITY BMidiLocalProducer "<link linkend='bmidilocalproducer'><classname>BMidiLocalProducer</classname></link>">
<!ENTITY BMidiProducer "<link linkend='bmidiproducer'><classname>BMidiProducer</classname></link>">
<!ENTITY BMidiProducer_Connect "<link linkend='bmidiproducer_connect'><function>Connect()</function></link>">
<!ENTITY BMidiProducer_Disconnect "<link linkend='bmidiproducer_disconnect'><function>Disconnect()</function></link>">
<!ENTITY BMidiConsumer "<link linkend='bmidiconsumer'><classname>BMidiConsumer</classname></link>">
<!ENTITY BMidiConsumer_Latency "<link linkend='bmidiconsumer_latency'><function>Latency()</function></link>">
<!ENTITY bmidiproducer "<link linkend='bmidiproducer'><classname>BMidiProducer</classname></link>">
<!ENTITY bmidiconsumer "<link linkend='bmidiconsumer'><classname>BMidiConsumer</classname></link>">
]> ]>
<sect1 id="midi2api"> <sect1 id="midi2api">
@@ -46,9 +51,9 @@
&midi2defs; &midi2defs;
&midi2roster; &midi2roster;
&midi2endpoint;
&midi2consumer; &midi2consumer;
&midi2producer; &midi2producer;
&midi2endpoint;
&midi2localconsumer; &midi2localconsumer;
&midi2localproducer; &midi2localproducer;
</sect1> </sect1>
@@ -7,16 +7,22 @@
A consumer is an object that knows how to deal with incoming MIDI events. A A consumer is an object that knows how to deal with incoming MIDI events. A
consumer can be connected to multiple producers at the same time. There is no consumer can be connected to multiple producers at the same time. There is no
way to find out which producers are connected to this consumer just by looking way to find out which producers are connected to this consumer just by looking
at the BMidiConsumer object; you will have to consult BMidiRoster for that. at the &BMidiConsumer; object; you will have to consult &BMidiRoster; for that.
</para> </para>
<para> <para>
A BMidiConsumer either represents a local consumer, i.e. a class extending from A &BMidiConsumer; either represents a local consumer, i.e. a class extending from
BMidiLocalConsumer, or is a proxy for a remote object published by another app. &BMidiLocalConsumer;, or is a proxy for a remote object published by another app.
</para> </para>
<sect3 id="BMidiConsumer_Latency"> <sect3 id="BMidiConsumer_Latency">
<title>bigtime_t Latency() const</title> <title>Latency()</title>
<methodsynopsis>
<type>bigtime_t</type>
<methodname>Latency</methodname>
<modifier>const</modifier>
</methodsynopsis>
<para> <para>
The latency is measured in microseconds. Producers should attempt to get MIDI The latency is measured in microseconds. Producers should attempt to get MIDI
@@ -26,20 +32,22 @@
</para> </para>
<para> <para>
You cannot <emphasis>set</emphasis> the latency on a BMidiConsumer, only on a You cannot <emphasis>set</emphasis> the latency on a &BMidiConsumer;, only on a
BMidiLocalConsumer. &BMidiLocalConsumer;.
</para> </para>
<para> <para>
The latency issue gets slightly more complicated when multiple endpoints are The latency issue gets slightly more complicated when multiple endpoints are
chained together, as in the following picture: chained together, as in the following picture:
<programlisting>
+-------+ +-------------+ +-------+ +-------+ +-------------+ +-------+
| | | | | | | | | | | |
| prodA |---->| consB prodB |---->| consC | | prodA |---->| consB prodB |---->| consC |
| | | | | | | | | | | |
+-------+ +-------------+ +-------+ +-------+ +-------------+ +-------+
appA appB (filter) appC appA appB (filter) appC
</programlisting>
</para> </para>
<para> <para>
@@ -4,24 +4,24 @@
<title>BMidiEndpoint</title> <title>BMidiEndpoint</title>
<para> <para>
The <filename>MidiEndpoint.h</filename> file defines the &bmidiendpoint;, The <filename>MidiEndpoint.h</filename> file defines the &BMidiEndpoint;,
which is the baseclass for all MIDI endpoints. which is the baseclass for all MIDI endpoints.
</para> </para>
<para> <para>
&bmidiendpoint; is the abstract base class that represents either a producer or &BMidiEndpoint; is the abstract base class that represents either a producer or
consumer endpoint. It may be used to obtain the state, name, properties, or consumer endpoint. It may be used to obtain the state, name, properties, or
system-wide ID of the object. &bmidiendpoint; also provides the ability to change system-wide ID of the object. &BMidiEndpoint; also provides the ability to change
the name and properties of endpoints that were created locally. the name and properties of endpoints that were created locally.
</para> </para>
<para> <para>
Remember, you cannot call the destructor of &bmidiendpoint; and its subclasses Remember, you cannot call the destructor of &BMidiEndpoint; and its subclasses
directly. Endpoint objects are destructed automatically when their reference directly. Endpoint objects are destructed automatically when their reference
count drops to zero. If necessary, the destructor of a local endpoint first count drops to zero. If necessary, the destructor of a local endpoint first
breaks off any connections and &bmidiendpoint_unregister;'s the endpoint before it is breaks off any connections and &BMidiEndpoint_Unregister;'s the endpoint before it is
deleted. However, for good style and bonus points you should really deleted. However, for good style and bonus points you should really
BMidiProducer::Disconnect() and &bmidiendpoint_unregister; the object BMidiProducer::Disconnect() and &BMidiEndpoint_Unregister; the object
yourself and not rely on the destructor to do this. yourself and not rely on the destructor to do this.
</para> </para>
@@ -31,7 +31,7 @@
<title>Name()</title> <title>Name()</title>
<methodsynopsis> <methodsynopsis>
<modifier>const</modifier> <type>char *</type> <type>const char *</type>
<methodname>Name</methodname> <methodname>Name</methodname>
<modifier>const</modifier> <modifier>const</modifier>
</methodsynopsis> </methodsynopsis>
@@ -43,11 +43,11 @@
<para> <para>
The function never returns NULL. If you created a local endpoint by passing a The function never returns NULL. If you created a local endpoint by passing a
NULL name into its constructor (or passing no name, which is the same thing), NULL name into its constructor (or passing no name, which is the same thing),
then &bmidiendpoint_name; will return an empty string, not NULL. then &BMidiEndpoint_Name; will return an empty string, not NULL.
</para> </para>
<para> <para>
See also &bmidiendpoint_setname;. See also &BMidiEndpoint_SetName;.
</para> </para>
</sect3> </sect3>
@@ -55,7 +55,7 @@
<title>SetName()</title> <title>SetName()</title>
<methodsynopsis> <methodsynopsis>
<modifier>void</modifier> <methodname>SetName</methodname> <type>void</type> <methodname>SetName</methodname>
<methodparam><modifier>const</modifier><type>char *</type><parameter>name</parameter></methodparam> <methodparam><modifier>const</modifier><type>char *</type><parameter>name</parameter></methodparam>
</methodsynopsis> </methodsynopsis>
@@ -72,7 +72,7 @@
<para> <para>
Even though you can call this function on both remote and local objects, you Even though you can call this function on both remote and local objects, you
are only allowed to change the names of local endpoints; &bmidiendpoint_setname; are only allowed to change the names of local endpoints; &BMidiEndpoint_SetName;
calls on remote endpoints are ignored. calls on remote endpoints are ignored.
</para> </para>
@@ -81,12 +81,12 @@
</para> </para>
<para> <para>
See also &bmidiendpoint_name;. See also &BMidiEndpoint_Name;.
</para> </para>
</sect3> </sect3>
<sect3 id="bmidiendpoint_id"> <sect3 id="bmidiendpoint_id">
<title>int32 BMidiEndpoint::ID() const</title> <title>ID()</title>
<methodsynopsis> <methodsynopsis>
<type>int32</type> <methodname>Name</methodname> <void/> <modifier>const</modifier> <type>int32</type> <methodname>Name</methodname> <void/> <modifier>const</modifier>
@@ -113,7 +113,7 @@
</methodsynopsis> </methodsynopsis>
<para> <para>
Determines whether this endpoint is a &bmidiproducer;. Determines whether this endpoint is a &BMidiProducer;.
</para> </para>
<para> <para>
@@ -137,7 +137,7 @@
</methodsynopsis> </methodsynopsis>
<para> <para>
Determines whether this endpoint is a &bmidiconsumer;. Determines whether this endpoint is a &BMidiConsumer;.
</para> </para>
<para> <para>
@@ -165,7 +165,7 @@
<para> <para>
An endpoint is "remote" when it is created by another application. Obviously, An endpoint is "remote" when it is created by another application. Obviously,
the remote object is &bmidiendpoint_register;'ed as well, otherwise you would not be able to the remote object is &BMidiEndpoint_Register;'ed as well, otherwise you would not be able to
see it. see it.
</para> </para>
</sect3> </sect3>
@@ -183,7 +183,7 @@
<para> <para>
An endpoint is "local" when it is created by this application; in other words, An endpoint is "local" when it is created by this application; in other words,
a &bmidilocalconsumer; or &bmidilocalproducer;. a &BMidiLocalConsumer; or &BMidiLocalProducer;.
</para> </para>
</sect3> </sect3>
@@ -221,16 +221,16 @@
<para> <para>
Suppose you obtained a proxy object for a remote endpoint by querying the Suppose you obtained a proxy object for a remote endpoint by querying the
&bmidiroster;. What if the application that published this endpoint quits, or &BMidiRoster;. What if the application that published this endpoint quits, or
less drastically, &bmidiendpoint_unregister;'s that endpoint? Even though you still have a less drastically, &BMidiEndpoint_Unregister;'s that endpoint? Even though you still have a
&bmidiendpoint; proxy object, the real endpoint no longer exists. You can use &BMidiEndpoint; proxy object, the real endpoint no longer exists. You can use
&bmidiendpoint_isvalid; to check for this. &BMidiEndpoint_IsValid; to check for this.
</para> </para>
<para> <para>
Don't worry, operations on invalid objects, such as &bmidiendpoint_getproperties;, will Don't worry, operations on invalid objects, such as &BMidiEndpoint_GetProperties;, will
return an error code (typically B_ERROR), but not cause a crash. Local objects return an error code (typically B_ERROR), but not cause a crash. Local objects
are always are considered to be valid, even if you did not &bmidiendpoint_register; them. are always are considered to be valid, even if you did not &BMidiEndpoint_Register; them.
(The only time a local endpoint is not valid is when there was a problem (The only time a local endpoint is not valid is when there was a problem
constructing it.) constructing it.)
</para> </para>
@@ -238,8 +238,8 @@
<para> <para>
If the application that created the remote endpoint crashes, then there is no If the application that created the remote endpoint crashes, then there is no
guarantee that the Midi Server immediately recognizes this. In that case, guarantee that the Midi Server immediately recognizes this. In that case,
&bmidiendpoint_isvalid; may still return true. Eventually, the stale endpoint will be removed &BMidiEndpoint_IsValid; may still return true. Eventually, the stale endpoint will be removed
from the roster, though. From then on, &bmidiendpoint_isvalid; correctly returns false. from the roster, though. From then on, &BMidiEndpoint_IsValid; correctly returns false.
</para> </para>
</sect3> </sect3>
@@ -255,35 +255,35 @@
</para> </para>
<para> <para>
Each &bmidiendpoint; has a reference count associated with it, so that Each &BMidiEndpoint; has a reference count associated with it, so that
&bmidiroster; can do proper bookkeeping. &bmidiendpoint_acquire; increments this reference &BMidiRoster; can do proper bookkeeping. &BMidiEndpoint_Acquire; increments this reference
count, and &bmidiendpoint_release; decrements it. Once the count reaches zero, the endpoint count, and &BMidiEndpoint_Release; decrements it. Once the count reaches zero, the endpoint
is deleted. is deleted.
</para> </para>
<para> <para>
When you are done with the endpoint, whether local or remote, you should When you are done with the endpoint, whether local or remote, you should
<emphasis>always</emphasis> &bmidiendpoint_release; it! <emphasis>always</emphasis> &BMidiEndpoint_Release; it!
</para> </para>
<para> <para>
Upon construction, local endpoints start with a reference count of 1. Any Upon construction, local endpoints start with a reference count of 1. Any
objects you obtain from &bmidiroster; using the NextXXX() or FindXXX() functions objects you obtain from &BMidiRoster; using the NextXXX() or FindXXX() functions
have their reference counts incremented in the process. If you forget to call have their reference counts incremented in the process. If you forget to call
&bmidiendpoint_release;, the objects won't be properly cleaned up and you'll make a fool out &BMidiEndpoint_Release;, the objects won't be properly cleaned up and you'll make a fool out
of yourself. of yourself.
</para> </para>
<para> <para>
After you &bmidiendpoint_release; an object, you are advised not to use it any further. If After you &BMidiEndpoint_Release; an object, you are advised not to use it any further. If
you do, your app will probably crash. That also happens if you &bmidiendpoint_release; an you do, your app will probably crash. That also happens if you &BMidiEndpoint_Release; an
object too many times. object too many times.
</para> </para>
<para> <para>
Typically, you don't need to call &bmidiendpoint_acquire;, unless you have two disparate Typically, you don't need to call &BMidiEndpoint_Acquire;, unless you have two disparate
parts of your application working with the same endpoint, and you don't want to parts of your application working with the same endpoint, and you don't want to
have to keep track of who needs to &bmidiendpoint_release; the endpoint. Now you simply have have to keep track of who needs to &BMidiEndpoint_Release; the endpoint. Now you simply have
both of them release it. both of them release it.
</para> </para>
@@ -292,7 +292,7 @@
</para> </para>
<para> <para>
See also &bmidiendpoint_release;. See also &BMidiEndpoint_Release;.
</para> </para>
</sect3> </sect3>
@@ -312,7 +312,7 @@
</para> </para>
<para> <para>
See also &bmidiendpoint_acquire; See also &BMidiEndpoint_Acquire;
</para> </para>
</sect3> </sect3>
@@ -329,25 +329,25 @@
<para> <para>
MIDI objects created by an application are invisible to other applications MIDI objects created by an application are invisible to other applications
until they are published. To publish an object use the &bmidiendpoint_register; until they are published. To publish an object use the &BMidiEndpoint_Register;
method. The corresponding &bmidiendpoint_unregister; method will cause an object to method. The corresponding &BMidiEndpoint_Unregister; method will cause an object to
once again become invisible to remote applications. once again become invisible to remote applications.
</para> </para>
<para> <para>
&bmidiroster; also has &bmidiroster_register; and &bmidiroster_unregister; methods. You may also use &BMidiRoster; also has &BMidiRoster_Register; and &BMidiRoster_Unregister; methods. You may also use
those methods to publish or hide your endpoints; both do the same thing. those methods to publish or hide your endpoints; both do the same thing.
</para> </para>
<para> <para>
Although it is considered bad style, calling &bmidiendpoint_register; on local endpoints that Although it is considered bad style, calling &BMidiEndpoint_Register; on local endpoints that
are already registered won't mess things up. The Midi Server will simply ignore are already registered won't mess things up. The Midi Server will simply ignore
your request. Likewise for &bmidiendpoint_unregister;'ing more than once. Attempts to your request. Likewise for &BMidiEndpoint_Unregister;'ing more than once. Attempts to
&bmidiendpoint_register; or &bmidiendpoint_unregister; remote endpoints will fail, of course. &BMidiEndpoint_Register; or &BMidiEndpoint_Unregister; remote endpoints will fail, of course.
</para> </para>
<para> <para>
If you are &bmidiroster;::&startwatching; watching, you will If you are &BMidiRoster;::&BMidiRoster_StartWatching; watching, you will
<emphasis>not</emphasis> receive notifications for any local endpoints you register or <emphasis>not</emphasis> receive notifications for any local endpoints you register or
unregister. Of course, other applications <emphasis>will</emphasis> be notified about your unregister. Of course, other applications <emphasis>will</emphasis> be notified about your
endpoints. endpoints.
@@ -365,7 +365,7 @@
</para> </para>
<para> <para>
See also &bmidiendpoint_unregister;. See also &BMidiEndpoint_Unregister;.
</para> </para>
</sect3> </sect3>
@@ -384,7 +384,7 @@
</para> </para>
<para> <para>
See also &bmidiendpoint_register;. See also &BMidiEndpoint_Register;.
</para> </para>
</sect3> </sect3>
@@ -421,7 +421,7 @@
<para> <para>
You are only allowed to call &bmidiendpoint_setproperties; on a local object. You are only allowed to call &BMidiEndpoint_SetProperties; on a local object.
</para> </para>
<para> <para>
@@ -483,7 +483,7 @@
</para> </para>
<para> <para>
See also &bmidiendpoint_getproperties;. See also &BMidiEndpoint_GetProperties;.
</para> </para>
</sect3> </sect3>
@@ -513,11 +513,11 @@
</para> </para>
<note><para> <note><para>
Note that &bmidiendpoint_getproperties; overwrites the contents of your BMessage. Note that &BMidiEndpoint_GetProperties; overwrites the contents of your BMessage.
</para></note> </para></note>
<para> <para>
See also &bmidiendpoint_setproperties; See also &BMidiEndpoint_SetProperties;
</para> </para>
</sect3> </sect3>
</sect2> </sect2>
@@ -4,26 +4,32 @@
<title>BMidiProducer</title> <title>BMidiProducer</title>
<para> <para>
Streams MIDI events to connected consumers Streams MIDI events to connected consumers.
</para> </para>
<para> <para>
A producer is an object that generate a stream of MIDI events. Each producer A producer is an object that generate a stream of MIDI events. Each producer
has a list of BMidiConsumer objects to which it is connected, and may be asked has a list of &BMidiConsumer; objects to which it is connected, and may be asked
to connect to or disconnect from a BMidiConsumer. A producer can spray its to connect to or disconnect from a &BMidiConsumer;. A producer can spray its
events to multiple consumers at the same time. events to multiple consumers at the same time.
</para> </para>
<para> <para>
A BMidiProducer either represents a local producer, i.e. a class extending from A &BMidiProducer; either represents a local producer, i.e. a class extending from
BMidiLocalProducer, or is a proxy for a remote object published by another app. &BMidiLocalProducer;, or is a proxy for a remote object published by another app.
</para> </para>
<sect3 id="bmidiproducer_connect"> <sect3 id="bmidiproducer_connect">
<title>status_t Connect(BMidiConsumer *cons)</title> <title>Connect()</title>
<methodsynopsis>
<type>status_t</type>
<methodname>Connect</methodname>
<methodparam><type>BMidiConsumer *</type> <parameter>cons</parameter></methodparam>
</methodsynopsis>
<para> <para>
Connects a consumer to this producer Connects a consumer to this producer.
</para> </para>
<para> <para>
@@ -40,15 +46,21 @@
</para> </para>
<para> <para>
See Also <xref linkend="bmidiproducer_disconnect"/> See Also &BMidiProducer_Disconnect;.
</para> </para>
</sect3> </sect3>
<sect3 id="bmidiproducer_disconnect"> <sect3 id="bmidiproducer_disconnect">
<title>status_t Disconnect(BMidiConsumer *cons)</title> <title>status_t Disconnect(BMidiConsumer *cons)</title>
<methodsynopsis>
<type>status_t</type>
<methodname>Disconnect</methodname>
<methodparam><type>BMidiConsumer *</type> <parameter>cons</parameter></methodparam>
</methodsynopsis>
<para> <para>
Disconnects a consumer from this producer Disconnects a consumer from this producer.
</para> </para>
<para> <para>
@@ -62,32 +74,44 @@
</para> </para>
<para> <para>
See Also <xref linkend="bmidiproducer_connect"/> See Also &BMidiProducer_Connect;.
</para> </para>
</sect3> </sect3>
<sect3 id="bmidiproducer_isconnected"> <sect3 id="bmidiproducer_isconnected">
<title>bool IsConnected(BMidiConsumer *cons) const</title> <title>IsConnected()</title>
<methodsynopsis>
<type>bool</type>
<methodname>IsConnected</methodname>
<methodparam><type>BMidiConsumer *</type> <parameter>cons</parameter></methodparam>
</methodsynopsis>
<para> <para>
Determines whether a consumer is connected to this producer Determines whether a consumer is connected to this producer.
</para> </para>
<para> <para>
See Also <xref linkend="bmidiproducer_connect"/> and See Also &BMidiProducer_Connect; and
<xref linkend="bmidiproducer_disconnect"/> &BMidiProducer_Disconnect;
</para> </para>
</sect3> </sect3>
<sect3 id="bmidiproducer_connections"> <sect3 id="bmidiproducer_connections">
<title>BList *Connections() const</title> <title>BList *Connections() const</title>
<methodsynopsis>
<type>BList *</type>
<methodname>Connections</methodname><void/>
<modifier>const</modifier>
</methodsynopsis>
<para> <para>
Returns a list with all connected consumers Returns a list with all connected consumers.
</para> </para>
<para> <para>
Returns a BList with pointers to BMidiEndpoint objects for all consumers that Returns a BList with pointers to &BMidiEndpoint; objects for all consumers that
are connected to this producer. You can examine the contents of the list as are connected to this producer. You can examine the contents of the list as
follows: follows:
</para> </para>
@@ -107,8 +131,8 @@
<para> <para>
Every time you call this function, a new BList is allocated. The caller (that Every time you call this function, a new BList is allocated. The caller (that
is you) is responsible for freeing this list. The BMidiEndpoint objects in the is you) is responsible for freeing this list. The &BMidiEndpoint; objects in the
list have their reference counts bumped, so you need to Release() them before list have their reference counts bumped, so you need to &BMidiEndpoint;::&BMidiEndpoint_Release; them before
you delete the list or they will go all leaky on you. you delete the list or they will go all leaky on you.
</para> </para>
</sect3> </sect3>
+1 -1
View File
@@ -4,7 +4,7 @@
<appendix id="license"> <appendix id="license">
<title>MIT License</title> <title>MIT License</title>
<sect1> <sect1 id="licensesect">
<para> <para>
Copyright (c) 2003-2005, Haiku, Inc. Copyright (c) 2003-2005, Haiku, Inc.
</para> </para>