* This program is licensed under GPL. See COPYING for details */ // make sure SM_PATH is defined if (!defined('SM_PATH')) { define('SM_PATH','../../'); } /** * init function */ function squirrelmail_plugin_init_abook_carddav() { global $squirrelmail_plugin_hooks; $squirrelmail_plugin_hooks['abook_init']['abook_carddav'] = 'abook_carddav_init'; $squirrelmail_plugin_hooks['abook_add_class']['abook_carddav'] = 'abook_carddav_class'; } /** * Initialized address book backend */ function abook_carddav_init(&$argv) { // Get the arguments $hookName = &$argv[0]; $abook = &$argv[1]; $r = &$argv[2]; bindtextdomain ('abook_carddav', SM_PATH . 'locale'); textdomain ('abook_carddav'); $r=$abook->add_backend('carddav',array('name'=>_("CardDAV Address Book"))); bindtextdomain ('squirrelmail', SM_PATH . 'locale'); textdomain ('squirrelmail'); } function abook_carddav_class() { bindtextdomain ('abook_carddav', SM_PATH . 'locale'); textdomain ('abook_carddav'); require_once(SM_PATH . 'plugins/abook_carddav/abook_class.php'); bindtextdomain ('squirrelmail', SM_PATH . 'locale'); textdomain ('squirrelmail'); } /** * shows plugin's version * @return string */ function abook_carddav_version() { return '1.0'; } ?>