NULL, "ATTACH" => NULL, "ATTENDEE" => array ("P", "EXPECT", "ROLE", "RSVP", "STATUS"), "BEGIN" => array("V", "VCALENDAR", "VEVENT", "VTODO"), "CATEGORIES" => NULL, "COMPLETED" => NULL, "CLASS" => array("V", "PUBLIC", "PRIVATE", "CONFIDENTIAL"), "DAYLIGHT" => NULL, "DCREATED" => NULL, "DESCRIPTION" => NULL, "DTSTART" => NULL, "DTEND" => NULL, "DUE" => NULL, "END" => array("V", "VCALENDAR", "VEVENT", "VTODO"), "EXDATE" => NULL, "LAST-MODIFIED" => NULL, "LOCATION" => NULL, "PRIORITY" => NULL, "RRULE" => NULL, "STATUS" => NULL, "SUMMARY" => NULL, "UID" => NULL, "VERSION" => array ("V", "1.0")); class sync_vcalendar_mysql extends sync_generic_mysql { var $_data = "vcalendar"; function get_ct() { return ("text/x-vcalendar"); } function get_datastore_caps ($name) { $datastore = & new xml_tree_node_c ("DataStore", NULL); $datastore->new_child_data ("SourceRef", NULL, $name); $datastore->new_child_data ("MaxGUIDSize", NULL, "4"); $rxpref = & $datastore->new_child ("Rx-Pref", NULL); $rxpref->new_child_data ("CTType", NULL, "text/x-vcalendar"); $rxpref->new_child_data ("VerCT", NULL, "1.0"); $txpref = & $datastore->new_child ("Tx-Pref", NULL); $txpref->new_child_data ("CTType", NULL, "text/x-vcalendar"); $txpref->new_child_data ("VerCT", NULL, "1.0"); $synccap = & $datastore->new_child ("SyncCap", NULL); $synccap->new_child_data ("SyncType", NULL, "1");// Two way sync $synccap->new_child_data ("SyncType", NULL, "2");// Slow two way sync return $datastore; } function get_ctcaps () { global $vcalendar_caps; $ctcap = & new xml_tree_node_c ("CTCap", NULL); $ctcap->new_child_data ("CTType", NULL, "text/x-vcalendar"); foreach ($vcalendar_caps as $key => $val) { $ctcap->new_child_data ("PropName", NULL, $key); if ($val) { if ($val[0] == "V") { foreach ($val as $param) { if ($param != "V") $ctcap->new_child_data ("ValEnum", NULL, $param); } } else if ($val[0] == "P") { foreach ($val as $param) { if ($param != "P") $ctcap->new_child_data ("ParamName", NULL, $param); } } } } return $ctcap; } }; ?>