The eventHandler function is too long to insert here complete.
public static function eventHandler($action, $e_id, $id, $directory, $module){
[... 1. collect data from the database about the meeting and the contact...]
[... 2. there are different actions ...]
if ( $action == 'delete' ) {
$result = sync_delete($user, $pass, $host, $domain, $folderid, $skey, $pkey, $e_seid, $typ, $e_array, $module);
if ( $skey != $result[1] ){
#Set new Synckey
Inmedias_CalSyncCommon::setSyncKey($result[1], $mail_id, $directory);
}
}
The function sync_delete() is from the file: sync_deleteEntry.php and this I have integrated with:
require 'modules/Inmedias/CalSync/sync_deleteEntry.php';
In this function I send an delete-Action to the exchange Active Sync.