]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
ctl: elem_info_int: dismiss ALSACtlElemInfoInt
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 12 Jun 2020 04:19:45 +0000 (13:19 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Fri, 12 Jun 2020 06:45:37 +0000 (15:45 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
doc/reference/ctl/alsactl-docs.xml
doc/reference/ctl/alsactl.types
src/ctl/elem-info-int.c [deleted file]
src/ctl/elem-info-int.h [deleted file]
src/ctl/meson.build
tests/alsactl-elem-info-int [deleted file]
tests/meson.build

index 22458bdd4d6da5028586e755a9726b9922679b85..ddc0b2e28e51a47451c6002363f7379dd6f7f34b 100644 (file)
@@ -37,7 +37,6 @@
         <xi:include href="xml/card-info.xml"/>
         <xi:include href="xml/elem-id.xml"/>
         <xi:include href="xml/elem-info.xml"/>
-        <xi:include href="xml/elem-info-int.xml"/>
         <xi:include href="xml/elem-info-enum.xml"/>
         <xi:include href="xml/elem-info-bytes.xml"/>
         <xi:include href="xml/elem-info-iec60958.xml"/>
index d314470867ddad820a83de9fbcb46dae6d377e49..ea7b44105f9337f834737d69f1dfcc33c305d2e2 100644 (file)
@@ -7,7 +7,6 @@ alsactl_card_get_type
 alsactl_card_info_get_type
 alsactl_elem_id_get_type
 alsactl_elem_info_get_type
-alsactl_elem_info_int_get_type
 alsactl_elem_info_enum_get_type
 alsactl_elem_info_bytes_get_type
 alsactl_elem_info_iec60958_get_type
diff --git a/src/ctl/elem-info-int.c b/src/ctl/elem-info-int.c
deleted file mode 100644 (file)
index d3d673a..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#include "elem-info-int.h"
-#include "privates.h"
-
-/**
- * SECTION: elem-info-int
- * @Title: ALSACtlElemInfoInt
- * @Short_description: A GObject-derived object to represent the information
- *                     of integer type of element
- *
- * A #ALSACtlElemInfoInt is a GObject-derived object to represent the
- * information of integer type of element, which contains integer values. The
- * object inherits methods and properties of #ALSACtlElemInfo. A call of
- * alsactl_card_get_elem_info() can returns the instance of object, or a call
- * of alsactl_card_add_elems() requires the instance of object as argument.
- */
-G_DEFINE_TYPE(ALSACtlElemInfoInt, alsactl_elem_info_int, ALSACTL_TYPE_ELEM_INFO)
-
-enum ctl_elem_info_int_prop_type {
-    CTL_ELEM_INFO_INT_PROP_VALUE_COUNT = 1,
-    CTL_ELEM_INFO_INT_PROP_MIN,
-    CTL_ELEM_INFO_INT_PROP_MAX,
-    CTL_ELEM_INFO_INT_PROP_STEP,
-    CTL_ELEM_INFO_INT_PROP_COUNT,
-};
-static GParamSpec *ctl_elem_info_int_props[CTL_ELEM_INFO_INT_PROP_COUNT] = { NULL, };
-
-static void ctl_elem_info_int_set_property(GObject *obj, guint id,
-                                           const GValue *val, GParamSpec *spec)
-{
-    ALSACtlElemInfo *parent = ALSACTL_ELEM_INFO(obj);
-    struct snd_ctl_elem_info *info;
-
-    ctl_elem_info_refer_private(parent, &info);
-
-    switch (id) {
-    case CTL_ELEM_INFO_INT_PROP_VALUE_COUNT:
-        info->count = g_value_get_uint(val);
-        break;
-    case CTL_ELEM_INFO_INT_PROP_MIN:
-        info->value.integer.min = (long)g_value_get_int(val);
-        break;
-    case CTL_ELEM_INFO_INT_PROP_MAX:
-        info->value.integer.max = (long)g_value_get_int(val);
-        break;
-    case CTL_ELEM_INFO_INT_PROP_STEP:
-        info->value.integer.step = (long)g_value_get_int(val);
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, id, spec);
-        break;
-    }
-}
-
-static void ctl_elem_info_int_get_property(GObject *obj, guint id, GValue *val,
-                                           GParamSpec *spec)
-{
-    ALSACtlElemInfo *parent = ALSACTL_ELEM_INFO(obj);
-    struct snd_ctl_elem_info *info;
-
-    ctl_elem_info_refer_private(parent, &info);
-
-    switch (id) {
-    case CTL_ELEM_INFO_INT_PROP_VALUE_COUNT:
-        g_value_set_uint(val, info->count);
-        break;
-    case CTL_ELEM_INFO_INT_PROP_MIN:
-        g_value_set_int(val, (int)info->value.integer.min);
-        break;
-    case CTL_ELEM_INFO_INT_PROP_MAX:
-        g_value_set_int(val, (int)info->value.integer.max);
-        break;
-    case CTL_ELEM_INFO_INT_PROP_STEP:
-        g_value_set_int(val, (int)info->value.integer.step);
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, id, spec);
-        break;
-    }
-}
-
-static void alsactl_elem_info_int_class_init(ALSACtlElemInfoIntClass *klass)
-{
-    GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
-
-    gobject_class->set_property = ctl_elem_info_int_set_property;
-    gobject_class->get_property = ctl_elem_info_int_get_property;
-
-    ctl_elem_info_int_props[CTL_ELEM_INFO_INT_PROP_VALUE_COUNT] =
-        g_param_spec_uint("value-count", "value-count",
-                          "The number of members as value of this element",
-                          0, G_MAXUINT,
-                          0,
-                          G_PARAM_READWRITE);
-
-    ctl_elem_info_int_props[CTL_ELEM_INFO_INT_PROP_MIN] =
-        g_param_spec_int("min", "min",
-                         "The minimum value for data of this element",
-                         G_MININT, G_MAXINT,
-                         0,
-                         G_PARAM_READWRITE);
-
-    ctl_elem_info_int_props[CTL_ELEM_INFO_INT_PROP_MAX] =
-        g_param_spec_int("max", "max",
-                         "The maximum value for data of this element",
-                         G_MININT, G_MAXINT,
-                         0,
-                         G_PARAM_READWRITE);
-
-    ctl_elem_info_int_props[CTL_ELEM_INFO_INT_PROP_STEP] =
-        g_param_spec_int("step", "step",
-                         "The gap of value for data of this element",
-                         G_MININT, G_MAXINT,
-                         0,
-                         G_PARAM_READWRITE);
-
-    g_object_class_install_properties(gobject_class,
-                        CTL_ELEM_INFO_INT_PROP_COUNT, ctl_elem_info_int_props);
-}
-
-static void alsactl_elem_info_int_init(ALSACtlElemInfoInt *self)
-{
-    return;
-}
-
-/**
- * alsactl_elem_info_int_new:
- *
- * Allocate and return an instance of ALSACtlElemInfoInt.
- *
- * Returns: A #ALSACtlElemInfoInt.
- */
-ALSACtlElemInfoInt *alsactl_elem_info_int_new()
-{
-    return g_object_new(ALSACTL_TYPE_ELEM_INFO_INT,
-                        "type", ALSACTL_ELEM_TYPE_INTEGER, NULL);
-}
diff --git a/src/ctl/elem-info-int.h b/src/ctl/elem-info-int.h
deleted file mode 100644 (file)
index 6f8df9a..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#ifndef __ALSA_GOBJECT_ALSACTL_ELEM_INFO_INT__H__
-#define __ALSA_GOBJECT_ALSACTL_ELEM_INFO_INT__H__
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <ctl/elem-info.h>
-
-#define ALSACTL_TYPE_ELEM_INFO_INT  (alsactl_elem_info_int_get_type())
-
-#define ALSACTL_ELEM_INFO_INT(obj)                              \
-    (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
-                                ALSACTL_TYPE_ELEM_INFO_INT,     \
-                                ALSACtlElemInfoInt))
-#define ALSACTL_IS_ELEM_INFO_INT(obj)                           \
-    (G_TYPE_CHECK_INSTANCE_TYPE((obj),                          \
-                                ALSACTL_TYPE_ELEM_INFO_INT))
-
-#define ALSACTL_ELEM_INFO_INT_CLASS(klass)                      \
-    (G_TYPE_CHECK_CLASS_CAST((klass),                           \
-                             ALSACTL_TYPE_ELEM_INFO_INT,        \
-                             ALSACtlElemInfoIntClass))
-#define ALSACTL_IS_ELEM_INFO_INT_CLASS(klass)                   \
-    (G_TYPE_CHECK_CLASS_TYPE((klass),                           \
-                             ALSACTL_TYPE_ELEM_INFO_INT))
-#define ALSACTL_ELEM_INFO_INT_GET_CLASS(obj)                    \
-    (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
-                               ALSACTL_TYPE_ELEM_INFO_INT,      \
-                               ALSACtlElemInfoIntClass))
-
-typedef struct _ALSACtlElemInfoInt      ALSACtlElemInfoInt;
-typedef struct _ALSACtlElemInfoIntClass ALSACtlElemInfoIntClass;
-
-struct _ALSACtlElemInfoInt {
-    ALSACtlElemInfo parent_instance;
-};
-
-struct _ALSACtlElemInfoIntClass {
-    ALSACtlElemInfoClass parent_class;
-};
-
-GType alsactl_elem_info_int_get_type(void) G_GNUC_CONST;
-
-ALSACtlElemInfoInt *alsactl_elem_info_int_new();
-
-G_END_DECLS
-
-#endif
index 85647efd795a6c345f16bc883c4e3169ea7f48d8..23e0c96c8c1352e593142331dfb46c6594321f86 100644 (file)
@@ -14,7 +14,6 @@ sources = files(
   'card-info.c',
   'elem-id.c',
   'elem-info.c',
-  'elem-info-int.c',
   'elem-info-enum.c',
   'elem-info-bytes.c',
   'elem-info-iec60958.c',
@@ -28,7 +27,6 @@ headers = files(
   'card-info.h',
   'elem-id.h',
   'elem-info.h',
-  'elem-info-int.h',
   'elem-info-enum.h',
   'elem-info-bytes.h',
   'elem-info-iec60958.h',
diff --git a/tests/alsactl-elem-info-int b/tests/alsactl-elem-info-int
deleted file mode 100644 (file)
index 111d858..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python3
-
-from sys import exit
-from errno import ENXIO
-
-from helper import test
-
-import gi
-gi.require_version('ALSACtl', '0.0')
-from gi.repository import ALSACtl
-
-target = ALSACtl.ElemInfoInt()
-props = (
-    'value-count',
-    'min',
-    'max',
-    'step',
-)
-methods = (
-    'new',
-)
-signals = ()
-
-if not test(target, props, methods, signals):
-    exit(ENXIO)
index 7c75136f952384d4d70b4e685d91e1b928f1d93e..e17e2904523fae772d195582bb0aa694ac704931 100644 (file)
@@ -7,7 +7,6 @@ tests = {
     'alsactl-card',
     'alsactl-card-info',
     'alsactl-elem-info',
-    'alsactl-elem-info-int',
     'alsactl-elem-info-enum',
     'alsactl-elem-info-bytes',
     'alsactl-elem-info-iec60958',