Copyright © 2012 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
ua_template_class() = ua_classifier:device_type() | generic
| classes/0 | Return all possible UA classes. |
| filename_split_class/1 | Split a filename (with subdir) to a device class and a relative path. |
| get_class/1 | Get the user agent class. |
| get_props/1 | Get the user agent class. |
| order_class/2 | Ordering function for lists:sort/2. |
| set_class/1 | Classify the user agent in the wm_reqdata. |
| set_class/2 | Set the class in a context, useful for testing. |
| to_ua_class/1 | |
| ua_probe/2 | Handle the return value of the user-agent probe. |
| ua_select/2 | The user selects an user agent by hand. |
classes() -> [ua_classifier:device_type()]
Return all possible UA classes
filename_split_class(F::file:filename()) -> {ua_template_class(), file:filename()}
Split a filename (with subdir) to a device class and a relative path.
get_class(Context::#context{} | #wm_reqdata{} | undefined) -> ua_classifier:device_type()
Get the user agent class
get_props(Context::#context{} | #wm_reqdata{} | undefined) -> [{atom(), term()}]
Get the user agent class
order_class(A::ua_classifier:device_type(), X2::ua_classifier:device_type()) -> boolean()
Ordering function for lists:sort/2. Orders by genericity. Most specific first.
set_class(Wm_reqdata::#wm_reqdata{}) -> {ok, #wm_reqdata{}}
Classify the user agent in the wm_reqdata.
set_class(UAClass::ua_classifier:device_type(), Context::#context{}) -> #context{}
Set the class in a context, useful for testing. Doesn't change the reqdata or the session settings.
to_ua_class(X1) -> any()
ua_probe(ProbePs, Context) -> any()
Handle the return value of the user-agent probe. When it comes back we know the user-agent has javascript, so we might want to upgrade from text to phone.
ua_select(UAClass::ua_classifier:device_type() | automatic, Context::#context{}) -> #context{}
The user selects an user agent by hand. Update cookie and session.
Generated by EDoc, Dec 10 2012, 20:44:34.