ConsoleUser
Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com
This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.
All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.
- class LoginManagerImpl.LoginManagerImpl(system, config)¶
This is the abstract super class of all LoginManagerImpl types, the classes which actually do the loging in and out etc.
Parameters:
system: a <no title> object which connects us to the remote system
config: a <no title> object containing all the configuration for this user
- can_login()¶
Try to determine whether or not a user could login if told to do so right now. This is different from isLoggedIn because it will also check for the screen being locked or similar other situations.
It is possible that this method will “disturb” the remote system by moving the mouse or other actions which could interfere with a running ConsoleUser or human at the console.
Return: a value < 0 on error, 0 if a user could login, 1 if there is already a user logged in, 2 if the screen is locked, or 3 if the state cannot be determined (e.g., the Please Wait dialog is showing)
- is_logged_in()¶
Return: True if there is a user currently logged in (though it may not be the same user this <no title> would have logged in
- login()¶
Return: True if the login seems to happen successfully.
- logout()¶
Return: True if the logout seems to happen successfully.
- needs_config()¶
Return: True if it seems like this system needs to be configured
- passive_is_logged_in()¶
Return: True if there is a user currently logged in (though it may not be the same user this <no title> would have logged in
- restart()¶
Return: True if the restart seems to start successfully.
- try_config()¶
Attempt to configure this systems as the ConsoleUser expects it.
- LoginManagerImpl.get_login_manager(system, config, m_type=None)¶
This is a Factory method for creating an appropriate LoginManagerImpl subclass based on the specified type or the config object.
Paramters:
system: the <no title> object connected to the target system
config: the <no title> object definingi this user
m_type: the type of login manager to create, overriding the value in the user config