]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
ctl: elem_info_bytes: dismiss ALSACtlElemInfoBytes
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-bytes.c [deleted file]
src/ctl/elem-info-bytes.h [deleted file]
src/ctl/meson.build
tests/alsactl-elem-info-bytes [deleted file]
tests/meson.build

index 24ae464ae17dbef4975fd8f2bc44888d83e72e3c..5cae2e4a2bc84703383db15d65e31a363737fc6e 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-bytes.xml"/>
         <xi:include href="xml/elem-info-iec60958.xml"/>
         <xi:include href="xml/elem-info-int64.xml"/>
         <xi:include href="xml/elem-value.xml"/>
index d4735bd9958f48ac6fa5a128cc67279495a860cd..f56d7ecbd42ed183025c1e74ffe5e4d2130d9a4c 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_bytes_get_type
 alsactl_elem_info_iec60958_get_type
 alsactl_elem_info_int64_get_type
 alsactl_elem_value_get_type
diff --git a/src/ctl/elem-info-bytes.c b/src/ctl/elem-info-bytes.c
deleted file mode 100644 (file)
index b0e60e5..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#include "elem-info-bytes.h"
-#include "privates.h"
-
-/**
- * SECTION: elem-info-bytes
- * @Title: ALSACtlElemInfoBytes
- * @Short_description: A GObject-derived object to represent the information
- *                     of bytes type of element
- *
- * A #ALSACtlElemInfoBytes is a GObject-derived object to represent the
- * information of bytes type of element, which contains byte values. The object
- * inherits methods and properties of #ALSACtlElemInfo. The call of
- * alsactl_card_get_elem_info() can returns the instance of object, or the call
- * of alsactl_card_add_elems() requires the instance of object as argument.
- */
-G_DEFINE_TYPE(ALSACtlElemInfoBytes, alsactl_elem_info_bytes, ALSACTL_TYPE_ELEM_INFO)
-
-enum ctl_elem_info_bytes_prop_type {
-    CTL_ELEM_INFO_BYTES_PROP_VALUE_COUNT = 1,
-    CTL_ELEM_INFO_BYTES_PROP_COUNT,
-};
-static GParamSpec *ctl_elem_info_bytes_props[CTL_ELEM_INFO_BYTES_PROP_COUNT] = { NULL, };
-
-static void ctl_elem_info_bytes_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_BYTES_PROP_VALUE_COUNT:
-        info->count = g_value_get_uint(val);
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, id, spec);
-        break;
-    }
-}
-
-static void ctl_elem_info_bytes_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_BYTES_PROP_VALUE_COUNT:
-        g_value_set_uint(val, info->count);
-        break;
-    default:
-        G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, id, spec);
-        break;
-    }
-}
-
-static void alsactl_elem_info_bytes_class_init(ALSACtlElemInfoBytesClass *klass)
-{
-    GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
-
-    gobject_class->set_property = ctl_elem_info_bytes_set_property;
-    gobject_class->get_property = ctl_elem_info_bytes_get_property;
-
-    ctl_elem_info_bytes_props[CTL_ELEM_INFO_BYTES_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);
-
-    g_object_class_install_properties(gobject_class,
-                                      CTL_ELEM_INFO_BYTES_PROP_COUNT,
-                                      ctl_elem_info_bytes_props);
-}
-
-static void alsactl_elem_info_bytes_init(ALSACtlElemInfoBytes *self)
-{
-    return;
-}
-
-/**
- * alsactl_elem_info_bytes_new:
- *
- * Allocate and return an instance of ALSACtlElemInfoBytes.
- *
- * Returns: A #ALSACtlElemInfoBytes.
- */
-ALSACtlElemInfoBytes *alsactl_elem_info_bytes_new()
-{
-    return g_object_new(ALSACTL_TYPE_ELEM_INFO_BYTES,
-                        "type", ALSACTL_ELEM_TYPE_BYTES, NULL);
-}
diff --git a/src/ctl/elem-info-bytes.h b/src/ctl/elem-info-bytes.h
deleted file mode 100644 (file)
index 4089d6b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#ifndef __ALSA_GOBJECT_ALSACTL_ELEM_INFO_BYTES__H__
-#define __ALSA_GOBJECT_ALSACTL_ELEM_INFO_BYTES__H__
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <ctl/elem-info.h>
-
-G_BEGIN_DECLS
-
-#define ALSACTL_TYPE_ELEM_INFO_BYTES     (alsactl_elem_info_bytes_get_type())
-
-#define ALSACTL_ELEM_INFO_BYTES(obj)                            \
-    (G_TYPE_CHECK_INSTANCE_CAST((obj),                          \
-                                ALSACTL_TYPE_ELEM_INFO_BYTES,   \
-                                ALSACtlElemInfoBytes))
-#define ALSACTL_IS_ELEM_INFO_BYTES(obj)                         \
-    (G_TYPE_CHECK_INSTANCE_TYPE((obj),                          \
-                                ALSACTL_TYPE_ELEM_INFO_BYTES))
-
-#define ALSACTL_ELEM_INFO_BYTES_CLASS(klass)                    \
-    (G_TYPE_CHECK_CLASS_CAST((klass),                           \
-                             ALSACTL_TYPE_ELEM_INFO_BYTES,      \
-                             ALSACtlElemInfoBytesClass))
-#define ALSACTL_IS_ELEM_INFO_BYTES_CLASS(klass)                 \
-    (G_TYPE_CHECK_CLASS_TYPE((klass),                           \
-                             ALSACTL_TYPE_ELEM_INFO_BYTES))
-#define ALSACTL_ELEM_INFO_BYTES_GET_CLASS(obj)                  \
-    (G_TYPE_INSTANCE_GET_CLASS((obj),                           \
-                               ALSACTL_TYPE_ELEM_INFO_BYTES,    \
-                               ALSACtlElemInfoBytesClass))
-
-typedef struct _ALSACtlElemInfoBytes         ALSACtlElemInfoBytes;
-typedef struct _ALSACtlElemInfoBytesClass    ALSACtlElemInfoBytesClass;
-
-struct _ALSACtlElemInfoBytes {
-    ALSACtlElemInfo parent_instance;
-};
-
-struct _ALSACtlElemInfoBytesClass {
-    ALSACtlElemInfoClass parent_class;
-};
-
-GType alsactl_elem_info_bytes_get_type(void) G_GNUC_CONST;
-
-ALSACtlElemInfoBytes *alsactl_elem_info_bytes_new();
-
-G_END_DECLS
-
-#endif
index 270b8a3d50bdf79c961696e4754503778877fcab..dc2ded331cef85d227ebd3ade81504caa3f79daa 100644 (file)
@@ -14,7 +14,6 @@ sources = files(
   'card-info.c',
   'elem-id.c',
   'elem-info.c',
-  'elem-info-bytes.c',
   'elem-info-iec60958.c',
   'elem-info-int64.c',
   'elem-value.c',
@@ -26,7 +25,6 @@ headers = files(
   'card-info.h',
   'elem-id.h',
   'elem-info.h',
-  'elem-info-bytes.h',
   'elem-info-iec60958.h',
   'elem-info-int64.h',
   'elem-value.h',
diff --git a/tests/alsactl-elem-info-bytes b/tests/alsactl-elem-info-bytes
deleted file mode 100644 (file)
index 4feebbf..0000000
+++ /dev/null
@@ -1,22 +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.ElemInfoBytes()
-props = (
-    'value-count',
-)
-methods = (
-    'new',
-)
-signals = ()
-
-if not test(target, props, methods, signals):
-    exit(ENXIO)
index bd4c8625035862e6928b17792f38f6d688449764..9ffbe00d790619b27c517ad02fc08b23357142db 100644 (file)
@@ -7,7 +7,6 @@ tests = {
     'alsactl-card',
     'alsactl-card-info',
     'alsactl-elem-info',
-    'alsactl-elem-info-bytes',
     'alsactl-elem-info-iec60958',
     'alsactl-elem-info-int64',
     'alsactl-elem-value',