Vidalia  0.2.17
ProtocolInfo.cpp
Go to the documentation of this file.
00001 /*
00002 **  This file is part of Vidalia, and is subject to the license terms in the
00003 **  LICENSE file, found in the top level directory of this distribution. If 
00004 **  you did not receive the LICENSE file with this file, you may obtain it
00005 **  from the Vidalia source package distributed by the Vidalia Project at
00006 **  http://www.torproject.org/projects/vidalia.html. No part of Vidalia, 
00007 **  including this file, may be copied, modified, propagated, or distributed 
00008 **  except according to the terms described in the LICENSE file.
00009 */
00010 
00011 /* 
00012 ** \file ProtocolInfo.cpp
00013 ** \brief Container for information in a PROTOCOLINFO reply from Tor
00014 */
00015 
00016 #include "ProtocolInfo.h"
00017 
00018 
00019 /** Returns true if this ProtocolInfo object contains no data. */
00020 bool
00021 ProtocolInfo::isEmpty() const
00022 {
00023   return (_torVersion.isEmpty()
00024             && _authMethods.isEmpty()
00025             && _cookieAuthFile.isEmpty());
00026 }
00027 
00028 /** Sets the authentication methods Tor currently accepts. <b>methods</b>
00029  * should be a comma-delimited list of authentication methods. */
00030 void
00031 ProtocolInfo::setAuthMethods(const QString authMethods)
00032 {
00033   _authMethods = authMethods.split(",");
00034 }
00035