<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/123263/">https://git.reviewboard.kde.org/r/123263/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 5th, 2015, 5:54 p.m. UTC, <b>Lamarque Souza</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="https://git.reviewboard.kde.org/r/123263/diff/1/?file=360131#file360131line79" style="color: black; font-weight: bold; text-decoration: underline;">src/solid/devices/backends/kdeconnect/kdeconnectbattery.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">79</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">return</span> <span class="mi">0</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Is it possible to retrieve a correct value for this and the other values below (timeToEmpty, timeToFull, etc)?</p></pre>
 </blockquote>



 <p>On April 5th, 2015, 5:58 p.m. UTC, <b>Kai Uwe Broulik</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I suppose, but that needs implementing on the KDE Connect side</p></pre>
 </blockquote>





 <p>On April 19th, 2015, 8:14 p.m. UTC, <b>Albert Vaca Cintora</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;">From Android we could expose any of these: http://developer.android.com/reference/android/os/BatteryManager.html

Which ones would be useful in solid?</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">According to /usr/include/solid/battery.h the ones we really need are: for isPlugged we need BATTERY_PLUGGED_AC, BATTERY_PLUGGED_USB and BATTERY_PLUGGED_WIRELESS. isPowerSupply: I think it is always false in this case. type: always PhoneBattery. chargePercent: BATTERY_PROPERTY_CAPACITY. capacity: BATTERY_PROPERTY_CHARGE_COUNTER. isRechargeable: always true. chargeState: BATTERY_STATUS_CHARGING, BATTERY_STATUS_DISCHARGING, BATTERY_STATUS_FULL and BATTERY_STATUS_NOT_CHARGING; BATTERY_STATUS_UNKNOWN can also be used, but Solid does not expose such a value.</p></pre>
<br />




<p>- Lamarque</p>


<br />
<p>On April 5th, 2015, 8:56 p.m. UTC, Kai Uwe Broulik wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for kdeconnect, Solid, Albert Vaca Cintora, and Emmanuel Pescosta.</div>
<div>By Kai Uwe Broulik.</div>


<p style="color: grey;"><i>Updated April 5, 2015, 8:56 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
solid
</div>


<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This adds a KDE Connect backend to Solid enabling us to show phone battery status in the device notifier, and have the phone appear in the device notifier like an external storage.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It is pretty synchronous at the moment. Any ideas how I could improve that? I guess when someone wants to get devices, it creates a new device interface and calls allDevices() or devicesFromQuery() immediately afterwards, so I cannot just do that stuff async and defer population? Or call deviceAdded for each of the initial ones once I have them?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It requires adjustment in the kdeconnect KIO slave so it can handle addresses like kdeconnect://org/kde/kdeconnect/123456 or kdeconnect:udi=/org/kde/kdeconnect/123456 (like mtp kio does) because all Dolphin or the device notifier have is the UDI. It also needs a new device action that matches "Portable Media Player" with the "kdeconnect" protocol, similar to mtp.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">By adjusting the predicate in Dolphin's Places sidebar (and probably the file dialog) to query for the "kdeconnect" protocol, we can have its places automatically updated without having KDE Connect manually mess with KFilePlaces.</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With some crash fixes already pushed to plasma-workspace it works pretty well.</p></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>src/solid/devices/CMakeLists.txt <span style="color: grey">(9271ae1)</span></li>

 <li>src/solid/devices/backends/kdeconnect/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectbattery.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectbattery.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectdevice.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectdevice.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectdeviceinterface.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectdeviceinterface.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectmanager.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectmanager.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectportablemediaplayer.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/backends/kdeconnect/kdeconnectportablemediaplayer.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/solid/devices/managerbase.cpp <span style="color: grey">(eee4de5)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/123263/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>