Skip to content

Commit

Permalink
Updated to 1.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHolmes_cp authored and ThomasHolmes_cp committed Mar 11, 2011
1 parent c57df90 commit ae39ef6
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 44 deletions.
12 changes: 0 additions & 12 deletions 51degrees.mobi 4.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiftyOne.Foundation 4", "Foundation\FiftyOne.Foundation 4.csproj", "{2C9B0E11-2654-49AF-855A-BFA629F302E8}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 3
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs06
SccLocalPath0 = .
SccProjectUniqueName1 = Detector\u0020Web\u0020Site\\Detector\u0020Web\u0020Site\u00204.csproj
SccProjectName1 = Detector\u0020Web\u0020Site
SccLocalPath1 = Detector\u0020Web\u0020Site
SccProjectUniqueName2 = Foundation\\FiftyOne.Foundation\u00204.csproj
SccProjectName2 = Foundation
SccLocalPath2 = Foundation
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Expand Down
12 changes: 0 additions & 12 deletions 51degrees.mobi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiftyOne.Foundation", "Foundation\FiftyOne.Foundation.csproj", "{2C9B0E11-2654-49AF-855A-BFA629F302E8}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 3
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/TFS06
SccLocalPath0 = .
SccProjectUniqueName1 = Detector\u0020Web\u0020Site\\Detector\u0020Web\u0020Site.csproj
SccProjectName1 = Detector\u0020Web\u0020Site
SccLocalPath1 = Detector\u0020Web\u0020Site
SccProjectUniqueName2 = Foundation\\FiftyOne.Foundation.csproj
SccProjectName2 = Foundation
SccLocalPath2 = Foundation
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Expand Down
Binary file modified Detector Web Site/App_Data/wurfl.xml.gz
Binary file not shown.
1 change: 1 addition & 0 deletions Detector Web Site/CheckUA.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected void Page_Load(object sender, EventArgs e)
PanelAdvanced.Controls.Add(CreateResultLabel("Actual Device Root", service.GetCapability("actual_device_root")));
PanelAdvanced.Controls.Add(CreateResultLabel("Tablet", service.GetCapability("is_tablet")));
PanelAdvanced.Controls.Add(CreateResultLabel("Version", service.GetCapability("mobile_browser_version")));
PanelAdvanced.Controls.Add(CreateResultLabel("Device OS", service.GetCapability("device_os")));

PanelBasic.Visible = true;
PanelAdvanced.Visible = true;
Expand Down
12 changes: 8 additions & 4 deletions Detector Web Site/Detector Web Site 4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
<RootNamespace>Detector</RootNamespace>
<AssemblyName>Detector</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
Expand Down
12 changes: 8 additions & 4 deletions Detector Web Site/Detector Web Site.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
<RootNamespace>Detector</RootNamespace>
<AssemblyName>Detector</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
12 changes: 8 additions & 4 deletions Foundation/FiftyOne.Foundation 4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
<AssemblyName>FiftyOne.Foundation</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<ApplicationIcon>PDA.ico</ApplicationIcon>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>
Expand Down
12 changes: 8 additions & 4 deletions Foundation/FiftyOne.Foundation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@
<AssemblyName>FiftyOne.Foundation</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<ApplicationIcon>PDA.ico</ApplicationIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal class BlackBerryHandler : RegexSegmentHandler
@"VendorID/\d+"
};

internal BlackBerryHandler() : base(PATTERNS, new[] {10, 2, 1})
internal BlackBerryHandler() : base(PATTERNS, new[] {10, 2, 11})
{
}

Expand Down
91 changes: 90 additions & 1 deletion Foundation/Mobile/Detection/Wurfl/MobileCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,17 @@ internal class MobileCapabilities : Detection.MobileCapabilities
private static readonly int HtmlWeb40 = Strings.Add("html_web_4_0");
private static readonly int HtmlWeb32 = Strings.Add("html_web_3_2");
private static readonly int PreferredMarkup = Strings.Add("preferred_markup");

private static readonly int MaxDeckSize = Strings.Add("max_deck_size");
private static readonly int BreakListOfLinksWithBrElementRecommended = Strings.Add("break_list_of_links_with_br_element_recommended");
private static readonly int InsertBrElementAfterWidgetRecommended = Strings.Add("insert_br_element_after_widget_recommended");
private static readonly int Rows = Strings.Add("rows");
private static readonly int Columns = Strings.Add("columns");
private static readonly int Utf8Support = Strings.Add("utf8_support");
private static readonly int XhtmlTableSupport = Strings.Add("xhtml_table_support");
private static readonly int XhtmlNoWrapMode = Strings.Add("xhtml_nowrap_mode");
private static readonly int SoftkeySupport = Strings.Add("softkey_support");


#endregion

