Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Vaish <gvaish@mono-cvs.ximian.com>2003-04-05 14:30:10 +0400
committerGaurav Vaish <gvaish@mono-cvs.ximian.com>2003-04-05 14:30:10 +0400
commit5f4782a70f097d95e9b4cafed023afdbcab46194 (patch)
tree9bde7a681b7b8f7d66ad1fecd4c16573c036b997 /mcs/class/System.Web.Mobile
parentc833d7d52168c4871b2c5341bf26fe4536028f14 (diff)
2003-04-05 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileCapabilities.cs : More methods. * DeviceFilterDictionary.cs: Used by MobCaps for filtering the capabilities. Init impl. svn path=/trunk/mcs/; revision=13195
Diffstat (limited to 'mcs/class/System.Web.Mobile')
-rw-r--r--mcs/class/System.Web.Mobile/System.Web.Mobile/ChangeLog6
-rw-r--r--mcs/class/System.Web.Mobile/System.Web.Mobile/DeviceFilterDictionary.cs91
-rw-r--r--mcs/class/System.Web.Mobile/System.Web.Mobile/ErrorHandlerModule.cs5
-rw-r--r--mcs/class/System.Web.Mobile/System.Web.Mobile/MobileCapabilities.cs19
4 files changed, 117 insertions, 4 deletions
diff --git a/mcs/class/System.Web.Mobile/System.Web.Mobile/ChangeLog b/mcs/class/System.Web.Mobile/System.Web.Mobile/ChangeLog
index da28b9ab5e4..a1f76fbb078 100644
--- a/mcs/class/System.Web.Mobile/System.Web.Mobile/ChangeLog
+++ b/mcs/class/System.Web.Mobile/System.Web.Mobile/ChangeLog
@@ -1,6 +1,12 @@
2003-04-05 Gaurav Vaish <gvaish_mono AT lycos.com>
+ * MobileCapabilities.cs : More methods.
+ * DeviceFilterDictionary.cs: Used by MobCaps for filtering
+ the capabilities. Init impl.
+
+2003-04-05 Gaurav Vaish <gvaish_mono AT lycos.com>
+
* MobileCapabilities.cs : Completed all properties.
Thanks to the tool that I made.
* ErrorHandlerModule.cs : Initial implementation.
diff --git a/mcs/class/System.Web.Mobile/System.Web.Mobile/DeviceFilterDictionary.cs b/mcs/class/System.Web.Mobile/System.Web.Mobile/DeviceFilterDictionary.cs
new file mode 100644
index 00000000000..2ed90eaaa3d
--- /dev/null
+++ b/mcs/class/System.Web.Mobile/System.Web.Mobile/DeviceFilterDictionary.cs
@@ -0,0 +1,91 @@
+/**
+ * Project : Mono
+ * Namespace : System.Web.Mobile
+ * Class : DeviceFilterDictionary
+ * Author : Gaurav Vaish
+ *
+ * Copyright : 2003 with Gaurav Vaish, and with
+ * Ximian Inc
+ */
+
+using System;
+using System.Collections;
+using System.Web;
+using System.Web.UI;
+
+namespace System.Web.Mobile
+{
+ class DeviceFilterDictionary
+ {
+ internal class ComparisonEvaluator
+ {
+ public readonly string Name;
+ public readonly string Argument;
+
+ public ComparisonEvaluator(string name, string argument)
+ {
+ this.Name = name;
+ this.Argument = argument;
+ }
+ }
+
+ // for comparisons
+ private Hashtable cmpEvaluators;
+
+ // for delegates
+ private Hashtable dlgEvaluators;
+
+ internal DeviceFilterDictionary()
+ {
+ this.cmpEvaluators = new Hashtable();
+ this.dlgEvaluators = new Hashtable();
+ }
+
+ internal DeviceFilterDictionary(DeviceFilterDictionary init)
+ {
+ this.cmpEvaluators = (Hashtable)init.cmpEvaluators.Clone();
+ this.dlgEvaluators = (Hashtable)init.dlgEvaluators.Clone();
+ }
+
+ internal void AddCapabilityDelegate(string name,
+ MobileCapabilities.EvaluateCapabilitiesHandler handler)
+ {
+ dlgEvaluators[name] = handler;
+ }
+
+ internal void AddComparisonDelegate(string delegateName,
+ string comparisonName, string argument)
+ {
+ this.cmpEvaluators[delegateName] =
+ new ComparisonEvaluator(comparisonName, argument);
+ }
+
+ private void InvalidateComparisonDelegateLoops(string name)
+ {
+ // throws exception in case of a loop
+ throw new NotImplementedException();
+ }
+
+ internal bool LocateComparisonEvaluator(string evaluatorName,
+ out string capabilityName, out string capArgument)
+ {
+ throw new NotImplementedException();
+ }
+
+ internal bool LocateDelegateEvaluator(string name,
+ out MobileCapabilities.EvaluateCapabilitiesHandler result)
+ {
+ throw new NotImplementedException();
+ }
+
+ internal bool IsComparisonEvaluator(string name)
+ {
+ return cmpEvaluators.Contains(name);
+ }
+
+ internal bool IsDelegateEvaluator(string name)
+ {
+ return dlgEvaluators.Contains(name);
+ }
+ }
+}
diff --git a/mcs/class/System.Web.Mobile/System.Web.Mobile/ErrorHandlerModule.cs b/mcs/class/System.Web.Mobile/System.Web.Mobile/ErrorHandlerModule.cs
index 097b6eb01cb..3e81edb12a4 100644
--- a/mcs/class/System.Web.Mobile/System.Web.Mobile/ErrorHandlerModule.cs
+++ b/mcs/class/System.Web.Mobile/System.Web.Mobile/ErrorHandlerModule.cs
@@ -16,6 +16,9 @@ namespace System.Web.Mobile
{
public class ErrorHandlerModule //: IHttpModule
{
-
+ public ErrorHandlerModule()
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/mcs/class/System.Web.Mobile/System.Web.Mobile/MobileCapabilities.cs b/mcs/class/System.Web.Mobile/System.Web.Mobile/MobileCapabilities.cs
index b17fdcaf6cb..41d48b4ba57 100644
--- a/mcs/class/System.Web.Mobile/System.Web.Mobile/MobileCapabilities.cs
+++ b/mcs/class/System.Web.Mobile/System.Web.Mobile/MobileCapabilities.cs
@@ -16,6 +16,10 @@ namespace System.Web.Mobile
{
public class MobileCapabilities : HttpBrowserCapabilities
{
+ internal delegate void
+ EvaluateCapabilitiesHandler(MobileCapabilities capabilities,
+ string evaluationParam);
+
private bool canCombineFormsInDeck = false;
public MobileCapabilities()
@@ -73,7 +77,7 @@ namespace System.Web.Mobile
return this.canRenderAfterInputOrSelectElement;
}
}
-
+
private bool canRenderEmptySelects = false;
public bool CanRenderEmptySelects
@@ -91,7 +95,7 @@ namespace System.Web.Mobile
return this.canRenderEmptySelects;
}
}
-
+
private bool canRenderInputAndSelectElementsTogether = false;
public bool CanRenderInputAndSelectElementsTogether
@@ -109,7 +113,7 @@ namespace System.Web.Mobile
return this.canRenderInputAndSelectElementsTogether;
}
}
-
+
private bool canRenderMixedSelects = false;
public bool CanRenderMixedSelects
@@ -1297,5 +1301,14 @@ namespace System.Web.Mobile
return gatewayMinorVersion;
}
}
+
+ public bool HasCapability(string delegateName, string optParams)
+ {
+ if(delegateName == null || delegateName.Trim() == String.Empty)
+ {
+ throw new ArgumentException("MobCap_DelegateNameNoValue");
+ }
+ throw new NotImplementedException();
+ }
}
}