Previous: , Up: Development   [Contents][Index]

10.4 Developing Lists

If aegee-milter considers a symbol to be loaded as list, it extracts and executes a function called ’init’ from the dlpreopened object. If this function exists, and returns a SoList object, then the Tables() method of that object is called. A single SoList object can provide several tables. If it returns a non-empty std::vector<std::string>, then the std::strings are added to AegeeMilter::so_tables and linked to the libtool dlpreopened object. Otherwise the list is unloaded.

The order in which lists are loaded is insignificant.

Each list derives from the SoList class.

The method Query gets as parameters: the table name, from which to obtain information, the user (recipient), for which to obtain information and what information is asked for that user.

The method Insert inserts for a table, user and key a value.

The method Remove is used to remove from a table and user a specific key. Currently no list implements this method and no module calls it.

The method Expire is meant to expunge outdated data from a table and to be triggered regularly by aegee-milter. Currently no list implements it and the default implementation does nothing. The idea is to insert in a table information when vacation/out-of-office messages are sent, and to delete the information.

How the parameters are exactly interpretet is left to the modules and lists implementations and the agreements between them. For instance, list_log::Insert uses the user and key to compose an appropriate log message and list_log::Query is not called. list_timsieved_scripts::Query encodes in the user either which user and domain are meant, or if the global scripts for particular domain are requested. The key is used to request either the default script, or a particular script name. list_timsieved_scripts::Insert is not used by any module and is not implemented.

Previous: , Up: Development   [Contents][Index]