It's convenient to compare two instances of address in ALSA Sequencer.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
{
*port_id = self->port;
}
+
+/**
+ * alsaseq_addr_equal:
+ * @self: A #ALSASeqAddr.
+ * @target: A #ALSASeqAddr to compare.
+ *
+ * Returns: whether the given object indicates the same element.
+ */
+gboolean alsaseq_addr_equal(const ALSASeqAddr *self, const ALSASeqAddr *target)
+{
+ const struct snd_seq_addr *lhs, *rhs;
+
+ lhs = (const struct snd_seq_addr *)self;
+ rhs = (const struct snd_seq_addr *)target;
+
+ return lhs->client == rhs->client && lhs->port == rhs->port;
+}
void alsaseq_addr_get_port_id(const ALSASeqAddr *self, guint8 *port_id);
+gboolean alsaseq_addr_equal(const ALSASeqAddr *self, const ALSASeqAddr *target);
+
G_END_DECLS
#endif
"alsaseq_addr_new";
"alsaseq_addr_get_client_id";
"alsaseq_addr_get_port_id";
+ "alsaseq_addr_equal";
"alsaseq_port_info_get_type";
"alsaseq_port_info_new";