00001 /**************************************************************** 00002 * Vidalia is distributed under the following license: 00003 * 00004 * Copyright (C) 2006, Matt Edman, Justin Hipple 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 ****************************************************************/ 00021 00022 /** 00023 * \file controlreply.h 00024 * \version $Id: controlreply.h 1238 2006-09-25 17:50:57Z edmanm $ 00025 * \brief A response from Tor's control interface 00026 */ 00027 00028 #ifndef _CONTROLREPLY_H 00029 #define _CONTROLREPLY_H 00030 00031 #include <QStringList> 00032 00033 #include "replyline.h" 00034 00035 class ControlReply 00036 { 00037 public: 00038 /** Default constructor */ 00039 ControlReply(); 00040 00041 /** Add a line associated with this reply */ 00042 void appendLine(ReplyLine line); 00043 00044 /** Returns a single line from this reply */ 00045 ReplyLine getLine(int idx = 0); 00046 /** Returns all lines for this reply */ 00047 QList<ReplyLine> getLines(); 00048 00049 /** Returns the status of the first line in the reply */ 00050 QString getStatus(); 00051 /** Returns the messasge of the first line in the reply */ 00052 QString getMessage(); 00053 /** Returns the data for the first line in the reply. */ 00054 QStringList getData(); 00055 00056 private: 00057 QList<ReplyLine> _lines; 00058 }; 00059 00060 #endif 00061