diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-03-13 17:53:43 +0000 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-03-13 17:53:43 +0000 |
commit | 11c54d423e6a95c35932e83f81f367469a96c378 (patch) | |
tree | 5cf16d31d598fafd8872de09715138686c5f6059 /pykolab/plugins/defaultfolders/__init__.py | |
parent | 354522b3d14ff28c4d976aeab35cb8ac93906b5f (diff) | |
download | pykolab-11c54d423e6a95c35932e83f81f367469a96c378.tar.gz |
Redo plugins so they can be binary compiled
Diffstat (limited to 'pykolab/plugins/defaultfolders/__init__.py')
-rw-r--r-- | pykolab/plugins/defaultfolders/__init__.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pykolab/plugins/defaultfolders/__init__.py b/pykolab/plugins/defaultfolders/__init__.py new file mode 100644 index 0000000..426b293 --- /dev/null +++ b/pykolab/plugins/defaultfolders/__init__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2010-2011 Kolab Systems AG (http://www.kolabsys.com) +# +# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 3 or, at your option, any later version +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +__all__ = [ + 'KolabDefaultfolders' + ] + +class KolabDefaultfolders(object): + """ + Example plugin to create a set of default folders. + """ + + def __init__(self, conf=None): + self.conf = conf + + def create_user_folders(self, kw={}, args=()): + """ + The arguments passed to the 'create_user_folders' hook: + + - imap connection + - user folder + """ + + (folder, additional_folders) = args + + exec("additional_folders = %s" %(additional_folders)) + + return additional_folders |