/** * @brief Connect to all networks marked "autoconnect". * * Warning: This method is usually called outside the event loop, just after * initialisation. */ void dazeus::DaZeus::autoConnect() { #ifdef DEBUG fprintf(stderr, "dazeus::DaZeus::autoConnect() called: looking for networks to connect to\n"); #endif std::vector<Network*>::iterator it; for(it = networks_.begin(); it != networks_.end(); ++it) { Network *n = *it; if( n->autoConnectEnabled() ) { #ifdef DEBUG fprintf(stderr, "Connecting to %s (autoconnect is enabled)\n", Network::toString(n).c_str()); #endif n->connectToNetwork(); } #ifdef DEBUG else { fprintf(stderr, "Not connecting to %s, autoconnect is disabled.\n", Network::toString(n).c_str()); } #endif } }