]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
timer: add enumeration for the type of event
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 9 Feb 2020 03:20:53 +0000 (12:20 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Tue, 11 Feb 2020 04:28:18 +0000 (13:28 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/timer/alsatimer-enum-types.h
src/timer/alsatimer.map
tests/alsatimer-enums

index c1292d0775df04fbfd021f3bef92b8ddc66a1d2a..70449f9b3ccd792b9ab5340cb6b0f2421de5139c 100644 (file)
@@ -110,4 +110,16 @@ typedef enum
     ALSATIMER_EVENT_TYPE_MRESUME    = SNDRV_TIMER_EVENT_MRESUME,
 } ALSATimerEventType;
 
+/**
+ * ALSATimerEventDataType
+ * @ALSATIMER_EVENT_DATA_TYPE_TICK:         The data for tick event.
+ * @ALSATIMER_EVENT_DATA_TYPE_TIMESTAMP:    The data for timestamp event.
+ *
+ * A set of enumerations for the type of event data.
+ */
+typedef enum {
+    ALSATIMER_EVENT_DATA_TYPE_TICK,
+    ALSATIMER_EVENT_DATA_TYPE_TIMESTAMP,
+} ALSATimerEventDataType;
+
 #endif
index 030945a0e5309a3d25351a33f9fd045cee0c5172..4f71b1917842ad70874ae0f3beae83c91c30f250 100644 (file)
@@ -6,6 +6,7 @@ ALSA_GOBJECT_0_0_0 {
     "alsatimer_device_info_flag_get_type";
     "alsatimer_instance_param_flag_get_type";
     "alsatimer_event_type_get_type";
+    "alsatimer_event_data_type_get_type";
 
     "alsatimer_get_sysname";
     "alsatimer_get_devnode";
index b5dd331372e42fc61c53f5dfa84ec749da44b889..0923ac3d89641400f7ea9a4d0a65dd41997f1589 100644 (file)
@@ -51,6 +51,11 @@ event_types = (
     'MRESUME',
 )
 
+event_data_types = (
+    'TICK',
+    'TIMESTAMP',
+)
+
 types = {
     ALSATimer.Class:                class_types,
     ALSATimer.SlaveClass:           slave_class_types,
@@ -58,6 +63,7 @@ types = {
     ALSATimer.DeviceInfoFlag:       device_info_flags,
     ALSATimer.InstanceParamFlag:    instance_param_flags,
     ALSATimer.EventType:            event_types,
+    ALSATimer.EventDataType:        event_data_types,
 }
 
 for obj, types in types.items():