Merge lp:~online-accounts/accounts-qml-module/packaging into lp:accounts-qml-module

Proposed by Alberto Mardegan
Status: Merged
Approved by: Timo Jyrinki
Approved revision: no longer in the source branch.
Merged at revision: 55
Proposed branch: lp:~online-accounts/accounts-qml-module/packaging
Merge into: lp:accounts-qml-module
Diff against target: 375 lines (+337/-2)
3 files modified
debian/control (+13/-1)
doc/accounts-qml-module.qdocconf (+1/-1)
doc/manifest-files.qdoc (+323/-0)
To merge this branch: bzr merge lp:~online-accounts/accounts-qml-module/packaging
Reviewer Review Type Date Requested Status
Timo Jyrinki (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Online Accounts Pending
Review via email: mp+240688@code.launchpad.net

Commit message

Rename QML module

Description of the change

Rename QML module

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Seems correct for the QML module, as the installation directory is /usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/OnlineAccounts. Transitional package looks good too.

But you would probably want to keep "accounts-qml-module-doc" intact however, since you'd need a transitional package for it otherwise too, to prevent breakage when upgrading on desktop. The source package is still called accounts-qml-module, so I'd say it's ok binary package name for the documentation too.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Looks great!

review: Approve
55. By Alberto Mardegan

Rename QML module Fixes: 1342031, 1375161
Approved by: Timo Jyrinki, PS Jenkins bot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-09-02 11:46:14 +0000
3+++ debian/control 2014-11-06 10:50:55 +0000
4@@ -19,16 +19,28 @@
5 # just go ahead. ~online-accounts will notice and sync up the code again.
6 Vcs-Bzr: https://code.launchpad.net/~online-accounts/accounts-qml-module/trunk
7
8-Package: qtdeclarative5-accounts-plugin
9+Package: qml-module-ubuntu-onlineaccounts
10 Architecture: any
11 Multi-Arch: same
12 Depends: ${misc:Depends},
13 ${shlibs:Depends},
14 qtdeclarative5-qtquick2-plugin,
15+Breaks: qtdeclarative5-accounts-plugin (<= 0.5+14.10.20141006-0ubuntu1)
16+Replaces: qtdeclarative5-accounts-plugin (<= 0.5+14.10.20141006-0ubuntu1)
17 Description: Expose the Online Accounts API to QML applications
18 This module provides access to the Online Accounts framework from QML
19 applications.
20
21+Package: qtdeclarative5-accounts-plugin
22+Architecture: any
23+Section: oldlibs
24+Multi-Arch: same
25+Depends: ${misc:Depends},
26+ qml-module-ubuntu-onlineaccounts,
27+Description: transitional dummy package for Online Accounts QML clients
28+ This module provides access to the Online Accounts framework from QML
29+ applications.
30+
31 Package: accounts-qml-module-doc
32 Section: doc
33 Architecture: all
34
35=== renamed file 'debian/qtdeclarative5-accounts-plugin.install' => 'debian/qml-module-ubuntu-onlineaccounts.install'
36=== modified file 'doc/accounts-qml-module.qdocconf'
37--- doc/accounts-qml-module.qdocconf 2013-04-26 20:39:04 +0000
38+++ doc/accounts-qml-module.qdocconf 2014-11-06 10:50:55 +0000
39@@ -2,7 +2,7 @@
40
41 HTML.templatedir = .
42 HTML.nobreadcrumbs = "true"
43-HTML.stylesheets = doc/qtquick.css
44+HTML.stylesheets = qtquick.css
45 HTML.headerstyles = " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/qtquick.css\" />\n"
46 HTML.endheader = "</head>\n"
47 HTML.footer = "<div class=\"footer\">Copyright (C) 2013 Canonical Ltd.</div>\n"
48
49=== added file 'doc/manifest-files.qdoc'
50--- doc/manifest-files.qdoc 1970-01-01 00:00:00 +0000
51+++ doc/manifest-files.qdoc 2014-11-06 10:50:55 +0000
52@@ -0,0 +1,323 @@
53+/*
54+ * Copyright (C) 2012 Canonical Ltd.
55+ *
56+ * This program is free software; you can redistribute it and/or modify
57+ * it under the terms of the GNU Lesser General Public License as published by
58+ * the Free Software Foundation; version 3.
59+ *
60+ * This program is distributed in the hope that it will be useful,
61+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
62+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63+ * GNU Lesser General Public License for more details.
64+ *
65+ * You should have received a copy of the GNU Lesser General Public License
66+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
67+ */
68+
69+/*!
70+ \page manifest-files.html manifest-files
71+ \title Manifest files
72+
73+ In order to integrate with the Online Accounts framework, one needs to ship
74+ a couple of manifest files which describe the online services being used or
75+ provided.
76+
77+ Account plugins must ship a \l{The provider files}{provider file} which
78+ can contain account settings readable by applications. Applications must
79+ ship an \l{The application files}{application file} which tells which
80+ online services the application is able to use, and \l{The service
81+ files}{service files} which describes the online services and their
82+ settings.
83+
84+ \section1 The provider files
85+
86+ A \c .provider file describes an online accounts provider. It's a XML file,
87+ typically installed in \c /usr/share/accounts/providers/ or \c
88+ ~/.local/share/accounts/providers/ which looks like this:
89+
90+ \code
91+<?xml version="1.0" encoding="UTF-8"?>
92+<provider id="facebook">
93+ <name>Facebook</name>
94+ <icon>facebook</icon>
95+ <translations>account-plugins</translations>
96+ <domains>.*facebook\.com</domains>
97+ <plugin>generic-oauth</plugin>
98+ <single-account>true</single-account>
99+
100+ <template>
101+ <group name="auth">
102+ <setting name="method">oauth2</setting>
103+ <setting name="mechanism">user_agent</setting>
104+ <group name="oauth2">
105+ <group name="user_agent">
106+ <setting name="Host">www.facebook.com</setting>
107+ <setting name="AuthPath">/dialog/oauth</setting>
108+ <setting name="RedirectUri">https://www.facebook.com/connect/login_success.html</setting>
109+ <setting name="Display">popup</setting>
110+ <setting type="as" name="Scope">['publish_stream','status_update','user_photos']</setting>
111+ <setting name="ClientId">412471239412</setting>
112+ <setting type="as" name="AllowedSchemes">['https','http']</setting>
113+ </group>
114+ </group>
115+ </group>
116+ </template>
117+</provider>
118+ \endcode
119+
120+ This file name must match the value of the \c id tag in the root \c
121+ <provider> element, plus the \c ".provider" suffix.
122+
123+ The only mandatory element is \c <name>, and that's the display name of the
124+ provider.
125+ Other optional elements are:
126+ \list
127+ \li \c <icon>: an icon for the account provider.
128+ \li \c <translations>: a translation domain for the \c <name> element.
129+ \li \c <domains>: a regular expression matching the domain(s) where this
130+ account is used.
131+ \li \c <plugin>: the ID of the account plugin which must be used to create
132+ or edit the accounts for this provider.
133+ \li \c <single-account>: whether the account editing UI should prevent the
134+ user to create multiple accounts for this provider.
135+ \li \c <template>: default settings or authentication parameters for the
136+ account. This element is described in \l{The template element} section.
137+ \endlist
138+
139+
140+ \section1 The service files
141+
142+ A \c .service file describes an online service. It's a XML file, typically
143+ installed in \c /usr/share/accounts/services/ or \c
144+ ~/.local/share/accounts/services/ which looks like this:
145+
146+ \code
147+<?xml version="1.0" encoding="UTF-8"?>
148+<service id="picasa">
149+ <type>photo-sharing</type>
150+ <name>Picasa</name>
151+ <icon>icon_picasa</icon>
152+ <provider>google</provider>
153+ <translations>account-plugins</translations>
154+
155+ <template>
156+ <group name="auth/oauth2/user_agent">
157+ <setting type="as" name="Scope">["https://picasaweb.google.com/data/"]</setting>
158+ </group>
159+ <setting type="i" name="max-resolution">2048</setting>
160+ </template>
161+
162+</service>
163+ \endcode
164+
165+ The name of the file must match the contents of the \c id tag in the root
166+ \c <service> element, plus the \c ".service" suffix.
167+ Despite the complexity of the example above, only two pieces of information
168+ are mandatory:
169+ \list
170+ \li \c <provider>: the ID of the account provider. See the \l{The provider files}{section about provider files} for more.
171+ \li \c <type>: the type of service; some applications don't have a fixed
172+ set of supported services, but rather can use any service implementing a
173+ certain protocol (for example, IMAP for e-mail clients): in such cases, the
174+ different services would use a common type here, and applications would
175+ refer to them via this type. Otherwise, the type should be set to a unique
176+ string which has low chances of conflicting with other types: for instance,
177+ a good practice would be to set it to "\a <provider-id>-<service-id>".
178+ \endlist
179+
180+ Other information which can be embedded in \c .service files:
181+ \list
182+ \li \c <name>: a display name for the service.
183+ \li \c <icon>: an icon name for the service.
184+ \li \c <translations>: a translation domain for the \c <name> element.
185+ \li \c <template>: default settings or authentication parameters for the
186+ service. This element is described in \l{The template element} section.
187+ \endlist
188+
189+
190+ \section1 The application files
191+
192+ An \c .application file describes how an application uses online accounts.
193+ It's a XML file, typically installed in \c
194+ /usr/share/accounts/applications/ or \c
195+ ~/.local/share/accounts/applications/ which looks like this:
196+
197+ \code
198+<?xml version="1.0" encoding="UTF-8" ?>
199+<application id="my-photo-manager">
200+ <description>My Photo Manager</description>
201+ <desktop-entry>photo-manager.desktop</desktop-entry>
202+ <translations>photo-manager</translations>
203+
204+ <services>
205+ <service id="photo-instagram">
206+ <description>Publish your pictures to Instagram</description>
207+ </service>
208+ <service id="photo-facebook">
209+ <description>Publish your pictures to Facebook</description>
210+ </service>
211+ </services>
212+
213+ <service-types>
214+ <service-type id="photo-sharing">
215+ <description>Publish your pictures to your favorite site</description>
216+ </service-type>
217+ </service-types>
218+
219+</application>
220+ \endcode
221+
222+ The name of the file must match the contents of the \c id tag in the root
223+ \c <application> element, plus the \c ".application" suffix.
224+ None of the elements is mandatory, but in order to be linked to some online
225+ accounts there should be at least one valid \c <service> or \c
226+ <service-type> element.
227+
228+ The XML elements that an \c .application file can contain are:
229+ \list
230+ \li \c <description>: a description of the application; if missing, this
231+ will be read from the \c .desktop file associated with the application.
232+ \li \c <desktop-entry>: the ID of the \c .desktop file associated with the
233+ application (with or without the \c ".desktop" suffix); if missing, it's
234+ assumed to be the same application ID specified in the \c id tag of the
235+ root \c <application> element.
236+ \li \c <translations>: a translation domain for all the \c <description>
237+ elements.
238+ \li \c <services>: a container for \c <service> elements, which refer to
239+ the IDs of the \l{The service files}{services} which the application can
240+ use.
241+ \li \c <service-types>: a container for \c <service-type> elements, which
242+ refer to the IDs of the service types which the application can use. See
243+ the documentation for the \c <type> element in \l{The service
244+ files}{service files}.
245+ \endlist
246+
247+ \section2 The template element
248+
249+ Accounts can contain settings which can be useful for applications, for
250+ example authentication parameters or server settings (such as the address and
251+ port of an IMAP server). These settings are stored in the accounts
252+ database, and an application can read them by accessing the \l
253+ AccountService::settings property. The \c <template>
254+ element in the \c .service or \c .provider files can be used to specify a
255+ fallback value for those settings which have not been set in the accounts
256+ database.
257+
258+ A \c .service file \c <template> element is used when the \c id of the \l
259+ AccountService::service object matches its ID. The \c .provider file \c
260+ <template> element is instead used when the \c id of the \l
261+ AccountService::service object is empty, meaning that the \c AccountService
262+ is describing the global account, and not a specific service.
263+
264+ \section3 Format of the default settings
265+
266+ The \c <template> element describes a dictionary of keys and values, where
267+ the key is always a string, and values can be any data type.
268+ Keys can contain the "/" character, which can be used to define key groups;
269+ for instance:
270+
271+ \code
272+ <setting name="net/server/address">example.com</setting>
273+ <setting name="net/server/port" type="u">2500</setting>
274+ <setting name="net/use-ssl" type="b">false</setting>
275+ \endcode
276+
277+ is equivalent to
278+
279+ \code
280+ <group name="net">
281+ <group name="server">
282+ <setting name="address">example.com</setting>
283+ <setting name="port" type="u">2500</setting>
284+ </group>
285+ <setting name="use-ssl" type="b">false</setting>
286+ </group>
287+ \endcode
288+
289+ and also to
290+
291+ \code
292+ <group name="net/server">
293+ <setting name="address">example.com</setting>
294+ <setting name="port" type="u">2500</setting>
295+ </group>
296+ <setting name="net/use-ssl" type="b">false</setting>
297+ \endcode
298+
299+ Values are always assumed to be strings, unless a \c type attribute is set
300+ in the \c <setting> element; the most commonly used types are:
301+
302+ \table
303+ \header
304+ \li Type
305+ \li Code
306+ \li Example
307+ \row
308+ \li string
309+ \li \c s
310+ \li \c <setting... \c type="s">Hello \c world!</setting>
311+ \row
312+ \li boolean
313+ \li \c b
314+ \li \c <setting... \c type="b">true</setting>
315+ \row
316+ \li integer
317+ \li \c i
318+ \li \c <setting... \c type="i">-12</setting>
319+ \row
320+ \li unsigned
321+ \li \c u
322+ \li \c <setting... \c type="u">256</setting>
323+ \row
324+ \li array of strings
325+ \li \c as
326+ \li \c <setting... \c type="as">["one","two"]</setting>
327+ \endtable
328+
329+ \section3 Authentication data
330+
331+ The object returned by the \l AccountService::authData property is also
332+ built with a similar fallback mechanism as the rest of account settings,
333+ but it's a bit more refined to especially address the needs of application
334+ developers to override the authentication parameters. A typical example is
335+ OAuth 2.0, where the application might need to specify a different \a
336+ ClientId and \a ClientSecret than those used by the rest of the system.
337+ Another example is that of an account provider offering a REST API with an
338+ OAuth 2.0 authentication for publishing pictures, but a basic
339+ username/password authentication to access an IMAP mail sever.
340+
341+ The authentication data consists of:
342+ \list
343+ \li the \c CredentialsId key: this is the numeric ID of the account
344+ credentials in the local machine. This key is usually never stored in the
345+ \c <template> element, as its value becomes known only when the account is
346+ created.
347+ \li the \c auth/method key: a string defining which authentication plugin
348+ needs to be used. Please refer to the \l
349+ {http://docs.accounts-sso.googlecode.com/git/libsignon-qt/html/index.html}
350+ {libsignon-qt documentation}.
351+ \li the \c auth/mechanism key: a string defining which authentication
352+ mechanism needs to be used. Each authentication plugin defines its own
353+ mechanisms, so please refer to the plugin's documentation.
354+ \li all the settings defined under the \c "auth/ \a <method> \c / \a
355+ <mechanism> \c " group. Each authentication plugin defines its own parameters,
356+ so please refer to the plugin's documentation.
357+ \endlist
358+
359+ When the \l AccountService represents the global account, then the
360+ authentication data obtained by reading the \l AccountService::authData
361+ property follows the usual fallback scheme: the parameters stored in the
362+ accounts database have precence over the template parameters defined in the
363+ \c .provider file.
364+
365+ However, if the \l AccountService represent a service within an account,
366+ the authentication parameters are read in the following order (higher
367+ priority is listed first):
368+
369+ \list
370+ \li parameters stored in the accounts database, for the specific service;
371+ \li parameters stored in the \c <template> element of the \c .service file;
372+ \li parameters stored in the accounts database, for the global account;
373+ \li parameters stored in the \c <template> element of the \c .provider file.
374+ \endlist
375+ */

Subscribers

People subscribed via source and target branches

to all changes: