From 0f05883544c6b698ce76b524da4d13d77529eb31 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 22 Sep 2011 17:53:08 +0000 Subject: Add remote control socket to kdm git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1255013 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdmlib/kgreet_classic.cpp | 7 +++++++ kdmlib/kgreet_classic.h | 1 + kdmlib/kgreet_pam.cpp | 7 +++++++ kdmlib/kgreet_pam.h | 1 + kdmlib/kgreet_winbind.cpp | 7 +++++++ kdmlib/kgreet_winbind.h | 1 + kdmlib/kgreeterplugin.h | 6 ++++++ 7 files changed, 30 insertions(+) (limited to 'kdmlib') diff --git a/kdmlib/kgreet_classic.cpp b/kdmlib/kgreet_classic.cpp index 50f959596..8117429a8 100644 --- a/kdmlib/kgreet_classic.cpp +++ b/kdmlib/kgreet_classic.cpp @@ -217,6 +217,13 @@ KClassicGreeter::setUser( const TQString &user ) passwdEdit->selectAll(); } +void // virtual +KClassicGreeter::setPassword( const TQString &pass ) +{ + passwdEdit->erase(); + passwdEdit->insert( pass ); +} + void // virtual KClassicGreeter::setEnabled( bool enable ) { diff --git a/kdmlib/kgreet_classic.h b/kdmlib/kgreet_classic.h index 1467f3b99..07bf35957 100644 --- a/kdmlib/kgreet_classic.h +++ b/kdmlib/kgreet_classic.h @@ -50,6 +50,7 @@ class KClassicGreeter : public TQObject, public KGreeterPlugin { virtual void presetEntity( const TQString &entity, int field ); virtual TQString getEntity() const; virtual void setUser( const TQString &user ); + virtual void setPassword( const TQString &pass ); virtual void setEnabled( bool on ); virtual bool textMessage( const char *message, bool error ); virtual void textPrompt( const char *prompt, bool echo, bool nonBlocking ); diff --git a/kdmlib/kgreet_pam.cpp b/kdmlib/kgreet_pam.cpp index 5a9c2cbe8..19c797b44 100644 --- a/kdmlib/kgreet_pam.cpp +++ b/kdmlib/kgreet_pam.cpp @@ -263,6 +263,13 @@ KPamGreeter::setUser( const TQString &user ) } } +void // virtual +KPamGreeter::setPassword( const TQString &pass ) +{ + authEdit[0]->erase(); + authEdit[0]->insert( pass ); +} + void // virtual KPamGreeter::setEnabled(bool enable) { diff --git a/kdmlib/kgreet_pam.h b/kdmlib/kgreet_pam.h index 8691b3350..0be454674 100644 --- a/kdmlib/kgreet_pam.h +++ b/kdmlib/kgreet_pam.h @@ -50,6 +50,7 @@ class KPamGreeter : public TQObject, public KGreeterPlugin { virtual void presetEntity( const TQString &entity, int field ); virtual TQString getEntity() const; virtual void setUser( const TQString &user ); + virtual void setPassword( const TQString &pass ); virtual void setEnabled( bool on ); virtual bool textMessage( const char *message, bool error ); virtual void textPrompt( const char *prompt, bool echo, bool nonBlocking ); diff --git a/kdmlib/kgreet_winbind.cpp b/kdmlib/kgreet_winbind.cpp index ae55a4b0f..8ae12144b 100644 --- a/kdmlib/kgreet_winbind.cpp +++ b/kdmlib/kgreet_winbind.cpp @@ -297,6 +297,13 @@ KWinbindGreeter::setUser( const TQString &user ) passwdEdit->selectAll(); } +void // virtual +KWinbindGreeter::setPassword( const TQString &pass ) +{ + passwdEdit->erase(); + passwdEdit->insert( pass ); +} + void // virtual KWinbindGreeter::setEnabled( bool enable ) { diff --git a/kdmlib/kgreet_winbind.h b/kdmlib/kgreet_winbind.h index c57dc64fd..055296e34 100644 --- a/kdmlib/kgreet_winbind.h +++ b/kdmlib/kgreet_winbind.h @@ -54,6 +54,7 @@ class KWinbindGreeter : public TQObject, public KGreeterPlugin { virtual void presetEntity( const TQString &entity, int field ); virtual TQString getEntity() const; virtual void setUser( const TQString &user ); + virtual void setPassword( const TQString &pass ); virtual void setEnabled( bool on ); virtual bool textMessage( const char *message, bool error ); virtual void textPrompt( const char *prompt, bool echo, bool nonBlocking ); diff --git a/kdmlib/kgreeterplugin.h b/kdmlib/kgreeterplugin.h index 44799a622..61d9b519a 100644 --- a/kdmlib/kgreeterplugin.h +++ b/kdmlib/kgreeterplugin.h @@ -151,6 +151,12 @@ public: */ virtual void setUser( const TQString &user ) = 0; + /** + * "Push" a password into the talker. + * @param pass the password to set. + */ + virtual void setPassword( const TQString &pass ) = 0; + /** * En-/disable any widgets contained in the talker. * Will be called only when not running. -- cgit v1.2.1