core: Allow clean shutdown of the core
[quassel.git] / src / core / coresession.h
index fe81a2b..15c9533 100644 (file)
@@ -63,7 +63,6 @@ class CoreSession : public QObject
 
 public:
     CoreSession(UserId, bool restoreState, bool strictIdentEnabled, QObject *parent = 0);
-    ~CoreSession();
 
     QList<BufferInfo> buffers() const;
     inline UserId user() const { return _user; }
@@ -112,6 +111,11 @@ public slots:
     void addClient(RemotePeer *peer);
     void addClient(InternalPeer *peer);
 
+    /**
+     * Shuts down the session and deletes itself afterwards.
+     */
+    void shutdown();
+
     void msgFromClient(BufferInfo, QString message);
 
     //! Create an identity and propagate the changes to the clients.