protected function _parseAnnotation(Horde_Imap_Client_Interaction_Pipeline $pipeline, Horde_Imap_Client_Tokenize $data)
{
// Mailbox name is in UTF7-IMAP.
$mbox = Horde_Imap_Client_Mailbox::get($data->next(), true);
$entry = $data->next();
// Ignore unsolicited responses.
if ($data->next() !== true) {
return;
}
while (($type = $data->next()) !== false) {
switch ($type) {
case 'value.priv':
$pipeline->data['metadata'][strval($mbox)]['/private' . $entry] = $data->next();
break;
case 'value.shared':
$pipeline->data['metadata'][strval($mbox)]['/shared' . $entry] = $data->next();
break;
default:
$e = new Horde_Imap_Client_Exception(Horde_Imap_Client_Translation::r("Invalid METADATA value type \"%s\"."), Horde_Imap_Client_Exception::METADATA_INVALID);
$e->messagePrintf(array($type));
throw $e;
}
}
}