pa-card-profile-tray/qpulse.h

38 lines
825 B
C
Raw Normal View History

2018-10-01 07:00:27 +00:00
#ifndef QPULSE_H
#define QPULSE_H
#include <QObject>
#include <pulse/pulseaudio.h>
class QPulse : public QObject
{
Q_OBJECT
public:
explicit QPulse(QObject *parent = 0);
~QPulse();
pa_context_state_t ConnectionState();
void RequestServerInfo();
void RequestCardInfo();
signals:
void ConnectionStateChanged();
void GotServerInfo(const pa_server_info& i);
void GotCardInfoList(const pa_card_info& i, int eol);
2018-10-01 07:00:27 +00:00
public slots:
protected:
pa_threaded_mainloop* ml;
pa_context *c;
private:
static void onConnectionStateChangedSt(pa_context *c, void *userdata);
static void onGotServerInfoSt(pa_context *c, const pa_server_info *i, void *userdata);
static void onGotCardInfoListSt(pa_context *c, const pa_card_info *i, int eol, void *userdata);
};
#endif // QPULSE_H