2 * hfdialer - Hands Free Voice Call Manager
3 * Copyright (c) 2012, Intel Corporation.
5 * This program is licensed under the terms and conditions of the
6 * Apache License, version 2.0. The full text of the Apache License is at
7 * http://www.apache.org/licenses/LICENSE-2.0
13 #include <pulse/context.h>
14 #include <pulse/pulseaudio.h>
15 #include <pulse/glib-mainloop.h>
37 class PAControl : public QObject
41 PAControl(QObject *parent = 0);
44 static PAControl* instance();
47 PADevice* findBluezSource();
48 PADevice* findBluezSink();
49 PADevice* findAlsaSource(QString alsasource);
50 PADevice* findAlsaSink(QString alsasink);
51 PAModule* findModule(QString name, QString pattern);
52 QList<PAModule*> getAllModules();
53 void routeSourceWithSink(PADevice *source, PADevice *sink);
55 void unloadModule(PAModule* module);
56 void toggleMuteSource(PADevice *source, bool isMute);
59 void setErrorMsg(QString msg);
60 QString getErrorMsg();
62 void setState(bool state);
66 void addSource(PADevice* device);
67 void addSink(PADevice* device);
68 void addModule(PAModule* module);
70 QList<PADevice*> sourceList;
71 QList<PADevice*> sinkList;
72 QList<PAModule*> moduleList;
79 void sourceAppeared(PADevice* device);
80 void sinkAppeared(PADevice* device);
81 void moduleAppeared(PAModule* device);
85 void onSourceAppeared(PADevice* device);
86 void onSinkAppeared(PADevice* device);
87 void onCallsChanged();
103 bool m_btSourceReady;
107 #endif // PACONTROL_H