<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="https://git.reviewboard.kde.org/r/117339/">https://git.reviewboard.kde.org/r/117339/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">While you're at it, do you think it would be worthwhile to also add the other (new) properties, like temperature?</pre>
<br />
<div>
<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/117339/diff/2/?file=262435#file262435line1" style="color: black; font-weight: bold; text-decoration: underline;">src/solid/backends/hal/halbattery.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">/*</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">/*</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think you can completely ignore the HAL backend, afaik Alex wanted to drop it completely.</pre>
</div>
<br />
<div>
<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/117339/diff/2/?file=262440#file262440line45" style="color: black; font-weight: bold; text-decoration: underline;">src/solid/ifaces/battery.h</a>
<span style="font-weight: normal;">
(Diff revision 2)
</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; ">public:</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">44</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * Indicates if this battery is plugged.</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">45</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * Indicates if this battery is plugged.</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix the comment to match the method name</pre>
</div>
<br />
<p>- Lukáš Tinkl</p>
<br />
<p>On April 2nd, 2014, 9:33 p.m. CEST, Kai Uwe Broulik wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Solid and Àlex Fiestas.</div>
<div>By Kai Uwe Broulik.</div>
<p style="color: grey;"><i>Updated April 2, 2014, 9:33 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;">This adds the following functionality to Solid::Battery:
- timeToFull and timeToEmpty (at the moment provided by PowerDevil but for all batteries combined, this patch does it individually for each)
- rename isPlugged to isPresent (as plugged always confused me - it has nothing to do with whether AC is plugged in but if the battery is "present in its bay", it's also the name of the UPower iface)
- FullyCharged battery state, we cannot rely on the battery being 100%, and since the info is provided by UPower (not on HAL), why not use it
- RecallVendor/RecallUrl when a battery has been recalled by the vendor, currently provided/handled by PowerDevil
- Serial number of the battery
Sorry for the hard to read patch but I also re-ordered some methods to have the order in all implementations and headers the same.</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;">Compiles, solid-hardware5 details /org/freedesktop/UPower/devices/battery_BAT0 reports:
udi = '/org/freedesktop/UPower/devices/battery_BAT0'
parent = '/org/freedesktop/UPower' (string)
vendor = 'ASUSTeK' (string)
product = 'UX31-35' (string)
description = 'Lithium Ion Battery' (string)
Battery.present = true (bool)
Battery.type = 'PrimaryBattery' (0x3) (enum)
Battery.chargePercent = 31 (0x1f) (int)
Battery.capacity = 83 (0x53) (int)
Battery.rechargeable = true (bool)
Battery.powerSupply = true (bool)
Battery.chargeState = 'Discharging' (0x2) (enum)
Battery.timeToEmpty = 5105 (0x13f1) (qlonglong)
Battery.timeToFull = 0 (0x0) (qlonglong)
Battery.energy = '13.223' (string) ? dunno why it says string, it's double everywhere
Battery.energyRate = '9.324' (string) ? same
Battery.voltage = '7.4' (string) ? same
Battery.recalled = false (bool)
Battery.recallVendor = '' (string)
Battery.recallUrl = '' (string)
Battery.serial = '' (string)</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/backends/upower/upowerbattery.h <span style="color: grey">(f0f41b5)</span></li>
<li>src/solid/backends/upower/upowerbattery.cpp <span style="color: grey">(c771f68)</span></li>
<li>src/solid/battery.h <span style="color: grey">(bbf2201)</span></li>
<li>src/solid/battery.cpp <span style="color: grey">(3cc376f)</span></li>
<li>src/solid/ifaces/battery.h <span style="color: grey">(864f93d)</span></li>
<li>src/solid/backends/fakehw/fakebattery.h <span style="color: grey">(f544613)</span></li>
<li>src/solid/backends/fakehw/fakebattery.cpp <span style="color: grey">(9af4c6c)</span></li>
<li>src/solid/backends/hal/halbattery.h <span style="color: grey">(71d654d)</span></li>
<li>src/solid/backends/hal/halbattery.cpp <span style="color: grey">(a2ac83d)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/117339/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>