* Get a list of server changes that occured during the specified time
* period.
*
- * @param string $folderId The server id of the collection to check.
- * @param timestamp $from_ts The starting timestamp
- * @param timestamp $to_ts The ending timestamp
+ * @param string $folderId The server id of the collection to check.
+ * @param integer $from_ts The starting timestamp
+ * @param integer $to_ts The ending timestamp
*
* @return array A list of messge uids that have chnaged in the specified
* time period.
*/
public function getServerChanges($folderId, $from_ts, $to_ts, $cutoffdate)
{
- // FIXME: Need to filter the results by $from_ts OR need to fix
- // Horde_History to query for a timerange instead of a single timestamp
$this->_logger->debug("Horde_ActiveSync_Driver_Horde::getServerChanges($folderId, $from_ts, $to_ts, $cutoffdate)");
switch ($folderId) {
case self::APPOINTMENTS_FOLDER:
}
$edits = $deletes = array();
} else {
- $adds = $this->_connector->calendar_listBy('add', $from_ts);
- $edits = $this->_connector->calendar_listBy('modify', $from_ts);
- $deletes = $this->_connector->calendar_listBy('delete', $from_ts);
+ $adds = $this->_connector->calendar_listBy('add', $from_ts, $to_ts);
+ $edits = $this->_connector->calendar_listBy('modify', $from_ts, $to_ts);
+ $deletes = $this->_connector->calendar_listBy('delete', $from_ts, $to_ts);
}
break;
case self::CONTACTS_FOLDER:
$adds = $this->_connector->contacts_list();
$edits = $deletes = array();
} else {
- $adds = $this->_connector->contacts_listBy('add', $from_ts);
- $edits = $this->_connector->contacts_listBy('modify', $from_ts);
- $deletes = $this->_connector->contacts_listBy('delete', $from_ts);
+ $adds = $this->_connector->contacts_listBy('add', $from_ts, $to_ts);
+ $edits = $this->_connector->contacts_listBy('modify', $from_ts, $to_ts);
+ $deletes = $this->_connector->contacts_listBy('delete', $from_ts, $to_ts);
}
break;
case self::TASKS_FOLDER:
$adds = $this->_connector->tasks_listTasks();
$edits = $deletes = array();
} else {
- $adds = $this->_connector->tasks_listBy('add', $from_ts);
- $edits = $this->_connector->tasks_listBy('modify', $from_ts);
- $deletes = $this->_connector->tasks_listBy('delete', $from_ts);
+ $adds = $this->_connector->tasks_listBy('add', $from_ts, $to_ts);
+ $edits = $this->_connector->tasks_listBy('modify', $from_ts, $to_ts);
+ $deletes = $this->_connector->tasks_listBy('delete', $from_ts, $to_ts);
}
break;
}
/**
* Get a list of events from horde's calendar api
*
- * @param timestamp $startstamp The start of time period.
- * @param timestamp $endstamp The end of time period
+ * @param integer $startstamp The start of time period.
+ * @param integer $endstamp The end of time period
*
* @return array
*/
/**
* Get a list of event uids that have had $action happen since $from_ts.
*
- * @param string $action The action to check for (add, modify, delete)
- * @param timestamp $from_ts The timestamp to start checking from
+ * @param string $action The action to check for (add, modify, delete)
+ * @param integer $from_ts The timestamp to start checking from
+ * @param integer $to_ts The ending timestamp
*
* @return array An array of event uids
*/
- public function calendar_listBy($action, $from_ts)
+ public function calendar_listBy($action, $from_ts, $to_ts)
{
- return $this->_registry->calendar->listBy($action, (int)$from_ts);
+ return $this->_registry->calendar->listBy($action, $from_ts, null, $to_ts);
}
/**
* @param string $uid The UID of the event we are interested in.
* @param string $action The action we are interested in (add, modify...)
*
- * @return timestamp
+ * @return integer
*/
public function calendar_getActionTimestamp($uid, $action)
{
* @param string $uid The UID of the contact to search
* @param string $action The action to lookup
*
- * @return timestamp
+ * @return integer
*/
public function contacts_getActionTimestamp($uid, $action)
{
/**
* Get a list of contact uids that have had $action happen since $from_ts.
*
- * @param string $action The action to check for (add, modify, delete)
- * @param timestamp $from_ts The timestamp to start checking from
- *
+ * @param string $action The action to check for (add, modify, delete)
+ * @param integer $from_ts The timestamp to start checking from
+ * @param integer $to_ts The ending timestamp
* @return array An array of event uids
*/
- public function contacts_listBy($action, $from_ts)
+ public function contacts_listBy($action, $from_ts, $to_ts)
{
- return $this->_registry->contacts->listBy($action, (int)$from_ts);
+ return $this->_registry->contacts->listBy($action, $from_ts, null, $to_ts);
}
/**
* @param string $uid The UID of the task we are interested in.
* @param string $action The action we are interested in (add, modify...)
*
- * @return timestamp
+ * @return integer
*/
public function tasks_getActionTimestamp($uid, $action)
{
/**
* Get a list of task uids that have had $action happen since $from_ts.
*
- * @param string $action The action to check for (add, modify, delete)
- * @param timestamp $from_ts The timestamp to start checking from
+ * @param string $action The action to check for (add, modify, delete)
+ * @param integer $from_ts The timestamp to start checking from
+ * @param integer $to_ts The ending timestamp
*
* @return array An array of event uids
*/
public function tasks_listBy($action, $from_ts)
{
- return $this->_registry->tasks->listBy($action, (int)$from_ts);
+ return $this->_registry->tasks->listBy($action, $from_ts, null, $to_ts);
}
/**