from siriObjects.baseObjects import ClientBoundCommand, AceObject

class AddViews(ClientBoundCommand):
	def __init__(self, refId, scrollToTop=False, temporary=False, dialogPhase="Completion", views=None):
		super(AddViews, self).__init__("AddViews", "com.apple.ace.assistant", None, refId)
		self.scrollToTop = scrollToTop
		self.temporary = temporary
		self.dialogPhase = dialogPhase
		self.views = views if views != None else []
	
	def to_plist(self):
		self.add_property('scrollToTop')
		self.add_property('temporary')
		self.add_property('dialogPhase')
		self.add_property('views')
		return super(AddViews, self).to_plist()

class AssistantUtteranceView(AceObject):
	def __init__(self, text="", speakableText=None, dialogIdentifier="Misc#ident", listenAfterSpeaking=False):
		super(AssistantUtteranceView, self).__init__("AssistantUtteranceView", "com.apple.ace.assistant")
		self.text = text
		if speakableText == None:
			self.speakableText = text
		else:
			self.speakableText = speakableText
		self.dialogIdentifier = dialogIdentifier
		self.listenAfterSpeaking = listenAfterSpeaking
	def to_plist(self):
		self.add_property('text')
		self.add_property('speakableText')
		self.add_property('dialogIdentifier')
		self.add_property('listenAfterSpeaking')
		return super(AssistantUtteranceView, self).to_plist()