dbusmock.templates.logind ========================= .. py:module:: dbusmock.templates.logind .. autoapi-nested-parse:: systemd logind mock template This creates the expected methods and properties of the main org.freedesktop.login1.Manager object. You can specify D-Bus property values like "CanSuspend" or the return value of Inhibit() in "parameters". Attributes ---------- .. autoapisummary:: dbusmock.templates.logind.__author__ dbusmock.templates.logind.__copyright__ dbusmock.templates.logind.BUS_NAME dbusmock.templates.logind.MAIN_OBJ dbusmock.templates.logind.MAIN_IFACE dbusmock.templates.logind.SYSTEM_BUS Functions --------- .. autoapisummary:: dbusmock.templates.logind.load dbusmock.templates.logind.ListUsers dbusmock.templates.logind.ListSessions dbusmock.templates.logind.Inhibit dbusmock.templates.logind.ListInhibitors dbusmock.templates.logind.AddSeat dbusmock.templates.logind.AddUser dbusmock.templates.logind.AddSession Module Contents --------------- .. py:data:: __author__ :value: 'Martin Pitt' .. py:data:: __copyright__ :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ (c) 2013 Canonical Ltd. (c) 2017 - 2022 Martin Pitt """ .. raw:: html
.. py:data:: BUS_NAME :value: 'org.freedesktop.login1' .. py:data:: MAIN_OBJ :value: '/org/freedesktop/login1' .. py:data:: MAIN_IFACE :value: 'org.freedesktop.login1.Manager' .. py:data:: SYSTEM_BUS :value: True .. py:function:: load(mock, parameters) .. py:function:: ListUsers(_) .. py:function:: ListSessions(_) .. py:function:: Inhibit(_, what, who, why, mode) .. py:function:: ListInhibitors(_) .. py:function:: AddSeat(self, seat) Convenience method to add a seat. Return the object path of the new seat. .. py:function:: AddUser(self, uid, username, active) Convenience method to add a user. Return the object path of the new user. .. py:function:: AddSession(self, session_id, seat, uid, username, active) Convenience method to add a session. If the given seat and/or user do not exit, they will be created. Return the object path of the new session.