]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - lib/rm/rm_plugin.rb
Way too many changes to mention. The 'rm' mode works now.
[mailshears.git] / lib / rm / rm_plugin.rb
index 0c155a18f9441521d1ee3a6c9445927c19bd022a..cad493d9f85c95ae8a3c79bee121e59c508a8efb 100644 (file)
@@ -3,6 +3,18 @@ module RmPlugin
   # Plugins for the removal of accounts.
   #
 
+  def RmPlugin.included(c)
+    # Callback, called whenever another class or module includes this
+    # one. The parameter given is the name of the class or module
+    # that included us.
+    @includers ||= []
+    @includers << c
+  end
+
+  def RmPlugin.includers
+    return @includers
+  end
+
   def delete_domain(domain)
     # Delete the given domain.
     raise NotImplementedError
@@ -13,15 +25,11 @@ module RmPlugin
     raise NotImplementedError
   end
 
-  def get_leftover_domains(db_domains)
-    # Given a list of domains, determine which domains belonging to
-    # this plugin are not contained in the given list.
+  def get_domain_usernames(domain)
+    # Get a list of usernames for a given domain,
+    # needed to delete accounts before removing
+    # a domain.
     raise NotImplementedError
   end
 
-  def get_leftover_accounts(db_accounts)
-    # Given a list of accounts, determine which accounts belonging to
-    # this plugin are not contained in the given list.
-    raise NotImplementedError
-  end
 end