• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

yapet/globals.cc

Go to the documentation of this file.
00001 // $Id: globals.cc 3356 2010-09-18 21:06:17Z rafi $
00002 //
00003 // Copyright (C) 2009-2010  Rafael Ostertag
00004 //
00005 // This file is part of YAPET.
00006 //
00007 // YAPET is free software: you can redistribute it and/or modify it under the
00008 // terms of the GNU General Public License as published by the Free Software
00009 // Foundation, either version 3 of the License, or (at your option) any later
00010 // version.
00011 //
00012 // YAPET is distributed in the hope that it will be useful, but WITHOUT ANY
00013 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00014 // FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00015 // details.
00016 //
00017 // You should have received a copy of the GNU General Public License along with
00018 // YAPET.  If not, see <http://www.gnu.org/licenses/>.
00019 //
00020 
00021 #include "globals.h"
00022 #include "cfg.h"
00023 #include "consts.h"
00024 
00025 using namespace YAPET::GLOBALS;
00026 
00027 YAPET::PWGEN::RNGENGINE Globals::pwgen_rng(YAPET::CONFIG::Config::getDefPWGenRNG());
00028 int Globals::selected_character_pools(YAPET::CONFIG::Config::getDefCharPools());
00029 size_t Globals::selected_password_length(YAPET::CONFIG::Config::getDefPWLength());
00030 bool Globals::allow_lock_quit(YAPET::CONFIG::Config::getDefAllowLockQuit());
00031 unsigned int Globals::pw_input_timeout(YAPET::CONFIG::Config::getDefPwInputTimeout());
00032 
00033 void
00034 Globals::setPWGenRNG(YAPET::PWGEN::RNGENGINE e) {
00035     pwgen_rng = e;
00036 }
00037 
00038 YAPET::PWGEN::RNGENGINE
00039 Globals::getPWGenRNG() {
00040     return pwgen_rng;
00041 }
00042 
00043 void
00044 Globals::setCharacterPools(int cp) {
00045     selected_character_pools = cp;
00046 }
00047 
00048 int
00049 Globals::getCharacterPools() {
00050     return selected_character_pools;
00051 }
00052 
00053 void
00054 Globals::setPasswordLength(size_t pl) {
00055     selected_password_length = pl;
00056 }
00057 
00058 size_t
00059 Globals::getPasswordLength() {
00060     return selected_password_length;
00061 }
00062 
00063 void
00064 Globals::setAllowLockQuit(bool b) {
00065     allow_lock_quit = b;
00066 }
00067 
00068 bool
00069 Globals::getAllowLockQuit() {
00070     return allow_lock_quit;
00071 }
00072 
00073 void
00074 Globals::setPwInputTimeout(unsigned int i) {
00075     pw_input_timeout = i;
00076 }
00077 
00078 unsigned int
00079 Globals::getPwInputTimeout() {
00080     return pw_input_timeout;
00081 }

Generated on Sun Sep 19 2010 15:37:14 for YAPET by  doxygen 1.7.1