Пример #1
0
void REIXSXESMCPDetector::onControlsConnected(bool connected){
	if(connected)
		setConnected(connected);
	else
		setConnected(false);

	if(connected)
		setReadyForAcquisition();
	else if(!isNotReadyForAcquisition())
		setNotReadyForAcquisition();
}
void
LNetworkConnectionMonitor::onStateChange( uint newState )
{
    qDebug() << "Networkmanager state change!";
    
    if ( newState == Disconnected )
    {
       setConnected( false );
    }
    else if ( newState == Connected )
    {
       setConnected( true );
    }
}
void
lastfm::LNetworkConnectionMonitor::onStateChange( uint newState )
{
    qDebug() << "Networkmanager state change!";

    if ( newState == NM_STATE_DISCONNECTED || newState == NM_STATE_ASLEEP )
    {
       setConnected( false );
    }
    else if ( newState == NM_STATE_CONNECTED_GLOBAL )
    {
       setConnected( true );
    }
}
Пример #4
0
void CDatabaseItem::init(const QString &dbname)
{
#ifdef DEBUG
  qDebug("CDatabaseItem::init('%s')", debug_string(dbname));
#endif

  setText(0,dbname);
  setDatabaseName(dbname);
  widgetData.setAutoDelete(true);
  if (databaseDisconnectedIcon.isNull())
    databaseDisconnectedIcon = getPixmapIcon("databaseDisconnectedIcon");

  if (databaseConnectedIcon.isNull())
    databaseConnectedIcon = getPixmapIcon("databaseConnectedIcon");

  databaseConnectIcon = getPixmapIcon("databaseConnectIcon");
  databaseDisconnectIcon = getPixmapIcon("databaseDisconnectIcon");
  sqlIcon = getPixmapIcon("sqlIcon");
  deleteIcon = getPixmapIcon("deleteIcon");
  newWindowIcon = getPixmapIcon("newWindowIcon");
  if (is_connected)
    setConnected(is_connected);
  else
    setPixmap(0, databaseDisconnectedIcon);
}
Пример #5
0
void IcyConnector::ProcessHeaders(const QString &hdrs)
{
    QStringList f0;
    QStringList f1;
    QString txt;

    f0=hdrs.split("\r\n");
    if(f0[0]!="OK2") {
        Log(LOG_WARNING,
            QString().sprintf("login to \"%s:%d\" rejected: %s",
                              (const char *)hostHostname().toUtf8(),
                              0xFFFF&hostPort(),
                              (const char *)f0[0].toUtf8()));
        return;
    }
    icy_authenticated=true;
    WriteHeader("icy-name: "+streamName());
    WriteHeader("icy-genre: "+streamGenre());
    WriteHeader("icy-pub: "+QString().sprintf("%d",streamPublic()));
    WriteHeader("icy-br: "+QString().sprintf("%u",audioBitrate()));
    if(icy_protocol_version==1) {
        WriteHeader("icy-url: "+streamUrl());
    }
    WriteHeader("icy-irc: "+streamIrc());
    WriteHeader("icy-icq: "+streamIcq());
    WriteHeader("icy-aim: "+streamAim());
    WriteHeader("Content-Type: "+contentType());
    WriteHeader("");

    setConnected(true);
}
Пример #6
0
void WlanCoreImpl::cacheInterfaceInfo()
{
	m_deviceOk = false;
	memset(&m_deviceId, 0, sizeof(m_deviceId));
	PWLAN_INTERFACE_INFO_LIST intfList;
	if (ERROR_SUCCESS == m_wlanapi->WlanEnumInterfaces(m_wlanHandle, NULL, &intfList)) {
		if (intfList->dwNumberOfItems > 0) {
			const WLAN_INTERFACE_INFO *intf = intfList->InterfaceInfo + 0;
			m_deviceOk = true;
			m_deviceId = intf->InterfaceGuid;
			m_deviceState = intf->isState;
			m_deviceDesc = QString::fromWCharArray(intf->strInterfaceDescription);
		}
		m_wlanapi->WlanFreeMemory(intfList);
	}

	if (m_deviceOk) {
		cacheRadioState();
		cacheConnectionInfo();
	} else {
		setSoftwareEnabled(false);
		setHardwareEnabled(false);
		setEnabled(false);
		setSsid(QString());
		setMacAddress(QByteArray());
		setSignalQuality(0);
		setProfileName(QString());
		setConnected(false);
	}
}
Пример #7
0
void WlanCoreImpl::cacheConnectionInfo()
{
	QString profileName;
	QString ssid;
	bool connected = false;
	int signalQuality = 0;
	QByteArray macAddress;

	if (m_deviceOk) {
		PWLAN_CONNECTION_ATTRIBUTES conn;
		DWORD cb = sizeof(conn);
		WLAN_OPCODE_VALUE_TYPE vt;
		if (ERROR_SUCCESS == m_wlanapi->WlanQueryInterface(m_wlanHandle, &m_deviceId, wlan_intf_opcode_current_connection, NULL, &cb, reinterpret_cast<PVOID*>(&conn), &vt)) {
			profileName = QString::fromWCharArray(conn->strProfileName).trimmed();
			connected = (conn->isState == wlan_interface_state_connected);
			ssid = QString::fromLatin1(reinterpret_cast<char*>(conn->wlanAssociationAttributes.dot11Ssid.ucSSID), conn->wlanAssociationAttributes.dot11Ssid.uSSIDLength);
			signalQuality = conn->wlanAssociationAttributes.wlanSignalQuality;
			macAddress = QByteArray(reinterpret_cast<char*>(conn->wlanAssociationAttributes.dot11Bssid), 6);
			m_wlanapi->WlanFreeMemory(conn);
		}
	}

	setSsid(ssid);
	setMacAddress(macAddress);
	setSignalQuality(signalQuality);
	setProfileName(profileName);
	setConnected(connected);
}
Пример #8
0
void DkCamControls::closeDeviceAndSetState() {
	bool lvActive = false;
	try {
		lvActive = maidFacade->isLiveViewActive();
	} catch (Maid::MaidError) {
		lvActive = false;
	}

	if (lvActive) {
		maidFacade->toggleLiveView();
		liveViewTimer->stop();
		
		// TODO: get the plugin viewport here?!
		//viewport->setImage(QImage());
		//emit updateImage(QImage());	// is setting an empty image here intentional?
	}

	try {
		maidFacade->closeSource();
	} catch (Maid::MaidError) {
		// there is probably nothing left to close
	}
	connectedDeviceId.second = false;
	setConnected(false);
	updateUiValues();
}
Пример #9
0
void DkCamControls::onDeviceOpened() {
	
	if (openDeviceProgressDialog) {
		openDeviceProgressDialog->cancel();
	}

	try {
		if (!maidFacade->isSourceAlive()) {
			return;
		}

		if (!maidFacade->checkCameraType()) {
			QMessageBox dialog(this);
			dialog.setIcon(QMessageBox::Warning);
			dialog.setText(tr("This program is not compatible with the selected camera model."));
			dialog.show();
			dialog.exec();

			//qDebug() << tr("This program is not compatible with the selected camera model.");
			closeDeviceAndSetState();
			return;
		}

		setConnected(true);
		updateUiValues();
	} catch (Maid::MaidError e) {
		qDebug() << tr("[ERROR] after opening device");
	}
}
void BioXASSSRLMonochromatorRegionControl::updateConnected()
{
	bool slitsOK = ( maskUpperBlade_ && maskUpperBlade_->isConnected() && maskLowerBlade_ && maskLowerBlade_->isConnected() && maskBladesStatus_ && maskBladesStatus_->isConnected() );
	bool paddleOK = (paddle_ && paddle_->isConnected());
	bool paddleStatusOK = (paddleStatus_ && paddleStatus_->isConnected());
	bool keyStatusOK = (keyStatus_ && keyStatus_->isConnected());
	bool brakeStatusOK = (brakeStatus_ && brakeStatus_->isConnected());
	bool braggOK = (bragg_ && bragg_->isConnected());
	bool braggAtCrystalChangePositionStatusOK = (braggAtCrystalChangePositionStatus_ && braggAtCrystalChangePositionStatus_->isConnected());
	bool crystalChangeOK = (crystalChange_ && crystalChange_->isConnected());
	bool crystalChangeCWLimitStatusOK = (crystalChangeCWLimitStatus_ && crystalChangeCWLimitStatus_->isConnected());
	bool crystalChangeCCWLimitStatusOK = (crystalChangeCCWLimitStatus_ && crystalChangeCCWLimitStatus_->isConnected());
	bool regionAStatusOK = (regionAStatus_ && regionAStatus_->isConnected());
	bool regionBStatusOK = (regionBStatus_ && regionBStatus_->isConnected());

	bool isConnected = (
				slitsOK &&
				paddleOK &&
				paddleStatusOK &&
				keyStatusOK &&
				brakeStatusOK &&
				braggOK &&
				braggAtCrystalChangePositionStatusOK &&
				crystalChangeOK &&
				crystalChangeCWLimitStatusOK &&
				crystalChangeCCWLimitStatusOK &&
				regionAStatusOK &&
				regionBStatusOK
				);

	setConnected(isConnected);
}
Пример #11
0
int HidController::close() {
    if (!isOpen()) {
        qDebug() << "HID device" << getName() << "already closed";
        return -1;
    }

    qDebug() << "Shutting down HID device" << getName();

    // Stop the reading thread
    if (m_pReader == NULL) {
        qWarning() << "HidReader not present for" << getName()
                   << "yet the device is open!";
    } else {
        disconnect(m_pReader, SIGNAL(incomingData(QByteArray, mixxx::Duration)),
                   this, SLOT(receive(QByteArray, mixxx::Duration)));
        m_pReader->stop();
        hid_set_nonblocking(m_pHidDevice, 1);   // Quit blocking
        controllerDebug("  Waiting on reader to finish");
        m_pReader->wait();
        delete m_pReader;
        m_pReader = NULL;
    }

    // Stop controller engine here to ensure it's done before the device is closed
    //  incase it has any final parting messages
    stopEngine();

    // Close device
    setConnected(false);
    controllerDebug("  Closing device");
    hid_close(m_pHidDevice);
    setOpen(false);
    return 0;
}
Пример #12
0
void
Server::sendMessage(wstring* message)
{
	if(isConnected())
	{
		int result = 0;
		int mbsize = WideCharToMultiByte(CP_UTF8, 0, message->c_str(), static_cast<int>(message->length()), NULL, 0, NULL, NULL);
		if (mbsize > 0)
		{
			char *szMessage = (char*)malloc(mbsize);
			int bytes = WideCharToMultiByte(CP_UTF8, 0, message->c_str(), static_cast<int>(message->length()), szMessage, mbsize, NULL, NULL);
			result = send(serverSocket, szMessage, bytes, 0);		
			DebugPrint(L"Capture-Server-sendMessage: Allocated: %i, Converted: %i, Sent: %i\n", mbsize, bytes, result);
			if(result == SOCKET_ERROR)
			{
				DebugPrint(L"Capture-Server-sendMessage: Socket Error %i: %s\n", WSAGetLastError(), szMessage);
				if(WSAGetLastError() == WSAENOTCONN)
				{
					setConnected(false);
				}
			}
			free(szMessage);
		}	
	}
}
Пример #13
0
void Ableton::setup(string abletonOscHost)
{
    this->abletonOscHost = abletonOscHost;
    
    sender.setup(abletonOscHost, ABLETON_OSC_PORT_OUT);
    receiver.setup(ABLETON_OSC_PORT_IN);
    setConnected(true);
    setAutoUpdate(true);
    setAutoDraw(true);
    
    control.addToggle("Connected", &connected, this, &Ableton::eventSetConnected);      // unusued
    control.addButton("Refresh", this, &Ableton::eventRefresh);

    GuiWidget *widgetGlobal = control.addWidget("Global");
    widgetGlobal->addSlider("Tempo", &tempo, 4.0f, 999.0f, this, &Ableton::eventSetTempo);
    widgetGlobal->addSlider("Time", &time, 4.0f, 999.0f, this, &Ableton::eventSetTime);
    widgetGlobal->addSlider("Volume", &volume, 0.0f, 1.0f, this, &Ableton::eventSetVolume);
    widgetGlobal->addSlider("Pan", &pan, -1.0f, 1.0f, this, &Ableton::eventSetPan);
    widgetGlobal->addToggle("Overdub", &overdub, this, &Ableton::eventSetOverdub);
    
    GuiWidget *widgetPlayback = control.addWidget("Playback");
    widgetPlayback->addButton("Prev cue", this, &Ableton::eventPrevCue);
    widgetPlayback->addButton("Next cue", this, &Ableton::eventNextCue);
    widgetPlayback->addButton("Play", this, &Ableton::eventPlay);
    widgetPlayback->addButton("Continue", this, &Ableton::eventPlayContinue);
    widgetPlayback->addButton("Play selection", this, &Ableton::eventPlaySelection);
    widgetPlayback->addButton("Stop", this, &Ableton::eventStop);
    
    scanLiveSet();
    
    // REFRESH OPTION!
    // -> delete everything
    // -> redo scanLiveSet
    // CONNECTED variable
}
Пример #14
0
/**
 * Initializes the temperature sensor.
 * This method is called when the sensor is first created and also any time the sensor reports it's disconnected.
 * If the result is TEMP_SENSOR_DISCONNECTED then subsequent calls to read() will also return TEMP_SENSOR_DISCONNECTED.
 * Clients should attempt to re-initialize the sensor by calling init() again. 
 */
