From ee6ec19073c9d9ac1bf23515da871af65f6fa7de Mon Sep 17 00:00:00 2001 From: Constantin Kaplinsky Date: Tue, 12 Sep 2006 09:55:51 +0000 Subject: [PATCH] Rationalized FIXME comments, changed code layout in switch blocks. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@669 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/rfb/SConnection.cxx | 56 ++++++++++++++------------------------ 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx index daed8f8f..11da2a86 100644 --- a/common/rfb/SConnection.cxx +++ b/common/rfb/SConnection.cxx @@ -227,33 +227,27 @@ void SConnection::offerAuthentication() { vlog.debug("offering list of authentication methods"); - // FIXME: Security types and TightVNC's auth types should be distinguished - // although we use the same codes for NoAuth and VncAuth. + // See processVersionMsg(), the code below is similar. - // See processVersionMsg(), the code below is very similar. std::list secTypes; std::list::iterator i; + + // NOTE: In addition to standard security types, we might want to offer + // TightVNC-specific authentication types. But currently we support + // only the standard security types: secTypeNone and secTypeVncAuth. securityFactory->getSecTypes(&secTypes, reverseConnection); if (secTypes.empty()) throwConnFailedException("No supported security types"); - // FIXME: We should send an empty list for "no authentication". + // FIXME: Send an empty list for "no authentication". CapsList caps; for (i = secTypes.begin(); i != secTypes.end(); i++) { - // FIXME: Use mapping instead (authType -> ProtocolCapability). - // Each auth type should provide its capability data. - // FIXME: Check that client will send auth type listed in capabilities. - // Currently, capabilities should duplicate secTypes exactly, - // but that may change in the future. - switch(*i) { - case secTypeNone: - caps.addStandard(secTypeNone, "NOAUTH__"); - break; - case secTypeVncAuth: - caps.addStandard(secTypeVncAuth, "VNCAUTH_"); - break; + // FIXME: Capability info should be provided by SSecurity objects. + switch (*i) { + case secTypeNone: caps.addStandard(*i, "NOAUTH__"); break; + case secTypeVncAuth: caps.addStandard(*i, "VNCAUTH_"); break; } } os->writeU32(caps.getSize()); @@ -405,15 +399,15 @@ void SConnection::setInitialColourMap() void SConnection::clientInit(bool shared) { writer_->writeServerInit(); - - // FIXME: Is this a right place for this code? + + // FIXME: Send interaction capabilities via writer_? if (cp.tightExtensionsEnabled) sendInteractionCaps(); state_ = RFBSTATE_NORMAL; } -// FIXME: Is this class a right place for this function? +// FIXME: Move sendInteractionCaps() to a class derived from SMsgWriterV3? void SConnection::sendInteractionCaps() { // Advertise support for non-standard server-to-client messages. @@ -430,23 +424,13 @@ void SConnection::sendInteractionCaps() // First, add true encodings. for (unsigned int i = 1; i <= encodingMax; i++) { if (Encoder::supported(i)) { - // FIXME: Ideally, encoders themselves should provide capability info. - switch(i) { - case encodingRRE: - ecaps.addStandard(encodingRRE, "RRE_____"); - break; - case encodingCoRRE: - ecaps.addStandard(encodingCoRRE, "CORRE___"); - break; - case encodingHextile: - ecaps.addStandard(encodingHextile, "HEXTILE_"); - break; - case encodingZRLE: - ecaps.addStandard(encodingZRLE, "ZRLE____"); - break; - case encodingTight: - ecaps.addTightExt(encodingTight, "TIGHT___"); - break; + // FIXME: Capability info should be provided by Encoder objects. + switch (i) { + case encodingRRE: ecaps.addStandard(i, "RRE_____"); break; + case encodingCoRRE: ecaps.addStandard(i, "CORRE___"); break; + case encodingHextile: ecaps.addStandard(i, "HEXTILE_"); break; + case encodingZRLE: ecaps.addStandard(i, "ZRLE____"); break; + case encodingTight: ecaps.addTightExt(i, "TIGHT___"); break; } } } -- 2.39.5