Ejemplo n.º 1
0
int autoconnect(fd_set *master, int *fdmax, servlist *serv) // XXX broken in the face of asynch nl [I have forgotten what was meant by this; I'm not aware of anything broken about this function]
{
	servlist *curr=serv;
	if(!curr) return(0);
	#if ASYNCH_NL
	char cstr[36+strlen(serv->name)+strlen(serv->portno)];
	sprintf(cstr, "Connecting to %s on port %s...", serv->name, serv->portno);
	nl_list *list=irc_connect(serv->name, serv->portno);
	if(!list) return(autoconnect(master, fdmax, serv->next));
	add_to_buffer(0, STA, QUIET, 0, false, cstr, "auto: ");
	list->reconn_b=0;
	list->autoent=serv;
	#else /* ASYNCH_NL */
	char cstr[36+strlen(serv->name)+strlen(serv->portno)];
	sprintf(cstr, "Connecting to %s on port %s...", serv->name, serv->portno);
	add_to_buffer(0, STA, QUIET, 0, false, cstr, "auto: ");
	int serverhandle=irc_connect(serv->name, serv->portno, master, fdmax);
	if(serverhandle)
	{
		bufs=(buffer *)realloc(bufs, ++nbufs*sizeof(buffer));
		cbuf=nbufs-1;
		init_buffer(cbuf, SERVER, serv->name, buflines);
		bufs[cbuf].handle=serverhandle;
		bufs[cbuf].nick=strdup(serv->nick);
		bufs[cbuf].autoent=serv;
		if(serv) bufs[cbuf].ilist=n_dup(serv->igns);
		bufs[cbuf].server=cbuf;
		bufs[cbuf].conninpr=true;
		add_to_buffer(cbuf, STA, QUIET, 0, false, cstr, "auto: ");
		redraw_buffer();
	}
	#endif /* ASYNCH_NL */
	autoconnect(master, fdmax, serv->next);
	return(1);
}
Ejemplo n.º 2
0
void MidiInterface::setAcceptClock(bool on)
{
    _acceptClock = on;
    if(_rtMidiIn)
    {
        // Don't ignore sysex, timing, or active sensing messages.
        _rtMidiIn->ignoreTypes( false, !_acceptClock, true );
    }
    autoconnect();
}
Ejemplo n.º 3
0
void Settings::showEvent(QShowEvent *showEvent)
{
    Q_UNUSED(showEvent);

    ui->autoconnectCheckBox->setChecked(autoconnect());
    ui->autoanswerCheckBox->setChecked(autoanswer());
    ui->showLogCheckBox->setChecked(showLog());

    ui->hotAnswer1LineEdit->setText(hotAnswer(1));
    ui->hotAnswer2LineEdit->setText(hotAnswer(2));
    ui->hotAnswer3LineEdit->setText(hotAnswer(3));
    ui->hotAnswer4LineEdit->setText(hotAnswer(4));
    ui->hotAnswer5LineEdit->setText(hotAnswer(5));
}
Ejemplo n.º 4
0
void CTcSettingsDialog::PreLayoutDynInitL()
	{
	CEikChoiceList* iapList =
		reinterpret_cast< CEikChoiceList* >( Control( ECtrlIAPName ) );

	CDesCArray* names = iapList->DesCArray();
	names->Delete( 0 );	// delete dummy item from array

	TInt count = iIAPManager->MdcaCount();
	for( TInt i = 0; i < count; i++ )
		{
		TBuf< KCommsDbSvrMaxFieldLength > name16;
		name16.Copy( iIAPManager->MdcaPoint( i ) );
		names->AppendL( name16 );
		if( (TInt)iIAPManager->Id( i ) == iSettings.iIAPId )
			{
			iapList->SetCurrentItem( i );
			}
		}

	SetChoiceListCurrentItem( ECtrlConnection, iSettings.iBearerType );
	
	TBuf<40> remoteAddrText;
	iSettings.iTCPRemoteAddr.Output( remoteAddrText );
	SetEdwinTextL(ECtrlRemoteAddr, &remoteAddrText);
	
	SetNumberEditorValue( ECtrlTcpPort, iSettings.iTCPPort );

    SetChoiceListCurrentItem( ECtrlCSYName, iSettings.iCSYName );
    SetChoiceListCurrentItem( ECtrlCommPort, iSettings.iCommPort );
    SetNumberEditorValue( ECtrlBaudrate, iSettings.iBaudrate );
    
	TInt autoconnect( 1 );
	if( !iSettings.iAutoConnect )
		{
		autoconnect = 0;	// no autoconnect
		}
	SetChoiceListCurrentItem( ECtrlAutoConnect, autoconnect );
	}
Ejemplo n.º 5
0
void MidiInterface::setAcceptNoteChange(bool on)
{
    _acceptNoteChange = on;
    autoconnect();
}