imip-agent

Annotated imiptools/stores/__init__.py

1309:644b7e259059
2017-10-14 Paul Boddie Support BCC sending suppression so that routines requesting it can still be used with senders that will not support it, usually because there are no outgoing routing destinations for those senders.
paul@1069 1
#!/usr/bin/env python
paul@1069 2
paul@1069 3
"""
paul@1069 4
General support for calendar data storage.
paul@1069 5
paul@1206 6
Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
paul@1069 7
paul@1069 8
This program is free software; you can redistribute it and/or modify it under
paul@1069 9
the terms of the GNU General Public License as published by the Free Software
paul@1069 10
Foundation; either version 3 of the License, or (at your option) any later
paul@1069 11
version.
paul@1069 12
paul@1069 13
This program is distributed in the hope that it will be useful, but WITHOUT
paul@1069 14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
paul@1069 15
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
paul@1069 16
details.
paul@1069 17
paul@1069 18
You should have received a copy of the GNU General Public License along with
paul@1069 19
this program.  If not, see <http://www.gnu.org/licenses/>.
paul@1069 20
"""
paul@1069 21
paul@1206 22
from imiptools.stores.manifest import stores
paul@1071 23
paul@1088 24
# Access functions.
paul@1069 25
paul@1088 26
def get_store(store_type, store_dir):
paul@1088 27
    return stores[store_type].Store(store_dir)
paul@1069 28
paul@1088 29
def get_publisher(publishing_dir):
paul@1206 30
    return stores["file"].Publisher(publishing_dir)
paul@1069 31
paul@1088 32
def get_journal(store_type, journal_dir):
paul@1088 33
    return stores[store_type].Journal(journal_dir)
paul@1069 34
paul@1069 35
# vim: tabstop=4 expandtab shiftwidth=4