86
86
def start_conversation(self):
87
contacts = self.address_book.contacts.\
88
search_by_presence(pymsn.Presence.ONLINE)
89
for c in self.address_book.contacts:
90
if c.account == "@hotmail.com":
91
print "Fetching space of : %s with cid %s\n" % (c.display_name, c.cid)
92
self.spaces_service.get_contact_card(c)
94
if len(contacts) == 0:
95
print "No online contacts"
98
for contact in contacts:
99
if contact.account == "johann.prieur@gmail.com":
100
print "Inviting %s for a conversation" % contact.display_name
101
self.conv = pymsn.Conversation(self, [contact])
102
self._convo_events = AnnoyingConversation(self.conv)
89
for state in [pymsn.Presence.ONLINE, \
90
pymsn.Presence.BUSY, \
91
pymsn.Presence.IDLE, \
92
pymsn.Presence.AWAY, \
93
pymsn.Presence.BE_RIGHT_BACK, \
94
pymsn.Presence.ON_THE_PHONE, \
95
pymsn.Presence.OUT_TO_LUNCH]:
96
print "Trying %s" % state
97
contacts = self.address_book.contacts.\
98
search_by_presence(state)
100
if len(contacts) == 0:
101
print "No %s contacts" % state
103
for contact in contacts:
104
print "%s is %s" % (contact.display_name, state)
105
if contact.account == peer:
106
print "Inviting %s for a webcam" % contact.display_name
107
self._webcam_handler._create_new_send_session(contact)
110
120
if "--http" in sys.argv:
112
122
sys.argv.remove('--http')