]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: queue_timer_alsa: obsolete ALSASeqQueueTimerAlsa
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 9 Jun 2020 22:13:52 +0000 (07:13 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Thu, 11 Jun 2020 09:25:19 +0000 (18:25 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
doc/reference/seq/alsaseq-docs.xml
doc/reference/seq/alsaseq.types
src/seq/alsaseq.map
src/seq/meson.build
src/seq/queue-timer-alsa.c [deleted file]
src/seq/queue-timer-alsa.h [deleted file]
tests/alsaseq-queue-timer-alsa [deleted file]
tests/meson.build

index 64e308bc5fa93dc10a653ae91c0b109bed596f6e..92026584e3b38177584328b6d5882d605aa6a493 100644 (file)
@@ -51,7 +51,6 @@
         <xi:include href="xml/queue-status.xml"/>
         <xi:include href="xml/queue-tempo.xml"/>
         <xi:include href="xml/queue-timer.xml"/>
-        <xi:include href="xml/queue-timer-alsa.xml"/>
         <xi:include href="xml/queue-timer-data-alsa.xml"/>
         <xi:include href="xml/remove-filter.xml"/>
     </chapter>
index d8d91c1587ad5b3e6055938e8a4c3a9b1ca7baca..bde01694e9143a20ea4faf6d4f306fae2c3ebeb2 100644 (file)
@@ -33,6 +33,5 @@ alsaseq_queue_info_get_type
 alsaseq_queue_status_get_type
 alsaseq_queue_tempo_get_type
 alsaseq_queue_timer_get_type
-alsaseq_queue_timer_alsa_get_type
 alsaseq_queue_timer_data_alsa_get_type
 alsaseq_event_cntr_get_type
index ea610718a232908031cc6027c6164e088dcd631a..131289b6c786d2590be6ab66da0d61b05f953072 100644 (file)
@@ -149,9 +149,6 @@ ALSA_GOBJECT_0_0_0 {
     "alsaseq_queue_timer_get_alsa_data";
     "alsaseq_queue_timer_set_alsa_data";
 
-    "alsaseq_queue_timer_alsa_get_type";
-    "alsaseq_queue_timer_alsa_new";
-
     "alsaseq_queue_timer_data_alsa_get_type";
     "alsaseq_queue_timer_data_alsa_get_device_id";
     "alsaseq_queue_timer_data_alsa_set_device_id";
index c01c906de1b0c0ecf350651a0dc81b5f33ad0d8b..29cfd6be051c78994c9bedf12c9f2222af7849cc 100644 (file)
@@ -27,7 +27,6 @@ sources = files(
   'queue-status.c',
   'queue-tempo.c',
   'queue-timer.c',
-  'queue-timer-alsa.c',
   'queue-timer-data-alsa.c',
   'remove-filter.c',
   'event-cntr.c',
@@ -52,7 +51,6 @@ headers = files(
   'queue-status.h',
   'queue-tempo.h',
   'queue-timer.h',
-  'queue-timer-alsa.h',
   'queue-timer-data-alsa.h',
   'remove-filter.h',
   'event-cntr.h',
diff --git a/src/seq/queue-timer-alsa.c b/src/seq/queue-timer-alsa.c
deleted file mode 100644 (file)
index 6583201..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#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 {
-    SEQ_QUEUE_TIMER_ALSA_PROP_TIMER_DEVICE_ID = 1,
-    SEQ_QUEUE_TIMER_ALSA_PROP_RESOLUTION,
-    SEQ_QUEUE_TIMER_ALSA_PROP_COUNT,
-};
-static GParamSpec *seq_queue_timer_alsa_props[SEQ_QUEUE_TIMER_ALSA_PROP_COUNT] = { NULL, };
-
-static void seq_queue_timer_alsa_set_property(GObject *obj, guint id,
-                                         const GValue *val, GParamSpec *spec)
-{
-    ALSASeqQueueTimer *parent = ALSASEQ_QUEUE_TIMER(obj);
-    struct snd_seq_queue_timer *timer;
-
-    seq_queue_timer_refer_private(parent, &timer);
-
-    switch (id) {
-    case SEQ_QUEUE_TIMER_ALSA_PROP_TIMER_DEVICE_ID:
-    {
-        ALSATimerDeviceId *device_id = g_value_get_boxed(val);
-        timer->u.alsa.id = *device_id;
-        break;
-    }
-    case SEQ_QUEUE_TIMER_ALSA_PROP_RESOLUTION:
-        timer->u.alsa.resolution = g_value_get_uint(val);
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, id, spec);
-        break;
-    }
-}
-
-static void seq_queue_timer_alsa_get_property(GObject *obj, guint id,
-                                              GValue *val, GParamSpec *spec)
-{
-    ALSASeqQueueTimer *parent = ALSASEQ_QUEUE_TIMER(obj);
-    struct snd_seq_queue_timer *timer;
-
-    seq_queue_timer_refer_private(parent, &timer);
-
-    switch (id) {
-    case SEQ_QUEUE_TIMER_ALSA_PROP_TIMER_DEVICE_ID:
-    {
-        g_value_set_static_boxed(val, &timer->u.alsa.id);
-        break;
-    }
-    case SEQ_QUEUE_TIMER_ALSA_PROP_RESOLUTION:
-        g_value_set_uint(val, timer->u.alsa.resolution);
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, id, spec);
-        break;
-    }
-}
-
-static void alsaseq_queue_timer_alsa_class_init(ALSASeqQueueTimerAlsaClass *klass)
-{
-    GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
-
-    gobject_class->set_property = seq_queue_timer_alsa_set_property;
-    gobject_class->get_property = seq_queue_timer_alsa_get_property;
-
-    seq_queue_timer_alsa_props[SEQ_QUEUE_TIMER_ALSA_PROP_TIMER_DEVICE_ID] =
-        g_param_spec_boxed("timer-device-id", "timer-device-id",
-                           "The device id for used timer.",
-                           ALSATIMER_TYPE_DEVICE_ID,
-                           G_PARAM_READWRITE);
-
-    seq_queue_timer_alsa_props[SEQ_QUEUE_TIMER_ALSA_PROP_RESOLUTION] =
-        g_param_spec_uint("resolution", "resolution",
-                          "The resolution of timer in Hz.",
-                          10, 6250,
-                          1000,
-                          G_PARAM_READWRITE);
-
-    g_object_class_install_properties(gobject_class,
-                                      SEQ_QUEUE_TIMER_ALSA_PROP_COUNT,
-                                      seq_queue_timer_alsa_props);
-}
-
-static void alsaseq_queue_timer_alsa_init(ALSASeqQueueTimerAlsa *self)
-{
-    return;
-}
-
-/**
- * alsaseq_queue_timer_alsa_new:
- *
- * Allocate and return an instance of ALSASeqQueueTimerAlsa.
- *
- * Returns: A #ALSASeqQueueTimerAlsa.
- */
-ALSASeqQueueTimerAlsa *alsaseq_queue_timer_alsa_new()
-{
-    return g_object_new(ALSASEQ_TYPE_QUEUE_TIMER_ALSA, NULL);
-}
diff --git a/src/seq/queue-timer-alsa.h b/src/seq/queue-timer-alsa.h
deleted file mode 100644 (file)
index 6c879d4..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#ifndef __ALSA_GOBJECT_ALSASEQ_QUEUE_TIMER_ALSA__H__
-#define __ALSA_GOBJECT_ALSASEQ_QUEUE_TIMER_ALSA__H__
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <seq/queue-timer.h>
-
-G_BEGIN_DECLS
-
-
-#define ALSASEQ_TYPE_QUEUE_TIMER_ALSA     (alsaseq_queue_timer_alsa_get_type())
-
-#define ALSASEQ_QUEUE_TIMER_ALSA(obj)                           \
-    (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
-                                ALSASEQ_TYPE_QUEUE_TIMER_ALSA,  \
-                                ALSASeqQueueTimerAlsa))
-#define ALSASEQ_IS_QUEUE_TIMER_ALSA(obj)                        \
-    (G_TYPE_CHECK_INSTANCE_TYPE((obj),                          \
-                                ALSASEQ_TYPE_QUEUE_TIMER_ALSA))
-
-#define ALSASEQ_QUEUE_TIMER_ALSA_CLASS(klass)                   \
-    (G_TYPE_CHECK_CLASS_CAST((klass),                           \
-                             ALSASEQ_TYPE_QUEUE_TIMER_ALSA,     \
-                             ALSASeqQueueTimerAlsaClass))
-#define ALSASEQ_IS_QUEUE_TIMER_ALSA_CLASS(klass)                \
-    (G_TYPE_CHECK_CLASS_TYPE((klass),                           \
-                             ALSASEQ_TYPE_QUEUE_TIMER_ALSA))
-#define ALSASEQ_QUEUE_TIMER_ALSA_GET_CLASS(obj)                 \
-    (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
-                               ALSASEQ_TYPE_QUEUE_TIMER_ALSA,   \
-                               ALSASeqQueueTimerAlsaClass))
-
-typedef struct _ALSASeqQueueTimerAlsa           ALSASeqQueueTimerAlsa;
-typedef struct _ALSASeqQueueTimerAlsaClass      ALSASeqQueueTimerAlsaClass;
-
-struct _ALSASeqQueueTimerAlsa {
-    ALSASeqQueueTimer parent_instance;
-};
-
-struct _ALSASeqQueueTimerAlsaClass {
-    ALSASeqQueueTimerClass parent_class;
-};
-
-GType alsaseq_queue_timer_alsa_get_type() G_GNUC_CONST;
-
-ALSASeqQueueTimerAlsa *alsaseq_queue_timer_alsa_new();
-
-G_END_DECLS
-
-#endif
diff --git a/tests/alsaseq-queue-timer-alsa b/tests/alsaseq-queue-timer-alsa
deleted file mode 100644 (file)
index 245b7e7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python3
-
-from sys import exit
-from errno import ENXIO
-
-from helper import test
-
-import gi
-gi.require_version('ALSASeq', '0.0')
-from gi.repository import ALSASeq
-
-target = ALSASeq.QueueTimerAlsa()
-props = (
-    'timer-device-id',
-    'resolution',
-)
-methods = (
-    'new',
-)
-signals = ()
-
-if not test(target, props, methods, signals):
-    exit(ENXIO)
index 321ca7141328e4f42f4817e03abc937110c40e17..c8b5e5b809ca2088bfb55fccb217069925ff2bbe 100644 (file)
@@ -40,7 +40,6 @@ tests = {
     'alsaseq-queue-status',
     'alsaseq-queue-tempo',
     'alsaseq-queue-timer',
-    'alsaseq-queue-timer-alsa',
     'alsaseq-event-cntr',
   ],
   'hwdep': [