nsSearchService - //@line 40

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //@line 40 "e:\builds\moz2_slave\win32_build\build\toolkit\components\search\nsSearchService.j s" const Ci = Components.interfaces; const Cc = Components.classes; const Cr = Components.results; const PERMS_FILE = 0644; const PERMS_DIRECTORY = 0755; const MODE_RDONLY = 0x01; const MODE_WRONLY = 0x02; const MODE_CREATE = 0x08; const MODE_APPEND = 0x10; const MODE_TRUNCATE = 0x20; // Directory service keys const NS_APP_SEARCH_DIR_LIST = "SrchPluginsDL"; const NS_APP_USER_SEARCH_DIR = "UsrSrchPlugns"; const NS_APP_SEARCH_DIR = "SrchPlugns"; const NS_APP_USER_PROFILE_50_DIR = "ProfD"; // Search engine "locations". If this list is changed, be sure to update // the engine's _isDefault function accordingly. const SEARCH_APP_DIR = 1; const SEARCH_PROFILE_DIR = 2; const SEARCH_IN_EXTENSION = 3; const SEARCH_JAR = 4; // See documentation in nsIBrowserSearchService.idl. const SEARCH_ENGINE_TOPIC = "browser-search-engine-modified"; const QUIT_APPLICATION_TOPIC = "quit-application"; const SEARCH_ENGINE_REMOVED = "engine-removed"; const SEARCH_ENGINE_ADDED = "engine-added"; const SEARCH_ENGINE_CHANGED = "engine-changed"; const SEARCH_ENGINE_LOADED = "engine-loaded"; const SEARCH_ENGINE_CURRENT = "engine-current"; const SEARCH_TYPE_MOZSEARCH = Ci.nsISearchEngine.TYPE_MOZSEARCH; const SEARCH_TYPE_OPENSEARCH = Ci.nsISearchEngine.TYPE_OPENSEARCH; const SEARCH_TYPE_SHERLOCK = Ci.nsISearchEngine.TYPE_SHERLOCK; const SEARCH_DATA_XML = Ci.nsISearchEngine.DATA_XML; const SEARCH_DATA_TEXT = Ci.nsISearchEngine.DATA_TEXT; // File extensions for search plugin description files const XML_FILE_EXT = "xml"; const SHERLOCK_FILE_EXT = "src"; // Delay for lazy serialization (ms) const LAZY_SERIALIZE_DELAY = 100; // Delay for batching invalidation of the JSON cache (ms) const CACHE_INVALIDATION_DELAY = 1000; // Current cache version. This should be incremented if the format of the cache // file is modified. const CACHE_VERSION = 6; const ICON_DATAURL_PREFIX = "data:image/x-icon;base64,"; // Supported extensions for Sherlock plugin icons const SHERLOCK_ICON_EXTENSIONS = [".gif", ".png", ".jpg", ".jpeg"]; const NEW_LINES = /(\r\n|\r|\n)/; // Set an arbitrary cap on the maximum icon size. Without this, large icons can // cause big delays when loading them at startup. const MAX_ICON_SIZE = 10000; // Default charset to use for sending search parameters. ISO-8859-1 is used to // match previous nsInternetSearchService behavior. const DEFAULT_QUERY_CHARSET = "ISO-8859-1"; const SEARCH_BUNDLE = "chrome://global/locale/search/search.properties"; const BRAND_BUNDLE = "chrome://branding/locale/brand.properties"; const OPENSEARCH_NS_10 = "http://a9.com/-/spec/opensearch/1.0/"; const OPENSEARCH_NS_11 = "http://a9.com/-/spec/opensearch/1.1/"; // Although the specification at http://opensearch.a9.com/spec/1.1/description/ // gives the namespace names defined above, many existing OpenSearch engines // are using the following versions. We therefore allow either....
View Full Document

This note was uploaded on 03/11/2010 for the course ISD 125 taught by Professor 3ant during the Spring '10 term at École Normale Supérieure.

Page1 / 65

nsSearchService - //@line 40

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online