Device
Include fastly/device_detection.h to use this class.
The device data associated with a particular User-Agent string.
Methods
brand
View sourcestd::optional<std::string> fastly::device_detection::Device::brand()The brand of the client device, possibly different from the manufacturer of that device.
Returns
device_name
View sourcestd::optional<std::string> fastly::device_detection::Device::device_name()The name of the client device.
Returns
hwtype
View sourcestd::optional<std::string> fastly::device_detection::Device::hwtype()A string representation of the primary client platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.
Returns
is_desktop
View sourcestd::optional<bool> fastly::device_detection::Device::is_desktop()The client is a desktop web browser.
Returns
is_ereader
View sourcestd::optional<bool> fastly::device_detection::Device::is_ereader()The client device is a reading device (like a Kindle).
Returns
is_gameconsole
View sourcestd::optional<bool> fastly::device_detection::Device::is_gameconsole()The client device is a video game console (like a PlayStation or Xbox).
Returns
is_mediaplayer
View sourcestd::optional<bool> fastly::device_detection::Device::is_mediaplayer()The client device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo).
Returns
is_mobile
View sourcestd::optional<bool> fastly::device_detection::Device::is_mobile()The client device is a mobile phone.
Returns
is_smarttv
View sourcestd::optional<bool> fastly::device_detection::Device::is_smarttv()The client device is a smart TV.
Returns
is_tablet
View sourcestd::optional<bool> fastly::device_detection::Device::is_tablet()The client device is a tablet (like an iPad).
Returns
is_touchscreen
View sourcestd::optional<bool> fastly::device_detection::Device::is_touchscreen()The client device's screen is touch sensitive.
Returns
is_tvplayer
View sourcestd::optional<bool> fastly::device_detection::Device::is_tvplayer()The client device is a set-top box or other TV player (like a Roku or Apple TV).
Returns
model
View sourcestd::optional<std::string> fastly::device_detection::Device::model()The model of the client device.
Returns