3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * Namespace : System.Web.Mobile
25 * Class : MobileCapabilities
26 * Author : Gaurav Vaish
28 * Copyright : 2003 with Gaurav Vaish, and with
33 using System.Collections;
37 namespace System.Web.Mobile
39 public class MobileCapabilities : HttpBrowserCapabilities
41 internal delegate void
42 EvaluateCapabilitiesHandler(MobileCapabilities capabilities,
43 string evaluationParam);
45 private Hashtable evaluatorResults =
46 Hashtable.Synchronized(new Hashtable());
48 private bool canCombineFormsInDeck = false;
50 public MobileCapabilities()
54 public bool CanCombineFormsInDeck
58 if(!this.canCombineFormsInDeck)
60 if(this["CanCombineFormsInDeck"] != null)
62 this.canCombineFormsInDeck =
63 Convert.ToBoolean(this["CanCombineFormsInDeck"]);
66 return this.canCombineFormsInDeck;
70 private bool canInitiateVoiceCall = false;
72 public bool CanInitiateVoiceCall
76 if(!this.canInitiateVoiceCall)
78 if(this["CanInitiateVoiceCall"] != null)
80 this.canInitiateVoiceCall =
81 Convert.ToBoolean(this["CanInitiateVoiceCall"]);
84 return this.canInitiateVoiceCall;
88 private bool canRenderAfterInputOrSelectElement = false;
90 public bool CanRenderAfterInputOrSelectElement
94 if(!this.canRenderAfterInputOrSelectElement)
96 if(this["CanRenderAfterInputOrSelectElement"] != null)
98 this.canRenderAfterInputOrSelectElement =
99 Convert.ToBoolean(this["CanRenderAfterInputOrSelectElement"]);
102 return this.canRenderAfterInputOrSelectElement;
106 private bool canRenderEmptySelects = false;
108 public bool CanRenderEmptySelects
112 if(!this.canRenderEmptySelects)
114 if(this["CanRenderEmptySelects"] != null)
116 this.canRenderEmptySelects =
117 Convert.ToBoolean(this["CanRenderEmptySelects"]);
120 return this.canRenderEmptySelects;
124 private bool canRenderInputAndSelectElementsTogether = false;
126 public bool CanRenderInputAndSelectElementsTogether
130 if(!this.canRenderInputAndSelectElementsTogether)
132 if(this["CanRenderInputAndSelectElementsTogether"] != null)
134 this.canRenderInputAndSelectElementsTogether =
135 Convert.ToBoolean(this["CanRenderInputAndSelectElementsTogether"]);
138 return this.canRenderInputAndSelectElementsTogether;
142 private bool canRenderMixedSelects = false;
144 public bool CanRenderMixedSelects
148 if(!this.canRenderMixedSelects)
150 if(this["CanRenderMixedSelects"] != null)
152 this.canRenderMixedSelects =
153 Convert.ToBoolean(this["CanRenderMixedSelects"]);
156 return this.canRenderMixedSelects;
160 private bool canRenderOneventAndPrevElementsTogether = false;
162 public bool CanRenderOneventAndPrevElementsTogether
166 if(canRenderOneventAndPrevElementsTogether == false)
168 if(this["CanRenderOneventAndPrevElementsTogether"] != null)
170 this.canRenderOneventAndPrevElementsTogether =
171 Convert.ToBoolean(this["CanRenderOneventAndPrevElementsTogether"]);
174 return canRenderOneventAndPrevElementsTogether;
178 private bool canRenderPostBackCards = false;
180 public bool CanRenderPostBackCards
184 if(canRenderPostBackCards == false)
186 if(this["CanRenderPostBackCards"] != null)
188 this.canRenderPostBackCards =
189 Convert.ToBoolean(this["CanRenderPostBackCards"]);
192 return canRenderPostBackCards;
196 private bool canRenderSetvarZeroWithMultiSelectionList = false;
198 public bool CanRenderSetvarZeroWithMultiSelectionList
202 if(canRenderSetvarZeroWithMultiSelectionList == false)
204 if(this["CanRenderSetvarZeroWithMultiSelectionList"] != null)
206 this.canRenderSetvarZeroWithMultiSelectionList =
207 Convert.ToBoolean(this["CanRenderSetvarZeroWithMultiSelectionList"]);
210 return canRenderSetvarZeroWithMultiSelectionList;
214 private bool canSendMail = false;
216 public bool CanSendMail
220 if(canSendMail == false)
222 if(this["CanSendMail"] != null)
225 Convert.ToBoolean(this["CanSendMail"]);
232 private string gatewayVersion = String.Empty;
234 public string GatewayVersion
238 if(gatewayVersion == String.Empty)
240 if(this["GatewayVersion"] != null)
242 this.gatewayVersion =
243 this["GatewayVersion"];
246 return gatewayVersion;
250 private bool hasBackButton = false;
252 public bool HasBackButton
256 if(hasBackButton == false)
258 if(this["HasBackButton"] != null)
261 Convert.ToBoolean(this["HasBackButton"]);
264 return hasBackButton;
268 private bool hidesRightAlignedMultiselectScrollbars = false;
270 public bool HidesRightAlignedMultiselectScrollbars
274 if(hidesRightAlignedMultiselectScrollbars == false)
276 if(this["HidesRightAlignedMultiselectScrollbars"] != null)
278 this.hidesRightAlignedMultiselectScrollbars =
279 Convert.ToBoolean(this["HidesRightAlignedMultiselectScrollbars"]);
282 return hidesRightAlignedMultiselectScrollbars;
286 private string inputType = String.Empty;
288 public string InputType
292 if(inputType == String.Empty)
294 if(this["InputType"] != null)
304 private bool isColor = false;
312 if(this["IsColor"] != null)
315 Convert.ToBoolean(this["IsColor"]);
322 private bool isMobileDevice = false;
324 public bool IsMobileDevice
328 if(isMobileDevice == false)
330 if(this["IsMobileDevice"] != null)
332 this.isMobileDevice =
333 Convert.ToBoolean(this["IsMobileDevice"]);
336 return isMobileDevice;
340 private string mobileDeviceManufacturer = String.Empty;
342 public string MobileDeviceManufacturer
346 if(mobileDeviceManufacturer == String.Empty)
348 if(this["MobileDeviceManufacturer"] != null)
350 this.mobileDeviceManufacturer =
351 this["MobileDeviceManufacturer"];
354 return mobileDeviceManufacturer;
358 private string mobileDeviceModel = String.Empty;
360 public string MobileDeviceModel
364 if(mobileDeviceModel == String.Empty)
366 if(this["MobileDeviceModel"] != null)
368 this.mobileDeviceModel =
369 this["MobileDeviceModel"];
372 return mobileDeviceModel;
376 private string preferredImageMime = String.Empty;
378 public string PreferredImageMime
382 if(preferredImageMime == String.Empty)
384 if(this["PreferredImageMime"] != null)
386 this.preferredImageMime =
387 this["PreferredImageMime"];
390 return preferredImageMime;
394 private string preferredRenderingMime = String.Empty;
396 public string PreferredRenderingMime
400 if(preferredRenderingMime == String.Empty)
402 if(this["PreferredRenderingMime"] != null)
404 this.preferredRenderingMime =
405 this["PreferredRenderingMime"];
408 return preferredRenderingMime;
412 private string preferredRenderingType = String.Empty;
414 public string PreferredRenderingType
418 if(preferredRenderingType == String.Empty)
420 if(this["PreferredRenderingType"] != null)
422 this.preferredRenderingType =
423 this["PreferredRenderingType"];
426 return preferredRenderingType;
430 private bool rendersBreakBeforeWmlSelectAndInput = false;
432 public bool RendersBreakBeforeWmlSelectAndInput
436 if(rendersBreakBeforeWmlSelectAndInput == false)
438 if(this["RendersBreakBeforeWmlSelectAndInput"] != null)
440 this.rendersBreakBeforeWmlSelectAndInput =
441 Convert.ToBoolean(this["RendersBreakBeforeWmlSelectAndInput"]);
444 return rendersBreakBeforeWmlSelectAndInput;
448 private bool rendersBreaksAfterHtmlLists = false;
450 public bool RendersBreaksAfterHtmlLists
454 if(rendersBreaksAfterHtmlLists == false)
456 if(this["RendersBreaksAfterHtmlLists"] != null)
458 this.rendersBreaksAfterHtmlLists =
459 Convert.ToBoolean(this["RendersBreaksAfterHtmlLists"]);
462 return rendersBreaksAfterHtmlLists;
466 private bool rendersBreaksAfterWmlAnchor = false;
468 public bool RendersBreaksAfterWmlAnchor
472 if(rendersBreaksAfterWmlAnchor == false)
474 if(this["RendersBreaksAfterWmlAnchor"] != null)
476 this.rendersBreaksAfterWmlAnchor =
477 Convert.ToBoolean(this["RendersBreaksAfterWmlAnchor"]);
480 return rendersBreaksAfterWmlAnchor;
484 private bool rendersBreaksAfterWmlInput = false;
486 public bool RendersBreaksAfterWmlInput
490 if(rendersBreaksAfterWmlInput == false)
492 if(this["RendersBreaksAfterWmlInput"] != null)
494 this.rendersBreaksAfterWmlInput =
495 Convert.ToBoolean(this["RendersBreaksAfterWmlInput"]);
498 return rendersBreaksAfterWmlInput;
502 private bool rendersWmlDoAcceptsInline = false;
504 public bool RendersWmlDoAcceptsInline
508 if(rendersWmlDoAcceptsInline == false)
510 if(this["RendersWmlDoAcceptsInline"] != null)
512 this.rendersWmlDoAcceptsInline =
513 Convert.ToBoolean(this["RendersWmlDoAcceptsInline"]);
516 return rendersWmlDoAcceptsInline;
520 private bool rendersWmlSelectsAsMenuCards = false;
522 public bool RendersWmlSelectsAsMenuCards
526 if(rendersWmlSelectsAsMenuCards == false)
528 if(this["RendersWmlSelectsAsMenuCards"] != null)
530 this.rendersWmlSelectsAsMenuCards =
531 Convert.ToBoolean(this["RendersWmlSelectsAsMenuCards"]);
534 return rendersWmlSelectsAsMenuCards;
538 private string requiredMetaTagNameValue = String.Empty;
540 public string RequiredMetaTagNameValue
544 if(requiredMetaTagNameValue == String.Empty)
546 if(this["RequiredMetaTagNameValue"] != null)
548 this.requiredMetaTagNameValue =
549 this["RequiredMetaTagNameValue"];
552 return requiredMetaTagNameValue;
556 private bool requiresAttributeColonSubstitution = false;
558 public bool RequiresAttributeColonSubstitution
562 if(requiresAttributeColonSubstitution == false)
564 if(this["RequiresAttributeColonSubstitution"] != null)
566 this.requiresAttributeColonSubstitution =
567 Convert.ToBoolean(this["RequiresAttributeColonSubstitution"]);
570 return requiresAttributeColonSubstitution;
574 private bool requiresContentTypeMetaTag = false;
576 public bool RequiresContentTypeMetaTag
580 if(requiresContentTypeMetaTag == false)
582 if(this["RequiresContentTypeMetaTag"] != null)
584 this.requiresContentTypeMetaTag =
585 Convert.ToBoolean(this["RequiresContentTypeMetaTag"]);
588 return requiresContentTypeMetaTag;
592 private bool requiresDBCSCharacter = false;
594 public bool RequiresDBCSCharacter
598 if(requiresDBCSCharacter == false)
600 if(this["RequiresDBCSCharacter"] != null)
602 this.requiresDBCSCharacter =
603 Convert.ToBoolean(this["RequiresDBCSCharacter"]);
606 return requiresDBCSCharacter;
610 private bool requiresHtmlAdaptiveErrorReporting = false;
612 public bool RequiresHtmlAdaptiveErrorReporting
616 if(requiresHtmlAdaptiveErrorReporting == false)
618 if(this["RequiresHtmlAdaptiveErrorReporting"] != null)
620 this.requiresHtmlAdaptiveErrorReporting =
621 Convert.ToBoolean(this["RequiresHtmlAdaptiveErrorReporting"]);
624 return requiresHtmlAdaptiveErrorReporting;
628 private bool requiresLeadingPageBreak = false;
630 public bool RequiresLeadingPageBreak
634 if(requiresLeadingPageBreak == false)
636 if(this["RequiresLeadingPageBreak"] != null)
638 this.requiresLeadingPageBreak =
639 Convert.ToBoolean(this["RequiresLeadingPageBreak"]);
642 return requiresLeadingPageBreak;
646 private bool requiresNoBreakInFormatting = false;
648 public bool RequiresNoBreakInFormatting
652 if(requiresNoBreakInFormatting == false)
654 if(this["RequiresNoBreakInFormatting"] != null)
656 this.requiresNoBreakInFormatting =
657 Convert.ToBoolean(this["RequiresNoBreakInFormatting"]);
660 return requiresNoBreakInFormatting;
664 private bool requiresOutputOptimization = false;
666 public bool RequiresOutputOptimization
670 if(requiresOutputOptimization == false)
672 if(this["RequiresOutputOptimization"] != null)
674 this.requiresOutputOptimization =
675 Convert.ToBoolean(this["RequiresOutputOptimization"]);
678 return requiresOutputOptimization;
682 private bool requiresPhoneNumbersAsPlainText = false;
684 public bool RequiresPhoneNumbersAsPlainText
688 if(requiresPhoneNumbersAsPlainText == false)
690 if(this["RequiresPhoneNumbersAsPlainText"] != null)
692 this.requiresPhoneNumbersAsPlainText =
693 Convert.ToBoolean(this["RequiresPhoneNumbersAsPlainText"]);
696 return requiresPhoneNumbersAsPlainText;
700 private bool requiresSpecialViewStateEncoding = false;
702 public bool RequiresSpecialViewStateEncoding
706 if(requiresSpecialViewStateEncoding == false)
708 if(this["RequiresSpecialViewStateEncoding"] != null)
710 this.requiresSpecialViewStateEncoding =
711 Convert.ToBoolean(this["RequiresSpecialViewStateEncoding"]);
714 return requiresSpecialViewStateEncoding;
718 private bool requiresUniqueFilePathSuffix = false;
720 public bool RequiresUniqueFilePathSuffix
724 if(requiresUniqueFilePathSuffix == false)
726 if(this["RequiresUniqueFilePathSuffix"] != null)
728 this.requiresUniqueFilePathSuffix =
729 Convert.ToBoolean(this["RequiresUniqueFilePathSuffix"]);
732 return requiresUniqueFilePathSuffix;
736 private bool requiresUniqueHtmlCheckboxNames = false;
738 public bool RequiresUniqueHtmlCheckboxNames
742 if(requiresUniqueHtmlCheckboxNames == false)
744 if(this["RequiresUniqueHtmlCheckboxNames"] != null)
746 this.requiresUniqueHtmlCheckboxNames =
747 Convert.ToBoolean(this["RequiresUniqueHtmlCheckboxNames"]);
750 return requiresUniqueHtmlCheckboxNames;
754 private bool requiresUrlEncodedPostfieldValues = false;
756 public bool RequiresUrlEncodedPostfieldValues
760 if(requiresUrlEncodedPostfieldValues == false)
762 if(this["RequiresUrlEncodedPostfieldValues"] != null)
764 this.requiresUrlEncodedPostfieldValues =
765 Convert.ToBoolean(this["RequiresUrlEncodedPostfieldValues"]);
768 return requiresUrlEncodedPostfieldValues;
772 private bool supportsAccesskeyAttribute = false;
774 public bool SupportsAccesskeyAttribute
778 if(supportsAccesskeyAttribute == false)
780 if(this["SupportsAccesskeyAttribute"] != null)
782 this.supportsAccesskeyAttribute =
783 Convert.ToBoolean(this["SupportsAccesskeyAttribute"]);
786 return supportsAccesskeyAttribute;
790 private bool supportsBodyColor = false;
792 public bool SupportsBodyColor
796 if(supportsBodyColor == false)
798 if(this["SupportsBodyColor"] != null)
800 this.supportsBodyColor =
801 Convert.ToBoolean(this["SupportsBodyColor"]);
804 return supportsBodyColor;
808 private bool supportsBold = false;
810 public bool SupportsBold
814 if(supportsBold == false)
816 if(this["SupportsBold"] != null)
819 Convert.ToBoolean(this["SupportsBold"]);
826 private bool supportsCacheControlMetaTag = false;
828 public bool SupportsCacheControlMetaTag
832 if(supportsCacheControlMetaTag == false)
834 if(this["SupportsCacheControlMetaTag"] != null)
836 this.supportsCacheControlMetaTag =
837 Convert.ToBoolean(this["SupportsCacheControlMetaTag"]);
840 return supportsCacheControlMetaTag;
844 private bool supportsCss = false;
846 public bool SupportsCss
850 if(supportsCss == false)
852 if(this["SupportsCss"] != null)
855 Convert.ToBoolean(this["SupportsCss"]);
862 private bool supportsDivAlign = false;
864 public bool SupportsDivAlign
868 if(supportsDivAlign == false)
870 if(this["SupportsDivAlign"] != null)
872 this.supportsDivAlign =
873 Convert.ToBoolean(this["SupportsDivAlign"]);
876 return supportsDivAlign;
880 private bool supportsDivNoWrap = false;
882 public bool SupportsDivNoWrap
886 if(supportsDivNoWrap == false)
888 if(this["SupportsDivNoWrap"] != null)
890 this.supportsDivNoWrap =
891 Convert.ToBoolean(this["SupportsDivNoWrap"]);
894 return supportsDivNoWrap;
898 private bool supportsFontColor = false;
900 public bool SupportsFontColor
904 if(supportsFontColor == false)
906 if(this["SupportsFontColor"] != null)
908 this.supportsFontColor =
909 Convert.ToBoolean(this["SupportsFontColor"]);
912 return supportsFontColor;
916 private bool supportsFontName = false;
918 public bool SupportsFontName
922 if(supportsFontName == false)
924 if(this["SupportsFontName"] != null)
926 this.supportsFontName =
927 Convert.ToBoolean(this["SupportsFontName"]);
930 return supportsFontName;
934 private bool supportsFontSize = false;
936 public bool SupportsFontSize
940 if(supportsFontSize == false)
942 if(this["SupportsFontSize"] != null)
944 this.supportsFontSize =
945 Convert.ToBoolean(this["SupportsFontSize"]);
948 return supportsFontSize;
952 private bool supportsModeSymbols = false;
954 public bool SupportsModeSymbols
958 if(supportsModeSymbols == false)
960 if(this["SupportsModeSymbols"] != null)
962 this.supportsModeSymbols =
963 Convert.ToBoolean(this["SupportsModeSymbols"]);
966 return supportsModeSymbols;
970 private bool supportsImageSubmit = false;
972 public bool SupportsImageSubmit
976 if(supportsImageSubmit == false)
978 if(this["SupportsImageSubmit"] != null)
980 this.supportsImageSubmit =
981 Convert.ToBoolean(this["SupportsImageSubmit"]);
984 return supportsImageSubmit;
988 private bool supportsInputStyle = false;
990 public bool SupportsInputStyle
994 if(supportsInputStyle == false)
996 if(this["SupportsInputStyle"] != null)
998 this.supportsInputStyle =
999 Convert.ToBoolean(this["SupportsInputStyle"]);
1002 return supportsInputStyle;
1006 private bool supportsInputMode = false;
1008 public bool SupportsInputMode
1012 if(supportsInputMode == false)
1014 if(this["SupportsInputMode"] != null)
1016 this.supportsInputMode =
1017 Convert.ToBoolean(this["SupportsInputMode"]);
1020 return supportsInputMode;
1024 private bool supportsItalic = false;
1026 public bool SupportsItalic
1030 if(supportsItalic == false)
1032 if(this["SupportsItalic"] != null)
1034 this.supportsItalic =
1035 Convert.ToBoolean(this["SupportsItalic"]);
1038 return supportsItalic;
1042 private bool supportsJPhoneMultiMediaAttributes = false;
1044 public bool SupportsJPhoneMultiMediaAttributes
1048 if(supportsJPhoneMultiMediaAttributes == false)
1050 if(this["SupportsJPhoneMultiMediaAttributes"] != null)
1052 this.supportsJPhoneMultiMediaAttributes =
1053 Convert.ToBoolean(this["SupportsJPhoneMultiMediaAttributes"]);
1056 return supportsJPhoneMultiMediaAttributes;
1060 private bool supportsJPhoneSymbols = false;
1062 public bool SupportsJPhoneSymbols
1066 if(supportsJPhoneSymbols == false)
1068 if(this["SupportsJPhoneSymbols"] != null)
1070 this.supportsJPhoneSymbols =
1071 Convert.ToBoolean(this["SupportsJPhoneSymbols"]);
1074 return supportsJPhoneSymbols;
1078 private bool supportsQueryStringInFormAction = false;
1080 public bool SupportsQueryStringInFormAction
1084 if(supportsQueryStringInFormAction == false)
1086 if(this["SupportsQueryStringInFormAction"] != null)
1088 this.supportsQueryStringInFormAction =
1089 Convert.ToBoolean(this["SupportsQueryStringInFormAction"]);
1092 return supportsQueryStringInFormAction;
1096 private bool supportsRedirectWithCookie = false;
1098 public bool SupportsRedirectWithCookie
1102 if(supportsRedirectWithCookie == false)
1104 if(this["SupportsRedirectWithCookie"] != null)
1106 this.supportsRedirectWithCookie =
1107 Convert.ToBoolean(this["SupportsRedirectWithCookie"]);
1110 return supportsRedirectWithCookie;
1114 private bool supportsSelectMultiple = false;
1116 public bool SupportsSelectMultiple
1120 if(supportsSelectMultiple == false)
1122 if(this["SupportsSelectMultiple"] != null)
1124 this.supportsSelectMultiple =
1125 Convert.ToBoolean(this["SupportsSelectMultiple"]);
1128 return supportsSelectMultiple;
1132 private bool supportsUncheck = false;
1134 public bool SupportsUncheck
1138 if(supportsUncheck == false)
1140 if(this["SupportsUncheck"] != null)
1142 this.supportsUncheck =
1143 Convert.ToBoolean(this["SupportsUncheck"]);
1146 return supportsUncheck;
1150 private int gatewayMajorVersion = 0;
1152 public int GatewayMajorVersion
1156 if(gatewayMajorVersion == 0)
1158 if(this["GatewayMajorVersion"] != null)
1160 this.gatewayMajorVersion =
1161 Convert.ToInt32(this["GatewayMajorVersion"]);
1164 return gatewayMajorVersion;
1168 private int maximumRenderedPageSize = 0;
1170 public int MaximumRenderedPageSize
1174 if(maximumRenderedPageSize == 0)
1176 if(this["MaximumRenderedPageSize"] != null)
1178 this.maximumRenderedPageSize =
1179 Convert.ToInt32(this["MaximumRenderedPageSize"]);
1182 return maximumRenderedPageSize;
1186 private int maximumSoftkeyLabelLength = 0;
1188 public int MaximumSoftkeyLabelLength
1192 if(maximumSoftkeyLabelLength == 0)
1194 if(this["MaximumSoftkeyLabelLength"] != null)
1196 this.maximumSoftkeyLabelLength =
1197 Convert.ToInt32(this["MaximumSoftkeyLabelLength"]);
1200 return maximumSoftkeyLabelLength;
1204 private int numberOfSoftkeys = 0;
1206 public int NumberOfSoftkeys
1210 if(numberOfSoftkeys == 0)
1212 if(this["NumberOfSoftkeys"] != null)
1214 this.numberOfSoftkeys =
1215 Convert.ToInt32(this["NumberOfSoftkeys"]);
1218 return numberOfSoftkeys;
1222 private int screenBitDepth = 0;
1224 public int ScreenBitDepth
1228 if(screenBitDepth == 0)
1230 if(this["ScreenBitDepth"] != null)
1232 this.screenBitDepth =
1233 Convert.ToInt32(this["ScreenBitDepth"]);
1236 return screenBitDepth;
1240 private int screenCharactersHeight = 0;
1242 public int ScreenCharactersHeight
1246 if(screenCharactersHeight == 0)
1248 if(this["ScreenCharactersHeight"] != null)
1250 this.screenCharactersHeight =
1251 Convert.ToInt32(this["ScreenCharactersHeight"]);
1254 return screenCharactersHeight;
1258 private int screenCharactersWidth = 0;
1260 public int ScreenCharactersWidth
1264 if(screenCharactersWidth == 0)
1266 if(this["ScreenCharactersWidth"] != null)
1268 this.screenCharactersWidth =
1269 Convert.ToInt32(this["ScreenCharactersWidth"]);
1272 return screenCharactersWidth;
1276 private int screenPixelsHeight = 0;
1278 public int ScreenPixelsHeight
1282 if(screenPixelsHeight == 0)
1284 if(this["ScreenPixelsHeight"] != null)
1286 this.screenPixelsHeight =
1287 Convert.ToInt32(this["ScreenPixelsHeight"]);
1290 return screenPixelsHeight;
1294 private int screenPixelsWidth = 0;
1296 public int ScreenPixelsWidth
1300 if(screenPixelsWidth == 0)
1302 if(this["ScreenPixelsWidth"] != null)
1304 this.screenPixelsWidth =
1305 Convert.ToInt32(this["ScreenPixelsWidth"]);
1308 return screenPixelsWidth;
1312 private double gatewayMinorVersion = 0.0;
1314 public double GatewayMinorVersion
1318 if(gatewayMinorVersion == 0.0)
1320 if(this["GatewayMinorVersion"] != null)
1322 this.gatewayMinorVersion =
1323 Convert.ToDouble(this["GatewayMinorVersion"]);
1326 return gatewayMinorVersion;
1330 public bool HasCapability(string delegateName, string optParams)
1332 if(delegateName == null || delegateName.Trim() == String.Empty)
1334 throw new ArgumentException("MobCap_DelegateNameNoValue");
1336 DeviceFilterDictionary dict = GetCurrentFilters();
1337 // check if delegateName is ComparisonEvaluator
1338 // search for it in this.evaluatorResults, if failed:
1339 // HasProperty(??), HasItem(??)
1340 // -> add to this.evaluatorResults
1341 // else throw not found exception!
1342 throw new NotImplementedException();
1345 private bool HasComparisonEvaluator(string evalName,
1348 throw new NotImplementedException();
1351 private bool HasDelegateEvaluator(string evalName,
1354 throw new NotImplementedException();
1357 private bool HasProperty(string evalName, string param,
1360 throw new NotImplementedException();
1363 private bool HasItem(string evalName, string param,
1366 throw new NotImplementedException();
1369 private bool IsComparisonEvaluator(string evalName)
1371 throw new NotImplementedException();
1374 private DeviceFilterDictionary GetCurrentFilters()
1376 throw new NotImplementedException();