~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to lockscreen/UserPromptView.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:
25
25
 
26
26
#include <Nux/Nux.h>
27
27
#include <Nux/View.h>
 
28
#include "UnityCore/GLibSource.h"
28
29
#include "UnityCore/SessionManager.h"
29
30
 
30
31
#include "LockScreenAbstractPromptView.h"
31
 
#include "UserAuthenticatorPam.h"
32
32
#include "unity-shared/IMTextEntry.h"
33
33
 
34
34
namespace nux
48
48
class UserPromptView : public AbstractUserPromptView
49
49
{
50
50
public:
51
 
  UserPromptView(session::Manager::Ptr const& session_manager);
 
51
  UserPromptView(session::Manager::Ptr const& session_manager,
 
52
                 UserAuthenticator::Ptr const& user_authenticator);
52
53
 
53
54
  nux::View* focus_view();
54
55
 
70
71
  void ShowAuthenticated(bool successful);
71
72
  void StartAuthentication();
72
73
  void DoUnlock();
 
74
  void HandleAuthenticationStartFailure();
73
75
 
74
 
  session::Manager::Ptr session_manager_;
75
 
  UserAuthenticatorPam user_authenticator_;
76
76
  std::shared_ptr<nux::AbstractPaintLayer> bg_layer_;
77
77
  StaticCairoText* username_;
78
78
  nux::VLayout* msg_layout_;
84
84
 
85
85
  bool prompted_;
86
86
  bool unacknowledged_messages_;
 
87
  int num_retry_auth_ = 0;
 
88
 
 
89
  glib::SourceManager source_manager_;
87
90
};
88
91
 
89
92
}