protocolinfo.h

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.vidalia-project.net/. No part of Vidalia, including this file,
00007 **  may be copied, modified, propagated, or distributed except according to
00008 **  the terms described in the LICENSE file.
00009 */
00010 
00011 /*
00012 ** \file protocolinfo.h
00013 ** \version $Id: protocolinfo.h 2362 2008-02-29 04:30:11Z edmanm $
00014 ** \brief Container for information in a PROTOCOLINFO reply from Tor
00015 */
00016 
00017 #ifndef _PROTOCOLINFO_H
00018 #define _PROTOCOLINFO_H
00019 
00020 #include <QStringList>
00021 
00022 
00023 class ProtocolInfo
00024 {
00025 public:
00026   /** Default constructor. */
00027   ProtocolInfo() {}
00028   
00029   /** Returns true if this ProtocolInfo object contains no data. */
00030   bool isEmpty() const;
00031   
00032   /** Sets the authentication methods Tor currently accepts. <b>methods</b>
00033    * should be a comma-delimited list of authentication methods. */
00034   void setAuthMethods(const QString methods);
00035   /** Returns the authentication methods Tor currently accepts. */
00036   QStringList authMethods() const { return _authMethods; }
00037 
00038   /** Sets the file to which Tor has written its authentication cookie. */
00039   void setCookieAuthFile(const QString cookieAuthFile)
00040     { _cookieAuthFile = cookieAuthFile; }
00041   /** Returns the file to which Tor has written its authentication cookie. */
00042   QString cookieAuthFile() const { return _cookieAuthFile; }
00043 
00044   /** Sets the version of Tor to which the controller is connected. */
00045   void setTorVersion(const QString torVersion) { _torVersion = torVersion; }
00046   /** Returns the version of Tor to which the controller is connected. */
00047   QString torVersionString() const { return _torVersion; }
00048 
00049 private:
00050   QString _torVersion;      /**< The Tor version in the PROTOCOLINFO reply. */
00051   QString _cookieAuthFile;  /**< Tor's authentication cookie file. */
00052   QStringList _authMethods; /**< Tor's ccepted authentication methods. */
00053 };
00054 
00055 #endif
00056 

Generated on Wed Dec 23 21:11:09 2009 for Vidalia by  doxygen 1.6.1