streamevent.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 streamevent.h
00013 ** \version $Id: streamevent.h 2977 2008-08-17 01:28:25Z edmanm $
00014 ** \brief Event dispatched when a stream status update is received from Tor
00015 */
00016 
00017 #ifndef _STREAMEVENT_H
00018 #define _STREAMEVENT_H
00019 
00020 #include <QEvent>
00021 
00022 #include "eventtype.h"
00023 #include "stream.h"
00024 
00025 
00026 class StreamEvent : public QEvent
00027 {
00028 public:
00029   /** Default constructor */
00030   StreamEvent(Stream stream)
00031   : QEvent((QEvent::Type)CustomEventType::StreamEvent)
00032   { _stream = stream; }
00033   
00034   /** Returns the Stream object for this stream event. */
00035   Stream stream() const { return _stream; }
00036   /** Returns the ID for this stream event. */
00037   StreamId id() const { return _stream.id(); }
00038   /** Returns the status for this stream event. */
00039   Stream::Status status() const { return _stream.status(); }
00040   /** Returns the ID of the circuit to which this stream is assigned */
00041   CircuitId circuitId() const { return _stream.circuitId(); }
00042   /** Returns the target for this stream event. */
00043   QString target() const { return _stream.target(); }
00044   
00045 private:
00046   Stream _stream; /**< Stream object for this stream event. */
00047 };
00048 
00049 #endif
00050 

Generated on 22 Feb 2010 for Vidalia by  doxygen 1.6.1