Package mobi :: Package mtld :: Package da :: Package device :: Module client_props :: Class ClientProps
[hide private]
[frames] | no frames]

Class ClientProps

                   object --+    
                            |    
post_walk_rules.PostWalkRules --+
                                |
                               ClientProps

Nested Classes [hide private]

Inherited from post_walk_rules.PostWalkRules: PostWalkRulesException

Instance Methods [hide private]
 
__init__(self, tree)
x.__init__(...) initializes x; see help(type(x)) for signature
 
put_properties(self, client_side_properties, properties)
Put Client Side properties into the property set.
 
parse_client_side_properties(self, client_side_properties, properties)
Parse the client side properties and if typed values is set convert the values to the appropriate type.
 
_init_get_matcher_propery_ids(self, group, prop_ids)
Find all the properties that are used for matching.
 
_init_rule_sets(self, group)
Prepare the rule set by extracting it from the current group and wrapping it in a list.
 
__rules_to_run(self, groups, properties)
 
__check_properties_match(self, property_matchers, properties)
 
__compare_values(self, detected_value, expected_value, operator, type_prop_name)

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

Class Variables [hide private]
  KEY_CP_RULES = u'cpr'
  KEY_USER_AGENT = u'ua'

Inherited from post_walk_rules.PostWalkRules: KEY_MATCHER_PROP_IDS_IN_USE, KEY_OPERATOR, KEY_PROPERTY_MATCHER, KEY_PROPERTY_VALUE, KEY_RULE_ARR, KEY_RULE_GROUPS, KEY_RULE_PROP_IDS_IN_USE, KEY_RULE_SET, KEY_RULE_SET_COUNT, branch, tree_provider

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, tree)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

put_properties(self, client_side_properties, properties)

 

Put Client Side properties into the property set.

The first character of the property name is the type of the value.

Parameters:
  • client_side_properties - Cookie content with the following format: bjs.webGl:1|sdeviceAspectRatio:16/10|iusableDisplayHeight:1050

parse_client_side_properties(self, client_side_properties, properties)

 

Parse the client side properties and if typed values is set convert the values to the appropriate type.

The first character of the property name is the type of the value.

Parameters:
  • client_side_properties - Cookie content with the form: bjs.webGl:1|sdeviceAspectRatio:16/10|iusableDisplayHeight:1050

_init_get_matcher_propery_ids(self, group, prop_ids)

 

Find all the properties that are used for matching.

Parameters:
  • group - The rule group that can contain a property matcher.
  • prop_ids - The set of found property IDs. It returns an updated set of property IDs.
Returns:
an updated set of property IDs.
Overrides: post_walk_rules.PostWalkRules._init_get_matcher_propery_ids

_init_rule_sets(self, group)

 

Prepare the rule set by extracting it from the current group and wrapping it in a list.

Parameters:
  • group - The current parent group. It returns a list of all rule sets.
Returns:
a list of all rule sets.
Overrides: post_walk_rules.PostWalkRules._init_rule_sets