bool Camera_INDIClass::Connect(const wxString& camId) { // If not configured open the setup dialog if (strcmp(INDICameraName,"INDI Camera")==0) CameraSetup(); // define server to connect to. setServer(INDIhost.mb_str(wxConvUTF8), INDIport); // Receive messages only for our camera. watchDevice(INDICameraName.mb_str(wxConvUTF8)); // Connect to server. if (connectServer()) { return !ready; } else { // last chance to fix the setup CameraSetup(); setServer(INDIhost.mb_str(wxConvUTF8), INDIport); watchDevice(INDICameraName.mb_str(wxConvUTF8)); if (connectServer()) { return !ready; } else { return true; } } }
bool ScopeINDI::Connect() { // If not configured open the setup dialog if (INDIMountName == wxT("INDI Mount")) { SetupDialog(); } // define server to connect to. setServer(INDIhost.mb_str(wxConvUTF8), INDIport); // Receive messages only for our mount. watchDevice(INDIMountName.mb_str(wxConvUTF8)); // Connect to server. if (connectServer()) { return !ready; } else { // last chance to fix the setup SetupDialog(); setServer(INDIhost.mb_str(wxConvUTF8), INDIport); watchDevice(INDIMountName.mb_str(wxConvUTF8)); if (connectServer()) { return !ready; } else { return true; } } }
bool DictEngine::sourceRequestEvent(const QString &query) { // FIXME: this is COMPLETELY broken .. it can only look up one query at a time! // a DataContainer subclass that does the look up should probably be made if (m_currentQuery == query) { return false; } if (m_tcpSocket) { m_tcpSocket->abort(); //stop if lookup is in progress and new query is requested m_tcpSocket->deleteLater(); m_tcpSocket = 0; } QStringList queryParts = query.split(':', QString::SkipEmptyParts); if (queryParts.isEmpty()) { return false; } m_currentWord = queryParts.last(); m_currentQuery = query; //asked for a dictionary? if (queryParts.count() > 1) { setDict(queryParts[queryParts.count()-2]); //default to wordnet } else { setDict(QStringLiteral("wn")); } //asked for a server? if (queryParts.count() > 2) { setServer(queryParts[queryParts.count()-3]); //default to wordnet } else { setServer(QStringLiteral("dict.org")); } if (m_currentWord.simplified().isEmpty()) { setData(m_currentWord, m_dictName, QString()); } else { setData(m_currentWord, m_dictName, QString()); m_tcpSocket = new QTcpSocket(this); m_tcpSocket->abort(); connect(m_tcpSocket, &QTcpSocket::disconnected, this, &DictEngine::socketClosed); if (m_currentWord == QLatin1String("list-dictionaries")) { connect(m_tcpSocket, &QTcpSocket::readyRead, this, &DictEngine::getDicts); } else { connect(m_tcpSocket, &QTcpSocket::readyRead, this, &DictEngine::getDefinition); } m_tcpSocket->connectToHost(m_serverName, 2628); } return true; }
void configTime(int timezone, int daylightOffset_sec, const char* server1, const char* server2, const char* server3) { sntp_stop(); setServer(0, server1); setServer(1, server2); setServer(2, server3); sntp_set_timezone(timezone/3600); sntp_set_daylight(daylightOffset_sec); sntp_init(); }
bool Contact::setAddress(const QString &address) { QStringList addressParts = address.split("@"); if (addressParts.count() == 2) { setServerUser(addressParts[0]); setServer(addressParts[1]); } else { setServerUser(""); setServer(""); } }
void WEAK_ATTR configTime(int timezone, int daylightOffset_sec, const char* server1, const char* server2, const char* server3) { sntp_stop(); setServer(0, server1); setServer(1, server2); setServer(2, server3); s_timezone_sec = timezone; s_daylightOffset_sec = daylightOffset_sec; sntp_set_timezone(timezone/3600); sntp_init(); }
/************************************************* Function Name: onClickbtnLogin() Description: 单击“登录”按钮 Input: NULL Output: NULL Changes: NULL *************************************************/ void IMLoginWidget::onClickBtnLogin() { setServer(); m_leUserID->setReadOnly(true); m_leUserPwd->setReadOnly(true); // m_btnLogin->setEnabled(false); if (true == m_isLogin) { m_isLogin = false; m_btnLogin->setText(tr("取消")); m_closeTimer = false; m_timerID=startTimer(1000);//interval is 100ms // IMClientMessageCtrl::sm_hostAddress = address; // IMClientMessageCtrl::sm_hostPort = port; m_labelStatus->setText(tr("登录中")); if (m_loginCtrl == NULL) { m_loginCtrl = new IMLoginCtrl(this); connect(m_loginCtrl, SIGNAL(getLoginMessgae(QString,bool,const UserInformation*)), this, SLOT(setLabelStatus(QString,bool,const UserInformation*))); }
PubSubClient::PubSubClient(const char* domain, uint16_t port, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(domain,port); setClient(client); setStream(stream); setListener(NULL); // TOAST }
PubSubClient::PubSubClient(IPAddress addr, uint16_t port, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(addr, port); setClient(client); this->stream = NULL; setListener(NULL); // TOAST }
MqttClient::MqttClient(const char* domain, uint16_t port, MQTT_CALLBACK_SIGNATURE, Nokia_MqttClientAdapter& client) { this->_state = MQTT_DISCONNECTED; setServer(domain,port); setCallback(callback); setClient(client); this->stream = NULL; }
MqttClient::MqttClient(IPAddress addr, uint16_t port, MQTT_CALLBACK_SIGNATURE, Nokia_MqttClientAdapter& client) { this->_state = MQTT_DISCONNECTED; setServer(addr, port); setCallback(callback); setClient(client); this->stream = NULL; }
PubSubClient::PubSubClient(const char* domain, uint16_t port, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(domain,port); setClient(client); this->stream = NULL; }
MqttClient::MqttClient(uint8_t *ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Nokia_MqttClientAdapter& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(ip,port); setCallback(callback); setClient(client); setStream(stream); }
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(ip, port); setClient(client); this->stream = NULL; }
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(ip,port); setClient(client); setStream(stream); setProtocol(MQTT_VERSION); }
GameScripting::GameScripting(Server* server) { setServer(server); // setEnv(env) is called by ScriptApiEnv::initializeEnvironment() // once the environment has been created SCRIPTAPI_PRECHECKHEADER if (g_settings->getBool("secure.enable_security")) { initializeSecurity(); } lua_getglobal(L, "core"); int top = lua_gettop(L); lua_newtable(L); lua_setfield(L, -2, "object_refs"); lua_newtable(L); lua_setfield(L, -2, "luaentities"); // Initialize our lua_api modules InitializeModApi(L, top); lua_pop(L, 1); // Push builtin initialization type lua_pushstring(L, "game"); lua_setglobal(L, "INIT"); infostream << "SCRIPTAPI: Initialized game modules" << std::endl; }
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(ip, port); setCallback(callback); setClient(client); this->stream = NULL; }
PubSubClient::PubSubClient(const char* domain, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(domain,port); setCallback(callback); setClient(client); setStream(stream); }
MyProxy(ISocketHandler &h) : ProxyClient(h) { setServer("evocraft.net"); addTimer(NULL, 1.0f, 0); }
PubSubClient::PubSubClient(IPAddress addr, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(addr,port); setCallback(callback); setClient(client); setStream(stream); }
PubSubClient::PubSubClient(const char* domain, uint16_t port, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(domain,port); setClient(client); setStream(stream); setProtocol(MQTT_VERSION); }
PubSubClient::PubSubClient(IPAddress addr, uint16_t port, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(addr,port); setClient(client); setStream(stream); }
GameScripting::GameScripting(Server* server) { setServer(server); // setEnv(env) is called by ScriptApiEnv::initializeEnvironment() // once the environment has been created //TODO add security luaL_openlibs(getStack()); SCRIPTAPI_PRECHECKHEADER // Create the main minetest table lua_newtable(L); lua_newtable(L); lua_setfield(L, -2, "object_refs"); lua_newtable(L); lua_setfield(L, -2, "luaentities"); lua_setglobal(L, "minetest"); // Initialize our lua_api modules lua_getglobal(L, "minetest"); int top = lua_gettop(L); InitializeModApi(L, top); lua_pop(L, 1); infostream << "SCRIPTAPI: initialized game modules" << std::endl; }
PubSubClient::PubSubClient(IPAddress addr, uint16_t port, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(addr, port); setClient(client); this->stream = NULL; setProtocol(MQTT_VERSION); }
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(ip,port); setClient(client); setStream(stream); setListener(NULL); // TOAST }
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(ip,port); setCallback(callback); setClient(client); setStream(stream); setProtocol(MQTT_VERSION); }
PubSubClient::PubSubClient(const char* domain, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(domain,port); setCallback(callback); setClient(client); this->stream = NULL; setProtocol(MQTT_VERSION); }
PubSubClient::PubSubClient(uint8_t *ip, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client, Stream& stream) { this->_state = MQTT_DISCONNECTED; setServer(ip,port); setCallback(callback); setClient(client); setStream(stream); setListener(NULL); // TOAST }
PubSubClient::PubSubClient(IPAddress addr, uint16_t port, MQTT_CALLBACK_SIGNATURE, Client& client) { this->_state = MQTT_DISCONNECTED; setServer(addr, port); setCallback(callback); setClient(client); this->stream = NULL; setListener(NULL); // TOAST }
void dlgEditProfile::openMudList () { const cMUDEntry *e = dlgMudList::getEntry (this); if (!e) return; setName (e->name); setServer (e->host); // TODO: perhaps add an ability to set IP instead of name ? setPort (e->port); }