]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
timer: add GLib enumeration to report type of error for ALSATimer.UserInstance
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 14 Nov 2020 08:28:09 +0000 (17:28 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 14 Nov 2020 08:28:09 +0000 (17:28 +0900)
This commit adds new GLib enumeration for error reporting in
instance of ALSATimerUserInstance class.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/timer/alsatimer-enum-types.h
src/timer/alsatimer.map
tests/alsatimer-enums

index fd728b0483d65d69a61e01654b12e919b367ab34..02d528b3c7c73cf46fcec0fe8f22ee68ac81d802 100644 (file)
@@ -122,4 +122,14 @@ typedef enum {
     ALSATIMER_EVENT_DATA_TYPE_TSTAMP,
 } ALSATimerEventDataType;
 
+/**
+ * ALSATimerUserInstanceError:
+ * @ALSATIMER_USER_INSTANCE_ERROR_FAILED:           The system call failed.
+ *
+ * A set of error code for GError with domain which equals to #alsatimer_user_instance_error_quark()
+ */
+typedef enum {
+    ALSATIMER_USER_INSTANCE_ERROR_FAILED,
+} ALSATimerUserInstanceError;
+
 #endif
index 7cd05746c024897265c982489c482049a67903db..a5e4da994e88e02b994025d38277f4a086b0d434 100644 (file)
@@ -73,3 +73,7 @@ ALSA_GOBJECT_0_0_0 {
   local:
     *;
 };
+
+ALSA_GOBJECT_0_2_0 {
+    "alsatimer_user_instance_error_get_type";
+} ALSA_GOBJECT_0_0_0;
index dad6f07887d463ab75eb3c7d359c2cf06554b348..4a412966b599894b1d16e09a885c4252883c1380 100644 (file)
@@ -56,6 +56,10 @@ event_data_types = (
     'TSTAMP',
 )
 
+user_instance_error_types = (
+    'FAILED',
+)
+
 types = {
     ALSATimer.Class:                class_types,
     ALSATimer.SlaveClass:           slave_class_types,
@@ -64,6 +68,7 @@ types = {
     ALSATimer.InstanceParamFlag:    instance_param_flags,
     ALSATimer.EventType:            event_types,
     ALSATimer.EventDataType:        event_data_types,
+    ALSATimer.UserInstanceError:    user_instance_error_types,
 }
 
 for obj, types in types.items():