Difference between revisions of "Update Notification Protocol"

From Apache OpenOffice Wiki
Redirect page
Jump to: navigation, search
(Update documents and feeds)
(Redirected page to Update Service)
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Status: Draft
+
#REDIRECT [[Update Service]]
 
+
= Introduction =
+
 
+
Since version 2.0.3 OpenOffice.org users of builds providing an UpdateURL can manually check for available updates by invoking "Help -> Check for Updates .." . Starting with version 2.0.4 OpenOffice.org can perform this check automatically in a user configurable interval.
+
 
+
This is an attempt to define a second version of the update notification protocol, which is better extendable, can also be used for [[Extensions | extensions]] and no longer uses http post requests.
+
 
+
= Request =
+
 
+
The update notification request is a http get request to an URL, which may contain the operating system and processor type the OpenOffice.org instance is compiled for either as part of the URL or as URL parameter.
+
 
+
== Examples ==
+
 
+
<pre>
+
UpdateURL=http://update.services.openoffice.org/ProductUpdateService/check.Update2?_OS=Solaris&_ARCH=SPARC
+
</pre>
+
 
+
<pre>
+
UpdateURL=http://www.example.org/MyProduct/MyOS/MyArch
+
</pre>
+
 
+
= User Agent field =
+
 
+
To reduce the amount of transfered data when asking for OpenOffice.org updates, the user agent field contains all information required to identify a specific build plus the UI language currently in use:
+
 
+
<pre>
+
OpenOffice.org/2.2 (680m212 (Build:9263); Solaris; SPARC; BundledLanguages=en-US_fr) (lang=de)
+
</pre>
+
 
+
= Update documents and feeds =
+
 
+
The simplest possible reply is of the following form:
+
 
+
<pre>
+
<?xml version="1.0" encoding="utf-8"?>
+
<inst:description xmlns:inst="http://installation.openoffice.org/description">
+
  <inst:id>OpenOffice.org_2_en-US_fr</inst:id>
+
  <inst:version>2.2.0-5</inst:version>
+
  <inst:os>Solaris</inst:os>
+
  <inst:arch>SPARC</inst:arch>
+
  <inst:update type="text/html">
+
    <src xml::href="http://update.services.openoffice.org/ooo/snapshot.html" />
+
  </inst:update>
+
</inst:description>
+
</pre>
+
 
+
 
+
ToDo: add extension sample
+
 
+
 
+
The other supported reply format, which also allows to include several components or several versions of a single component, is to embed the update document in an [http://tools.ietf.org/wg/atompub/draft-ietf-atompub-format/rfc4287.txt atom feed].
+
 
+
<pre>
+
<?xml version="1.0" encoding="utf-8"?>
+
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang”en-US”>
+
 
+
  <title>OpenOffice.org Update Feed</title>
+
  <link rel="alternate" type="text/html" href="http://update.services.openoffice.org/ooo/snapshot.html"/>
+
  <updated>2006-11-06T18:30:02Z</updated>
+
  <author>
+
    <name>The OpenOffice.org Project</name>
+
    <uri>http://openoffice.org</uri>
+
    <email>updatefeed@openoffice.org</email>
+
  </author>
+
  <id>urn:uuid:a4ccd383-1dd1-11b2-a95c-0003ba566e9d</id>
+
  <entry>
+
    <title>OpenOffice.org 2.2 available</title>
+
    <link rel="alternate" type="text/html"
+
        href="http://update.services.openoffice.org/ooo/snapshot.html"/>
+
    <id>OpenOffice.org_2_en-US_fr-2.2</id>
+
    <updated>2006-11-06T18:30:02Z</updated>
+
    <summary>Click here to go to the download page.</summary>
+
    <category term="OpenOffice.org_2_en-US_fr" label="OpenOffice.org 2.2 US english/french" />
+
    <content type="application/xml">
+
      <inst:description xmlns:inst="http://installation.openoffice.org/description">
+
        <inst:id>OpenOffice.org_2_en-US_fr</inst:id>
+
        <inst:version>2.2.0-5</inst:version>
+
        <inst:os>Solaris</inst:os>
+
        <inst:arch>SPARC</inst:arch>
+
        <inst:update type="text/html">
+
          <src xml:href="http://update.services.openoffice.org/ooo/snapshot.html" />
+
        </inst:update>
+
      </inst:description>
+
    </content>
+
  </entry>
+
</feed>
+
</pre>
+
 
+
'''Note''': to allow proper filtering, the <category> tag of the <atom:entry> element must contain the <install:id> string of the component to be updated.
+
 
+
 
+
Extension developers might prefer to link to the update description file instead of embedding it:
+
 
+
<pre>
+
<?xml version="1.0" encoding="utf-8"?>
+
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang”en-US”>
+
 
+
  <title>My Extention Update Feed</title>
+
  <link rel="alternate" type="text/html" href="http://update.services.openoffice.org/ooo/snapshot.html"/>
+
  <updated>2006-11-06T18:30:02Z</updated>
+
  <author>
+
    <name>Extension Developer</name>
+
    <uri>http://example.org</uri>
+
    <email>update@example.org</email>
+
  </author>
+
  <id>urn:uuid:a4ccd383-1dd1-11b2-a95c-0003ba566e9d</id>
+
  <entry>
+
    <title>Version 2 available</title>
+
    <link rel="alternate" type="text/html"
+
        href="http://example.org/myextension/latest.html"/>
+
    <id>MyExtension+version</id>
+
    <updated>2006-11-06T18:30:02Z</updated>
+
    <category term="MyExtension" label="My Extension" />
+
    <content type="application/xml" src="http://example.org/myextension/latest/myextension.update.xml" />
+
  </entry>
+
</feed>
+
</pre>
+
 
+
 
+
[[Category:Spec]]
+
[[Category:Draft]]
+

Latest revision as of 09:42, 10 July 2014

Personal tools