Show
Ignore:
Timestamp:
01/12/06 19:20:30 (3 years ago)
Author:
edmanm
Message:

Ta da! Now we can identify when the Tor process mysteriously dies without
having a separate thread polling isRunning().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/control/torcontrol.h

    r75 r76  
    3535  Q_OBJECT 
    3636   
    37 private: 
    38   ControlConnection _controlConn; 
    39   TorProcess _torProcess; 
    40  
    4137public: 
    4238  /** Default constructor */ 
     
    7571  /** Ask Tor for its version */ 
    7672  QString getTorVersion(QString *errmsg = 0); 
     73 
     74 
     75signals: 
     76  /** Emitted when the Tor process has started */ 
     77  void started(); 
    7778   
     79  /** Emitted when the Tor process has stopped */ 
     80  void stopped(int exitCode, QProcess::ExitStatus exitStatus); 
     81 
     82  /** Emitted when the controller has connected to Tor */ 
     83  void connected(); 
     84 
     85  /** Emitted when the controller has disconnected from Tor */ 
     86  void disconnected(); 
     87 
     88 
     89private: 
     90  /** Instantiates a socket used to connect to Tor's control port */ 
     91  ControlConnection _controlConn; 
     92  /** Manages and monitors the Tor process */ 
     93  TorProcess _torProcess;   
     94 
     95/* The slots below simply relay signals from the appropriate member objects */ 
     96private slots: 
     97  void onStarted(); 
     98  void onStopped(int exitCode, QProcess::ExitStatus exitStatus); 
     99  void onConnected(); 
     100  void onDisconnected(); 
    78101}; 
    79102