Confirmed users
385
edits
Line 70: | Line 70: | ||
== Draft Plan == | == Draft Plan == | ||
* | * waiting on feed back | ||
=== | === proposed data model for a plugin record v3 === | ||
** name, description, searchForm, iconurl, urls (very fat object on default engines), url values can be derived from openSearchRefObj | |||
* data not being synced | |||
** directory - machine specific | |||
** lastModifiedTime - machine & directory specific. used to invalidate cache | |||
** filepath - path to the xml, which wont exist since we arent syncing the xml and would be specific to a machine (where fx is installed, where profile is installed, etc) | |||
* data model | |||
<div style="background-color: #F0F0F0"><pre> | <div style="background-color: #F0F0F0"><pre> | ||
{ | { | ||
id // string id | id // string id of the plugin usually looks like [app]google.xml | ||
guid // used for sync reconciliation | |||
openSearchRefObj //the whole of the OpenSearch xml object json-ifed. Clients may pick & choose which bits of data they will use/store in their representation. The sync store however, will hold onto this, to prevent differing internal representations from causing data loss on other platforms. It also ensures sync can in the future gracefully support any future features that are covered by the OpenSearch spec but not by the current internal representations. | |||
age //age in unix time of the ref object (so if the ref object changes, we know which one to keep) | |||
order // place in the global order (beware, even hidden engines have order) | |||
aliases // may be [], array of search keywords associated with this plugin | |||
isHidden // true if this engine should be globally disabled. Note some clients may treat some engines as 'removed' when they are actually disabled. (like desktop never actually removes the defaults even though the ui says it does) | |||
applicationIds // array of ids that this plugin should be installed on. [] if all platforms. (some plugins should not be installed on mobile, like desktop's google plugin, but others like twitter, are suitable for all platforms. Also leaves room for us to indicate a plugin meant for a subset, like mobile platforms {fennec, firefoxOS} and not desktop) | |||
locale //the locale of the plugin. Currently all plugins will have the same locale | |||
installLocation // optional. if not present, this plugin is default [app] on desktop | |||
installLocation // optional. if not present, this plugin is default [app] | type //optional, used to differentiate origins of plugins on desktop | ||
type //optional | queryCharset // defaults on desktop do not have this, may be null | ||
queryCharset // | isReadOnly //may be null | ||
} | } | ||
</pre></div> | </pre></div> | ||
=== High level Spec === | |||
* The OpenSearch plugins, ordering of search engines, keywords for search engines (both custom & default), and hidden flags (default engines only afaik) will be sync'ed across platforms (though the mobile client(s) will be written later) | * The OpenSearch plugins, ordering of search engines, keywords for search engines (both custom & default), and hidden flags (default engines only afaik) will be sync'ed across platforms (though the mobile client(s) will be written later) | ||
** parts of default engines will be synced (such as ordering & keywords) | ** parts of default engines will be synced (such as ordering & keywords) |