]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/smux.h
More subscriptions, less notifiers.
[stg.git] / projects / stargazer / plugins / other / smux / smux.h
index 1986d28be72ce746b02327e353c90ce88fdc8f1a..3e708e2b70342da1a45a70be6c2d3acd77dd3e48 100644 (file)
@@ -81,16 +81,6 @@ private:
     UserPtr userPtr;
 };
 //-----------------------------------------------------------------------------
-class ADD_DEL_TARIFF_NOTIFIER : public STG::NotifierBase<STG::TariffData> {
-public:
-    explicit ADD_DEL_TARIFF_NOTIFIER(SMUX & s)
-             : STG::NotifierBase<STG::TariffData>(), smux(s) {}
-    void notify(const STG::TariffData &) override;
-
-private:
-    SMUX & smux;
-};
-//-----------------------------------------------------------------------------
 class SMUX : public STG::Plugin {
 public:
     SMUX();
@@ -170,9 +160,10 @@ private:
 
     STG::ScopedConnection m_onAddUserConn;
     STG::ScopedConnection m_onDelUserConn;
+    STG::ScopedConnection m_onAddTariffConn;
+    STG::ScopedConnection m_onDelTariffConn;
 
     std::list<CHG_AFTER_NOTIFIER> notifiers;
-    ADD_DEL_TARIFF_NOTIFIER addDelTariffNotifier;
 
     STG::PluginLogger logger;
 };
@@ -183,9 +174,3 @@ void CHG_AFTER_NOTIFIER::notify(const std::string &, const std::string &)
 {
 smux.UpdateTables();
 }
-
-inline
-void ADD_DEL_TARIFF_NOTIFIER::notify(const STG::TariffData &)
-{
-smux.UpdateTables();
-}