def checkCallStatus( name, skypeWindow ):
time.sleep(10)
filePath = __addon__.getSetting( 'skypexmlcontroller_var_path') + "skype2kodi\\call.xml"
while __windowopen__ and (not xbmc.abortRequested):
if os.path.isfile(filePath):
from xml.dom import minidom
xmldoc = minidom.parse(filePath)
friendName = xmldoc.getElementsByTagName('name')[0].childNodes[0].nodeValue
friendAvatar = xmldoc.getElementsByTagName('avatar')[0].childNodes[0].nodeValue
callStatus = xmldoc.getElementsByTagName('status')[0].childNodes[0].nodeValue
xbmc.log("Skype : call status is " + callStatus + " with " + friendName)
if (callStatus == 'incoming'):
wRinging.ringing(friendName, friendAvatar, 'incoming')
#xbmc.executebuiltin('Notification(Skype,' + friendName + ' is calling !, 1000, ' + friendAvatar + ')')
if (callStatus == 'outgoing'):
wRinging.ringing(friendName, friendAvatar, 'outgoing')
#xbmc.executebuiltin('Notification(Skype, Calling ' + friendName + ', 1000, ' + friendAvatar + ')')
#if (callStatus == 'active'):
# xbmc.executebuiltin('Notification(Skype, Call active with ' + friendName + ', 1000, ' + friendAvatar + ')')
if (callStatus == 'finished'):
wRinging.close()
os.remove(filePath)
xbmc.executebuiltin('Notification(Skype, Call finished with ' + friendName + ', 3000, ' + friendAvatar + ')')
time.sleep(2)
#---------------------------------------------------------------------------------------------------------------------
#
评论列表
文章目录