#region Constructor
Expand Down Expand Up @@ -221,6 +231,18 @@ private static void Enhance(IDictionary capabilities, IDictionary currentCapabil
SetValue(capabilities, "preferredImageMime", GetPreferredImageMime(device, capabilities));
SetValue(capabilities, "isColor", GetIsColor(device));
SetValue(capabilities, "SupportsCallback", GetSupportsCallback(device));
SetValue(capabilities, "maximumRenderedPageSize", GetMaximumRenderedPageSize(device));
SetValue(capabilities, "rendersBreaksAfterWmlAnchor", GetRendersBreaksAfterWmlAnchor(device));
SetValue(capabilities, "rendersBreaksAfterWmlInput", GetRendersBreaksAfterWmlInput(device));
SetValue(capabilities, "screenCharactersHeight", GetScreenCharactersHeight(device));
SetValue(capabilities, "screenCharactersWidth", GetScreenCharactersWidth(device));
SetValue(capabilities, "requiresUTF8ContentEncoding", GetRequiresUTF8ContentEncoding(device));
SetValue(capabilities, "tables", GetTables(device));
SetValue(capabilities, "canInitiateVoiceCall", GetIsMobileDevice(device));
SetValue(capabilities, "javascript", GetJavascriptSupport(device));
SetValue(capabilities, "supportsNoWrapStyle", GetSupportsNoWrapStyle(device));
SetValue(capabilities, "supportsStyleElement", GetPreferredRenderingTypeFromWURFL(device));
SetValue(capabilities, "maximumSoftKeyLabelLength", GetMaximumSoftKeyLabelLength(device));

// Use the Version class to find the version. If this fails use the 1st two
// decimal segments of the string.
Expand Down Expand Up @@ -294,6 +316,8 @@ private static void Enhance(IDictionary capabilities, IDictionary currentCapabil
}
}



/// <summary>
/// Sets the version using a regular expression to find numeric segments of
/// the provided version string.
Expand Down Expand Up @@ -542,6 +566,71 @@ private static string GetPreferredRenderingTypeFromWURFL(DeviceInfo device)
}
}


//The following methods and bindings were suggested by forum member 'fravelgue'
private static string GetMaximumSoftKeyLabelLength(DeviceInfo device)
{
string value = Strings.Get(device.GetCapability(SoftkeySupport));
if (String.IsNullOrEmpty(value) || value.Equals("false", StringComparison.InvariantCultureIgnoreCase))
return bool.FalseString.ToLowerInvariant();
return bool.TrueString.ToLowerInvariant();
}

private static string GetSupportsNoWrapStyle(DeviceInfo device)
{
string value = Strings.Get(device.GetCapability(XhtmlNoWrapMode));
if (String.IsNullOrEmpty(value) || value.Equals("false", StringComparison.InvariantCultureIgnoreCase))
return bool.FalseString.ToLowerInvariant();
return bool.TrueString.ToLowerInvariant();
}

private static string GetTables(DeviceInfo device)
{
string value = Strings.Get(device.GetCapability(XhtmlTableSupport));
if(String.IsNullOrEmpty(value) || value.Equals("false", StringComparison.InvariantCultureIgnoreCase))
return bool.FalseString.ToLowerInvariant();
return bool.TrueString.ToLowerInvariant();
}

private static string GetRequiresUTF8ContentEncoding(DeviceInfo device)
{
string value = Strings.Get(device.GetCapability(Utf8Support));
if (String.IsNullOrEmpty(value) || value.Equals("false", StringComparison.InvariantCultureIgnoreCase))
return bool.FalseString.ToLowerInvariant();
return bool.TrueString.ToLowerInvariant();
}

private static string GetScreenCharactersWidth(DeviceInfo device)
{
return Strings.Get(device.GetCapability(Columns));
}

private static string GetScreenCharactersHeight(DeviceInfo device)
{
return Strings.Get(device.GetCapability(Rows));
}

private static string GetRendersBreaksAfterWmlInput(DeviceInfo device)
{
string value = Strings.Get(device.GetCapability(InsertBrElementAfterWidgetRecommended));
if (String.IsNullOrEmpty(value) || value.Equals("false", StringComparison.InvariantCultureIgnoreCase))
return bool.FalseString.ToLowerInvariant();
return bool.TrueString.ToLowerInvariant();
}

private static string GetRendersBreaksAfterWmlAnchor(DeviceInfo device)
{
string value = Strings.Get(device.GetCapability(BreakListOfLinksWithBrElementRecommended));
if (String.IsNullOrEmpty(value) || value.Equals("false", StringComparison.InvariantCultureIgnoreCase))
return bool.FalseString.ToLowerInvariant();
return bool.TrueString.ToLowerInvariant();
}

private static string GetMaximumRenderedPageSize(DeviceInfo device)
{
return Strings.Get(device.GetCapability(MaxDeckSize));
}

#endregion
}
}
4 changes: 2 additions & 2 deletions Foundation/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
// Revision
//

[assembly: AssemblyVersion("0.1.11.11")]
[assembly: AssemblyFileVersion("0.1.11.11")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguage("en-GB")]

0 comments on commit ae39ef6

Please sign in to comment.