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 torsignal.h 00013 ** \version $Id: torsignal.h 2362 2008-02-29 04:30:11Z edmanm $ 00014 ** \brief Sends a signal to Tor's control interface 00015 */ 00016 00017 #ifndef _TORSIGNAL_H 00018 #define _TORSGINAL_H 00019 00020 #include <QString> 00021 00022 00023 class TorSignal 00024 { 00025 public: 00026 /** Signals that can be sent by the controller */ 00027 enum Signal { 00028 Reload, /**< SIGHUP: Reloads config items and refetch directory */ 00029 Shutdown, /**< SIGINT: Controlled shutdown */ 00030 Dump, /**< SIGUSR1: Log information about current circuits */ 00031 Debug, /**< SIGUSR2: Switch all open logs to loglevel debug */ 00032 Halt, /**< SIGTERM: Immediate shutdown */ 00033 NewNym /**< NEWNYM: Switch to all new clean circuits */ 00034 }; 00035 00036 /** Returns a string representation of a signal that Tor understands. */ 00037 static QString toString(Signal signal); 00038 }; 00039 00040 #endif 00041