/****************************************************************** * [Marvin Projet - GUI based on LibSIP, LibNN and gpgme * Copyright (C) 2002 - 2003 PARMANTIER Romain * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. This * program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. You should have * received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * * SPECIAL NOTE (the beerware clause): * This software is free software. However, it also falls under the beerware * special category. That is, if you find this software useful, or use it * every day, or want to grant us for our modest contribution to the * free software community, feel free to send us a beer from one of * your local brewery. Our preference goes to Belgium abbey beers and * irish stout (Guiness for strength!), but we like to try new stuffs. * * Authors: * * PARMANTIER Romain * Paper mail : * E-mail : romain.parmantier@loutor.org * *******************************************************************/ #include #include #include "user.hh" #include "language/language.hh" static int my_error(std::string msg) { std::cerr << msg << std::endl; return 1; } int main( int argc, char *argv[] ) { argc = 0; *argv = NULL; c_list_user *list_user = new c_list_user(); // charge les utilisateurs existants if (list_user != 0) if (list_user->load_user() != 0) return my_error(ERROR1); // demande création utilisateur ou pas // avec enregistrement de la voix if (list_user->new_user_or_not() == 0) // vérifie s'il existe un utilisateur au min. if (list_user->get_list_user().size() != 0) // identification de l'utilisateur par mdp if (list_user->identify_user() == 0) // choix des actions pour l'utilisateur if (list_user->action_user() != 0) return my_error(ERROR1); else return 0; else return my_error(ERROR4); else return my_error(ERROR5); else return my_error(ERROR1); return 0; }