2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / System.Web.Mobile / System.Web.Mobile / MobileCapabilities.cs
1
2 //
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:
10 // 
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
13 // 
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.
21 //
22 /**
23  * Project   : Mono
24  * Namespace : System.Web.Mobile
25  * Class     : MobileCapabilities
26  * Author    : Gaurav Vaish
27  *
28  * Copyright : 2003 with Gaurav Vaish, and with
29  *             Ximian Inc
30  */
31
32 using System;
33 using System.Collections;
34 using System.Web;
35 using System.Web.UI;
36
37 namespace System.Web.Mobile
38 {
39         public class MobileCapabilities : HttpBrowserCapabilities
40         {
41                 internal delegate void
42                        EvaluateCapabilitiesHandler(MobileCapabilities capabilities,
43                                                     string evaluationParam);
44
45                 private Hashtable evaluatorResults =
46                        Hashtable.Synchronized(new Hashtable());
47
48                 private bool canCombineFormsInDeck = false;
49
50                 public MobileCapabilities()
51                 {
52                 }
53
54                 public bool CanCombineFormsInDeck
55                 {
56                         get
57                         {
58                                 if(!this.canCombineFormsInDeck)
59                                 {
60                                         if(this["CanCombineFormsInDeck"] != null)
61                                         {
62                                                 this.canCombineFormsInDeck =
63                                                         Convert.ToBoolean(this["CanCombineFormsInDeck"]);
64                                         }
65                                 }
66                                 return this.canCombineFormsInDeck;
67                         }
68                 }
69
70                 private bool canInitiateVoiceCall = false;
71
72                 public bool CanInitiateVoiceCall
73                 {
74                         get
75                         {
76                                 if(!this.canInitiateVoiceCall)
77                                 {
78                                         if(this["CanInitiateVoiceCall"] != null)
79                                         {
80                                                 this.canInitiateVoiceCall =
81                                                      Convert.ToBoolean(this["CanInitiateVoiceCall"]);
82                                         }
83                                 }
84                                 return this.canInitiateVoiceCall;
85                         }
86                 }
87
88                 private bool canRenderAfterInputOrSelectElement = false;
89
90                 public bool CanRenderAfterInputOrSelectElement
91                 {
92                         get
93                         {
94                                 if(!this.canRenderAfterInputOrSelectElement)
95                                 {
96                                         if(this["CanRenderAfterInputOrSelectElement"] != null)
97                                         {
98                                                 this.canRenderAfterInputOrSelectElement =
99                                                      Convert.ToBoolean(this["CanRenderAfterInputOrSelectElement"]);
100                                         }
101                                 }
102                                 return this.canRenderAfterInputOrSelectElement;
103                         }
104                 }
105
106                 private bool canRenderEmptySelects = false;
107
108                 public bool CanRenderEmptySelects
109                 {
110                         get
111                         {
112                                 if(!this.canRenderEmptySelects)
113                                 {
114                                         if(this["CanRenderEmptySelects"] != null)
115                                         {
116                                                 this.canRenderEmptySelects =
117                                                      Convert.ToBoolean(this["CanRenderEmptySelects"]);
118                                         }
119                                 }
120                                 return this.canRenderEmptySelects;
121                         }
122                 }
123
124                 private bool canRenderInputAndSelectElementsTogether = false;
125
126                 public bool CanRenderInputAndSelectElementsTogether
127                 {
128                         get
129                         {
130                                 if(!this.canRenderInputAndSelectElementsTogether)
131                                 {
132                                         if(this["CanRenderInputAndSelectElementsTogether"] != null)
133                                         {
134                                                 this.canRenderInputAndSelectElementsTogether =
135                                                      Convert.ToBoolean(this["CanRenderInputAndSelectElementsTogether"]);
136                                         }
137                                 }
138                                 return this.canRenderInputAndSelectElementsTogether;
139                         }
140                 }
141
142                 private bool canRenderMixedSelects = false;
143
144                 public bool CanRenderMixedSelects
145                 {
146                         get
147                         {
148                                 if(!this.canRenderMixedSelects)
149                                 {
150                                         if(this["CanRenderMixedSelects"] != null)
151                                         {
152                                                 this.canRenderMixedSelects =
153                                                      Convert.ToBoolean(this["CanRenderMixedSelects"]);
154                                         }
155                                 }
156                                 return this.canRenderMixedSelects;
157                         }
158                 }
159
160                 private bool canRenderOneventAndPrevElementsTogether = false;
161
162                 public bool CanRenderOneventAndPrevElementsTogether
163                 {
164                         get
165                         {
166                                 if(canRenderOneventAndPrevElementsTogether == false)
167                                 {
168                                         if(this["CanRenderOneventAndPrevElementsTogether"] != null)
169                                         {
170                                                 this.canRenderOneventAndPrevElementsTogether =
171                                                      Convert.ToBoolean(this["CanRenderOneventAndPrevElementsTogether"]);
172                                         }
173                                 }
174                                 return canRenderOneventAndPrevElementsTogether;
175                         }
176                 }
177
178                 private bool canRenderPostBackCards = false;
179
180                 public bool CanRenderPostBackCards
181                 {
182                         get
183                         {
184                                 if(canRenderPostBackCards == false)
185                                 {
186                                         if(this["CanRenderPostBackCards"] != null)
187                                         {
188                                                 this.canRenderPostBackCards =
189                                                      Convert.ToBoolean(this["CanRenderPostBackCards"]);
190                                         }
191                                 }
192                                 return canRenderPostBackCards;
193                         }
194                 }
195
196                 private bool canRenderSetvarZeroWithMultiSelectionList = false;
197
198                 public bool CanRenderSetvarZeroWithMultiSelectionList
199                 {
200                         get
201                         {
202                                 if(canRenderSetvarZeroWithMultiSelectionList == false)
203                                 {
204                                         if(this["CanRenderSetvarZeroWithMultiSelectionList"] != null)
205                                         {
206                                                 this.canRenderSetvarZeroWithMultiSelectionList =
207                                                      Convert.ToBoolean(this["CanRenderSetvarZeroWithMultiSelectionList"]);
208                                         }
209                                 }
210                                 return canRenderSetvarZeroWithMultiSelectionList;
211                         }
212                 }
213
214                 private bool canSendMail = false;
215
216                 public bool CanSendMail
217                 {
218                         get
219                         {
220                                 if(canSendMail == false)
221                                 {
222                                         if(this["CanSendMail"] != null)
223                                         {
224                                                 this.canSendMail =
225                                                      Convert.ToBoolean(this["CanSendMail"]);
226                                         }
227                                 }
228                                 return canSendMail;
229                         }
230                 }
231
232                 private string gatewayVersion = String.Empty;
233
234                 public string GatewayVersion
235                 {
236                         get
237                         {
238                                 if(gatewayVersion == String.Empty)
239                                 {
240                                         if(this["GatewayVersion"] != null)
241                                         {
242                                                 this.gatewayVersion =
243                                                      this["GatewayVersion"];
244                                         }
245                                 }
246                                 return gatewayVersion;
247                         }
248                 }
249
250                 private bool hasBackButton = false;
251
252                 public bool HasBackButton
253                 {
254                         get
255                         {
256                                 if(hasBackButton == false)
257                                 {
258                                         if(this["HasBackButton"] != null)
259                                         {
260                                                 this.hasBackButton =
261                                                      Convert.ToBoolean(this["HasBackButton"]);
262                                         }
263                                 }
264                                 return hasBackButton;
265                         }
266                 }
267
268                 private bool hidesRightAlignedMultiselectScrollbars = false;
269
270                 public bool HidesRightAlignedMultiselectScrollbars
271                 {
272                         get
273                         {
274                                 if(hidesRightAlignedMultiselectScrollbars == false)
275                                 {
276                                         if(this["HidesRightAlignedMultiselectScrollbars"] != null)
277                                         {
278                                                 this.hidesRightAlignedMultiselectScrollbars =
279                                                      Convert.ToBoolean(this["HidesRightAlignedMultiselectScrollbars"]);
280                                         }
281                                 }
282                                 return hidesRightAlignedMultiselectScrollbars;
283                         }
284                 }
285
286                 private string inputType = String.Empty;
287
288                 public string InputType
289                 {
290                         get
291                         {
292                                 if(inputType == String.Empty)
293                                 {
294                                         if(this["InputType"] != null)
295                                         {
296                                                 this.inputType =
297                                                      this["InputType"];
298                                         }
299                                 }
300                                 return inputType;
301                         }
302                 }
303
304                 private bool isColor = false;
305
306                 public bool IsColor
307                 {
308                         get
309                         {
310                                 if(isColor == false)
311                                 {
312                                         if(this["IsColor"] != null)
313                                         {
314                                                 this.isColor =
315                                                      Convert.ToBoolean(this["IsColor"]);
316                                         }
317                                 }
318                                 return isColor;
319                         }
320                 }
321
322                 private bool isMobileDevice = false;
323
324                 public bool IsMobileDevice
325                 {
326                         get
327                         {
328                                 if(isMobileDevice == false)
329                                 {
330                                         if(this["IsMobileDevice"] != null)
331                                         {
332                                                 this.isMobileDevice =
333                                                      Convert.ToBoolean(this["IsMobileDevice"]);
334                                         }
335                                 }
336                                 return isMobileDevice;
337                         }
338                 }
339
340                 private string mobileDeviceManufacturer = String.Empty;
341
342                 public string MobileDeviceManufacturer
343                 {
344                         get
345                         {
346                                 if(mobileDeviceManufacturer == String.Empty)
347                                 {
348                                         if(this["MobileDeviceManufacturer"] != null)
349                                         {
350                                                 this.mobileDeviceManufacturer =
351                                                      this["MobileDeviceManufacturer"];
352                                         }
353                                 }
354                                 return mobileDeviceManufacturer;
355                         }
356                 }
357
358                 private string mobileDeviceModel = String.Empty;
359
360                 public string MobileDeviceModel
361                 {
362                         get
363                         {
364                                 if(mobileDeviceModel == String.Empty)
365                                 {
366                                         if(this["MobileDeviceModel"] != null)
367                                         {
368                                                 this.mobileDeviceModel =
369                                                      this["MobileDeviceModel"];
370                                         }
371                                 }
372                                 return mobileDeviceModel;
373                         }
374                 }
375
376                 private string preferredImageMime = String.Empty;
377
378                 public string PreferredImageMime
379                 {
380                         get
381                         {
382                                 if(preferredImageMime == String.Empty)
383                                 {
384                                         if(this["PreferredImageMime"] != null)
385                                         {
386                                                 this.preferredImageMime =
387                                                      this["PreferredImageMime"];
388                                         }
389                                 }
390                                 return preferredImageMime;
391                         }
392                 }
393
394                 private string preferredRenderingMime = String.Empty;
395
396                 public string PreferredRenderingMime
397                 {
398                         get
399                         {
400                                 if(preferredRenderingMime == String.Empty)
401                                 {
402                                         if(this["PreferredRenderingMime"] != null)
403                                         {
404                                                 this.preferredRenderingMime =
405                                                      this["PreferredRenderingMime"];
406                                         }
407                                 }
408                                 return preferredRenderingMime;
409                         }
410                 }
411
412                 private string preferredRenderingType = String.Empty;
413
414                 public string PreferredRenderingType
415                 {
416                         get
417                         {
418                                 if(preferredRenderingType == String.Empty)
419                                 {
420                                         if(this["PreferredRenderingType"] != null)
421                                         {
422                                                 this.preferredRenderingType =
423                                                      this["PreferredRenderingType"];
424                                         }
425                                 }
426                                 return preferredRenderingType;
427                         }
428                 }
429
430                 private bool rendersBreakBeforeWmlSelectAndInput = false;
431
432                 public bool RendersBreakBeforeWmlSelectAndInput
433                 {
434                         get
435                         {
436                                 if(rendersBreakBeforeWmlSelectAndInput == false)
437                                 {
438                                         if(this["RendersBreakBeforeWmlSelectAndInput"] != null)
439                                         {
440                                                 this.rendersBreakBeforeWmlSelectAndInput =
441                                                      Convert.ToBoolean(this["RendersBreakBeforeWmlSelectAndInput"]);
442                                         }
443                                 }
444                                 return rendersBreakBeforeWmlSelectAndInput;
445                         }
446                 }
447
448                 private bool rendersBreaksAfterHtmlLists = false;
449
450                 public bool RendersBreaksAfterHtmlLists
451                 {
452                         get
453                         {
454                                 if(rendersBreaksAfterHtmlLists == false)
455                                 {
456                                         if(this["RendersBreaksAfterHtmlLists"] != null)
457                                         {
458                                                 this.rendersBreaksAfterHtmlLists =
459                                                      Convert.ToBoolean(this["RendersBreaksAfterHtmlLists"]);
460                                         }
461                                 }
462                                 return rendersBreaksAfterHtmlLists;
463                         }
464                 }
465
466                 private bool rendersBreaksAfterWmlAnchor = false;
467
468                 public bool RendersBreaksAfterWmlAnchor
469                 {
470                         get
471                         {
472                                 if(rendersBreaksAfterWmlAnchor == false)
473                                 {
474                                         if(this["RendersBreaksAfterWmlAnchor"] != null)
475                                         {
476                                                 this.rendersBreaksAfterWmlAnchor =
477                                                      Convert.ToBoolean(this["RendersBreaksAfterWmlAnchor"]);
478                                         }
479                                 }
480                                 return rendersBreaksAfterWmlAnchor;
481                         }
482                 }
483
484                 private bool rendersBreaksAfterWmlInput = false;
485
486                 public bool RendersBreaksAfterWmlInput
487                 {
488                         get
489                         {
490                                 if(rendersBreaksAfterWmlInput == false)
491                                 {
492                                         if(this["RendersBreaksAfterWmlInput"] != null)
493                                         {
494                                                 this.rendersBreaksAfterWmlInput =
495                                                      Convert.ToBoolean(this["RendersBreaksAfterWmlInput"]);
496                                         }
497                                 }
498                                 return rendersBreaksAfterWmlInput;
499                         }
500                 }
501
502                 private bool rendersWmlDoAcceptsInline = false;
503
504                 public bool RendersWmlDoAcceptsInline
505                 {
506                         get
507                         {
508                                 if(rendersWmlDoAcceptsInline == false)
509                                 {
510                                         if(this["RendersWmlDoAcceptsInline"] != null)
511                                         {
512                                                 this.rendersWmlDoAcceptsInline =
513                                                      Convert.ToBoolean(this["RendersWmlDoAcceptsInline"]);
514                                         }
515                                 }
516                                 return rendersWmlDoAcceptsInline;
517                         }
518                 }
519
520                 private bool rendersWmlSelectsAsMenuCards = false;
521
522                 public bool RendersWmlSelectsAsMenuCards
523                 {
524                         get
525                         {
526                                 if(rendersWmlSelectsAsMenuCards == false)
527                                 {
528                                         if(this["RendersWmlSelectsAsMenuCards"] != null)
529                                         {
530                                                 this.rendersWmlSelectsAsMenuCards =
531                                                      Convert.ToBoolean(this["RendersWmlSelectsAsMenuCards"]);
532                                         }
533                                 }
534                                 return rendersWmlSelectsAsMenuCards;
535                         }
536                 }
537
538                 private string requiredMetaTagNameValue = String.Empty;
539
540                 public string RequiredMetaTagNameValue
541                 {
542                         get
543                         {
544                                 if(requiredMetaTagNameValue == String.Empty)
545                                 {
546                                         if(this["RequiredMetaTagNameValue"] != null)
547                                         {
548                                                 this.requiredMetaTagNameValue =
549                                                      this["RequiredMetaTagNameValue"];
550                                         }
551                                 }
552                                 return requiredMetaTagNameValue;
553                         }
554                 }
555
556                 private bool requiresAttributeColonSubstitution = false;
557
558                 public bool RequiresAttributeColonSubstitution
559                 {
560                         get
561                         {
562                                 if(requiresAttributeColonSubstitution == false)
563                                 {
564                                         if(this["RequiresAttributeColonSubstitution"] != null)
565                                         {
566                                                 this.requiresAttributeColonSubstitution =
567                                                      Convert.ToBoolean(this["RequiresAttributeColonSubstitution"]);
568                                         }
569                                 }
570                                 return requiresAttributeColonSubstitution;
571                         }
572                 }
573
574                 private bool requiresContentTypeMetaTag = false;
575
576                 public bool RequiresContentTypeMetaTag
577                 {
578                         get
579                         {
580                                 if(requiresContentTypeMetaTag == false)
581                                 {
582                                         if(this["RequiresContentTypeMetaTag"] != null)
583                                         {
584                                                 this.requiresContentTypeMetaTag =
585                                                      Convert.ToBoolean(this["RequiresContentTypeMetaTag"]);
586                                         }
587                                 }
588                                 return requiresContentTypeMetaTag;
589                         }
590                 }
591
592                 private bool requiresDBCSCharacter = false;
593
594                 public bool RequiresDBCSCharacter
595                 {
596                         get
597                         {
598                                 if(requiresDBCSCharacter == false)
599                                 {
600                                         if(this["RequiresDBCSCharacter"] != null)
601                                         {
602                                                 this.requiresDBCSCharacter =
603                                                      Convert.ToBoolean(this["RequiresDBCSCharacter"]);
604                                         }
605                                 }
606                                 return requiresDBCSCharacter;
607                         }
608                 }
609
610                 private bool requiresHtmlAdaptiveErrorReporting = false;
611
612                 public bool RequiresHtmlAdaptiveErrorReporting
613                 {
614                         get
615                         {
616                                 if(requiresHtmlAdaptiveErrorReporting == false)
617                                 {
618                                         if(this["RequiresHtmlAdaptiveErrorReporting"] != null)
619                                         {
620                                                 this.requiresHtmlAdaptiveErrorReporting =
621                                                      Convert.ToBoolean(this["RequiresHtmlAdaptiveErrorReporting"]);
622                                         }
623                                 }
624                                 return requiresHtmlAdaptiveErrorReporting;
625                         }
626                 }
627
628                 private bool requiresLeadingPageBreak = false;
629
630                 public bool RequiresLeadingPageBreak
631                 {
632                         get
633                         {
634                                 if(requiresLeadingPageBreak == false)
635                                 {
636                                         if(this["RequiresLeadingPageBreak"] != null)
637                                         {
638                                                 this.requiresLeadingPageBreak =
639                                                      Convert.ToBoolean(this["RequiresLeadingPageBreak"]);
640                                         }
641                                 }
642                                 return requiresLeadingPageBreak;
643                         }
644                 }
645
646                 private bool requiresNoBreakInFormatting = false;
647
648                 public bool RequiresNoBreakInFormatting
649                 {
650                         get
651                         {
652                                 if(requiresNoBreakInFormatting == false)
653                                 {
654                                         if(this["RequiresNoBreakInFormatting"] != null)
655                                         {
656                                                 this.requiresNoBreakInFormatting =
657                                                      Convert.ToBoolean(this["RequiresNoBreakInFormatting"]);
658                                         }
659                                 }
660                                 return requiresNoBreakInFormatting;
661                         }
662                 }
663
664                 private bool requiresOutputOptimization = false;
665
666                 public bool RequiresOutputOptimization
667                 {
668                         get
669                         {
670                                 if(requiresOutputOptimization == false)
671                                 {
672                                         if(this["RequiresOutputOptimization"] != null)
673                                         {
674                                                 this.requiresOutputOptimization =
675                                                      Convert.ToBoolean(this["RequiresOutputOptimization"]);
676                                         }
677                                 }
678                                 return requiresOutputOptimization;
679                         }
680                 }
681
682                 private bool requiresPhoneNumbersAsPlainText = false;
683
684                 public bool RequiresPhoneNumbersAsPlainText
685                 {
686                         get
687                         {
688                                 if(requiresPhoneNumbersAsPlainText == false)
689                                 {
690                                         if(this["RequiresPhoneNumbersAsPlainText"] != null)
691                                         {
692                                                 this.requiresPhoneNumbersAsPlainText =
693                                                      Convert.ToBoolean(this["RequiresPhoneNumbersAsPlainText"]);
694                                         }
695                                 }
696                                 return requiresPhoneNumbersAsPlainText;
697                         }
698                 }
699
700                 private bool requiresSpecialViewStateEncoding = false;
701
702                 public bool RequiresSpecialViewStateEncoding
703                 {
704                         get
705                         {
706                                 if(requiresSpecialViewStateEncoding == false)
707                                 {
708                                         if(this["RequiresSpecialViewStateEncoding"] != null)
709                                         {
710                                                 this.requiresSpecialViewStateEncoding =
711                                                      Convert.ToBoolean(this["RequiresSpecialViewStateEncoding"]);
712                                         }
713                                 }
714                                 return requiresSpecialViewStateEncoding;
715                         }
716                 }
717
718                 private bool requiresUniqueFilePathSuffix = false;
719
720                 public bool RequiresUniqueFilePathSuffix
721                 {
722                         get
723                         {
724                                 if(requiresUniqueFilePathSuffix == false)
725                                 {
726                                         if(this["RequiresUniqueFilePathSuffix"] != null)
727                                         {
728                                                 this.requiresUniqueFilePathSuffix =
729                                                      Convert.ToBoolean(this["RequiresUniqueFilePathSuffix"]);
730                                         }
731                                 }
732                                 return requiresUniqueFilePathSuffix;
733                         }
734                 }
735
736                 private bool requiresUniqueHtmlCheckboxNames = false;
737
738                 public bool RequiresUniqueHtmlCheckboxNames
739                 {
740                         get
741                         {
742                                 if(requiresUniqueHtmlCheckboxNames == false)
743                                 {
744                                         if(this["RequiresUniqueHtmlCheckboxNames"] != null)
745                                         {
746                                                 this.requiresUniqueHtmlCheckboxNames =
747                                                      Convert.ToBoolean(this["RequiresUniqueHtmlCheckboxNames"]);
748                                         }
749                                 }
750                                 return requiresUniqueHtmlCheckboxNames;
751                         }
752                 }
753
754                 private bool requiresUrlEncodedPostfieldValues = false;
755
756                 public bool RequiresUrlEncodedPostfieldValues
757                 {
758                         get
759                         {
760                                 if(requiresUrlEncodedPostfieldValues == false)
761                                 {
762                                         if(this["RequiresUrlEncodedPostfieldValues"] != null)
763                                         {
764                                                 this.requiresUrlEncodedPostfieldValues =
765                                                      Convert.ToBoolean(this["RequiresUrlEncodedPostfieldValues"]);
766                                         }
767                                 }
768                                 return requiresUrlEncodedPostfieldValues;
769                         }
770                 }
771
772                 private bool supportsAccesskeyAttribute = false;
773
774                 public bool SupportsAccesskeyAttribute
775                 {
776                         get
777                         {
778                                 if(supportsAccesskeyAttribute == false)
779                                 {
780                                         if(this["SupportsAccesskeyAttribute"] != null)
781                                         {
782                                                 this.supportsAccesskeyAttribute =
783                                                      Convert.ToBoolean(this["SupportsAccesskeyAttribute"]);
784                                         }
785                                 }
786                                 return supportsAccesskeyAttribute;
787                         }
788                 }
789
790                 private bool supportsBodyColor = false;
791
792                 public bool SupportsBodyColor
793                 {
794                         get
795                         {
796                                 if(supportsBodyColor == false)
797                                 {
798                                         if(this["SupportsBodyColor"] != null)
799                                         {
800                                                 this.supportsBodyColor =
801                                                      Convert.ToBoolean(this["SupportsBodyColor"]);
802                                         }
803                                 }
804                                 return supportsBodyColor;
805                         }
806                 }
807
808                 private bool supportsBold = false;
809
810                 public bool SupportsBold
811                 {
812                         get
813                         {
814                                 if(supportsBold == false)
815                                 {
816                                         if(this["SupportsBold"] != null)
817                                         {
818                                                 this.supportsBold =
819                                                      Convert.ToBoolean(this["SupportsBold"]);
820                                         }
821                                 }
822                                 return supportsBold;
823                         }
824                 }
825
826                 private bool supportsCacheControlMetaTag = false;
827
828                 public bool SupportsCacheControlMetaTag
829                 {
830                         get
831                         {
832                                 if(supportsCacheControlMetaTag == false)
833                                 {
834                                         if(this["SupportsCacheControlMetaTag"] != null)
835                                         {
836                                                 this.supportsCacheControlMetaTag =
837                                                      Convert.ToBoolean(this["SupportsCacheControlMetaTag"]);
838                                         }
839                                 }
840                                 return supportsCacheControlMetaTag;
841                         }
842                 }
843
844                 private bool supportsCss = false;
845
846                 public bool SupportsCss
847                 {
848                         get
849                         {
850                                 if(supportsCss == false)
851                                 {
852                                         if(this["SupportsCss"] != null)
853                                         {
854                                                 this.supportsCss =
855                                                      Convert.ToBoolean(this["SupportsCss"]);
856                                         }
857                                 }
858                                 return supportsCss;
859                         }
860                 }
861
862                 private bool supportsDivAlign = false;
863
864                 public bool SupportsDivAlign
865                 {
866                         get
867                         {
868                                 if(supportsDivAlign == false)
869                                 {
870                                         if(this["SupportsDivAlign"] != null)
871                                         {
872                                                 this.supportsDivAlign =
873                                                      Convert.ToBoolean(this["SupportsDivAlign"]);
874                                         }
875                                 }
876                                 return supportsDivAlign;
877                         }
878                 }
879
880                 private bool supportsDivNoWrap = false;
881
882                 public bool SupportsDivNoWrap
883                 {
884                         get
885                         {
886                                 if(supportsDivNoWrap == false)
887                                 {
888                                         if(this["SupportsDivNoWrap"] != null)
889                                         {
890                                                 this.supportsDivNoWrap =
891                                                      Convert.ToBoolean(this["SupportsDivNoWrap"]);
892                                         }
893                                 }
894                                 return supportsDivNoWrap;
895                         }
896                 }
897
898                 private bool supportsFontColor = false;
899
900                 public bool SupportsFontColor
901                 {
902                         get
903                         {
904                                 if(supportsFontColor == false)
905                                 {
906                                         if(this["SupportsFontColor"] != null)
907                                         {
908                                                 this.supportsFontColor =
909                                                      Convert.ToBoolean(this["SupportsFontColor"]);
910                                         }
911                                 }
912                                 return supportsFontColor;
913                         }
914                 }
915
916                 private bool supportsFontName = false;
917
918                 public bool SupportsFontName
919                 {
920                         get
921                         {
922                                 if(supportsFontName == false)
923                                 {
924                                         if(this["SupportsFontName"] != null)
925                                         {
926                                                 this.supportsFontName =
927                                                      Convert.ToBoolean(this["SupportsFontName"]);
928                                         }
929                                 }
930                                 return supportsFontName;
931                         }
932                 }
933
934                 private bool supportsFontSize = false;
935
936                 public bool SupportsFontSize
937                 {
938                         get
939                         {
940                                 if(supportsFontSize == false)
941                                 {
942                                         if(this["SupportsFontSize"] != null)
943                                         {
944                                                 this.supportsFontSize =
945                                                      Convert.ToBoolean(this["SupportsFontSize"]);
946                                         }
947                                 }
948                                 return supportsFontSize;
949                         }
950                 }
951
952                 private bool supportsModeSymbols = false;
953
954                 public bool SupportsModeSymbols
955                 {
956                         get
957                         {
958                                 if(supportsModeSymbols == false)
959                                 {
960                                         if(this["SupportsModeSymbols"] != null)
961                                         {
962                                                 this.supportsModeSymbols =
963                                                      Convert.ToBoolean(this["SupportsModeSymbols"]);
964                                         }
965                                 }
966                                 return supportsModeSymbols;
967                         }
968                 }
969
970                 private bool supportsImageSubmit = false;
971
972                 public bool SupportsImageSubmit
973                 {
974                         get
975                         {
976                                 if(supportsImageSubmit == false)
977                                 {
978                                         if(this["SupportsImageSubmit"] != null)
979                                         {
980                                                 this.supportsImageSubmit =
981                                                      Convert.ToBoolean(this["SupportsImageSubmit"]);
982                                         }
983                                 }
984                                 return supportsImageSubmit;
985                         }
986                 }
987
988                 private bool supportsInputStyle = false;
989
990                 public bool SupportsInputStyle
991                 {
992                         get
993                         {
994                                 if(supportsInputStyle == false)
995                                 {
996                                         if(this["SupportsInputStyle"] != null)
997                                         {
998                                                 this.supportsInputStyle =
999                                                      Convert.ToBoolean(this["SupportsInputStyle"]);
1000                                         }
1001                                 }
1002                                 return supportsInputStyle;
1003                         }
1004                 }
1005
1006                 private bool supportsInputMode = false;
1007
1008                 public bool SupportsInputMode
1009                 {
1010                         get
1011                         {
1012                                 if(supportsInputMode == false)
1013                                 {
1014                                         if(this["SupportsInputMode"] != null)
1015                                         {
1016                                                 this.supportsInputMode =
1017                                                      Convert.ToBoolean(this["SupportsInputMode"]);
1018                                         }
1019                                 }
1020                                 return supportsInputMode;
1021                         }
1022                 }
1023
1024                 private bool supportsItalic = false;
1025
1026                 public bool SupportsItalic
1027                 {
1028                         get
1029                         {
1030                                 if(supportsItalic == false)
1031                                 {
1032                                         if(this["SupportsItalic"] != null)
1033                                         {
1034                                                 this.supportsItalic =
1035                                                      Convert.ToBoolean(this["SupportsItalic"]);
1036                                         }
1037                                 }
1038                                 return supportsItalic;
1039                         }
1040                 }
1041
1042                 private bool supportsJPhoneMultiMediaAttributes = false;
1043
1044                 public bool SupportsJPhoneMultiMediaAttributes
1045                 {
1046                         get
1047                         {
1048                                 if(supportsJPhoneMultiMediaAttributes == false)
1049                                 {
1050                                         if(this["SupportsJPhoneMultiMediaAttributes"] != null)
1051                                         {
1052                                                 this.supportsJPhoneMultiMediaAttributes =
1053                                                      Convert.ToBoolean(this["SupportsJPhoneMultiMediaAttributes"]);
1054                                         }
1055                                 }
1056                                 return supportsJPhoneMultiMediaAttributes;
1057                         }
1058                 }
1059
1060                 private bool supportsJPhoneSymbols = false;
1061
1062                 public bool SupportsJPhoneSymbols
1063                 {
1064                         get
1065                         {
1066                                 if(supportsJPhoneSymbols == false)
1067                                 {
1068                                         if(this["SupportsJPhoneSymbols"] != null)
1069                                         {
1070                                                 this.supportsJPhoneSymbols =
1071                                                      Convert.ToBoolean(this["SupportsJPhoneSymbols"]);
1072                                         }
1073                                 }
1074                                 return supportsJPhoneSymbols;
1075                         }
1076                 }
1077
1078                 private bool supportsQueryStringInFormAction = false;
1079
1080                 public bool SupportsQueryStringInFormAction
1081                 {
1082                         get
1083                         {
1084                                 if(supportsQueryStringInFormAction == false)
1085                                 {
1086                                         if(this["SupportsQueryStringInFormAction"] != null)
1087                                         {
1088                                                 this.supportsQueryStringInFormAction =
1089                                                      Convert.ToBoolean(this["SupportsQueryStringInFormAction"]);
1090                                         }
1091                                 }
1092                                 return supportsQueryStringInFormAction;
1093                         }
1094                 }
1095
1096                 private bool supportsRedirectWithCookie = false;
1097
1098                 public bool SupportsRedirectWithCookie
1099                 {
1100                         get
1101                         {
1102                                 if(supportsRedirectWithCookie == false)
1103                                 {
1104                                         if(this["SupportsRedirectWithCookie"] != null)
1105                                         {
1106                                                 this.supportsRedirectWithCookie =
1107                                                      Convert.ToBoolean(this["SupportsRedirectWithCookie"]);
1108                                         }
1109                                 }
1110                                 return supportsRedirectWithCookie;
1111                         }
1112                 }
1113
1114                 private bool supportsSelectMultiple = false;
1115
1116                 public bool SupportsSelectMultiple
1117                 {
1118                         get
1119                         {
1120                                 if(supportsSelectMultiple == false)
1121                                 {
1122                                         if(this["SupportsSelectMultiple"] != null)
1123                                         {
1124                                                 this.supportsSelectMultiple =
1125                                                      Convert.ToBoolean(this["SupportsSelectMultiple"]);
1126                                         }
1127                                 }
1128                                 return supportsSelectMultiple;
1129                         }
1130                 }
1131
1132                 private bool supportsUncheck = false;
1133
1134                 public bool SupportsUncheck
1135                 {
1136                         get
1137                         {
1138                                 if(supportsUncheck == false)
1139                                 {
1140                                         if(this["SupportsUncheck"] != null)
1141                                         {
1142                                                 this.supportsUncheck =
1143                                                      Convert.ToBoolean(this["SupportsUncheck"]);
1144                                         }
1145                                 }
1146                                 return supportsUncheck;
1147                         }
1148                 }
1149
1150                 private int gatewayMajorVersion = 0;
1151
1152                 public int GatewayMajorVersion
1153                 {
1154                         get
1155                         {
1156                                 if(gatewayMajorVersion == 0)
1157                                 {
1158                                         if(this["GatewayMajorVersion"] != null)
1159                                         {
1160                                                 this.gatewayMajorVersion =
1161                                                      Convert.ToInt32(this["GatewayMajorVersion"]);
1162                                         }
1163                                 }
1164                                 return gatewayMajorVersion;
1165                         }
1166                 }
1167
1168                 private int maximumRenderedPageSize = 0;
1169
1170                 public int MaximumRenderedPageSize
1171                 {
1172                         get
1173                         {
1174                                 if(maximumRenderedPageSize == 0)
1175                                 {
1176                                         if(this["MaximumRenderedPageSize"] != null)
1177                                         {
1178                                                 this.maximumRenderedPageSize =
1179                                                      Convert.ToInt32(this["MaximumRenderedPageSize"]);
1180                                         }
1181                                 }
1182                                 return maximumRenderedPageSize;
1183                         }
1184                 }
1185
1186                 private int maximumSoftkeyLabelLength = 0;
1187
1188                 public int MaximumSoftkeyLabelLength
1189                 {
1190                         get
1191                         {
1192                                 if(maximumSoftkeyLabelLength == 0)
1193                                 {
1194                                         if(this["MaximumSoftkeyLabelLength"] != null)
1195                                         {
1196                                                 this.maximumSoftkeyLabelLength =
1197                                                      Convert.ToInt32(this["MaximumSoftkeyLabelLength"]);
1198                                         }
1199                                 }
1200                                 return maximumSoftkeyLabelLength;
1201                         }
1202                 }
1203
1204                 private int numberOfSoftkeys = 0;
1205
1206                 public int NumberOfSoftkeys
1207                 {
1208                         get
1209                         {
1210                                 if(numberOfSoftkeys == 0)
1211                                 {
1212                                         if(this["NumberOfSoftkeys"] != null)
1213                                         {
1214                                                 this.numberOfSoftkeys =
1215                                                      Convert.ToInt32(this["NumberOfSoftkeys"]);
1216                                         }
1217                                 }
1218                                 return numberOfSoftkeys;
1219                         }
1220                 }
1221
1222                 private int screenBitDepth = 0;
1223
1224                 public int ScreenBitDepth
1225                 {
1226                         get
1227                         {
1228                                 if(screenBitDepth == 0)
1229                                 {
1230                                         if(this["ScreenBitDepth"] != null)
1231                                         {
1232                                                 this.screenBitDepth =
1233                                                      Convert.ToInt32(this["ScreenBitDepth"]);
1234                                         }
1235                                 }
1236                                 return screenBitDepth;
1237                         }
1238                 }
1239
1240                 private int screenCharactersHeight = 0;
1241
1242                 public int ScreenCharactersHeight
1243                 {
1244                         get
1245                         {
1246                                 if(screenCharactersHeight == 0)
1247                                 {
1248                                         if(this["ScreenCharactersHeight"] != null)
1249                                         {
1250                                                 this.screenCharactersHeight =
1251                                                      Convert.ToInt32(this["ScreenCharactersHeight"]);
1252                                         }
1253                                 }
1254                                 return screenCharactersHeight;
1255                         }
1256                 }
1257
1258                 private int screenCharactersWidth = 0;
1259
1260                 public int ScreenCharactersWidth
1261                 {
1262                         get
1263                         {
1264                                 if(screenCharactersWidth == 0)
1265                                 {
1266                                         if(this["ScreenCharactersWidth"] != null)
1267                                         {
1268                                                 this.screenCharactersWidth =
1269                                                      Convert.ToInt32(this["ScreenCharactersWidth"]);
1270                                         }
1271                                 }
1272                                 return screenCharactersWidth;
1273                         }
1274                 }
1275
1276                 private int screenPixelsHeight = 0;
1277
1278                 public int ScreenPixelsHeight
1279                 {
1280                         get
1281                         {
1282                                 if(screenPixelsHeight == 0)
1283                                 {
1284                                         if(this["ScreenPixelsHeight"] != null)
1285                                         {
1286                                                 this.screenPixelsHeight =
1287                                                      Convert.ToInt32(this["ScreenPixelsHeight"]);
1288                                         }
1289                                 }
1290                                 return screenPixelsHeight;
1291                         }
1292                 }
1293
1294                 private int screenPixelsWidth = 0;
1295
1296                 public int ScreenPixelsWidth
1297                 {
1298                         get
1299                         {
1300                                 if(screenPixelsWidth == 0)
1301                                 {
1302                                         if(this["ScreenPixelsWidth"] != null)
1303                                         {
1304                                                 this.screenPixelsWidth =
1305                                                      Convert.ToInt32(this["ScreenPixelsWidth"]);
1306                                         }
1307                                 }
1308                                 return screenPixelsWidth;
1309                         }
1310                 }
1311
1312                 private double gatewayMinorVersion = 0.0;
1313
1314                 public double GatewayMinorVersion
1315                 {
1316                         get
1317                         {
1318                                 if(gatewayMinorVersion == 0.0)
1319                                 {
1320                                         if(this["GatewayMinorVersion"] != null)
1321                                         {
1322                                                 this.gatewayMinorVersion =
1323                                                      Convert.ToDouble(this["GatewayMinorVersion"]);
1324                                         }
1325                                 }
1326                                 return gatewayMinorVersion;
1327                         }
1328                 }
1329
1330                 public bool HasCapability(string delegateName, string optParams)
1331                 {
1332                         if(delegateName == null || delegateName.Trim() == String.Empty)
1333                         {
1334                                 throw new ArgumentException("MobCap_DelegateNameNoValue");
1335                         }
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();
1343                 }
1344
1345                 private bool HasComparisonEvaluator(string evalName,
1346                                                     out bool result)
1347                 {
1348                         throw new NotImplementedException();
1349                 }
1350
1351                 private bool HasDelegateEvaluator(string evalName,
1352                                                   out bool result)
1353                 {
1354                         throw new NotImplementedException();
1355                 }
1356
1357                 private bool HasProperty(string evalName, string param,
1358                                          out bool result)
1359                 {
1360                         throw new NotImplementedException();
1361                 }
1362
1363                 private bool HasItem(string evalName, string param,
1364                                      out bool result)
1365                 {
1366                         throw new NotImplementedException();
1367                 }
1368
1369                 private bool IsComparisonEvaluator(string evalName)
1370                 {
1371                         throw new NotImplementedException();
1372                 }
1373
1374                 private DeviceFilterDictionary GetCurrentFilters()
1375                 {
1376                         throw new NotImplementedException();
1377                 }
1378         }
1379 }