Lines Matching refs:typ
193 self.untagged_responses = {} # {typ: [data, ...], ...}
367 (typ, [data]) = <instance>.recent()
373 typ, dat = self._untagged_response('OK', [None], name)
375 return typ, dat
376 typ, dat = self.noop() # Prod server for response
377 return self._untagged_response(typ, dat, name)
397 (typ, [data]) = <instance>.append(mailbox, flags, date_time, message)
442 typ, dat = self._simple_command('AUTHENTICATE', mech)
443 if typ != 'OK':
446 return typ, dat
450 """(typ, [data]) = <instance>.capability()
454 typ, dat = self._simple_command(name)
455 return self._untagged_response(typ, dat, name)
461 (typ, [data]) = <instance>.check()
472 (typ, [data]) = <instance>.close()
475 typ, dat = self._simple_command('CLOSE')
478 return typ, dat
484 (typ, [data]) = <instance>.copy(message_set, new_mailbox)
492 (typ, [data]) = <instance>.create(mailbox)
500 (typ, [data]) = <instance>.delete(mailbox)
507 (typ, [data]) = <instance>.deleteacl(mailbox, who)
514 (typ, [data]) = <instance>.enable(capability)
518 typ, data = self._simple_command('ENABLE', capability)
519 if typ == 'OK' and 'UTF8=ACCEPT' in capability.upper():
521 return typ, data
528 (typ, [data]) = <instance>.expunge()
533 typ, dat = self._simple_command(name)
534 return self._untagged_response(typ, dat, name)
540 (typ, [data, ...]) = <instance>.fetch(message_set, message_parts)
548 typ, dat = self._simple_command(name, message_set, message_parts)
549 return self._untagged_response(typ, dat, name)
555 (typ, [data]) = <instance>.getacl(mailbox)
557 typ, dat = self._simple_command('GETACL', mailbox)
558 return self._untagged_response(typ, dat, 'ACL')
562 """(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute)
565 typ, dat = self._simple_command('GETANNOTATION', mailbox, entry, attribute)
566 return self._untagged_response(typ, dat, 'ANNOTATION')
574 (typ, [data]) = <instance>.getquota(root)
576 typ, dat = self._simple_command('GETQUOTA', root)
577 return self._untagged_response(typ, dat, 'QUOTA')
583 (typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox)
585 typ, dat = self._simple_command('GETQUOTAROOT', mailbox)
586 typ, quota = self._untagged_response(typ, dat, 'QUOTA')
587 typ, quotaroot = self._untagged_response(typ, dat, 'QUOTAROOT')
588 return typ, [quotaroot, quota]
594 (typ, [data]) = <instance>.list(directory='""', pattern='*')
599 typ, dat = self._simple_command(name, directory, pattern)
600 return self._untagged_response(typ, dat, name)
606 (typ, [data]) = <instance>.login(user, password)
610 typ, dat = self._simple_command('LOGIN', user, self._quote(password))
611 if typ != 'OK':
614 return typ, dat
620 (typ, [data]) = <instance>.login_cram_md5(user, password)
637 (typ, [data]) = <instance>.logout()
642 typ, dat = self._simple_command('LOGOUT')
644 return typ, dat
650 (typ, [data, ...]) = <instance>.lsub(directory='""', pattern='*')
655 typ, dat = self._simple_command(name, directory, pattern)
656 return self._untagged_response(typ, dat, name)
661 (typ, [data]) = <instance>.myrights(mailbox)
663 typ,dat = self._simple_command('MYRIGHTS', mailbox)
664 return self._untagged_response(typ, dat, 'MYRIGHTS')
669 (typ, [data, ...]) = <instance>.namespace()
672 typ, dat = self._simple_command(name)
673 return self._untagged_response(typ, dat, name)
679 (typ, [data]) = <instance>.noop()
690 (typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length)
695 typ, dat = self._simple_command(name, message_num, message_part, start, length)
696 return self._untagged_response(typ, dat, 'FETCH')
705 (typ, [data]) = <instance>.proxyauth(user)
715 (typ, [data]) = <instance>.rename(oldmailbox, newmailbox)
723 (typ, [data]) = <instance>.search(charset, criterion, ...)
732 typ, dat = self._simple_command(name, 'CHARSET', charset, *criteria)
734 typ, dat = self._simple_command(name, *criteria)
735 return self._untagged_response(typ, dat, name)
743 (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False)
756 typ, dat = self._simple_command(name, mailbox)
757 if typ != 'OK':
759 return typ, dat
767 return typ, self.untagged_responses.get('EXISTS', [None])
773 (typ, [data]) = <instance>.setacl(mailbox, who, what)
779 """(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+)
782 typ, dat = self._simple_command('SETANNOTATION', *args)
783 return self._untagged_response(typ, dat, 'ANNOTATION')
789 (typ, [data]) = <instance>.setquota(root, limits)
791 typ, dat = self._simple_command('SETQUOTA', root, limits)
792 return self._untagged_response(typ, dat, 'QUOTA')
798 (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
805 typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria)
806 return self._untagged_response(typ, dat, name)
820 typ, dat = self._simple_command(name)
821 if typ == 'OK':
829 return self._untagged_response(typ, dat, name)
835 (typ, [data]) = <instance>.status(mailbox, names)
840 typ, dat = self._simple_command(name, mailbox, names)
841 return self._untagged_response(typ, dat, name)
847 (typ, [data]) = <instance>.store(message_set, command, flags)
851 typ, dat = self._simple_command('STORE', message_set, command, flags)
852 return self._untagged_response(typ, dat, 'FETCH')
858 (typ, [data]) = <instance>.subscribe(mailbox)
869 typ, dat = self._simple_command(name, threading_algorithm, charset, *search_criteria)
870 return self._untagged_response(typ, dat, name)
877 (typ, [data]) = <instance>.uid(command, arg1, arg2, ...)
890 typ, dat = self._simple_command(name, command, *args)
895 return self._untagged_response(typ, dat, name)
901 (typ, [data]) = <instance>.unsubscribe(mailbox)
913 (typ, [data]) = <instance>.unselect()
916 typ, data = self._simple_command('UNSELECT')
919 return typ, data
928 (typ, [data]) = <instance>.xatom(name, arg, ...)
944 def _append_untagged(self, typ, dat):
951 (typ, len(ur.get(typ,'')), dat))
952 if typ in ur:
953 ur[typ].append(dat)
955 ur[typ] = [dat]
973 for typ in ('OK', 'NO', 'BAD'):
974 if typ in self.untagged_responses:
975 del self.untagged_responses[typ]
1047 typ, data = self._get_tagged_response(tag, expect_bye=logout)
1054 if typ == 'BAD':
1055 raise self.error('%s command error: %s %s' % (name, typ, data))
1056 return typ, data
1060 typ, dat = self.capability()
1084 typ = self.mo.group('type')
1085 typ = str(typ, self._encoding)
1087 self.tagged_commands[tag] = (typ, [dat])
1106 typ = self.mo.group('type')
1107 typ = str(typ, self._encoding)
1126 self._append_untagged(typ, (dat, data))
1132 self._append_untagged(typ, dat)
1136 if typ in ('OK', 'NO', 'BAD') and self._match(Response_code, dat):
1137 typ = self.mo.group('type')
1138 typ = str(typ, self._encoding)
1139 self._append_untagged(typ, self.mo.group('data'))
1142 if self.debug >= 1 and typ in ('NO', 'BAD', 'BYE'):
1143 self._mesg('%s response: %r' % (typ, dat))
1157 typ = 'BYE'
1158 bye = self.untagged_responses.pop(typ, None)
1161 return (typ, bye)
1233 def _untagged_response(self, typ, dat, name):
1234 if typ == 'NO':
1235 return typ, dat
1237 return typ, [None]
1242 return typ, data
1603 typ, dat = getattr(M, cmd)(*args)
1604 M._mesg('%s => %s %s' % (cmd, typ, dat))
1605 if typ == 'NO': raise dat[0]