drumstick 2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.

Subscriber container class. More...

#include <subscription.h>

Public Member Functions

 Subscriber ()
 Default constructor.
 
 Subscriber (const Subscriber &other)
 Copy constructor. More...
 
 Subscriber (snd_seq_query_subscribe_t *other)
 Constructor. More...
 
virtual ~Subscriber ()
 Destructor.
 
Subscriberclone ()
 Copy the current object. More...
 
int getSizeOfInfo () const
 Gets the size of the ALSA query subscriber object. More...
 
int getClient ()
 Gets the subscriber's client number. More...
 
int getPort ()
 Gets the subscriober's port number. More...
 
const snd_seq_addr_t * getRoot ()
 Gets the subscriber's root address. More...
 
snd_seq_query_subs_type_t getType ()
 Gets the subscription type (read or write). More...
 
int getIndex ()
 Gets the index of the subscriber container. More...
 
int getNumSubs ()
 Gets the number of subscribers returned by a query operation. More...
 
const snd_seq_addr_t * getAddr ()
 Gets the subscriber's address. More...
 
int getQueue ()
 Gets the subscriber's queue number. More...
 
bool getExclusive ()
 Gets the subscriber's exclusive flag. More...
 
bool getTimeUpdate ()
 Gets the susbcriber's time-update flag. More...
 
bool getTimeReal ()
 Gets the subscriber's time real time-stamp flag. More...
 
void setClient (int client)
 Sets the subscriber's client number. More...
 
void setPort (int port)
 Sets the subscriber's port number. More...
 
void setRoot (snd_seq_addr_t *addr)
 Sets the subscriber's root address. More...
 
void setType (snd_seq_query_subs_type_t type)
 Sets the subscription type. More...
 
void setIndex (int index)
 Sets the index of the subscriber. More...
 
Subscriberoperator= (const Subscriber &other)
 Assignment operator. More...
 

Detailed Description

Subscriber container class.

This class is used to enumerate the subscribers of a given (root) port.

Examples
sysinfo.cpp.

Definition at line 57 of file subscription.h.

Constructor & Destructor Documentation

◆ Subscriber() [1/2]

Subscriber ( const Subscriber other)

Copy constructor.

Parameters
otherExisting Subscriber object reference

Definition at line 63 of file subscription.cpp.

◆ Subscriber() [2/2]

Subscriber ( snd_seq_query_subscribe_t *  other)
explicit

Constructor.

Parameters
otherPointer to an ALSA query subscribe object

Definition at line 73 of file subscription.cpp.

Member Function Documentation

◆ clone()

Subscriber * clone ( )

Copy the current object.

Returns
Pointer to the new object

Definition at line 91 of file subscription.cpp.

References Subscriber::Subscriber().

◆ getAddr()

const snd_seq_addr_t * getAddr ( )

Gets the subscriber's address.

Returns
Pointer to the ALSA address record
Examples
sysinfo.cpp.

Definition at line 178 of file subscription.cpp.

Referenced by MidiPort::getReadSubscribers(), and MidiPort::getWriteSubscribers().

◆ getClient()

int getClient ( )

Gets the subscriber's client number.

Returns
Client number

Definition at line 114 of file subscription.cpp.

◆ getExclusive()

bool getExclusive ( )

Gets the subscriber's exclusive flag.

Returns
Exclusive flag

Definition at line 198 of file subscription.cpp.

◆ getIndex()

int getIndex ( )

Gets the index of the subscriber container.

Returns
Index of the subscriber

Definition at line 158 of file subscription.cpp.

Referenced by PortInfo::readSubscribers().

◆ getNumSubs()

int getNumSubs ( )

Gets the number of subscribers returned by a query operation.

Returns
Number of subscribers

Definition at line 168 of file subscription.cpp.

◆ getPort()

int getPort ( )

Gets the subscriober's port number.

Returns
Port number

Definition at line 124 of file subscription.cpp.

◆ getQueue()

int getQueue ( )

Gets the subscriber's queue number.

Returns
Queue number

Definition at line 188 of file subscription.cpp.

◆ getRoot()

const snd_seq_addr_t * getRoot ( )

Gets the subscriber's root address.

Returns
Pointer to the ALSA client/port address

Definition at line 134 of file subscription.cpp.

◆ getSizeOfInfo()

int getSizeOfInfo ( ) const

Gets the size of the ALSA query subscriber object.

Returns
Size of the ALSA object

Definition at line 282 of file subscription.cpp.

◆ getTimeReal()

bool getTimeReal ( )

Gets the subscriber's time real time-stamp flag.

Returns
Time real flag

Definition at line 218 of file subscription.cpp.

◆ getTimeUpdate()

bool getTimeUpdate ( )

Gets the susbcriber's time-update flag.

Returns
Time update flag

Definition at line 208 of file subscription.cpp.

◆ getType()

snd_seq_query_subs_type_t getType ( )

Gets the subscription type (read or write).

  • SND_SEQ_QUERY_SUBS_READ: read subscriptions
  • SND_SEQ_QUERY_SUBS_WRITE: write subscriptions
Returns
Subscription type

Definition at line 148 of file subscription.cpp.

◆ operator=()

Subscriber & operator= ( const Subscriber other)

Assignment operator.

Parameters
otherExisting Subscriber object reference
Returns
This object

Definition at line 101 of file subscription.cpp.

◆ setClient()

void setClient ( int  client)

Sets the subscriber's client number.

Parameters
clientClient number

Definition at line 228 of file subscription.cpp.

◆ setIndex()

void setIndex ( int  index)

Sets the index of the subscriber.

Parameters
indexSubscriber index

Definition at line 272 of file subscription.cpp.

Referenced by PortInfo::readSubscribers().

◆ setPort()

void setPort ( int  port)

Sets the subscriber's port number.

Parameters
portPort number

Definition at line 238 of file subscription.cpp.

◆ setRoot()

void setRoot ( snd_seq_addr_t *  addr)

Sets the subscriber's root address.

Parameters
addrPointer to the root ALSA address record

Definition at line 248 of file subscription.cpp.

Referenced by PortInfo::readSubscribers().

◆ setType()

void setType ( snd_seq_query_subs_type_t  type)

Sets the subscription type.

  • SND_SEQ_QUERY_SUBS_READ: read subscriptions
  • SND_SEQ_QUERY_SUBS_WRITE: write subscriptions
Parameters
typeSubscription type

Definition at line 262 of file subscription.cpp.

Referenced by PortInfo::readSubscribers().


The documentation for this class was generated from the following files: