snd_seq_query_port_subscribers

Name

snd_seq_query_port_subscribers -- query port subscriber list

Synopsis

int snd_seq_query_port_subscribers(snd_seq_t *handle, snd_seq_query_subs_t *info);

Description

Queries the subscribers accessing to a port. The query information is specified in info argument, which takes the following structure.

typedef struct {
	int client;
	int port;
	int type;		/* READ or WRITE */
	int index;		/* 0..N-1 */
	int num_subs;		/* R/O: number of subscriptions on this port */
	snd_seq_addr_t addr;	/* R/O: result */
	unsigned char queue;	/* R/O: result */
	int exclusive: 1;	/* R/O: result */
	int realtime: 1;	/* R/O: result */
	int convert_time: 1;	/* R/O: result */
	char reserved[64];	/* for future use */
} snd_seq_query_subs_t;
The target client and port are specified in client and port fields. The type field is the type of subscription direction, either read (data is sent from another port to this port) or write (data is sent from this port to anohter).

ValueDescription
SND_SEQ_QUERY_SUBS_READ Queries the read subscriptions.
SND_SEQ_QUERY_SUBS_WRITE Queries the write subscriptions.

The index is the index of the subscriber to be queried. For the first call, zero should be given to it. Other fields are read only and filled with results in query.

The num_subs field is the number of subscriptions established on this port for the given direction. The addr is the port address of source or destination for read or write direction, respectively. The queue, exclusive, realtime, convert_time are identical with ones of snd_seq_port_subscribe_t.

Function returns zero if successful, or a negative error code.

See Also

snd_seq_subscribe_port, snd_seq_port_subscribe_t