~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to lockscreen/UserAuthenticator.h

  • Committer: Bileto Bot
  • Author(s): Andrea Azzarone
  • Date: 2017-09-25 16:03:52 UTC
  • mfrom: (4253.3.3 fix-missing-entry-lockscreen)
  • Revision ID: ci-train-bot@canonical.com-20170925160352-kqd3v7i3wdwhixjn
Refactor the way UserAuthenticator is created and passed around. Handle failures to create new threads and fallback to a "Switch to greeter..." button in case of failure. (LP: #1311316)

Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
class UserAuthenticator
37
37
{
38
38
public:
 
39
  typedef std::shared_ptr<UserAuthenticator> Ptr;
39
40
  typedef std::function<void(bool)> AuthenticateEndCallback;
40
41
 
41
42
  virtual ~UserAuthenticator() = default;
43
44
  // Authenticate the user in a background thread.
44
45
  virtual bool AuthenticateStart(std::string const& username, AuthenticateEndCallback const&) = 0;
45
46
 
 
47
  sigc::signal<void> start_failed;
46
48
  sigc::signal<void, std::string, PromiseAuthCodePtr const&> echo_on_requested;
47
49
  sigc::signal<void, std::string, PromiseAuthCodePtr const&> echo_off_requested;
48
50
  sigc::signal<void, std::string> message_requested;