package PublicCheck::MidStore; use strict; our($CONF_KEY) = "PublicCheck"; sub new { my ($this, $plugin) = @_; $this = ref($this) || $this; return(bless({},$this)); } sub check_start { } sub check_end { } sub parse_config { my($self,$plugin,$opt) = (shift,shift,shift); return(0); } # Should return <1 for never used. # should return TRUE if the message ID was used. sub exists { my($self,$plugin,$pmstat,$id,$email) = @_; return(0); } sub per_msg_finish { } 1; __END__ =pod =head1 NAME PublicCheck::MidStore - Message-ID storage module. This package is used as a base class for storing out-bound message ID's. If you're message ID's are in some other storage mechanism, you should extend this class. The storage mechanism should implement an exists() method that returns T/F depending on if the message ID has been sent. You'll need to set public_store_module to your implementation. Unless otherwise noted, we refer to the PublicCheck:To instance as '$plugin' =head1 METHODS =over 4 =item new($plugin) Standard boilerplate constructor. You should call it with the $self = $this->SUPER::new(@_); as you're probably aware. $public_to_plugin is the instance of PublicCheck::To that we are providing storage for, =item parse_config($plugin,$opt) Same as a plugin parse_config, except with 2 arguments, this is where you get your configuration. If you recognize the keys in $opt, you should call $plugin->inhibit_further_callbacks() and return(1), return(0) otherwise. =item check_start($plugin,$opt) =item check_end($plugin,$opt) =item per_msg_finish($plugin,$opt) These are the same as the plugins, except you're given 2 arguments. =item exists($plugin,$pmstat,$mid,$email) =item exists($plugin,$pmstat,$mid) This is where the storage implementation must return TRUE if the message ID, $mid is known. If it is given an additional argument, ($email) it is expected to confirm that the email message is connected to this message ID. =back =cut