Ejemplo n.º 1
0
bool ZBlackBerryServer::Handler_ManagerChanged::Write(const ZStreamW& w)
	{
	ZGuardRMtxR locker(fMutex);

	if (fState == eState_SendChanged)
		{
		fState = eState_Quiet;
		locker.Release();
		w.WriteBool(true);
		return true;
		}
	else if (fState == eState_SendClosed)
		{
		locker.Release();
		w.WriteBool(false);
		return false;
		}

	return true;
	}
Ejemplo n.º 2
0
/// \sa ZBlackBerry::Device_Client::Write
bool ZBlackBerryServer::Handler_DeviceFinished::Write(const ZStreamW& w)
	{
	if (!fOpen)
		{
		if (ZLOG(s, eDebug + 2, "ZBlackBerryServer::Handler_DeviceFinished"))
			s << "Write false, return false";

		w.WriteBool(false);
		return false;
		}

	if (ZLOG(s, eDebug + 2, "ZBlackBerryServer::Handler_DeviceFinished"))
		s << "Write nothing, return true";

	return true;
	}
Ejemplo n.º 3
0
void ZTBQuery::SortSpec::ToStream(const ZStreamW& iStreamW) const
	{
	fPropName.ToStream(iStreamW);
	iStreamW.WriteBool(fAscending);
	iStreamW.WriteUInt8(fStrength);
	}