array("V", "VNOTE"), "END" => array("V", "VNOTE"), "DCREATED" => NULL, "LAST-MODIFIED" => NULL, "BODY" => NULL, "VERESION" => array ("V", "1.1")); class sync_vnote_mysql extends sync_generic_mysql { var $_data = "vnote"; function get_ct() { return ("text/x-vnote"); } 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-vnote"); $rxpref->new_child_data ("VerCT", NULL, "1.1"); $txpref = & $datastore->new_child ("Tx-Pref", NULL); $txpref->new_child_data ("CTType", NULL, "text/x-vnote"); $txpref->new_child_data ("VerCT", NULL, "1.1"); $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 $vnote_caps; $ctcap = & new xml_tree_node_c ("CTCap", NULL); $ctcap->new_child_data ("CTType", NULL, "text/x-vnote"); foreach ($vnote_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; } }; ?>