2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / class / System.Web.Abstractions / System.Web / HttpBrowserCapabilitiesWrapper.cs
1 //
2 // HttpBrowserCapabilitiesWrapper.cs
3 //
4 // Author:
5 //      Atsushi Enomoto <atsushi@ximian.com>
6 //
7 // Copyright (C) 2008 Novell Inc. http://novell.com
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 using System;
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Globalization;
34 using System.IO;
35 using System.Runtime.CompilerServices;
36 using System.Security.Permissions;
37 using System.Security.Principal;
38 using System.Web.Caching;
39 using System.Web.UI;
40
41 namespace System.Web
42 {
43 #if NET_4_0
44         [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
45 #endif
46         [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
47         [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
48         public class HttpBrowserCapabilitiesWrapper : HttpBrowserCapabilitiesBase
49         {
50                 HttpBrowserCapabilities w;
51
52                 public HttpBrowserCapabilitiesWrapper (HttpBrowserCapabilities httpBrowserCapabilities)
53                 {
54                         if (httpBrowserCapabilities == null)
55                                 throw new ArgumentNullException ("httpBrowserCapabilities");
56                         w = httpBrowserCapabilities;
57                 }
58
59
60                 public override bool ActiveXControls {
61                         get { return w.ActiveXControls; }
62                 }
63
64                 public override IDictionary Adapters {
65                         get { return w.Adapters; }
66                 }
67
68                 public override bool AOL {
69                         get { return w.AOL; }
70                 }
71
72                 public override bool BackgroundSounds {
73                         get { return w.BackgroundSounds; }
74                 }
75
76                 public override bool Beta {
77                         get { return w.Beta; }
78                 }
79
80                 public override string Browser {
81                         get { return w.Browser; }
82                 }
83
84                 public override ArrayList Browsers {
85                         get { return w.Browsers; }
86                 }
87
88                 public override bool CanCombineFormsInDeck {
89                         get { return w.CanCombineFormsInDeck; }
90                 }
91
92                 public override bool CanInitiateVoiceCall {
93                         get { return w.CanInitiateVoiceCall; }
94                 }
95
96                 public override bool CanRenderAfterInputOrSelectElement {
97                         get { return w.CanRenderAfterInputOrSelectElement; }
98                 }
99
100                 public override bool CanRenderEmptySelects {
101                         get { return w.CanRenderEmptySelects; }
102                 }
103
104                 public override bool CanRenderInputAndSelectElementsTogether {
105                         get { return w.CanRenderInputAndSelectElementsTogether; }
106                 }
107
108                 public override bool CanRenderMixedSelects {
109                         get { return w.CanRenderMixedSelects; }
110                 }
111
112                 public override bool CanRenderOneventAndPrevElementsTogether {
113                         get { return w.CanRenderOneventAndPrevElementsTogether; }
114                 }
115
116                 public override bool CanRenderPostBackCards {
117                         get { return w.CanRenderPostBackCards; }
118                 }
119
120                 public override bool CanRenderSetvarZeroWithMultiSelectionList {
121                         get { return w.CanRenderSetvarZeroWithMultiSelectionList; }
122                 }
123
124                 public override bool CanSendMail {
125                         get { return w.CanSendMail; }
126                 }
127
128                 public override IDictionary Capabilities {
129                         get { return w.Capabilities; } set { w.Capabilities = value; }
130                 }
131
132                 public override bool CDF {
133                         get { return w.CDF; }
134                 }
135
136                 public override Version ClrVersion {
137                         get { return w.ClrVersion; }
138                 }
139
140                 public override bool Cookies {
141                         get { return w.Cookies; }
142                 }
143
144                 public override bool Crawler {
145                         get { return w.Crawler; }
146                 }
147
148                 public override int DefaultSubmitButtonLimit {
149                         get { return w.DefaultSubmitButtonLimit; }
150                 }
151
152                 public override Version EcmaScriptVersion {
153                         get { return w.EcmaScriptVersion; }
154                 }
155
156                 public override bool Frames {
157                         get { return w.Frames; }
158                 }
159
160                 public override int GatewayMajorVersion {
161                         get { return w.GatewayMajorVersion; }
162                 }
163
164                 public override double GatewayMinorVersion {
165                         get { return w.GatewayMinorVersion; }
166                 }
167
168                 public override string GatewayVersion {
169                         get { return w.GatewayVersion; }
170                 }
171
172                 public override bool HasBackButton {
173                         get { return w.HasBackButton; }
174                 }
175
176                 public override bool HidesRightAlignedMultiselectScrollbars {
177                         get { return w.HidesRightAlignedMultiselectScrollbars; }
178                 }
179
180                 public override string HtmlTextWriter {
181                         get { return w.HtmlTextWriter; } set { w.HtmlTextWriter = value; }
182                 }
183
184                 public override string Id {
185                         get { return w.Id; }
186                 }
187
188                 public override string InputType {
189                         get { return w.InputType; }
190                 }
191
192                 public override bool IsColor {
193                         get { return w.IsColor; }
194                 }
195
196                 public override bool IsMobileDevice {
197                         get { return w.IsMobileDevice; }
198                 }
199
200                 public override string this [string key] {
201                         get { throw new NotImplementedException (); }
202                 }
203
204                 public override bool JavaApplets {
205                         get { return w.JavaApplets; }
206                 }
207
208                 public override Version JScriptVersion {
209                         get { return w.JScriptVersion; }
210                 }
211
212                 public override int MajorVersion {
213                         get { return w.MajorVersion; }
214                 }
215
216                 public override int MaximumHrefLength {
217                         get { return w.MaximumHrefLength; }
218                 }
219
220                 public override int MaximumRenderedPageSize {
221                         get { return w.MaximumRenderedPageSize; }
222                 }
223
224                 public override int MaximumSoftkeyLabelLength {
225                         get { return w.MaximumSoftkeyLabelLength; }
226                 }
227
228                 public override double MinorVersion {
229                         get { return w.MinorVersion; }
230                 }
231
232                 public override string MinorVersionString {
233                         get { return w.MinorVersionString; }
234                 }
235
236                 public override string MobileDeviceManufacturer {
237                         get { return w.MobileDeviceManufacturer; }
238                 }
239
240                 public override string MobileDeviceModel {
241                         get { return w.MobileDeviceModel; }
242                 }
243
244                 public override Version MSDomVersion {
245                         get { return w.MSDomVersion; }
246                 }
247
248                 public override int NumberOfSoftkeys {
249                         get { return w.NumberOfSoftkeys; }
250                 }
251
252                 public override string Platform {
253                         get { return w.Platform; }
254                 }
255
256                 public override string PreferredImageMime {
257                         get { return w.PreferredImageMime; }
258                 }
259
260                 public override string PreferredRenderingMime {
261                         get { return w.PreferredRenderingMime; }
262                 }
263
264                 public override string PreferredRenderingType {
265                         get { return w.PreferredRenderingType; }
266                 }
267
268                 public override string PreferredRequestEncoding {
269                         get { return w.PreferredRequestEncoding; }
270                 }
271
272                 public override string PreferredResponseEncoding {
273                         get { return w.PreferredResponseEncoding; }
274                 }
275
276                 public override bool RendersBreakBeforeWmlSelectAndInput {
277                         get { return w.RendersBreakBeforeWmlSelectAndInput; }
278                 }
279
280                 public override bool RendersBreaksAfterHtmlLists {
281                         get { return w.RendersBreaksAfterHtmlLists; }
282                 }
283
284                 public override bool RendersBreaksAfterWmlAnchor {
285                         get { return w.RendersBreaksAfterWmlAnchor; }
286                 }
287
288                 public override bool RendersBreaksAfterWmlInput {
289                         get { return w.RendersBreaksAfterWmlInput; }
290                 }
291
292                 public override bool RendersWmlDoAcceptsInline {
293                         get { return w.RendersWmlDoAcceptsInline; }
294                 }
295
296                 public override bool RendersWmlSelectsAsMenuCards {
297                         get { return w.RendersWmlSelectsAsMenuCards; }
298                 }
299
300                 public override string RequiredMetaTagNameValue {
301                         get { return w.RequiredMetaTagNameValue; }
302                 }
303
304                 public override bool RequiresAttributeColonSubstitution {
305                         get { return w.RequiresAttributeColonSubstitution; }
306                 }
307
308                 public override bool RequiresContentTypeMetaTag {
309                         get { return w.RequiresContentTypeMetaTag; }
310                 }
311
312                 public override bool RequiresControlStateInSession {
313                         get { return w.RequiresControlStateInSession; }
314                 }
315
316                 public override bool RequiresDBCSCharacter {
317                         get { return w.RequiresDBCSCharacter; }
318                 }
319
320                 public override bool RequiresHtmlAdaptiveErrorReporting {
321                         get { return w.RequiresHtmlAdaptiveErrorReporting; }
322                 }
323
324                 public override bool RequiresLeadingPageBreak {
325                         get { return w.RequiresLeadingPageBreak; }
326                 }
327
328                 public override bool RequiresNoBreakInFormatting {
329                         get { return w.RequiresNoBreakInFormatting; }
330                 }
331
332                 public override bool RequiresOutputOptimization {
333                         get { return w.RequiresOutputOptimization; }
334                 }
335
336                 public override bool RequiresPhoneNumbersAsPlainText {
337                         get { return w.RequiresPhoneNumbersAsPlainText; }
338                 }
339
340                 public override bool RequiresSpecialViewStateEncoding {
341                         get { return w.RequiresSpecialViewStateEncoding; }
342                 }
343
344                 public override bool RequiresUniqueFilePathSuffix {
345                         get { return w.RequiresUniqueFilePathSuffix; }
346                 }
347
348                 public override bool RequiresUniqueHtmlCheckboxNames {
349                         get { return w.RequiresUniqueHtmlCheckboxNames; }
350                 }
351
352                 public override bool RequiresUniqueHtmlInputNames {
353                         get { return w.RequiresUniqueHtmlInputNames; }
354                 }
355
356                 public override bool RequiresUrlEncodedPostfieldValues {
357                         get { return w.RequiresUrlEncodedPostfieldValues; }
358                 }
359
360                 public override int ScreenBitDepth {
361                         get { return w.ScreenBitDepth; }
362                 }
363
364                 public override int ScreenCharactersHeight {
365                         get { return w.ScreenCharactersHeight; }
366                 }
367
368                 public override int ScreenCharactersWidth {
369                         get { return w.ScreenCharactersWidth; }
370                 }
371
372                 public override int ScreenPixelsHeight {
373                         get { return w.ScreenPixelsHeight; }
374                 }
375
376                 public override int ScreenPixelsWidth {
377                         get { return w.ScreenPixelsWidth; }
378                 }
379
380                 public override bool SupportsAccesskeyAttribute {
381                         get { return w.SupportsAccesskeyAttribute; }
382                 }
383
384                 public override bool SupportsBodyColor {
385                         get { return w.SupportsBodyColor; }
386                 }
387
388                 public override bool SupportsBold {
389                         get { return w.SupportsBold; }
390                 }
391
392                 public override bool SupportsCacheControlMetaTag {
393                         get { return w.SupportsCacheControlMetaTag; }
394                 }
395
396                 public override bool SupportsCallback {
397                         get { return w.SupportsCallback; }
398                 }
399
400                 public override bool SupportsCss {
401                         get { return w.SupportsCss; }
402                 }
403
404                 public override bool SupportsDivAlign {
405                         get { return w.SupportsDivAlign; }
406                 }
407
408                 public override bool SupportsDivNoWrap {
409                         get { return w.SupportsDivNoWrap; }
410                 }
411
412                 public override bool SupportsEmptyStringInCookieValue {
413                         get { return w.SupportsEmptyStringInCookieValue; }
414                 }
415
416                 public override bool SupportsFontColor {
417                         get { return w.SupportsFontColor; }
418                 }
419
420                 public override bool SupportsFontName {
421                         get { return w.SupportsFontName; }
422                 }
423
424                 public override bool SupportsFontSize {
425                         get { return w.SupportsFontSize; }
426                 }
427
428                 public override bool SupportsImageSubmit {
429                         get { return w.SupportsImageSubmit; }
430                 }
431
432                 public override bool SupportsIModeSymbols {
433                         get { return w.SupportsIModeSymbols; }
434                 }
435
436                 public override bool SupportsInputIStyle {
437                         get { return w.SupportsInputIStyle; }
438                 }
439
440                 public override bool SupportsInputMode {
441                         get { return w.SupportsInputMode; }
442                 }
443
444                 public override bool SupportsItalic {
445                         get { return w.SupportsItalic; }
446                 }
447
448                 public override bool SupportsJPhoneMultiMediaAttributes {
449                         get { return w.SupportsJPhoneMultiMediaAttributes; }
450                 }
451
452                 public override bool SupportsJPhoneSymbols {
453                         get { return w.SupportsJPhoneSymbols; }
454                 }
455
456                 public override bool SupportsQueryStringInFormAction {
457                         get { return w.SupportsQueryStringInFormAction; }
458                 }
459
460                 public override bool SupportsRedirectWithCookie {
461                         get { return w.SupportsRedirectWithCookie; }
462                 }
463
464                 public override bool SupportsSelectMultiple {
465                         get { return w.SupportsSelectMultiple; }
466                 }
467
468                 public override bool SupportsUncheck {
469                         get { return w.SupportsUncheck; }
470                 }
471
472                 public override bool SupportsXmlHttp {
473                         get { return w.SupportsXmlHttp; }
474                 }
475
476                 public override bool Tables {
477                         get { return w.Tables; }
478                 }
479
480                 public override Type TagWriter {
481                         get { return w.TagWriter; }
482                 }
483
484                 public override string Type {
485                         get { return w.Type; }
486                 }
487
488                 public override bool UseOptimizedCacheKey {
489                         get { return w.UseOptimizedCacheKey; }
490                 }
491
492                 public override bool VBScript {
493                         get { return w.VBScript; }
494                 }
495
496                 public override string Version {
497                         get { return w.Version; }
498                 }
499
500                 public override Version W3CDomVersion {
501                         get { return w.W3CDomVersion; }
502                 }
503
504                 public override bool Win16 {
505                         get { return w.Win16; }
506                 }
507
508                 public override bool Win32 {
509                         get { return w.Win32; }
510                 }
511
512                 public override void AddBrowser (string browserName)
513                 {
514                         w.AddBrowser (browserName);
515                 }
516
517                 [MonoTODO]
518                 public override int CompareFilters (string filter1, string filter2)
519                 {
520                         throw new NotImplementedException ();
521                 }
522
523                 [MonoTODO]
524                 public override HtmlTextWriter CreateHtmlTextWriter (TextWriter w)
525                 {
526                         throw new NotImplementedException ();
527                 }
528
529                 public override void DisableOptimizedCacheKey ()
530                 {
531                         w.DisableOptimizedCacheKey ();
532                 }
533
534                 [MonoTODO]
535                 public override bool EvaluateFilter (string filterName)
536                 {
537                         throw new NotImplementedException ();
538                 }
539
540                 public override Version [] GetClrVersions ()
541                 {
542                         return w.GetClrVersions ();
543                 }
544
545                 public override bool IsBrowser (string browserName)
546                 {
547                         return w.IsBrowser (browserName);
548                 }
549         }
550 }