Service/Sync/FxSync/Developer/BrowserObjects: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 110: Line 110:


== passwords ==
== passwords ==
Saved passwords help users get back into websites that require a login.
<b>hostname</b> <i>string</i>: hostname that password is applicable at
<b>formSubmitURL</b> <i>string</i>: submission url (GET/POST url set by <form>)
<b>httpRealm</b> <i>string</i>: the HTTP Realm for which the login is valid. if not provided by the server, the value is the same as hostname
<b>username</b> <i>string</i>: username to log in as
<b>password</b> <i>string</i>: password for the username
<b>usernameField</b> <i>string</i>: HTML field name of the username
<b>passwordField</b> <i>string</i>: HTML field name of the password


== prefs ==
== prefs ==


== tabs ==
== tabs ==

Revision as of 22:26, 5 February 2010

Once an encrypted Weave Basic Object's payload is decrypted using Weave Crypto, the result is a cleartext JSON string. Each collection can have its own object structure to store data that it needs to reconstruct the item on the client.

This document describes the current format of the objects for each collection. Typically, one record corresponds to one item, e.g., a bookmark, and the object formats have a fixed list of keys for simple key/value string pairs.

The following sections, named by the corresponding collection name, describes the various object formats and how they're used. Note that object structures may change in the future and may not be backwards compatible.

bookmarks

One bookmark record exists for each "bookmark item," where an item may actually be a folder or a separator. Each item will have a type that determines what other fields are available in the object. The following sections describe the object format for a given type.

bookmark

This describes a regular bookmark that users can click to view a page.

title string: name of the bookmark
bmkUri string uri of the page to load
description string: extra description if provided
loadInSidebar boolean: true if the bookmark should load in the sidebar
tags array of strings: tags for the bookmark
keyword string: alias to activate the bookmark from the location bar

parentName string: name of the containing folder
predecessorid string: GUID of the item before this (empty if it's first)
type string: "bookmark"

microsummary

Microsummaries allow pages to be summarized for viewing from the toolbar. This extends bookmark, so the usual bookmark fields apply.

generatorUri string: uri that generates the summary
staticTitle string: title to show when no summaries are available

title string: name of the microsummary
bmkUri string uri of the page to load
description string: extra description if provided
loadInSidebar boolean: true if the bookmark should load in the sidebar
tags array of strings: tags for the bookmark
keyword string: alias to activate the bookmark from the location bar

parentName string: name of the containing folder
predecessorid string: GUID of the item before this (empty if it's first)
type string: "microsummary"

query

Place queries are special bookmarks with a place: uri that links to an existing folder/tag. This extends bookmark, so the usual bookmark fields apply.

folderName string: name of the folder/tag to link to

title string: name of the query
bmkUri string place: uri query
description string: extra description if provided
loadInSidebar boolean: true if the bookmark should load in the sidebar
tags array of strings: tags for the query
keyword string: alias to activate the bookmark from the location bar

parentName string: name of the containing folder
predecessorid string: GUID of the item before this (empty if it's first)
type string: "query"

folder

Folders contain bookmark items like bookmarks and other folders.

title string: name of the folder

parentName string: name of the containing folder
predecessorid string: GUID of the item before this (empty if it's first)
type string: "folder"

livemark

Livemarks act like folders with a dynamic list bookmarks, e.g., a RSS feed. This extends folder, so the usual folder fields apply.

siteUri string: site associated with the livemark
feedUri string: feed to get items for the livemark

title string: name of the livemark

parentName string: name of the containing folder
predecessorid string: GUID of the item before this (empty if it's first)
type string: "livemark"

separator

Separators help split sections of a folder.

pos string: position (index) of the separator

parentName string: name of the containing folder
predecessorid string: GUID of the item before this (empty if it's first)
type string: "separator"

forms

Form data is used to give suggestions for autocomplete for a HTML text input form. One record is created for each form entry.

name string: name of the HTML input field
value string: value to suggest for the input

history

Every page a user visits generates a history item/page. One history (page) per record.

histUri string: uri of the page
title string: title of the page
visits array of objects: a number of how and when the page was visited
  date integer: datetime of the visit
  type integer: transition type of the visit

passwords

Saved passwords help users get back into websites that require a login.

hostname string: hostname that password is applicable at
formSubmitURL string: submission url (GET/POST url set by <form>)
httpRealm string: the HTTP Realm for which the login is valid. if not provided by the server, the value is the same as hostname
username string: username to log in as
password string: password for the username
usernameField string: HTML field name of the username
passwordField string: HTML field name of the password

prefs

tabs