/** @file * @author Edouard DUPIN * @copyright 2016, Edouard DUPIN, all right reserved * @license GPL v3 (see license file) */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void appl::ClientProperty::connect() { // Generate IP and Port in the client interface connection.propertyIp.set(address); connection.propertyPort.set(port); // Connection depending on the mode requested if (fromUser == toUser) { bool ret = connection.connect(fromUser, pass); if (ret == false) { APPL_ERROR(" ==> NOT Authentify with '" << toUser << "'"); return; } else { APPL_INFO(" ==> Authentify with '" << toUser << "'"); } } else if (fromUser != "") { bool ret = connection.connect(fromUser, toUser, pass); if (ret == false) { APPL_ERROR(" ==> NOT Connected to '" << toUser << "' with '" << fromUser << "'"); return; } else { APPL_INFO(" ==> Connected with '" << toUser << "'"); } } else { bool ret = connection.connect(toUser); if (ret == false) { APPL_ERROR(" ==> NOT Connected with 'anonymous' to '" << toUser << "'"); return; } else { APPL_INFO(" ==> Connected with 'anonymous' to '" << toUser << "'"); } } } #include ESIGNAL_DECLARE_SIGNAL(ememory::SharedPtr);