Details
- Reviewers
drosca - Commits
- R269:0e45f900501a: Add MediaTransport API
Diff Detail
- Repository
- R269 BluezQt
- Branch
- mediatransport
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 13328 Build 13346: arc lint + arc unit
src/a2dp-codecs.h | ||
---|---|---|
33 | Are you sure about this? | |
src/mediatransport.h | ||
47 | quint16 | |
src/tpendingcall.h | ||
45 | Is this really needed? In the end, it doesn't really make the code that much better: TPendingCall<QDBusUnixFileDescriptor, uint16_t, uint16_t> *fd = transport->tryAcquire(); fd->valueAt<0>(); fd->valueAt<1>(); fd->valueAt<2>(); vs PendingCall *fd = transport->tryAcquire(); fd->values().at(0).value<QDBusUnixFileDescriptor>(); fd->values().at(1).value<uint16_t>(); fd->values().at(2).value<uint16_t>(); Or we can add convenience method T valueAt(int) so it becomes: PendingCall *fd = transport->tryAcquire(); fd->valueAt<QDBusUnixFileDescriptor>(0); fd->valueAt<uint16_t>(1); fd->valueAt<uint16_t>(2); |
src/a2dp-codecs.h | ||
---|---|---|
33 | Yes, this has also been fixed by bluez as of 2018-12-28. | |
src/tpendingcall.h | ||
45 | Actually, my intention was to provide a type-safe way to obtain return values from PendingCall and to express explicitly, what the corresponding method returns in API header. Consider: auto *fd = transport->tryAcquire(); // Method declaration will define return type. auto ret1 = fd->valueAt<0>(); auto ret2 = fd->valueAt<1>(); auto ret3 = fd->valueAt<2>(); Thus, return type (of PendingCall) is expressed in API header and clients do not need to express the return types themselves. |
src/a2dp-codecs.h | ||
---|---|---|
33 | Will it work with older versions of bluez? |
src/a2dp-codecs.h | ||
---|---|---|
33 | Bluez just defines this constant, but does not use it internally (nor we do). |
src/tpendingcall.h | ||
---|---|---|
45 | Alright, that makes sense. With KF6 we can convert all PendingCalls to this form. It would be a good idea to add TODO: KF6 somewhere to not forget it. |
src/tpendingcall.h | ||
---|---|---|
45 | Ok, i will update this patch and land it in a couple of days. |