<table><tr><td style="">davidedmundson created this revision.<br />davidedmundson added a reviewer: Plasma.<br />Herald added a project: Plasma.<br />Herald added a subscriber: plasma-devel.<br />davidedmundson requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19389">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The old code path is old and even sometimes uses the ICE protocol to<br />
start a logout from ksmserver. It's quite archaic and unreadable,<br />
KDisplayManager is even worse.</p>
<p>The new code consists of two parts.</p>
<p>A QML friendly front end QObject that we can register in a plugin that<br />
can trigger actions such as prompting a logout or suspending the system<br />
and a singleton that talks to the relevant backend.</p>
<p>Backends are:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Any logind interface</li>
<li class="remarkup-list-item">Consolekit2</li>
<li class="remarkup-list-item">Consolekit0.4 + UPower</li>
</ul>
<p>New API loading is also entirely asyncronous.</p>
<p>There are some behavioural changes:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Creating a logout prompt is called directly instead of going via</li>
</ul>
<p>ksmserver. The prompt then calls into ksmserver when accepted</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Suspend is called directly instead of going via powerdevil through</li>
</ul>
<p>some kdelibs4support solid code.</p>
<p>All DBus calls use generated XML files, instead of big QDBusMessage<br />
commands. It's a bit overkill in terms of what we generate, but that's<br />
ready for moving SessionModel in here and killing KDisplayManager.</p>
<p>Patch looks huge because of all the XML files, but is otherwise very<br />
simple.</p>
<p>This is intended to be an API break, which is fine as kworkspace is only<br />
to be used by plasma. The relevant DataSource will remain compatiable.</p>
<p>WIP: As I need to port all the calling code, and I want to port<br />
SessionsModel (probably in a different patch)</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Ran sessionstest on my logind machine<br />
I do need other people to test their setups. <br />
Especially a BSD person with CK1</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>davidedmundson/kworkspace2</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19389">https://phabricator.kde.org/D19389</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>libkworkspace/CMakeLists.txt<br />
libkworkspace/kworkspace.cpp<br />
libkworkspace/kworkspace_p.h<br />
libkworkspace/login1_manager_interface.cpp<br />
libkworkspace/loginddbustypes.h<br />
libkworkspace/org.freedesktop.ConsoleKit.Manager.xml<br />
libkworkspace/org.freedesktop.UPower.xml<br />
libkworkspace/org.freedesktop.login1.Manager.xml<br />
libkworkspace/org.freedesktop.login1.Seat.xml<br />
libkworkspace/org.freedesktop.login1.Session.xml<br />
libkworkspace/org.freedesktop.login1.User.xml<br />
libkworkspace/sessionmanagement.cpp<br />
libkworkspace/sessionmanagement.h<br />
libkworkspace/sessionmanagementbackend.cpp<br />
libkworkspace/sessionmanagementbackend.h<br />
libkworkspace/tests/CMakeLists.txt<br />
libkworkspace/tests/sessiontest.cpp</div></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>