private bool DefaultXhtmlmpProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) { System.Collections.IDictionary dictionary; dictionary = browserCaps.Capabilities; // Identification: check header matches string headerValue; headerValue = ((string)(headers["Accept"])); bool result; RegexWorker regexWorker; regexWorker = new RegexWorker(browserCaps); result = regexWorker.ProcessRegex(headerValue, "application/xhtml\\+xml; profile|application/vnd\\.wap\\.xhtml\\+xml"); if ((result == false)) { return false; } headerValue = ((string)(headers["Accept"])); result = regexWorker.ProcessRegex(headerValue, "text/hdml"); if ((result == true)) { return false; } headerValue = ((string)(headers["Accept"])); result = regexWorker.ProcessRegex(headerValue, "text/vnd\\.wap\\.wml"); if ((result == true)) { return false; } browserCaps.DisableOptimizedCacheKey(); // Capabilities: set capabilities dictionary["preferredRenderingMime"] = "text/html"; dictionary["preferredRenderingType"] = "xhtml-mp"; browserCaps.HtmlTextWriter = "System.Web.UI.XhtmlTextWriter"; bool ignoreApplicationBrowsers = false; this.DefaultXhtmlmpProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps); return true; }
private bool VoiceProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) { System.Collections.IDictionary dictionary; dictionary = browserCaps.Capabilities; // Identification: check header matches string headerValue; headerValue = ((string)(headers["UA-VOICE"])); if (string.IsNullOrEmpty(headerValue)) { return false; } headerValue = ((string)(headers["UA-VOICE"])); bool result; RegexWorker regexWorker; regexWorker = new RegexWorker(browserCaps); result = regexWorker.ProcessRegex(headerValue, "(?i:TRUE)"); if ((result == false)) { return false; } browserCaps.DisableOptimizedCacheKey(); // Capabilities: set capabilities dictionary["canInitiateVoiceCall"] = "true"; this.VoiceProcessGateways(headers, browserCaps); bool ignoreApplicationBrowsers = false; this.VoiceProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps); return true; }
private bool PixelsProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) { System.Collections.IDictionary dictionary; dictionary = browserCaps.Capabilities; // Identification: check header matches string headerValue; headerValue = ((string)(headers["UA-PIXELS"])); if (string.IsNullOrEmpty(headerValue)) { return false; } headerValue = ((string)(headers["UA-PIXELS"])); bool result; RegexWorker regexWorker; regexWorker = new RegexWorker(browserCaps); result = regexWorker.ProcessRegex(headerValue, "(?\'screenWidth\'\\d+)x(?\'screenHeight\'\\d+)"); if ((result == false)) { return false; } browserCaps.DisableOptimizedCacheKey(); // Capabilities: set capabilities dictionary["screenPixelsHeight"] = regexWorker["${screenHeight}"]; dictionary["screenPixelsWidth"] = regexWorker["${screenWidth}"]; this.PixelsProcessGateways(headers, browserCaps); bool ignoreApplicationBrowsers = false; this.PixelsProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps); return true; }
private bool CpuProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) { System.Collections.IDictionary dictionary; dictionary = browserCaps.Capabilities; // Identification: check header matches string headerValue; headerValue = ((string)(headers["UA-CPU"])); bool result; RegexWorker regexWorker; regexWorker = new RegexWorker(browserCaps); result = regexWorker.ProcessRegex(headerValue, "(?\'cpu\'.+)"); if ((result == false)) { return false; } browserCaps.DisableOptimizedCacheKey(); // Capabilities: set capabilities dictionary["cpu"] = regexWorker["${cpu}"]; this.CpuProcessGateways(headers, browserCaps); bool ignoreApplicationBrowsers = false; this.CpuProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps); return true; }
private bool MonoProcess(System.Collections.Specialized.NameValueCollection headers, System.Web.HttpBrowserCapabilities browserCaps) { System.Collections.IDictionary dictionary; dictionary = browserCaps.Capabilities; // Identification: check header matches string headerValue; headerValue = ((string)(headers["UA-COLOR"])); if (string.IsNullOrEmpty(headerValue)) { return false; } headerValue = ((string)(headers["UA-COLOR"])); bool result; RegexWorker regexWorker; regexWorker = new RegexWorker(browserCaps); result = regexWorker.ProcessRegex(headerValue, "mono(?\'colorDepth\'\\d+)"); if ((result == false)) { return false; } browserCaps.DisableOptimizedCacheKey(); // Capabilities: set capabilities dictionary["isColor"] = "false"; dictionary["screenBitDepth"] = regexWorker["${colorDepth}"]; this.MonoProcessGateways(headers, browserCaps); bool ignoreApplicationBrowsers = false; this.MonoProcessBrowsers(ignoreApplicationBrowsers, headers, browserCaps); return true; }