/*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
 * 
 * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
 * WARRANTY OF ANY KIND, either express or implied. See the License for the specific
 * language governing rights and limitations under the License.
 * 
 * The Original Code is the Venice Web Communities System.
 * 
 * The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
 * for Silverwrist Design Studios.  Portions created by Eric J. Bowersox are
 * Copyright (C) 2002-03 Eric J. Bowersox/Silverwrist Design Studios.  All Rights Reserved.
 * 
 * Contributor(s): 
 */
package com.silverwrist.dynamo.iface;

import java.util.Set;

/**
 * The detected information about the user's browser, based on the "User-agent" string it sends.  This information
 * is looked up in an internal database and formatted in a convenient manner for use by scripting or other code.
 *
 * @author Eric J. Bowersox &lt;erbo@silcom.com&gt;
 * @version X
 */
public interface BrowserData
{
  /**
   * Browser attribute key for the name of the browser.
   */
  public static final String KEY_BROWSER_NAME = "Browser";

  /**
   * Browser attribute key for the version number of the browser.
   */
  public static final String KEY_VERSION = "Version";

  /**
   * Browser attribute key for the major version number of the browser.
   */
  public static final String KEY_MAJOR_VERSION = "MajorVer";

  /**
   * Browser attribute key for the minor version number of the browser.
   */
  public static final String KEY_MINOR_VERSION = "MinorVer";

  /**
   * Browser attribute key for the platform on which the browser is running.
   */
  public static final String KEY_PLATFORM = "Platform";

  /**
   * Browser attribute key for the version number of the Common Language Runtime underlying the browser.  (Only
   * applicable for instances of Microsoft Internet Explorer running on a CLR-supported platform such as Windows.)
   */
  public static final String KEY_CLR_VERSION = "CLR_Version";

  /**
   * Returns the User-agent string supplied by the browser.
   *
   * @return The User-agent string supplied by the browser.
   */
  public String getUserAgent();

  /**
   * Returns a defined attribute of the browser.
   *
   * @param key The name of the attribute to be returned.
   * @return The specified attribute.
   */
  public String getBrowserAttribute(String key);

  /**
   * Returns a {@link java.util.Set Set} of flags for the browser.  Each flag is a
   * {@link com.silverwrist.dynamo.BrowserFlag BrowserFlag} object.
   *
   * @return The set of flags for the current browser.
   */
  public Set getBrowserFlags();

} // end interface BrowserData
