Package mms :: Module message :: Class MMSMessagePage
[hide private]
[frames] | no frames]

Class MMSMessagePage

source code

A single page (or "slide") in an MMS Message.

In order to ensure that the MMS message can be correctly displayed by most terminals, each page's content is limited to having 1 image, 1 audio clip and 1 block of text, as stated in [1].


Notes:
Instance Methods [hide private]
 
__init__(self) source code
int
numberOfParts(self)
This function calculates the amount of data "parts" (or elements) in this slide.
source code
 
addImage(self, filename, timeBegin=0, timeEnd=0)
Adds an image to this slide.
source code
 
addAudio(self, filename, timeBegin=0, timeEnd=0)
Adds an audio clip to this slide.
source code
 
addText(self, text, timeBegin=0, timeEnd=0)
Adds a block of text to this slide.
source code
 
setDuration(self, duration)
Sets the maximum duration of this slide (i.e.
source code
Properties [hide private]
  dataParts
Returns a list of the data parst in this slide
Method Details [hide private]

numberOfParts(self)

source code 
This function calculates the amount of data "parts" (or elements) in this slide.
Returns: int
The number of data parts in this slide

addImage(self, filename, timeBegin=0, timeEnd=0)

source code 
Adds an image to this slide.
Parameters:
  • filename (str) - The name of the image file to add. Supported formats are JPEG, GIF and WBMP.
  • timeBegin (int) - The time (in milliseconds) during the duration of this slide to begin displaying the image. If this is 0 or less, the image will be displayed from the moment the slide is opened.
  • timeEnd (int) - The time (in milliseconds) during the duration of this slide at which to stop showing (i.e. hide) the image. If this is 0 or less, or if it is greater than the actual duration of this slide, it will be shown until the next slide is accessed.
Raises:
  • TypeError - An inappropriate variable type was passed in of the parameters

addAudio(self, filename, timeBegin=0, timeEnd=0)

source code 
Adds an audio clip to this slide.
Parameters:
  • filename (str) - The name of the audio file to add. Currently the only supported format is AMR.
  • timeBegin (int) - The time (in milliseconds) during the duration of this slide to begin playback of the audio clip. If this is 0 or less, the audio clip will be played the moment the slide is opened.
  • timeEnd (int) - The time (in milliseconds) during the duration of this slide at which to stop playing (i.e. mute) the audio clip. If this is 0 or less, or if it is greater than the actual duration of this slide, the entire audio clip will be played, or until the next slide is accessed.
Raises:
  • TypeError - An inappropriate variable type was passed in of the parameters

addText(self, text, timeBegin=0, timeEnd=0)

source code 
Adds a block of text to this slide.
Parameters:
  • text (str) - The text to add to the slide.
  • timeBegin (int) - The time (in milliseconds) during the duration of this slide to begin displaying the text. If this is 0 or less, the text will be displayed from the moment the slide is opened.
  • timeEnd (int) - The time (in milliseconds) during the duration of this slide at which to stop showing (i.e. hide) the text. If this is 0 or less, or if it is greater than the actual duration of this slide, it will be shown until the next slide is accessed.
Raises:
  • TypeError - An inappropriate variable type was passed in of the parameters

setDuration(self, duration)

source code 
Sets the maximum duration of this slide (i.e. how long this slide should be displayed)
Parameters:
  • duration (int) - the maxium slide duration, in milliseconds
Raises:
  • TypeError - <duration> must be an integer
  • ValueError - the requested duration is invalid (must be a non-zero, positive integer)

Property Details [hide private]

dataParts

Returns a list of the data parst in this slide
Get Method:
unreachable.dataParts(self) - Returns a list of the data parst in this slide