]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: fulfill documentation for ALSASeq
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 6 Jun 2020 08:35:12 +0000 (17:35 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Sun, 7 Jun 2020 00:32:56 +0000 (09:32 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
24 files changed:
doc/reference/seq/alsaseq-docs.xml
src/seq/addr.c
src/seq/client-info.c
src/seq/client-pool.c
src/seq/event-data-connect.c
src/seq/event-data-ctl.c
src/seq/event-data-note.c
src/seq/event-data-queue.c
src/seq/event-data-result.c
src/seq/event-fixed.c
src/seq/event-variable.c
src/seq/event.c
src/seq/port-info.c
src/seq/query.c
src/seq/queue-info.c
src/seq/queue-status.c
src/seq/queue-tempo.c
src/seq/queue-timer-alsa.c
src/seq/queue-timer.c
src/seq/remove-filter.c
src/seq/subscribe-data.c
src/seq/system-info.c
src/seq/tstamp.c
src/seq/user-client.c

index dbe42b0d5fe72920413405d8500f98a08dd834eb..6e9ea9d5f15efa65332331d73191cd3cf27b9ca4 100644 (file)
     </releaseinfo>
     </bookinfo>
 
+    <chapter id="introduction">
+        <title>Introduction</title>
+        <para>This library is designed for applications to manipulate ALSA
+        sequencer character device and operate its functionality abstracted.
+        as user client, port, and event. ALSASeqUserClient represent the user
+        client. It holds file descriptor and creates GSource for event
+        dispatching by GLib's GMainContext/GMainLoop.</para>
+    </chapter>
+
     <chapter id="alsaseq-enumerations">
         <title>ALSASeq enumerations</title>
         <xi:include href="xml/alsaseq-enum-types.xml"/>
index a4a1d560ab965cf9bd2d372d6be3f216607f4a1a..a4d7d06b33c610815ea804f361abd135d00edb56 100644 (file)
@@ -1,6 +1,16 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "addr.h"
 
+/**
+ * SECTION: addr
+ * @Title: ALSASeqAddr
+ * @Short_description: A boxed object to represent address in ALSA Sequencer.
+ *
+ * A #ALSASeqAddr is a boxed object to represent address in ALSA Sequencer. The
+ * address consists of two parts; the numerical ID of client and port.
+ *
+ * The object wraps 'struct snd_seq_addr' in UAPI of Linux sound subsystem.
+ */
 ALSASeqAddr *seq_addr_copy(const ALSASeqAddr *self)
 {
     return g_memdup(self, sizeof(*self));
index fa8d281098463b154b7c12227c28144f7036a969..7996ad2b0d1320c5f2735750f55018f2e1452f54 100644 (file)
@@ -3,6 +3,19 @@
 
 #include <errno.h>
 
+/**
+ * SECTION: client-info
+ * @Title: ALSASeqClientInfo
+ * @Short_description: A GObject-derived object to represent information of
+ *                     client.
+ *
+ * A #ALSASeqClientInfo is a GObject-derived object to represent information of
+ * client. The call of alsaseq_get_client_info() returns the instance of object.
+ * The call of alsaseq_user_client_set_info() and alsaseq_user_client_get_info()
+ * require the instance of object.
+ *
+ * The object wraps 'struct snd_seq_client_info' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqClientInfoPrivate {
     struct snd_seq_client_info info;
 };
index 6776b253c5423d50040c841200378203839f11bd..a8c46c06628af775268c2b37db0bc6a71171a1f5 100644 (file)
@@ -1,6 +1,19 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: client-pool
+ * @Title: ALSASeqClientPool
+ * @Short_description: A GObject-derived object to represent information of
+ *                     pool owned by client.
+ *
+ * A #ALSASeqClientPool is a GObject-derived object to represent information of
+ * pool owned by client. The call of alsaseq_get_client_pool() returns the
+ * instance of object. The call of alsaseq_user_client_set_pool() and
+ * alsaseq_user_client_get_pool() require the instance of object.
+ *
+ * The object wraps 'struct snd_seq_client_pool' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqClientPoolPrivate {
     struct snd_seq_client_pool pool;
 };
index 65d7175136fc4a784f2630f2fb902d7a469b1f5a..44e3b1e69fd77199d262208fc588ff52ff4a4696 100644 (file)
@@ -1,6 +1,17 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "event-data-connect.h"
 
+/**
+ * SECTION: event-data-connect
+ * @Title: ALSASeqEventDataConnect
+ * @Short_description: A boxed object to represent data of connect event
+ *
+ * A #ALSASeqEventDataConnect is a boxed object to represent data of connect
+ * event. The instance of object is one of data properties in
+ * #ALSASeqEventFixed.
+ *
+ * The object wraps 'struct snd_seq_connect' in UAPI of Linux sound subsystem.
+ */
 ALSASeqEventDataConnect *seq_event_data_connect_copy(const ALSASeqEventDataConnect *self)
 {
     return g_memdup(self, sizeof(*self));
index 3e3a9f71a99e3bf7b0113f985bbf7628508432c2..266abf4b8717833d1af043066928690eb0c9e860 100644 (file)
@@ -1,6 +1,17 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "event-data-ctl.h"
 
+/**
+ * SECTION: event-data-ctl
+ * @Title: ALSASeqEventDataCtl
+ * @Short_description: A boxed object to represent data of control event
+ *
+ * A #ALSASeqEventDataCtl is a boxed object to represent data of control
+ * event. The instance of object is one of data properties in
+ * #ALSASeqEventFixed.
+ *
+ * The object wraps 'struct snd_seq_ev_ctrl' in UAPI of Linux sound subsystem.
+ */
 ALSASeqEventDataCtl *seq_event_data_ctl_copy(const ALSASeqEventDataCtl *self)
 {
     return g_memdup(self, sizeof(*self));
index 3f672dbe3a2216405e9e508d4b87a615115b53a3..37796388bee635cb2db633cc2a1ec3ce995e1edc 100644 (file)
@@ -1,6 +1,16 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "event-data-note.h"
 
+/**
+ * SECTION: event-data-note
+ * @Title: ALSASeqEventDataNote
+ * @Short_description: A boxed object to represent data of note event
+ *
+ * A #ALSASeqEventDataNote is a boxed object to represent data of note event.
+ * The instance of object is one of data properties in #ALSASeqEventFixed.
+ *
+ * The object wraps 'struct snd_seq_ev_note' in UAPI of Linux sound subsystem.
+ */
 ALSASeqEventDataNote *seq_event_data_note_copy(const ALSASeqEventDataNote *self)
 {
     return g_memdup(self, sizeof(*self));
index ebf5fb8f7eb3f2bb1fe9dcd6882aded42f1aa317..5dad16b6b0e67f7009b5ce17f3fe4473116dced0 100644 (file)
@@ -1,6 +1,17 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "event-data-queue.h"
 
+/**
+ * SECTION: event-data-queue
+ * @Title: ALSASeqEventDataQueue
+ * @Short_description: A boxed object to represent data of queue event
+ *
+ * A #ALSASeqEventDataQueue is a boxed object to represent data of queue event.
+ * The instance of object is one of data properties in #ALSASeqEventFixed.
+ *
+ * The object wraps 'struct snd_seq_ev_queue_control' in UAPI of Linux sound
+ * subsystem.
+ */
 ALSASeqEventDataQueue *seq_event_data_queue_copy(const ALSASeqEventDataQueue *self)
 {
     return g_memdup(self, sizeof(*self));
index f0eae918d0487ef6f7b27a4aad2640a6e22a8ac5..6cf376adb44aa4833ddf5ea959430a79ff8a7b50 100644 (file)
@@ -1,6 +1,17 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "event-data-result.h"
 
+/**
+ * SECTION: event-data-result
+ * @Title: ALSASeqEventDataResult
+ * @Short_description: A boxed object to represent data of result event
+ *
+ * A #ALSASeqEventDataResult is a boxed object to represent data of result
+ * event. The instance of object is one of data properties in
+ * #ALSASeqEventFixed.
+ *
+ * The object wraps 'struct snd_seq_result' in UAPI of Linux sound subsystem.
+ */
 ALSASeqEventDataResult *seq_event_data_result_copy(const ALSASeqEventDataResult *self)
 {
     return g_memdup(self, sizeof(*self));
index 436a5d2ff1e53582b4562b2c8b61b8de71038cda..f5355b4bbd667dfc715d1338fb103509399bdc99 100644 (file)
@@ -4,6 +4,16 @@
 
 #include <errno.h>
 
+/**
+ * SECTION: event-fixed
+ * @Title: ALSASeqEventFixed
+ * @Short_description: A GObject-derived object to represent event with the
+ *                     various kind of fixed-size data.
+ *
+ * A #ALSASeqEventFixed is a GObject-derived object to represent event with the
+ * various kind of fixed-size data. The object has several properties to access
+ * to the data. The object inherits properties and methods from #ALSASeqEvent.
+ */
 G_DEFINE_TYPE(ALSASeqEventFixed, alsaseq_event_fixed, ALSASEQ_TYPE_EVENT)
 
 enum seq_event_fixed_prop_type {
index 2331706280465290ffe7d7f26bc5d2bf0a1f8250..e76b3aa6703b67c9def0c2b09a7b23c004ae622e 100644 (file)
@@ -4,6 +4,17 @@
 
 #include <errno.h>
 
+/**
+ * SECTION: event-variable
+ * @Title: ALSASeqEventVariable
+ * @Short_description: A GObject-derived object to represent event with the
+ *                     various kind of variable-size data.
+ *
+ * A #ALSASeqEventVariable is a GObject-derived object to represent event with
+ * the various kind of variable-size data. The object has accessor methods for
+ * the variable-size data.
+ * The object inherits properties and methods from #ALSASeqEvent.
+ */
 struct _ALSASeqEventVariablePrivate {
     void *data;
 };
index dd4958405abd1c6359a2b6a9d40e91484296d2e8..6ad299908d32ffda6d189b2ca51ca5e6bb460cb3 100644 (file)
@@ -3,6 +3,17 @@
 
 #include <errno.h>
 
+/**
+ * SECTION: event
+ * @Title: ALSASeqEvent
+ * @Short_description: A GObject-derived abstract object to represent any event
+ *
+ * A #ALSASeqEvent is a GObject-derived abstract object to represent common
+ * properties and method for any event. Applications can use derived object;
+ * #ALSASeqEventFixed and #ALSASeqEventVariable.
+ *
+ * The object wraps 'struct snd_seq_event' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqEventPrivate {
     struct snd_seq_event ev;
 };
index 35dd698b8895094721916a045eb9a5b4ca7cab08..73c73903fba555a91f0362eceaa75c82c8003def 100644 (file)
@@ -1,6 +1,18 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: port-info
+ * @Title: ALSASeqPortInfo
+ * @Short_description: A GObject-derived object to represent information of port
+ *
+ * A #ALSASeqPortInfo is a GObject-derived object to represent information of
+ * port. The call of alsaseq_get_port_info() returns the instance of object.
+ * The call of alsaseq_user_client_create_port() and
+ * alsaseq_user_client_update_port() requires the instance of object.
+ *
+ * The object wraps 'struct snd_port_info' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqPortInfoPrivate {
     struct snd_seq_port_info info;
 };
index fbc241122cf2b227dc9b5af97f583a2ff5799fcd..0844b8f3508526cc5d3d2e4b814a52933e0135a7 100644 (file)
 
 #include <libudev.h>
 
+/**
+ * SECTION: query
+ * @Title: Global functions in ALSASeq
+ * @Short_description: Global functions available without holding any file
+ *                     descriptor
+ */
+
 // For error handling.
 G_DEFINE_QUARK("alsaseq-error", alsaseq_error)
 
index 8f1eaf9799fe670a57d083ee96887766e581bd61..c7f0dc892aac572dc770f817972f66fbb737d6d7 100644 (file)
@@ -1,6 +1,20 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: queue-info
+ * @Title: ALSASeqQueueInfo
+ * @Short_description: A GObject-derived object to represent information of
+ *                     queue
+ *
+ * A #ALSASeqQueueInfo is a GObject-derived object to represent information of
+ * queue. The call of alsaseq_get_queue_info_by_id() and
+ * alsaseq_get_queue_info_by_name() returns the instance of object. The call of
+ * alsaseq_user_client_create_queue() and alsaseq_user_client_update_queue()
+ * requires the instance of object.
+ *
+ * The object wraps 'struct snd_seq_queue_info' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqQueueInfoPrivate {
     struct snd_seq_queue_info info;
 };
index 19d2eb4cf759d7ab80e59a6e0a7c17ed24c39e4e..5a864a3d8afc8a1e3e509a349db8e63a2e07c2ed 100644 (file)
@@ -1,6 +1,17 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: queue-status
+ * @Title: ALSASeqQueueStatus
+ * @Short_description: A GObject-derived object to represent status of queue
+ *
+ * A #ALSASeqQueueStatus is a GObject-derived object to represent status of
+ * queue. The call of alsaseq_get_queue_status() returns the instance of object.
+ *
+ * The object wraps 'struct snd_seq_queue_status' in UAPI of Linux sound
+ * subsystem.
+ */
 struct _ALSASeqQueueStatusPrivate {
     struct snd_seq_queue_status status;
 };
index 2c45daf9fd2f5273093a65e536ebfb5cc6171c7b..54b1c33804f57a19aa98d4f7c56381f048990830 100644 (file)
@@ -1,6 +1,16 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: queue-tempo
+ * @Title: ALSASeqQueueTempo
+ * @Short_description: A GObject-derived object to represent tempo of queue
+ *
+ * A #ALSASeqQueueTempo is a GObject-derived object to represent tempo of queue.
+ * The call of alsaseq_get_queue_status() returns the instance of object.
+ *
+ * The object wraps 'struct snd_seq_queue_tempo' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqQueueTempoPrivate {
     struct snd_seq_queue_tempo tempo;
 };
index 16aeb4ffc2dcd5f1e1d8bbef79ecd6249b35ad9e..658320167d55281c16a04f8fb4ba2201573b8174 100644 (file)
@@ -2,6 +2,17 @@
 #include "queue-timer-alsa.h"
 #include "privates.h"
 
+/**
+ * SECTION: queue-timer-alsa
+ * @Title: ALSASeqQueueTimerAlsa
+ * @Short_description: A GObject-derived object to represent timer instance for
+ *                     queue
+ *
+ * A #ALSASeqQueueTimerAlsa is a GObject-derived object to represent timer
+ * instance for queue. The instance belongs to ALSA timer functionality and is
+ * pointed by the identifier as property of the object. The object inherits
+ * properties and methods from #ALSASeqQueueTimer.
+ */
 G_DEFINE_TYPE(ALSASeqQueueTimerAlsa, alsaseq_queue_timer_alsa, ALSASEQ_TYPE_QUEUE_TIMER)
 
 enum seq_queue_timer_alsa_prop_type {
index 09e7b09a0d6a42982663de7e084e3e5fb9a77264..887e388b273cae3ff0dabc057c68ea8a0a7b7f12 100644 (file)
@@ -3,6 +3,18 @@
 
 #include <sound/asequencer.h>
 
+/**
+ * SECTION: queue-timer
+ * @Title: ALSASeqQueueTimer
+ * @Short_description: A GObject-derived abstract object to represent timer for
+ *                     queue
+ *
+ * A #ALSASeqQueueTimer is a GObject-derived abstract object to represent common
+ * properties and methods of timer for queue. Applications can use derived
+ * object; ALSASeqQueueTimerAlsa.
+ *
+ * The object wraps 'struct snd_seq_queue_timer' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqQueueTimerPrivate {
     struct snd_seq_queue_timer timer;
 };
index ecb8d7cf8b8ce89bc96a531eaed367e368c5123b..eeee419d98308d2763acfd8d8ddd96351df678f0 100644 (file)
@@ -4,6 +4,20 @@
 
 #include <errno.h>
 
+/**
+ * SECTION: remove-filter
+ * @Title: ALSASeqRemoveFilter
+ * @Short_description: A boxed object to represent filter to remove scheduled
+ *                     event in queue
+ *
+ * A #ALSASeqRemoveFilter is a boxed object to represent filter to remove
+ * scheduled event in queue. The call of alsaseq_user_client_remove_events()
+ * requires the instance of object. In the object, data shares the same storage,
+ * thus it's not possible to use several purposes.
+ *
+ * The object wraps 'struct snd_seq_remove_events' in UAPI of Linux sound
+ * subsystem.
+ */
 ALSASeqRemoveFilter *seq_remove_filter_copy(const ALSASeqRemoveFilter *self)
 {
     return g_memdup(self, sizeof(*self));
index 4ef47b56460b7c49924efe2a24ee50a37a137bc0..3515187baec41d3a8b1116d9efe1217eb6168915 100644 (file)
@@ -1,6 +1,20 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: subscribe-data
+ * @Title: ALSASeqSubscribeData
+ * @Short_description: A GObject-derived object to represent data for
+ *                     subscription between ports.
+ *
+ * A #ALSASeqSubscribeData is a GObject-derived object to represent data for
+ * subscription between a pair of ports. The call of
+ * alsaseq_get_subscription_list() returns the list of data. The call of
+ * alsaseq_user_client_operate_subscription() requires the instance of object.
+ *
+ * The object wraps 'struct snd_seq_port_subscribe' in UAPI of Linux sound
+ * subsystem.
+ */
 struct _ALSASeqSubscribeDataPrivate {
     struct snd_seq_port_subscribe data;
 };
index 147952e50bfabea9aad5162492aea4184867b093..cc4821e0dc0e1b9ff76d8d7f5190ee59f82df12f 100644 (file)
@@ -1,6 +1,18 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "privates.h"
 
+/**
+ * SECTION: system-info
+ * @Title: ALSASeqSystemInfo
+ * @Short_description: A GObject-derived object to represent information of
+ *                     ALSA Sequencer
+ *
+ * A #ALSASeqSystemInfo is a GObject-derived object to represent information of
+ * ALSA Sequencer. The call of alsaseq_get_system_info() returns the instance of
+ * object.
+ *
+ * The object wraps 'struct snd_seq_system_info' in UAPI of Linux sound subsystem.
+ */
 struct _ALSASeqSystemInfoPrivate {
     struct snd_seq_system_info info;
 };
index 0066a67423deec4682aee1954275f05eef8f9e25..36de92a95d3859132f2471ec6c6f9ed6cb7f0114 100644 (file)
@@ -1,6 +1,16 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
 #include "tstamp.h"
 
+/**
+ * SECTION: tstamp
+ * @Title: ALSASeqTstamp
+ * @Short_description: A boxed object to represent timestamp
+ *
+ * A #ALSASeqTstamp is a boxed object to represent timestamp. The object shares
+ * storage for two types of time; tick time and real time.
+ *
+ * The object wraps 'struct snd_seq_timestamp' in UAPI of Linux sound subsystem.
+ */
 ALSASeqTstamp *seq_tstamp_copy(const ALSASeqTstamp *self)
 {
     return g_memdup(self, sizeof(*self));
index 04052c171d9c095739a15c492440ee8779ea02fb..b60ecf2d4d34520672632fa8fa2d3cf1051418b8 100644 (file)
 #include <sys/ioctl.h>
 #include <errno.h>
 
+/**
+ * SECTION: user-client
+ * @Title: ALSASeqUserClient
+ * @Short_description: A GObject-derived object to represent user client
+ *
+ * A #ALSASeqUserClient is a GObject-derived object to represent user client.
+ * Any port can be added to the client as destination or source for any event.
+ *
+ * When the call of alsaseq_user_client_open(), the object maintain file
+ * descriptor till object destruction. The call of
+ * alsaseq_user_client_create_source() returns the instance of GSource. Once
+ * attached to the GSource, GMainContext/GMainLoop is available as event
+ * dispatcher. The #handle-event GObject signal is emitted in the event
+ * dispatcher to notify the event. The call of
+ * alsaseq_user_client_schedule_event() schedules event with given parameters.
+ */
 struct _ALSASeqUserClientPrivate {
     int fd;
     int client_id;