D22107: Add MediaTransport API

David Rosca noreply at phabricator.kde.org
Thu Jun 27 06:45:55 BST 2019


drosca requested changes to this revision.
drosca added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> a2dp-codecs.h:33
>  #define A2DP_CODEC_MPEG24		0x02
> -#define A2DP_CODEC_ATRAC		0x03
> +#define A2DP_CODEC_ATRAC		0x04
>  #define A2DP_CODEC_VENDOR		0xFF

Are you sure about this?

> mediatransport.h:47
> +    Q_PROPERTY(State state READ state NOTIFY stateChanged)
> +    Q_PROPERTY(uint16_t volume READ volume NOTIFY volumeChanged)
> +

`quint16`

> tpendingcall.h:45
> +template<class...T>
> +class TPendingCall : public PendingCall
> +{

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);

REPOSITORY
  R269 BluezQt

REVISION DETAIL
  https://phabricator.kde.org/D22107

To: mweichselbaumer, drosca
Cc: kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190627/c289e9cb/attachment.html>


More information about the Kde-frameworks-devel mailing list