ClienteTFG/main.cpp

29 lines
684 B
C++
Raw Normal View History

2020-05-08 12:42:02 +02:00
#include "conexion_ssl.h"
#include <iostream>
2020-05-13 00:56:26 +02:00
#include "container_window.h"
2020-05-08 12:42:02 +02:00
#define FILE_CONFIG "config"
using namespace std;
int main(int argc, char *argv[])
{
config_reader conf = config_reader(FILE_CONFIG);
conexion* con;
string option;
if(conf.get_param("security", option)){
if(option=="yes"){
con = new conexion_ssl(conf);
}else if(option=="no"){
con = new conexion(conf);
}else{
perror("invalid option in security");
}
}else{
perror("no securty option found in config");
}
2020-05-13 00:56:26 +02:00
auto app=Gtk::Application::create(argc, argv, "org.gtkmm.example");
container_window cont(con, app);
2020-05-08 12:42:02 +02:00
return 0;
}