bool OneWireTempSensor::init(){

	// save address and pinNr for log messages
	char addressString[17];
	printBytes(sensorAddress, 8, addressString);
	uint8_t pinNr = oneWire->pinNr();

	bool success = false;

	if (sensor==NULL) {
		sensor = new DallasTemperature(oneWire);
		if (sensor==NULL) {
			logErrorString(ERROR_SRAM_SENSOR, addressString);
		}
	}
	
	logDebug("init onewire sensor");
	// This quickly tests if the sensor is connected and initializes the reset detection.
	// During the main TempControl loop, we don't want to spend many seconds
	// scanning each sensor since this brings things to a halt.
	if (sensor && sensor->initConnection(sensorAddress) && requestConversion()) {
		logDebug("init onewire sensor - wait for conversion");
		waitForConversion();
		temperature temp = readAndConstrainTemp();
		DEBUG_ONLY(logInfoIntStringTemp(INFO_TEMP_SENSOR_INITIALIZED, pinNr, addressString, temp));
		success = temp!=DEVICE_DISCONNECTED && requestConversion();
	}	
	setConnected(success);
	logDebug("init onewire sensor complete %d", success);
	return success;
}
Пример #15
0
void JabberRoomChat::joined()
{
    auto details = static_cast<ChatDetailsRoom *>(m_chat.details());
    details->setConnected(true);

    emit joined(m_chat);
}
Пример #16
0
void Player::setConnectionThread(Thread *th) {
    thread = th;
    connect(this, SIGNAL(toClient(QString)), thread, SLOT(toClient(QString)));
    connect(thread, SIGNAL(fromClient(QString)), this, SIGNAL(fromPlayer(QString)));
    qDebug() << "Thread Set!";
    setConnected(true);
}
Пример #17
0
void AAPIO::checkForFileTimeout() {
	Gate g(this, "checkForFileTimeout()");
	QFile file("/dev/aap0");
	bool exists = file.exists();
	g.log() << "Exists" << exists;
	setConnected(exists);
}
Пример #18
0
void CloudConnection::onConnected()
{
    qCDebug(dcCloud()) << "Connected to cloud proxy server" << m_proxyServerUrl.toString();
    m_error = Cloud::CloudErrorNoError;
    setConnected(true);
    m_reconnectionTimer->stop();
}
Пример #19
0
void JabberRoomChat::left()
{
    auto details = static_cast<ChatDetailsRoom *>(m_chat.details());
    details->setConnected(false);

    emit left(m_chat);
}
Пример #20
0
void WESplClient::onConnect()
{
	//TODO
	// update all the flags on Connect.
	// alert data can be send now
	// do not allow to connect back again.

	// when reconnect happens, reset the variables
	setRollbackRslt(0);
	setCleanupRslt(0);
	setCpiPassed(false);
    setCpiFailed(false);

    setContinue(true);
	setConnected(true);
	ByteStream bsWrite;
	bsWrite << (ByteStream::byte) WE_CLT_SRV_KEEPALIVE;
	try
	{
		this->write(bsWrite);				// send the keep init keep alive
	}
	catch(...)
	{
	}

	// need to send Alarm
	fIpAddress = fClnt->addr2String();

}
Пример #21
0
void SGMUndulatorControl::updateConnected()
{
	setConnected(encoderControl_->isConnected() &&
	             stepControl_->isConnected() &&
	             stepVelocityControl_->isConnected() &&
	             stepAccelerationControl_->isConnected());
}
Пример #22
0
//
// connect()
//
void Socket::connect(const SocketAddress& endpoint, time_t timeout,const char* interface)
    throw(IllegalBlockingModeException, IllegalArgumentException, IOException)
{
    // Comprueba si endpoint es referencia a un objeto InetSocketAddress
    const InetSocketAddress* addrptr =
        dynamic_cast<const InetSocketAddress*>(&endpoint);

    if (addrptr == NULL)
    {
        throw IllegalArgumentException("Invalid SocketAddress");
    }

    try
    {
        Synchronized synchronized(_sync);
        {
            // Comprueba el modo de bloqueo del canal asociado, si existe
            if (_channel && _channel->isBlocking()==false)
            {
                throw IllegalBlockingModeException(
                          "SocketChannel in non-blocking mode");
            }

            // Invoca a la operacion connect de SocketImpl
            _impl->connect(endpoint, timeout,interface);
            setConnected();
        }
    }
    catch(TIDThr::Exception& e)
    {
        throw IOException(e.what());
    }
}
Пример #23
0
DGLTreeView::DGLTreeView(QWidget* parrent, DglController* controller)
        : QDockWidget(tr("State Tree"), parrent),
          m_TreeWidget(this),
          m_controller(controller) {
    setObjectName("DGLTreeView");

    //    m_TreeWidget.setMinimumSize(QSize(200, 0));

    setConnected(false);

    setWidget(&m_TreeWidget);
    // inbound
    CONNASSERT(controller, SIGNAL(setConnected(bool)), this,
               SLOT(setConnected(bool)));
    CONNASSERT(controller, SIGNAL(debugeeInfo(const std::string&)), this,
               SLOT(debugeeInfo(const std::string&)));
    CONNASSERT(controller, SIGNAL(setBreaked(bool)), &m_TreeWidget,
               SLOT(setEnabled(bool)));
    CONNASSERT(controller,
               SIGNAL(breakedWithStateReports(
                       opaque_id_t,
                       const std::vector<
                               dglnet::message::utils::ContextReport>&)),
               this,
               SLOT(breakedWithStateReports(
                       opaque_id_t,
                       const std::vector<
                               dglnet::message::utils::ContextReport>&)));

    // internal
    CONNASSERT(&m_TreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)),
               this, SLOT(onDoubleClicked(QTreeWidgetItem*, int)));
}
Пример #24
0
bool StarbookDriver::Disconnect()
{
    if (isConnected()) {
        bool rc = Telescope::Disconnect();
        last_known_state = starbook::UNKNOWN;
        // Disconnection is successful, set it IDLE and updateProperties.
        if (rc) {
            setConnected(false, IPS_IDLE);
            updateProperties();
        } else
            setConnected(true, IPS_ALERT);
        return rc;
    } else {
        return false;
    }
}
Пример #25
0
//------------------------------------------------------------------------------
void WESplClient::onDisconnect()
{
	//TODO
	// - set fContinue to false  - set the thread free
	setContinue(false);
	setConnected(false);
	setRollbackRslt(-1);
	setCleanupRslt(-1);

	if((!fCpiPassed)&&(!fCpiFailed))	//a hard disconnection
	{
		fOwner.onCpimportFail(fPmId);
		fOwner.setDisconnectFailure(true);
	}

	// update all the flags of disconnect.
	// alert on roll back
	// do not allow to connect back again.

	try
	{
	// send alarm
	ALARMManager alarmMgr;
	//std::string alarmItem = sin_addr2String(fClnt->serv_addr().sin_addr);
	std::string alarmItem = fClnt->addr2String();
	alarmItem.append(" WriteEngineServer");
	alarmMgr.sendAlarmReport(alarmItem.c_str(), oam::CONN_FAILURE, SET);
	}
	catch(...)
	{
		// just ignore it for time being.
	}
}
Пример #26
0
bool
Server::connectToServer(bool startSenderAndReciever)
{
	if(initialiseWinsock2())
	{
		char sport[6];
		size_t charsConverted;
		char szServerAddress[2048];
		struct addrinfo aiHints;
		struct addrinfo *aiList = NULL;	
			
		_itoa_s(port, sport, 6, 10);
		memset(&aiHints, 0, sizeof(aiHints));
		aiHints.ai_family = AF_INET;
		aiHints.ai_socktype = SOCK_STREAM;
		aiHints.ai_protocol = IPPROTO_TCP;
		DebugPrint(L"Connecting to: %ls:%s\n", serverAddress.c_str(), sport);
		wcstombs_s(&charsConverted, szServerAddress, 512, serverAddress.c_str(), serverAddress.length() + 1);
		if ((getaddrinfo(szServerAddress, sport, &aiHints, &aiList)) == 0)
		{
			struct addrinfo *ai = aiList;
			struct sockaddr_in *sa = (struct sockaddr_in *) ai->ai_addr;
		
			serverSocket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
			
			if(connect(serverSocket, (struct sockaddr *)sa, static_cast<int>(ai->ai_addrlen) ) != SOCKET_ERROR )
			{
				u_long iMode = 1;
				//ioctlsocket(serverSocket, FIONBIO, &iMode);
				printf("Connected to server at %s\n", szServerAddress);
				setConnected(true);
				if(startSenderAndReciever)
				{
					serverReceive->start();
				}
				freeaddrinfo(aiList);
				return true;
			} else {
				printf("Could not connect to server\n");
				printf("\tSocket error: %i\n", WSAGetLastError());
			}
			freeaddrinfo(aiList);
		}	
	}
	setConnected(false);
	return false;
}
Пример #27
0
bool
SCI_Transporter::init_remote()
{
  DBUG_ENTER("SCI_Transporter::init_remote");
  sci_error_t err; 
  Uint32 offset = 0;
  if(!m_mapped ) {
    DBUG_PRINT("info", ("Map remote segments"));
    for(Uint32 i=0; i < m_adapters ; i++) {
      m_TargetSegm[i].rhm[i].remoteHandle=0;
      SCIConnectSegment(sciAdapters[i].scidesc,
                        &(m_TargetSegm[i].rhm[i].remoteHandle),
                        m_remoteNodes[i],
                        remoteSegmentId(localNodeId, remoteNodeId),
                        i,
                        0,
                        0,
                        0,
                        0,
                        &err);

      if(err != SCI_ERR_OK) {
        NdbSleep_MilliSleep(10);
        DBUG_PRINT("error", ("Error connecting segment, err 0x%x", err));
        DBUG_RETURN(false);
      }
    }
    // Map the remote memory segment into program space  
    for(Uint32 i=0; i < m_adapters ; i++) {
      m_TargetSegm[i].mappedMemory =
        SCIMapRemoteSegment((m_TargetSegm[i].rhm[i].remoteHandle),
                            &(m_TargetSegm[i].rhm[i].map),
                            offset,
                            m_BufferSize,
                            NULL,
                            FLAGS,
                            &err);

      if(err!= SCI_ERR_OK) {
        DBUG_PRINT("error",
          ("Cannot map a segment to the remote node %d. Error code 0x%x",
          m_RemoteSciNodeId, err));
        //NDB SHOULD TERMINATE AND COMPUTER REBOOTED! 
        report_error(TE_SCI_CANNOT_MAP_REMOTESEGMENT);
        DBUG_RETURN(false);
      }
    }
    m_mapped=true;
    setupRemoteSegment();
    setConnected();
    DBUG_PRINT("info", ("connected and mapped to segment, remoteNode: %d",
               remoteNodeId));
    DBUG_PRINT("info", ("remoteSegId: %d",
               remoteSegmentId(localNodeId, remoteNodeId)));
    DBUG_RETURN(true);
  } else {
    DBUG_RETURN(getConnectionStatus());
  }
}
Пример #28
0
void IrcSessionPrivate::_q_error(QAbstractSocket::SocketError error)
{
    Q_Q(IrcSession);
    qWarning() << "IrcSessionPrivate::_q_error():" << error;
    setConnected(false);
    setActive(false);
    emit q->socketError(error);
}
Пример #29
0
void BaseRelationship::connectRelationship(void)
{
	if(!connected)
	{
		setConnected(true);
		setCodeInvalidated(true);
	}
}
Пример #30
0
void BaseRelationship::disconnectRelationship(void)
{
	if(connected)
	{
		setConnected(false);
		setCodeInvalidated(true);
	}
}