Changeset View
Changeset View
Standalone View
Standalone View
src/port.h
Show All 34 Lines | |||||
35 | public: | 35 | public: | ||
36 | 36 | | |||
37 | Port(QObject *parent); | 37 | Port(QObject *parent); | ||
38 | virtual ~Port(); | 38 | virtual ~Port(); | ||
39 | 39 | | |||
40 | template<typename PAInfo> | 40 | template<typename PAInfo> | ||
41 | void setInfo(const PAInfo *info) | 41 | void setInfo(const PAInfo *info) | ||
42 | { | 42 | { | ||
43 | Profile::setInfo(info); | 43 | Availability newAvailability; | ||
44 | switch (info->available) { | ||||
45 | case PA_PORT_AVAILABLE_NO: | ||||
46 | newAvailability = Unavailable; | ||||
47 | break; | ||||
48 | case PA_PORT_AVAILABLE_YES: | ||||
49 | newAvailability = Available; | ||||
50 | break; | ||||
51 | default: | ||||
52 | newAvailability = Unknown; | ||||
53 | } | ||||
54 | setCommonInfo(info, newAvailability); | ||||
44 | } | 55 | } | ||
45 | }; | 56 | }; | ||
46 | 57 | | |||
47 | } // QPulseAudio | 58 | } // QPulseAudio | ||
48 | 59 | | |||
49 | #endif // PORT_H | 60 | #endif // PORT_H |