<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/103028/">http://git.reviewboard.kde.org/r/103028/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 20th, 2011, 3:37 a.m., <b>Alex Fiestas</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/103028/diff/1/?file=40295#file40295line109" style="color: black; font-weight: bold; text-decoration: underline;">solid/solid/backends/udev/udevportablemediaplayer.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">109</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="n">value</span><span class="p">.</span><span class="n">split</span><span class="p">(</span><span class="n">QChar</span><span class="p">(</span><span class="sc">';'</span><span class="p">),</span> <span class="n">QString</span><span class="o">::</span><span class="n">SkipEmptyParts</span><span class="p">);</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">We have been returning "mtp" as the protocol that identify "mtp" devices, the value of the mpi files is "storage" while it should be mtp.</pre>
</blockquote>
<p>On November 22nd, 2011, 7:26 p.m., <b>Matěj Laitl</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">MTP devices should have ID_MEDIA_PLAYER == 1 si this is catched on line 93. If there is a MTP device that has ID_MEDIA_PLAYER == <string> ans <string>.mpi says AccessProtocol=storage, it is a bug in media-player-info. (it says that "storage" is for USB Mass Storage devices)</pre>
</blockquote>
<p>On November 22nd, 2011, 9:39 p.m., <b>Alex Fiestas</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Oh now I got it! so:
If MTP, libmtp set it to 1 and then you should use libmtp to get more info
If NOT mtp, m-p-i will set it to the file you should parse in order to get information.
Is that correct ?</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Absolutely.</pre>
<br />
<p>- Matěj</p>
<br />
<p>On November 5th, 2011, 4:47 p.m., Matěj Laitl wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kdelibs.</div>
<div>By Matěj Laitl.</div>
<p style="color: grey;"><i>Updated Nov. 5, 2011, 4:47 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is a second attempt at implementing PortableMediaPlayer for udev
back-end using media-player-info [3], the first attempt was [2] by
Alex Merry and this patch is heavily based on it. This patch relates to
a discussion at [1] and is just a first step, the second would
be to forward PMP interface from udev backed to udisks backed somehow
(udisks...Device interface provides NativePath attribute that links to
sysfs path that can help - on Linux)
[1] http://mail.kde.org/pipermail/kde-hardware-devel/2011-October/001481.html
[2] https://svn.reviewboard.kde.org/r/5853/
[3] http://www.freedesktop.org/wiki/Software/media-player-info
Care is taken not to change existing behaviour - e.g. when udev env
ID_MEDIA_PLAYER equals 1, behaviour is unchanged.
TODO: announce runtime-only media-player-info dependency for solid and
add it to build instructions. libmtp >= 1.0.4 is also needed at
runtime for detection of MTP devices to work. usbmuxd (dependency
of libimobiledevice) is needed at runtime for detection of Apple
iOS devices.
TODO: what about windows support?
The patch is against kdelibs KDE/4.7 branch, please forward-port.
CCBUG: 253671 # does not solve it yet, but is a first step
CCBUG: 269447
CCBUG: 269451
REVIEW: 103028
DIGEST: groundwork for better media device player detection
CCMAIL: amarok-devel@kde.org</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">1. connect iPod
2. works:
$ solid-hardware details /org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc
udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdc'
parent = '/org/kde/solid/udev' (string)
vendor = 'Apple' (string)
product = 'iPod' (string)
description = 'Portable Media Player' (string)
Block.major = 8 (0x8) (int)
Block.minor = 32 (0x20) (int)
Block.device = '/dev/sdc' (string)
PortableMediaPlayer.supportedProtocols = {'storage', 'ipod'} (string list)
PortableMediaPlayer.supportedDrivers = {'usb'} (string list)
3. not yet:
$ solid-hardware details /org/freedesktop/UDisks/devices/sdc1
udi = '/org/freedesktop/UDisks/devices/sdc1'
parent = '/org/freedesktop/UDisks/devices/sdc' (string)
vendor = 'Apple' (string)
product = 'MATOUSUV IP' (string)
description = 'MATOUSUV IP' (string)
Block.major = 8 (0x8) (int)
Block.minor = 33 (0x21) (int)
Block.device = '/dev/sdc1' (string)
StorageAccess.accessible = true (bool)
StorageAccess.filePath = '/media/MATOUSUV IP' (string)
StorageAccess.ignored = false (bool)
StorageVolume.ignored = false (bool)
StorageVolume.usage = 'FileSystem' (0x2) (enum)
StorageVolume.fsType = 'vfat' (string)
StorageVolume.label = 'MATOUSUV IP' (string)
StorageVolume.uuid = '3141-5926' (string)
StorageVolume.size = 7888957440 (0x1d637f000) (qulonglong)</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>solid/solid/CMakeLists.txt <span style="color: grey">(1a4adfa)</span></li>
<li>solid/solid/backends/udev/udevdevice.cpp <span style="color: grey">(d6c7fb4)</span></li>
<li>solid/solid/backends/udev/udevmanager.cpp <span style="color: grey">(55e655b)</span></li>
<li>solid/solid/backends/udev/udevportablemediaplayer.h <span style="color: grey">(e0348aa)</span></li>
<li>solid/solid/backends/udev/udevportablemediaplayer.cpp <span style="color: grey">(32a1893)</span></li>
<li>solid/solid/ifaces/portablemediaplayer.h <span style="color: grey">(a73120a)</span></li>
<li>solid/solid/xdgbasedirs.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>solid/solid/xdgbasedirs_p.h <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103028/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>