General discussion on installation and configuration of SOGo

Text archives Help

Re: [SOGo] Ideas for hooks

Chronological Thread 
  • From: Christian Holzberger < >
  • To:
  • Subject: Re: [SOGo] Ideas for hooks
  • Date: Sun, 31 Jul 2011 19:13:01 +0200
  • Organization: MOSAIK Software

it would be nice if we could virtually-merge different calenders / folders in one. Perhaps with some sort of filters, to exclude some appointments / contatcts...

and also route acl lookups through scripts so you can write-protect some appointments on-demand.

script triggers on error would also be nice so one can create a ticket in a bucktracker or send a mail to the admins - fully automatic.

On 07/29/2011 11:31 PM, Ludovic Marcotte wrote:

It's done - we can now extend SOGo directly in Python. One can easily create a Python class, define methods and create it as an object in Objective-C.

So what does that mean? It'll be possible for us to define "hooks" - methods that SOGo will invoke and people will implement in Python. For example, we could create a hook in SOGoParentFolder (_createPersonalFolder) :

- Name: -personalFolderWasCreated: (SOGoGCSFolder *) theFolder forUser: (SOGoUser *) theUser

- Description: This method will be invoked whenever a personal folder (default Calendar or
Address Book) is created. Using this hook, you can for example, automatically
subscribe the user when he "first logs in" to some other resources or you can
create additional resources.

Your Python module would simply look like:

=== SNIP ===
import objc

class Foobar (objc.lookUpClass('NSObject')):
"""Simple SOGo Bundle"""

def init(self):
return self

def personalFolderWasCreated_forUser_(self, folder, user):
// do your own stuff here
=== SNIP ===

Of course, from Python, you will be able to call Objective-C methods on objects (from SOGo/SOPE/GNUstep, etc.) or any other stuff coming for the gazillion on Python modules out there. Your Python module would simply be in a bundle, together with its resources.

What we need from you? Ideas for hooks.


Archive powered by MHonArc 2.6.18.

Top of page