How to control from a module the block visibility of a block implemented by another module? The default options in the administrative page for block visibility (e.g. admin/build/block/configure/block/3) are not enough for my needs.

For security reasons, I do not wish to use the PHP option (Show if the following PHP code returns TRUE (PHP-mode, experts only).).  I plan to turn off all PHP configuration throughout the site.  

The only route that remains available is to create a module that will control the visibility of certain blocks on specific pages.  I am an experienced module developer but I do not know how to implement this specific thing.

What API exist that I could use? Apparently it's possible in Drupal 7. What alternatives do exist in Drupal 6? 

Edit:
I actually easily found the answer to my original question. Now, I want to be able to control from my module the visibility of a block implemented by another module. My specific use case is thus: core's aggregator.module  create feed blocks, but I want each feed block to be displayed on pages of certain types authored by specific users who are associated with specific feeds. I could re-implement the whole aggregator_block() or... I could let the aggregator.module do its job and simply control the visibility of the block that it produces. Is it possible?
You can call the aggregator's (or an other module's) block routines by doing something like this in your module...

$foo=module_invoke('aggregator', 'block', 'view', 'BLOCK_DELTA');
$content.=$foo['content'];


...with the resulting $content containing the html of the block in question.

So, it would be fairly trivial to include something like the above in your custom module's block view hook instead of copying all of the aggregator module's code into your module.

More information on module_invoke() here.

Just an FYI:  Using the visibility key set to PHP in hook_block() actually requires the &lt;?php ... ?&gt; brackets with the whole shabang being passed through eval() so IMHO I don't think it is all that much safer than using the Block UI's PHP option.