The options module

The options module contains the Options class which provides the ability to load settings from the pysiriproxy configuration file, as as being able to parse the command line arguments.

The Files class

Inheritance diagram of pysiriproxy.options.options.Files

class pysiriproxy.options.options.Files

The Files class contains definitions of various file paths that pertain to pysiriproxy configuration.

CertFile

The CertFile property contains the path to the certification file for pysiriproxy.

ConfigFile

The ConfigFile property contains the path to the configuration file for pysiriproxy.

EtcHosts

The EtcHosts property contains the path to the system hosts file.

GenCerts

The GenCerts property contains the path to the bash script that generates certificates for pysiriproxy.

KeyFile

The KeyFile property contains the path to the key file to use for pysiriproxy.

LogFile

The LogFile property contains the path to the log file to use for pysiriproxy.

The Settings class

Inheritance diagram of pysiriproxy.options.options.Settings

class pysiriproxy.options.options.Settings[source]

The Settings class defines all of the specific configuration settings that can be used in the pysiriproxy configuration file.

CertFile

This setting should contain the path to the file that is used as the certification file for connecting to the Apple’s server.

DebugLevel

This setting should contain the debug level which will be used by the system.

ErrorResponse

This setting should contain a string that will be spoken by Siri in the event of an Exception while objects are being filtered or speech rules are being applied.

ExitOnConnectionLost

This setting should contain be set to True in order to configure the server such that it exits every time an established connection to the iPhone is lost. This will allow an external script to restart the server cleanly each time the connection is lost.

GenCerts

This setting should contain a boolean indicating whether the pysiriproxy SSL certificates should be generated or not.

KeyFile

The setting should contain the path to the file that is used as the key file for connecting to the Apple’s server.

LogFile

This setting should contain the path to the log file where pysiriproxy should log all of its logging messages.

LogLevel

This setting should contain the log level which will used by the system.

Here are valid values for this setting:

  • DEBUG,
  • INFO,
  • WARN, and
  • ERROR
PluginsDir

This setting should contain the path to the system directory that contains the plugins which pysiriproxy should load.

ServerHost

This setting should contain the host name of the Apple’s server. Defaults to the iOS 5 server.

ServerPort

This setting should contain the port number used for connecting to Apple’s web server.

Timestamp

This setting should contain a string which is the format for the timestamp which will be applied to all logged messages. See the man page for the date command for more info on the format. If this is an empty string, no timestamp will be applied to logged messages.

iPhonePort

This setting should contain the port number that the iPhone uses for its connection.

The Directories class

Inheritance diagram of pysiriproxy.options.options.Directories

class pysiriproxy.options.options.Directories

The Directories class contains various properties which define directories that contain pysiriproxy data.

Config

The Config directory contains the user’s siri proxy configuration directory.

Etc

The Etc property contains the path to the system etc directory.

Home

The Home property contains the user’s home directory.

Scripts

The Scripts property contains the scripts directory within the user’s siri proxy configuration directory.

SiriInstall

The SiriInstall property contains the system installation directory for pysiriproxy.

SystemDefaultConfig

The SystemDefaultConfig property contains the path to the system directory which contains the default configuration files created when pysiriproxy is installed on the system.

The Ids class

Inheritance diagram of pysiriproxy.options.options.Ids

class pysiriproxy.options.options.Ids

The Ids class defines various configuration settings.

Note

ConfigParser converts all properties to lower case

CertFile

The name of the configuration property that stores the certification file.

DebugLevel

The name of the configuration property that stores the debug level for the system.

ErrorResponse

The name of the configuration property that stores the string which Siri will respond with in the event that an Exception is encountered while processing an object filter, or a speech rule.

ExitOnConnectionLost

The name of the configuration property that determines whether the server application will exit in the event that the connection to the iPhone is lost. This will allow an external script to restart the server cleanly each time the connection is lost.

GenCerts

The name of the command line property that determines if the SSL certificates should be generated.

Host

The name of the configuration property that stores a particular host name.

IOsVersion

The name of the configuration property that stores the version of iOS that pysiriproxy should be configured for.

KeyFile

The name of the configuration property that stores the path to the key file to use for the system.

LogFile

The name of the configuration property that stores the path to the log file to use for the system.

LogLevel

The name of the configuration property that stores the log level to use for the system.

PluginsDir

The name of the configuration property that stores the path to the directory containing the plugin scripts.

Port

The name of the configuration property that stores the port number to use.

Timestamp

The name of the configuration property that stores the boolean indicating whether logged messages should be timestamped or not.

The Values class

Inheritance diagram of pysiriproxy.options.options.Values

class pysiriproxy.options.options.Values[source]

The Values class contains definitions of values that are used for certain command line arguments, or configuration properties.

IOs5

Configure for iOS version 5.

IOs5Server

The server for iOS 5.

IOs6

Configure for iOS version 6.

IOs6Server

The server for iOS 6.

The Vars class

Inheritance diagram of pysiriproxy.options.options.Vars

class pysiriproxy.options.options.Vars

Define various variables that can be used within the configuration file.

Note

Variables should be all caps

Config

The name of the variable which stores the path to the configuration file.

Home

The name of the variable which stores the path to the user’s home directory.

The Sections class

Inheritance diagram of pysiriproxy.options.options.Sections

class pysiriproxy.options.options.Sections

The Sections class defines the names of the sections that can be used within the configuration file.

Debug

The section containing debugging configuration settings.

General

The section containing general configuration settings.

Logging

The section containing settings pertaining to logging the system.

Responses

The section containing settings pertaining to creating responses.

Server

The section containing settings pertaining to Apple’s web server.

iPhone

The section containing settings pertaining to the iPhone connection.

The Options class

Inheritance diagram of pysiriproxy.options.options.Options

class pysiriproxy.options.options.Options(*args, **kwargs)[source]

The Options class is responsible for parsing command line and configuration file options and providing the ability to get the value of a given option.

ClOptions

Define the list of all of the options which are configurable only via the command line.

Options

Define the dictionary of possible configuration section names mapped to the list of configuration options available for that section.

Variables

Define the dictionary of variables that can be used in the pysiriproxy configuration file.

These variables can be used by adding a dollar sign before the variable name in the configuration file. These variables will be replaced in the configuration file prior to parsing it.

Example:

# If the following setting is configured in the configuration file,
# the $HOME variable would be replaced by the user's home directory
# prior to parsing the configuration file
RandomSetting = $HOME/Documents

Table Of Contents

Previous topic

The options module

Next topic

The config module

This Page