rename some archiving functions

This commit is contained in:
Yann Leboulanger 2009-12-08 17:09:41 +01:00
parent 3f4f07d326
commit 47ff962e5b
2 changed files with 6 additions and 6 deletions

View File

@ -210,7 +210,7 @@ class ArchivingStanzaSession(StanzaSession):
self.send(request)
def respond_archiving_bob(self, form):
def respond_archiving(self, form):
field = form.getField('logging')
options = [x[1] for x in field.getOptions()]
values = field.getValues()
@ -246,7 +246,7 @@ class ArchivingStanzaSession(StanzaSession):
self.send(response)
def accept_archiving_bob(self, form):
def we_accept_archiving(self, form):
if self.negotiated['logging'] == 'mustnot':
self.loggable = False
log.debug('archiving session accepted: %s' % self.loggable)
@ -255,7 +255,7 @@ class ArchivingStanzaSession(StanzaSession):
if self.control:
self.control.print_archiving_session_details()
def accept_archiving_alice(self, form):
def archiving_accepted(self, form):
negotiated = {}
ask_user = {}
not_acceptable = []

View File

@ -401,7 +401,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
if form.getType() == 'form' and 'security' in form.asDict():
security_options = [x[1] for x in form.getField('security').getOptions()]
if security_options == ['none']:
self.respond_archiving_bob(form)
self.respond_archiving(form)
else:
# bob responds
@ -443,7 +443,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
elif self.status == 'requested-archiving' and form.getType() == \
'submit':
try:
self.accept_archiving_alice(form)
self.archiving_accepted(form)
except exceptions.NegotiationError, details:
self.fail_bad_negotiation(details)
@ -485,7 +485,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
elif self.status == 'responded-archiving' and form.getType() == \
'result':
try:
self.accept_archiving_bob(form)
self.we_accept_archiving(form)
except exceptions.NegotiationError, details:
self.fail_bad_negotiation(details)