7699d7ec | #ifndef _CONVERSATION_H #define _CONVERSATION_H #include <security/pam_modules.h> |
0b6e39a6 | #include <string> |
caf7db60 | #include <memory> |
0b6e39a6 | |
01c00cfe | #include "pam.h" |
7699d7ec | |
cdf7fd74 | class conversation_result { private: std::string token_; std::string user_name_; public: |
b017a4d2 | conversation_result (std::string user_name, std::string token) : token_ (token), user_name_ (user_name) {} |
cdf7fd74 | std::string token() { return token_; } std::string user_name() { return user_name_; } |
caf7db60 | }; |
cdf7fd74 | class conversations_ifc { public: virtual ~conversations_ifc() {} virtual conversation_result initiate_conversation() { |
b017a4d2 | return conversation_result ("",""); |
cdf7fd74 | } |
caf7db60 | }; |
8a15acc6 | |
cdf7fd74 | class conversations : public conversations_ifc { private: std::shared_ptr<conversations_ifc> delegate_; public: |
b017a4d2 | conversations() : conversations (std::shared_ptr<conversations_ifc> (new conversations_ifc)) {} conversations (const std::shared_ptr<conversations_ifc> &delegate) : delegate_ (delegate) {} |
cdf7fd74 | conversation_result initiate_conversation() { return delegate_->initiate_conversation(); } |
8a15acc6 | }; |
caf7db60 | |
7699d7ec | #endif |