The factory module

The factory module contains classes which provide factory functions for creating concrete SiriObjects for specific purposes.

The ObjectFactory class

Inheritance diagram of pysiriproxy.objects.factory.ObjectFactory

class pysiriproxy.objects.factory.ObjectFactory[source]

The ObjectFactory provides factory methods for constructing concrete SiriObject objects of specific types.

classmethod action(actionType, *args, **kwargs)[source]

Create a SiriObject Action of the specific type.

  • actionType – The type of action to create
  • args – The arguments
  • kwargs – The keyword arguments
classmethod button(buttonType, buttonText, *args, **kwargs)[source]

Create a SiriObject Button of the specific type.

  • buttonType – The type of Button to create
  • buttonText – The button text
  • args – The argumnets
  • kwargs – The keyword arguments
classmethod utterance(displayText, spokenText=None, listenAfterSpeaking=False, identifier='Misc#ident')[source]

Create a SiriObject utterance.

  • displayText – The text to display
  • spokenText – The text that Siri will speak
  • listenAfterSpeaking – True for Siri to listen for a response
  • identifier – The identifier for the utterance

The ResponseFactory class

Inheritance diagram of pysiriproxy.objects.factory.ResponseFactory

class pysiriproxy.objects.factory.ResponseFactory[source]

The ResponseFactory is responsible for creating specific SiriObject responses to be sent from pysiriproxy to the iPhone user. These responses include things such as, creating a view composed of SiriObjects, sending a request completed object, and others.

classmethod requestCompleted(refId, callbacks=None)[source]

Create a request completed object.

  • refId – The reference id
  • callbacks – The list of callbacks
classmethod utterance(refId, displayText, spokenText=None, listenAfterSpeaking=False, identifier='Misc#ident')[source]

Create an utterance with the given display text, and spoken text.

  • refId – The reference id

  • displayText – The text to be displayed

  • spokenText – The text to be spoken by Siri

  • listenAfterSpeaking – True for Siri to listen for a response

    after speaking, False otherwise

classmethod view(refId, subObjects, dialogPhase='Completion')[source]

Create an utterance view composed of several sub objects.

  • refId – The reference id

  • subObjects – The list of SiriObjects the view will be composed of

    or a list of tuple arguments to create SiriObjects

  • dialogPhase – The dialogPhase

Table Of Contents

Previous topic

The commands module

Next topic

The dataObjects module

This Page