/** * Send WBXML to indicate provisioning is required. * * @param string $requestType The type of request we are handling. * @param integer $status The reason we need to provision. */ protected function _requireProvisionWbxml($requestType, $status) { $this->_encoder->startWBXML(); $this->_encoder->startTag($requestType); $this->_encoder->startTag(Horde_ActiveSync::SYNC_STATUS); $this->_encoder->content($status); $this->_encoder->endTag(); $this->_encoder->endTag(); }
/** * Stream a message deletion to the client. * * @param string $id The uid of the message we are deleting. * @param boolean $soft If true, send a SOFTDELETE, otherwise a REMOVE. */ public function messageDeletion($id, $soft = false) { if ($soft) { $this->_encoder->startTag(Horde_ActiveSync::SYNC_SOFTDELETE); } else { $this->_encoder->startTag(Horde_ActiveSync::SYNC_REMOVE); } $this->_encoder->startTag(Horde_ActiveSync::SYNC_SERVERENTRYID); $this->_encoder->content($id); $this->_encoder->endTag(); $this->_encoder->endTag(); }
/** * Output a single policy value * * @param string $policy The policy name * @param mixed $value The policy value * @param boolean $nodefault Don't send the policy if the value is default. */ protected function _sendPolicy($policy, $value, $nodefault = false) { if ($nodefault && $value == $this->_defaults[$policy]) { return; } if ($value === false) { $value = 0; } elseif ($value === true) { $value = 1; } $this->_encoder->startTag('Provision:' . $policy); $this->_encoder->content($value); $this->_encoder->endTag(); }