sbuild
1.5.3
|
00001 /* Copyright © 2005-2007 Roger Leigh <rleigh@debian.org> 00002 * 00003 * schroot is free software: you can redistribute it and/or modify it 00004 * under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation, either version 3 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * schroot is distributed in the hope that it will be useful, but 00009 * WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program. If not, see 00015 * <http://www.gnu.org/licenses/>. 00016 * 00017 *********************************************************************/ 00018 00019 #ifndef SBUILD_AUTH_PAM_CONV_H 00020 #define SBUILD_AUTH_PAM_CONV_H 00021 00022 #include <sbuild/sbuild-auth-pam-message.h> 00023 #include <sbuild/sbuild-error.h> 00024 #include <sbuild/sbuild-tr1types.h> 00025 00026 #include <vector> 00027 00028 #include <security/pam_appl.h> 00029 00030 namespace sbuild 00031 { 00032 00033 class auth_pam; 00034 00057 class auth_pam_conv 00058 { 00059 public: 00061 typedef std::vector<auth_pam_message> message_list; 00063 typedef std::shared_ptr<auth_pam> auth_ptr; 00065 typedef std::weak_ptr<auth_pam> weak_auth_ptr; 00067 typedef std::shared_ptr<auth_pam_conv> ptr; 00068 00069 protected: 00071 auth_pam_conv (); 00072 00073 public: 00075 virtual ~auth_pam_conv (); 00076 00082 virtual auth_ptr 00083 get_auth () = 0; 00084 00090 virtual void 00091 set_auth (auth_ptr auth) = 0; 00092 00098 virtual time_t 00099 get_warning_timeout () = 0; 00100 00106 virtual void 00107 set_warning_timeout (time_t timeout) = 0; 00108 00115 virtual time_t 00116 get_fatal_timeout () = 0; 00117 00124 virtual void 00125 set_fatal_timeout (time_t timeout) = 0; 00126 00141 virtual void 00142 conversation (message_list& messages) = 0; 00143 }; 00144 00145 } 00146 00147 #endif /* SBUILD_AUTH_PAM_CONV_H */ 00148 00149 /* 00150 * Local Variables: 00151 * mode:C++ 00152 * End: 00153 */