Package pywurfl :: Module wurflprocessor :: Class WurflProcessor
[hide private]
[frames] | no frames]

Class WurflProcessor

source code

object --+
         |
        WurflProcessor
Known Subclasses:

WURFL Processing Class

Instance Methods [hide private]
 
__init__(self, wurflxml, device_handler=None, options=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
process_options(self)
Hook called to process any additional options.
source code
 
start_process(self)
Hook called in before any processing is done.
source code
 
end_process(self)
Hook called when processing is done.
source code
 
handle_device(self, devobj)
Hook called to handle a device.
source code
 
process_deferred(self)
Hook called to handle deferred device objects.
source code
 
process_device(self, devobj)
Hook called after a new device object has been instantiated.
source code
 
process_group(self, devobj, group)
Hook called when a new WURFL group is encountered.
source code
 
process_capability(self, devobj, group, capability)
Hook called when a new WURFL capability is encountered.
source code
 
process_new_deferred(self, devobj)
Hook called when a device is initially deferred.
source code
 
process(self)
Main WURFL processing method.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, wurflxml, device_handler=None, options=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • wurflxml (string) - A filename of the WURFL.xml file to process. The filename can be a regular, zip, bzip2 or gzipped file.
  • device_handler (DeviceHandler) - A reference to a subclass of DeviceHandler.
  • options (dict) - A dictionary of additional user specified options.
Overrides: object.__init__

handle_device(self, devobj)

source code 

Hook called to handle a device.

This hook is called when all of the capabilities of a device have been processed and its fall_back has already been processed.

process_deferred(self)

source code 

Hook called to handle deferred device objects.

This hook is called to process any deferred devices (devices that have been defined in the WURFL before their fall_back has been defined). It is called after any device has been handled and also called in a loop after all device definitions in the WURFL have been exhausted.