The name of EventDataTstamp is redundant.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
#include <alsatimer-enums.h>
#include <tick-event.h>
-#include <event-data-tstamp.h>
+#include <tstamp-event.h>
#include <device-id.h>
#include <device-info.h>
"alsatimer_instance_status_get_type";
"alsatimer_instance_status_new";
"alsatimer_instance_status_get_tstamp";
-
- "alsatimer_event_data_tstamp_get_type";
- "alsatimer_event_data_tstamp_get_event";
- "alsatimer_event_data_tstamp_get_tstamp";
- "alsatimer_event_data_tstamp_get_val";
local:
*;
};
"alsatimer_tick_event_get_type";
"alsatimer_tick_event_get_resolution";
"alsatimer_tick_event_get_ticks";
+
+ "alsatimer_tstamp_event_get_type";
+ "alsatimer_tstamp_event_get_event";
+ "alsatimer_tstamp_event_get_tstamp";
+ "alsatimer_tstamp_event_get_val";
} ALSA_GOBJECT_0_2_0;
+++ /dev/null
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#ifndef __ALSA_GOBJECT_ALSATIMER_EVENT_DATA_TSTAMP_H__
-#define __ALSA_GOBJECT_ALSATIMER_EVENT_DATA_TSTAMP_H__
-
-#include <alsatimer.h>
-
-G_BEGIN_DECLS
-
-#define ALSATIMER_TYPE_EVENT_DATA_TSTAMP (alsatimer_event_data_tstamp_get_type())
-
-typedef struct snd_timer_tread ALSATimerEventDataTstamp;
-
-GType alsatimer_event_data_tstamp_get_type() G_GNUC_CONST;
-
-void alsatimer_event_data_tstamp_get_event(const ALSATimerEventDataTstamp *self,
- ALSATimerTstampEventType *event);
-
-void alsatimer_event_data_tstamp_get_tstamp(const ALSATimerEventDataTstamp *self,
- gint64 *const tstamp[2]);
-
-void alsatimer_event_data_tstamp_get_val(const ALSATimerEventDataTstamp *self,
- guint *val);
-
-G_END_DECLS
-
-#endif
'instance-params.c',
'instance-status.c',
'tick-event.c',
- 'event-data-tstamp.c',
+ 'tstamp-event.c',
)
headers = files(
'instance-params.h',
'instance-status.h',
'tick-event.h',
- 'event-data-tstamp.h',
+ 'tstamp-event.h',
)
privates = files(
#include "privates.h"
/**
- * ALSATimerEventDataTstamp:
+ * ALSATimerTstampEvent:
* A boxed object to represent event of timer with tstamp.
*
- * A [struct@EventDataTstamp] is a boxed object to represent event of timer with tstamp.
+ * A [struct@TstampEvent] is a boxed object to represent event of timer with tstamp.
*
* The object wraps `struct snd_timer_tread` in UAPI of Linux sound subsystem.
*/
-ALSATimerEventDataTstamp *timer_event_data_tstamp_copy(const ALSATimerEventDataTstamp *self)
+ALSATimerTstampEvent *timer_tstamp_event_copy(const ALSATimerTstampEvent *self)
{
#ifdef g_memdup2
return g_memdup2(self, sizeof(*self));
#endif
}
-G_DEFINE_BOXED_TYPE(ALSATimerEventDataTstamp, alsatimer_event_data_tstamp, timer_event_data_tstamp_copy, g_free)
+G_DEFINE_BOXED_TYPE(ALSATimerTstampEvent, alsatimer_tstamp_event, timer_tstamp_event_copy, g_free)
/**
- * alsatimer_event_data_tstamp_get_event:
- * @self: A [struct@EventDataTstamp].
+ * alsatimer_tstamp_event_get_event:
+ * @self: A [struct@TstampEvent].
* @event: (out): The type of tstamp event, one of [enum@TstampEventType].
*
* Get the kind of event for the timestamp event.
*/
-void alsatimer_event_data_tstamp_get_event(const ALSATimerEventDataTstamp *self,
- ALSATimerTstampEventType *event)
+void alsatimer_tstamp_event_get_event(const ALSATimerTstampEvent *self,
+ ALSATimerTstampEventType *event)
{
*event = (ALSATimerTstampEventType)self->event;
}
/**
- * alsatimer_event_data_tstamp_get_tstamp:
- * @self: A [struct@EventDataTstamp].
- * @tstamp: (array fixed-size=2)(inout): The array with two elements for the seconds and
+ * alsatimer_tstamp_event_get_tstamp:
+ * @self: A [struct@TstampEvent].
+ * @tstamp: (array fixed-size=2) (inout): The array with two elements for the seconds and
* nanoseconds part of timestamp when the instance queues the timestamp event.
*
* Get the seconds and nanoseconds part for the timestamp event.
*/
-void alsatimer_event_data_tstamp_get_tstamp(const ALSATimerEventDataTstamp *self,
- gint64 *const tstamp[2])
+void alsatimer_tstamp_event_get_tstamp(const ALSATimerTstampEvent *self, gint64 *const tstamp[2])
{
(*tstamp)[0] = (gint64)self->tstamp.tv_sec;
(*tstamp)[1] = (gint64)self->tstamp.tv_nsec;
}
/**
- * alsatimer_event_data_tstamp_get_val:
- * @self: A [struct@EventDataTstamp].
+ * alsatimer_tstamp_event_get_val:
+ * @self: A [struct@TstampEvent].
* @val: (out): The value depending on the type of timestamp event.
*
* Get the value depending on the type of timestamp event.
*/
-void alsatimer_event_data_tstamp_get_val(const ALSATimerEventDataTstamp *self,
- guint *val)
+void alsatimer_tstamp_event_get_val(const ALSATimerTstampEvent *self, guint *val)
{
*val = self->val;
}
--- /dev/null
+// SPDX-License-Identifier: LGPL-3.0-or-later
+#ifndef __ALSA_GOBJECT_ALSATIMER_TSTAMP_EVENT_H__
+#define __ALSA_GOBJECT_ALSATIMER_TSTAMP_EVENT_H__
+
+#include <alsatimer.h>
+
+G_BEGIN_DECLS
+
+#define ALSATIMER_TYPE_TSTAMP_EVENT (alsatimer_tstamp_event_get_type())
+
+typedef struct snd_timer_tread ALSATimerTstampEvent;
+
+GType alsatimer_tstamp_event_get_type() G_GNUC_CONST;
+
+void alsatimer_tstamp_event_get_event(const ALSATimerTstampEvent *self,
+ ALSATimerTstampEventType *event);
+
+void alsatimer_tstamp_event_get_tstamp(const ALSATimerTstampEvent *self, gint64 *const tstamp[2]);
+
+void alsatimer_tstamp_event_get_val(const ALSATimerTstampEvent *self, guint *val);
+
+G_END_DECLS
+
+#endif
/**
* ALSATimerUserInstance::handle-tstamp-event:
* @self: A [class@UserInstance].
- * @event: (transfer none): The instance of [struct@EventDataTstamp].
+ * @event: (transfer none): The instance of [struct@TstampEvent].
*
* Emitted when timestamp event occurs.
*/
G_STRUCT_OFFSET(ALSATimerUserInstanceClass, handle_tstamp_event),
NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
- G_TYPE_NONE, 1, ALSATIMER_TYPE_EVENT_DATA_TSTAMP);
+ G_TYPE_NONE, 1, ALSATIMER_TYPE_TSTAMP_EVENT);
/**
* ALSATimerUserInstance::handle-disconnection:
/**
* ALSATimerUserInstanceClass::handle_tstamp_event:
* @self: A [class@UserInstance].
- * @event: (transfer none): An object derived from [struct@EventDataTstamp].
+ * @event: (transfer none): An object derived from [struct@TstampEvent].
*
* Class closure for the [signal@UserInstance::handle-tstamp-event] signal.
*/
- void (*handle_tstamp_event)(ALSATimerUserInstance *self, const ALSATimerEventDataTstamp *event);
+ void (*handle_tstamp_event)(ALSATimerUserInstance *self, const ALSATimerTstampEvent *event);
/**
* ALSATimerUserInstanceClass::handle_disconnection: