Merge lp:~phablet-team/telephony-service/sip-account into lp:telephony-service/staging

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 997
Merged at revision: 1240
Proposed branch: lp:~phablet-team/telephony-service/sip-account
Merge into: lp:telephony-service/staging
Prerequisite: lp:~phablet-team/telephony-service/voip_support
Diff against target: 964 lines (+826/-1)
20 files modified
CMakeLists.txt (+2/-1)
accounts/CMakeLists.txt (+2/-0)
accounts/common/DynamicField.qml (+172/-0)
accounts/common/Main.qml (+106/-0)
accounts/common/NewAccountInterface.qml (+314/-0)
accounts/irc/CMakeLists.txt (+2/-0)
accounts/irc/data/CMakeLists.txt (+5/-0)
accounts/irc/data/telephony-irc-im.service (+22/-0)
accounts/irc/data/telephony-irc.provider (+5/-0)
accounts/irc/qml/CMakeLists.txt (+13/-0)
accounts/irc/qml/NewAccount.qml (+63/-0)
accounts/sip/CMakeLists.txt (+2/-0)
accounts/sip/data/CMakeLists.txt (+5/-0)
accounts/sip/data/telephony-sip-im.service (+22/-0)
accounts/sip/data/telephony-sip.provider (+5/-0)
accounts/sip/qml/CMakeLists.txt (+13/-0)
accounts/sip/qml/NewAccount.qml (+48/-0)
debian/account-plugin-irc-unity8.install (+3/-0)
debian/account-plugin-sip-unity8.install (+3/-0)
debian/control (+19/-0)
To merge this branch: bzr merge lp:~phablet-team/telephony-service/sip-account
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+314075@code.launchpad.net

Commit message

Create unity8 sip account package.
Create unity8 irc account package.

Description of the change

Create unity8 sip account package.
Create unity8 irc account package.

To post a comment you must log in.
981. By Tiago Salem Herrmann

merge parent branch

982. By Tiago Salem Herrmann

merge parent branch

983. By Renato Araujo Oliveira Filho

Use a new account provider.

984. By Renato Araujo Oliveira Filho

Renamed install dir for qml accounts pluings.

985. By Renato Araujo Oliveira Filho

rename qml account plugin install dir, to follow the new service name.

986. By Renato Araujo Oliveira Filho

Fix account display name for irc accounts.

987. By Renato Araujo Oliveira Filho

Disable "continue" button if the main fields are empty.

988. By Renato Araujo Oliveira Filho

Format display name for irc accounts.
Disable continue button if any of the basics fields are empty.

989. By Renato Araujo Oliveira Filho

Fix irc provider name.

990. By Renato Araujo Oliveira Filho

Auto enable accounts after creation.

991. By Renato Araujo Oliveira Filho

Added 'telepathy-accounts-signon' as dep for sip account plugin.

This is necessary because sip store the auth data using online accounts.

992. By Renato Araujo Oliveira Filho

trunk merged.

993. By Renato Araujo Oliveira Filho

FIXME: Use plain password for sip accounts.

994. By Gustavo Pichorim Boiko

Merge parent branch

995. By Tiago Salem Herrmann

merge parent branch

996. By Tiago Salem Herrmann

merge parent branch

Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Some things to fix, but in general it looks good.

review: Needs Fixing
997. By Renato Araujo Oliveira Filho

Added missing license headers.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

> Some things to fix, but in general it looks good.

Missing license fixed.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) :
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good now!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2017-03-21 18:15:48 +0000
3+++ CMakeLists.txt 2017-03-21 18:15:49 +0000
4@@ -46,7 +46,7 @@
5
6 option(SKIP_QML_TESTS "Skip QML tests" OFF)
7
8-if(NOT CMAKE_CROSSCOMPILING)
9+if(CMAKE_CROSSCOMPILING)
10 find_program(QMAKE_EXECUTABLE qmake)
11 if(QMAKE_EXECUTABLE STREQUAL "QMAKE_EXECUTABLE-NOTFOUND")
12 message(FATAL_ERROR "qmake not found")
13@@ -112,6 +112,7 @@
14 add_subdirectory(po)
15 add_subdirectory(tests)
16 add_subdirectory(protocols)
17+add_subdirectory(accounts)
18
19 include(EnableCoverageReport)
20 #####################################################################
21
22=== added directory 'accounts'
23=== added file 'accounts/CMakeLists.txt'
24--- accounts/CMakeLists.txt 1970-01-01 00:00:00 +0000
25+++ accounts/CMakeLists.txt 2017-03-21 18:15:49 +0000
26@@ -0,0 +1,2 @@
27+add_subdirectory(sip)
28+add_subdirectory(irc)
29
30=== added directory 'accounts/common'
31=== added file 'accounts/common/DynamicField.qml'
32--- accounts/common/DynamicField.qml 1970-01-01 00:00:00 +0000
33+++ accounts/common/DynamicField.qml 2017-03-21 18:15:49 +0000
34@@ -0,0 +1,172 @@
35+/*
36+ * Copyright (C) 2017 Canonical, Ltd.
37+ *
38+ * Authors:
39+ * Renato Araujo Oliveira Filho <renato.filho@canonical.com>
40+ *
41+ * This file is part of telephony-service.
42+ *
43+ * telephony-service is free software; you can redistribute it and/or modify
44+ * it under the terms of the GNU General Public License as published by
45+ * the Free Software Foundation; version 3.
46+ *
47+ * telephony-service is distributed in the hope that it will be useful,
48+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
49+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50+ * GNU General Public License for more details.
51+ *
52+ * You should have received a copy of the GNU General Public License
53+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
54+ */
55+
56+import QtQuick 2.0
57+import Ubuntu.Components 1.3
58+
59+Loader {
60+ id: root
61+
62+ property var model
63+ readonly property string value: status === Loader.Ready ? item.value : ""
64+ readonly property bool isEmpty: status === Loader.Ready ? item.isEmpty : true
65+
66+ Component {
67+ id: stringField
68+
69+ TextField {
70+ id: field
71+
72+ property alias label: field.placeholderText
73+ property string defaultValue
74+
75+ readonly property alias value: field.text
76+ readonly property bool isEmpty: value === "" || (defaultValue && value === model.defaultValue)
77+
78+ text: defaultValue ? defaultValue : ""
79+ }
80+ }
81+
82+ Component {
83+ id: booleanField
84+
85+ Item {
86+ property alias label: fieldLabel.text
87+ property string defaultValue
88+
89+ readonly property string value: fieldValue.checked ? "true" : "false"
90+ readonly property bool isEmpty: (defaultValue && value === model.defaultValue)
91+
92+ height: fieldValue.height
93+
94+ Label {
95+ id: fieldLabel
96+
97+ anchors {
98+ left: parent.left
99+ right: fieldValue.left
100+ verticalCenter: parent.verticalCenter
101+ }
102+ }
103+ Switch {
104+ id: fieldValue
105+
106+ anchors {
107+ right: parent.right
108+ verticalCenter: parent.verticalCenter
109+ }
110+ checked: (defaultValue && (defaultValue === 'true'))
111+ }
112+ }
113+ }
114+
115+ Component {
116+ id: numericField
117+
118+ TextField {
119+ id: field
120+
121+ property alias label: field.placeholderText
122+ property string defaultValue
123+
124+ readonly property alias value: field.text
125+ readonly property bool isEmpty: value === "" || (defaultValue && (value === defaultValue))
126+
127+ inputMethodHints: Qt.ImhDigitsOnly
128+ validator: IntValidator {}
129+ }
130+ }
131+
132+ Component{
133+ id: passwordField
134+
135+ Item {
136+ property alias label: field.placeholderText
137+ readonly property alias value: field.text
138+ readonly property bool isEmpty: value === ""
139+
140+ height: field.height + showPasswordCheck.height
141+ TextField {
142+ id: field
143+
144+ echoMode: showPasswordCheck.checked ? TextInput.Normal : TextInput.Password
145+ anchors {
146+ left: parent.left
147+ right: parent.right
148+ }
149+ onTextChanged: root.changed()
150+ }
151+ CheckBox {
152+ id: showPasswordCheck
153+ anchors {
154+ left: field.left
155+ top: field.bottom
156+ topMargin: units.gu(1)
157+ }
158+ }
159+ Label {
160+ text: i18n.tr("Show Password")
161+ anchors {
162+ top: showPasswordCheck.top
163+ left: showPasswordCheck.right
164+ leftMargin: units.gu(1)
165+ right: field.right
166+ }
167+ }
168+ }
169+ }
170+
171+
172+ sourceComponent: {
173+ if (!model)
174+ return null
175+
176+ if (!model.inputType) {
177+ console.warn("Model does not contain 'inputType'")
178+ return null
179+ }
180+
181+ switch (model.inputType) {
182+ case 'string':
183+ return stringField
184+ case 'boolean':
185+ return booleanField
186+ case 'numeric':
187+ return numericField
188+ case 'password':
189+ return passwordField
190+ }
191+ }
192+
193+ Binding {
194+ target: root.item
195+ property: "label"
196+ value: model.label
197+ when: root.status == Loader.Ready
198+ }
199+
200+ Binding {
201+ target: root.item
202+ property: "defaultValue"
203+ value: model.defaultValue
204+ when: model.hasOwnProperty('defaultValue') && root.status == Loader.Ready
205+ }
206+}
207
208=== added file 'accounts/common/Main.qml'
209--- accounts/common/Main.qml 1970-01-01 00:00:00 +0000
210+++ accounts/common/Main.qml 2017-03-21 18:15:49 +0000
211@@ -0,0 +1,106 @@
212+/*
213+ * Copyright (C) 2017 Canonical, Ltd.
214+ *
215+ * Authors:
216+ * Renato Araujo Oliveira Filho <renato.filho@canonical.com>
217+ *
218+ * This file is part of telephony-service.
219+ *
220+ * telephony-service is free software; you can redistribute it and/or modify
221+ * it under the terms of the GNU General Public License as published by
222+ * the Free Software Foundation; version 3.
223+ *
224+ * telephony-service is distributed in the hope that it will be useful,
225+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
226+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
227+ * GNU General Public License for more details.
228+ *
229+ * You should have received a copy of the GNU General Public License
230+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
231+ */
232+
233+import QtQuick 2.0
234+import Ubuntu.Components 1.3
235+import Ubuntu.OnlineAccounts.Plugin 1.0
236+
237+Item {
238+ id: rootFlickable
239+
240+ property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
241+
242+ signal finished
243+
244+ anchors.fill: parent
245+
246+ Flickable {
247+ anchors {
248+ left: parent.left
249+ right: parent.right
250+ top: parent.top
251+ bottom: btnConfirm.top
252+ }
253+ contentWidth: parent.width
254+ contentHeight: editPageLoader.item.height + keyboardSize
255+ clip: true
256+
257+ Loader {
258+ id: editPageLoader
259+ sourceComponent: account.accountId != 0 ? existingAccountComponent : newAccountComponent
260+ anchors {
261+ left: parent.left
262+ right: parent.right
263+ }
264+
265+ Connections {
266+ target: editPageLoader.item
267+ onFinished: rootFlickable.finished()
268+ }
269+ }
270+
271+ Component {
272+ id: newAccountComponent
273+ NewAccount {}
274+ }
275+
276+ Component {
277+ id: existingAccountComponent
278+ Options {}
279+ }
280+ }
281+
282+ Button {
283+ id: btnConfirm
284+ text: i18n.tr("Continue")
285+ color: UbuntuColors.orange
286+ anchors {
287+ left: parent.left
288+ right: parent.right
289+ bottom: btnCancel.top
290+ margins: units.gu(2)
291+ bottomMargin: units.gu(1)
292+ }
293+ enabled: editPageLoader.item && editPageLoader.item.isValid
294+ onClicked: {
295+ if (editPageLoader.item)
296+ editPageLoader.item.confirm()
297+ }
298+
299+ }
300+
301+ Button {
302+ id: btnCancel
303+
304+ text: i18n.tr("Cancel")
305+ anchors {
306+ left: parent.left
307+ right: parent.right
308+ bottom: parent.bottom
309+ margins: units.gu(2)
310+ bottomMargin: units.gu(1)
311+ }
312+ onClicked: {
313+ if (editPageLoader.item)
314+ editPageLoader.item.cancel()
315+ }
316+ }
317+}
318
319=== added file 'accounts/common/NewAccountInterface.qml'
320--- accounts/common/NewAccountInterface.qml 1970-01-01 00:00:00 +0000
321+++ accounts/common/NewAccountInterface.qml 2017-03-21 18:15:49 +0000
322@@ -0,0 +1,314 @@
323+/*
324+ * Copyright (C) 2017 Canonical, Ltd.
325+ *
326+ * Authors:
327+ * Renato Araujo Oliveira Filho <renato.filho@canonical.com>
328+ *
329+ * This file is part of telephony-service.
330+ *
331+ * telephony-service is free software; you can redistribute it and/or modify
332+ * it under the terms of the GNU General Public License as published by
333+ * the Free Software Foundation; version 3.
334+ *
335+ * telephony-service is distributed in the hope that it will be useful,
336+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
337+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
338+ * GNU General Public License for more details.
339+ *
340+ * You should have received a copy of the GNU General Public License
341+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
342+ */
343+
344+import QtQuick 2.0
345+import Ubuntu.Components 1.3
346+import Ubuntu.OnlineAccounts 0.1
347+
348+Item {
349+ id: root
350+
351+ readonly property string keyPrefix: "telepathy/"
352+ readonly property var accountObjectHandle: account ? account.objectHandle : undefined
353+ readonly property alias isValid: paramsRepeater.fieldHasValues
354+
355+ property string manager
356+ property string protocol
357+ property string icon
358+ property var params
359+ property var advancedParams
360+ property bool hasCrendentials: true
361+
362+
363+ signal finished
364+ height: fields.childrenRect.height +
365+ units.gu(10)
366+
367+ function getAccountService() {
368+ var service = serviceModel.get(0, "accountServiceHandle")
369+ if (!service) {
370+ console.warn("No service handle from model")
371+ return null
372+ }
373+
374+ return accountServiceComponent.createObject(null,
375+ {"objectHandle": service})
376+ }
377+
378+ // virual
379+ function extendedSettings(inputFields)
380+ {
381+ return {}
382+ //Helper class to be extended by derived class
383+ }
384+
385+ // virtual
386+ function formatDisplayName(inputFields)
387+ {
388+ return inputFields['account']
389+ // Helper function that allow the derived class to format a different display name
390+ }
391+
392+ function saveServiceSettings(serviceIM, creds) {
393+ var settingsIM = serviceIM.settings
394+ var inputFields = {}
395+
396+ settingsIM[root.keyPrefix + 'manager'] = root.manager
397+ settingsIM[root.keyPrefix + 'protocol'] = root.protocol
398+ settingsIM[root.keyPrefix + 'Icon'] = root.icon
399+
400+ // basic fields
401+ for (var i=0; i < paramsRepeater.count; i++) {
402+ var fieldData = root.params[i]
403+ var field = paramsRepeater.itemAt(i)
404+ var fieldParamName = root.keyPrefix + 'param-' + fieldData.name
405+
406+ if (field.isEmpty) {
407+ delete settingsIM[fieldParamName]
408+ } else {
409+ inputFields[fieldData.name] = field.value
410+ if (fieldData.store) {
411+ settingsIM[fieldParamName] = field.value
412+ }
413+ }
414+ }
415+
416+ // advanced fields
417+ for (var i=0; i < advancedParamsRepeater.count; i++) {
418+ var xFieldData = root.advancedParams[i]
419+ var xField = advancedParamsRepeater.itemAt(i)
420+ var xFieldParamName = root.keyPrefix + 'param-' + xFieldData.name
421+
422+ if (xField.isEmpty) {
423+ delete settingsIM[xFieldParamName]
424+ } else {
425+ inputFields[xFieldData.name] = xField.value
426+
427+ if (xFieldData.store) {
428+ settingsIM[xFieldParamName] = xField.value
429+ }
430+ }
431+ }
432+
433+
434+ var xSettings = extendedSettings(inputFields)
435+ for (var key in xSettings) {
436+ settingsIM[root.keyPrefix + key] = xSettings[key]
437+ }
438+
439+ account.updateDisplayName(formatDisplayName(inputFields))
440+
441+ serviceIM.updateSettings(settingsIM)
442+ //serviceIM.credentials = creds
443+ //serviceIM.updateServiceEnabled(true)
444+ }
445+
446+ function continueAccountSave(creds) {
447+ var imService = root.getAccountService()
448+ if (!imService) {
449+ console.warn("Fail to retrieve account service")
450+ return
451+ }
452+
453+ root.saveServiceSettings(imService, creds)
454+ if (creds)
455+ globalAccountService.credentials = creds
456+ globalAccountService.updateServiceEnabled(true)
457+
458+ account.synced.connect(root.finished)
459+ account.sync()
460+ }
461+
462+ function credentialsStored() {
463+ if (creds.credentialsId === 0) {
464+ console.warn("Credentials not stored correct")
465+ return
466+ }
467+
468+ var imService = root.getAccountService()
469+ if (!imService) {
470+ console.warn("Fail to retrieve account service")
471+ return
472+ }
473+
474+ continueAccountSave(creds)
475+ }
476+
477+ function parseCrendentials() {
478+ var credentials = {'userName': '', 'password': ''}
479+
480+ for (var i=0; i < paramsRepeater.count; i++) {
481+ var fieldData = root.params[i]
482+ var field = paramsRepeater.itemAt(i)
483+
484+ if (fieldData.name === 'account')
485+ credentials['userName'] = field.value
486+
487+ if (fieldData.name === 'password')
488+ credentials['password'] = field.value
489+ }
490+
491+ return credentials
492+ }
493+
494+ function cancel() {
495+ account.removed.connect(root.finished)
496+ account.remove(Account.RemoveCredentials)
497+ }
498+
499+ function confirm() {
500+ var info = root.parseCrendentials()
501+ // save account
502+ account.updateDisplayName(info.userName)
503+ if (root.hasCrendentials) {
504+ creds.userName = info.userName
505+ creds.secret = info.password
506+ creds.sync()
507+ } else {
508+ continueAccountSave(null)
509+ }
510+ }
511+
512+ Column {
513+ id: fields
514+
515+ anchors {
516+ top: parent.top
517+ topMargin: units.gu(5)
518+ left: parent.left
519+ right: parent.right
520+ }
521+ height: childrenRect.height
522+ spacing: units.gu(2)
523+
524+ Icon {
525+ anchors.horizontalCenter: fields.horizontalCenter
526+ name: root.icon
527+ }
528+
529+ Repeater {
530+ id: paramsRepeater
531+
532+ property bool fieldHasValues: false
533+
534+ function checkFieldsHasValues()
535+ {
536+ var hasEmptyField = false
537+ for (var i = 0; i < paramsRepeater.count; i++) {
538+
539+ var child = paramsRepeater.itemAt(i)
540+ if (child && child.isEmpty) {
541+ hasEmptyField = true
542+ break
543+ }
544+ }
545+ fieldHasValues = !hasEmptyField
546+ }
547+
548+ width: parent.width
549+ model: root.params
550+ DynamicField {
551+ model: modelData
552+ anchors{
553+ left: parent.left
554+ right: parent.right
555+ margins: units.gu(4)
556+ }
557+ onValueChanged: paramsRepeater.checkFieldsHasValues()
558+ }
559+ }
560+
561+ Item {
562+ id: div
563+
564+ anchors{
565+ left: parent.left
566+ right: parent.right
567+ }
568+ height: units.gu(3)
569+ visible: root.advancedParams.length > 0
570+ }
571+
572+ Label {
573+ id: advancedParamsTitle
574+
575+ anchors{
576+ left: parent.left
577+ right: parent.right
578+ margins: units.gu(4)
579+ }
580+ visible: root.advancedParams.length > 0
581+ text: i18n.tr("Advanced Options")
582+ textSize: Label.Medium
583+ }
584+
585+ Repeater {
586+ id: advancedParamsRepeater
587+
588+ width: parent.width
589+ model: root.advancedParams
590+ DynamicField {
591+ model: modelData
592+ anchors{
593+ left: parent.left
594+ right: parent.right
595+ margins: units.gu(4)
596+ }
597+ }
598+ }
599+ }
600+
601+ AccountService {
602+ id: globalAccountService
603+
604+ objectHandle: account.accountServiceHandle
605+ autoSync: false
606+ }
607+
608+ Credentials {
609+ id: creds
610+
611+ caption: account.provider.id
612+ acl: "*" // untill later
613+ storeSecret: true
614+ onCredentialsIdChanged: {
615+ console.debug("Credetials id changed")
616+ root.credentialsStored()
617+ }
618+ }
619+
620+ // necessary to store settings on the "IM" service
621+ AccountServiceModel {
622+ id: serviceModel
623+
624+ includeDisabled: true
625+ account: root.accountObjectHandle
626+ serviceType: "IM"
627+ }
628+
629+ Component {
630+ id: accountServiceComponent
631+
632+ AccountService {
633+ autoSync: false
634+ }
635+ }
636+}
637
638=== added directory 'accounts/irc'
639=== added file 'accounts/irc/CMakeLists.txt'
640--- accounts/irc/CMakeLists.txt 1970-01-01 00:00:00 +0000
641+++ accounts/irc/CMakeLists.txt 2017-03-21 18:15:49 +0000
642@@ -0,0 +1,2 @@
643+add_subdirectory(qml)
644+add_subdirectory(data)
645
646=== added directory 'accounts/irc/data'
647=== added file 'accounts/irc/data/CMakeLists.txt'
648--- accounts/irc/data/CMakeLists.txt 1970-01-01 00:00:00 +0000
649+++ accounts/irc/data/CMakeLists.txt 2017-03-21 18:15:49 +0000
650@@ -0,0 +1,5 @@
651+file(GLOB PROVIDER_FILES *.provider)
652+install(FILES ${PROVIDER_FILES} DESTINATION share/accounts/providers/)
653+
654+file(GLOB SERVICE_FILES *.service)
655+install(FILES ${SERVICE_FILES} DESTINATION share/accounts/services/)
656
657=== added file 'accounts/irc/data/telephony-irc-im.service'
658--- accounts/irc/data/telephony-irc-im.service 1970-01-01 00:00:00 +0000
659+++ accounts/irc/data/telephony-irc-im.service 2017-03-21 18:15:49 +0000
660@@ -0,0 +1,22 @@
661+<?xml version="1.0" encoding="UTF-8"?>
662+<service id="telephony-irc-im">
663+ <type>IM</type>
664+ <name>IRC</name>
665+ <icon>irc</icon>
666+ <provider>telephony-irc</provider>
667+
668+ <!-- default settings (account settings have precedence over these) -->
669+ <template>
670+ <group name="telepathy">
671+ <setting name="manager">irc</setting>
672+ <setting name="protocol">irc</setting>
673+ <setting name="ConnectAutomatically">true</setting>
674+ <setting type="s" name="AutomaticPresence">2;available;;</setting>
675+ </group>
676+ <group name="auth">
677+ <setting name="method">password</setting>
678+ <setting name="mechanism">password</setting>
679+ </group>
680+ </template>
681+
682+</service>
683
684=== added file 'accounts/irc/data/telephony-irc.provider'
685--- accounts/irc/data/telephony-irc.provider 1970-01-01 00:00:00 +0000
686+++ accounts/irc/data/telephony-irc.provider 2017-03-21 18:15:49 +0000
687@@ -0,0 +1,5 @@
688+<?xml version="1.0" encoding="UTF-8" ?>
689+<provider id="telephony-irc">
690+ <name>IRC</name>
691+ <icon>irc</icon>
692+</provider>
693
694=== added directory 'accounts/irc/qml'
695=== added file 'accounts/irc/qml/AccountInfo.qml'
696=== added file 'accounts/irc/qml/CMakeLists.txt'
697--- accounts/irc/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000
698+++ accounts/irc/qml/CMakeLists.txt 2017-03-21 18:15:49 +0000
699@@ -0,0 +1,13 @@
700+file(GLOB QML_PLUGIN_FILES *.qml)
701+
702+# The path (including plug-in name) where the QML files are installed
703+set(QML_PLUGIN_INSTALL_DIR share/accounts/qml-plugins/telephony-irc/)
704+
705+# Do not install symbolic links
706+set (QML_PLUGIN_RESOLVED_FILES "")
707+foreach (QML_PLUGIN_FILE ${QML_PLUGIN_FILES})
708+ get_filename_component(resolvedFile "${QML_PLUGIN_FILE}" REALPATH)
709+ list (APPEND QML_PLUGIN_RESOLVED_FILES "${resolvedFile}")
710+endforeach()
711+
712+install(FILES ${QML_PLUGIN_RESOLVED_FILES} DESTINATION ${QML_PLUGIN_INSTALL_DIR})
713
714=== added symlink 'accounts/irc/qml/DynamicField.qml'
715=== target is u'../../common/DynamicField.qml'
716=== added symlink 'accounts/irc/qml/Main.qml'
717=== target is u'../../common/Main.qml'
718=== added file 'accounts/irc/qml/NewAccount.qml'
719--- accounts/irc/qml/NewAccount.qml 1970-01-01 00:00:00 +0000
720+++ accounts/irc/qml/NewAccount.qml 2017-03-21 18:15:49 +0000
721@@ -0,0 +1,63 @@
722+/*
723+ * Copyright (C) 2017 Canonical, Ltd.
724+ *
725+ * Authors:
726+ * Renato Araujo Oliveira Filho <renato.filho@canonical.com>
727+ *
728+ * This file is part of telephony-service.
729+ *
730+ * telephony-service is free software; you can redistribute it and/or modify
731+ * it under the terms of the GNU General Public License as published by
732+ * the Free Software Foundation; version 3.
733+ *
734+ * telephony-service is distributed in the hope that it will be useful,
735+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
736+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
737+ * GNU General Public License for more details.
738+ *
739+ * You should have received a copy of the GNU General Public License
740+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
741+ */
742+
743+import QtQuick 2.0
744+
745+NewAccountInterface {
746+ id: root
747+
748+ anchors {
749+ left: parent.left
750+ right: parent.right
751+ verticalCenter: parent.verticalCenter
752+ }
753+
754+ manager: 'irc'
755+ protocol: 'irc'
756+ icon: 'irc'
757+ hasCrendentials: false
758+ params: [
759+ {'name': 'server', 'inputType': 'string', 'label': i18n.tr('Network. (Eg: chat.freenode.net)'), 'store': true},
760+ {'name': 'nickname', 'inputType': 'string', 'label': i18n.tr('Nickname'), 'store': true},
761+ ]
762+ advancedParams: [
763+ {'name': 'port', 'inputType': 'numeric', 'label': i18n.tr('Port'), 'store': true},
764+ {'name': 'use-ssl', 'inputType': 'boolean', 'label': i18n.tr('Use ssl'), 'store': true},
765+ {'name': 'verify-ssl-cert', 'inputType': 'boolean', 'label': i18n.tr('Verify ssl certificate'), 'store': true},
766+ {'name': 'username', 'inputType': 'string', 'label': i18n.tr('Username'), 'store': true},
767+ {'name': 'password', 'inputType': 'password', 'label': i18n.tr('Password'), 'store': true},
768+ {'name': 'fullname', 'inputType': 'string', 'label': i18n.tr('Real name'), 'store': true},
769+ ]
770+
771+ function extendedSettings(inputFields)
772+ {
773+ var settings = {}
774+ settings['param-account'] = inputFields['nickname'] + "@" + inputFields['server']
775+ if (settings['param-port'] == "")
776+ settings['param-port'] = "6667"
777+ return settings
778+ }
779+
780+ function formatDisplayName(inputFields)
781+ {
782+ return inputFields['nickname'] + "@" + inputFields['server']
783+ }
784+}
785
786=== added symlink 'accounts/irc/qml/NewAccountInterface.qml'
787=== target is u'../../common/NewAccountInterface.qml'
788=== added directory 'accounts/sip'
789=== added file 'accounts/sip/CMakeLists.txt'
790--- accounts/sip/CMakeLists.txt 1970-01-01 00:00:00 +0000
791+++ accounts/sip/CMakeLists.txt 2017-03-21 18:15:49 +0000
792@@ -0,0 +1,2 @@
793+add_subdirectory(qml)
794+add_subdirectory(data)
795
796=== added directory 'accounts/sip/data'
797=== added file 'accounts/sip/data/CMakeLists.txt'
798--- accounts/sip/data/CMakeLists.txt 1970-01-01 00:00:00 +0000
799+++ accounts/sip/data/CMakeLists.txt 2017-03-21 18:15:49 +0000
800@@ -0,0 +1,5 @@
801+file(GLOB PROVIDER_FILES *.provider)
802+install(FILES ${PROVIDER_FILES} DESTINATION share/accounts/providers/)
803+
804+file(GLOB SERVICE_FILES *.service)
805+install(FILES ${SERVICE_FILES} DESTINATION share/accounts/services/)
806
807=== added file 'accounts/sip/data/telephony-sip-im.service'
808--- accounts/sip/data/telephony-sip-im.service 1970-01-01 00:00:00 +0000
809+++ accounts/sip/data/telephony-sip-im.service 2017-03-21 18:15:49 +0000
810@@ -0,0 +1,22 @@
811+<?xml version="1.0" encoding="UTF-8"?>
812+<service id="telephony-sip-im">
813+ <type>IM</type>
814+ <name>SIP</name>
815+ <icon>sip</icon>
816+ <provider>telephony-sip</provider>
817+
818+ <!-- default settings (account settings have precedence over these) -->
819+ <template>
820+ <group name="telepathy">
821+ <setting name="manager">sofiasip</setting>
822+ <setting name="protocol">sip</setting>
823+ <setting name="ConnectAutomatically">true</setting>
824+ <setting type="s" name="AutomaticPresence">2;available;;</setting>
825+ </group>
826+ <group name="auth">
827+ <setting name="method">password</setting>
828+ <setting name="mechanism">password</setting>
829+ </group>
830+ </template>
831+
832+</service>
833
834=== added file 'accounts/sip/data/telephony-sip.provider'
835--- accounts/sip/data/telephony-sip.provider 1970-01-01 00:00:00 +0000
836+++ accounts/sip/data/telephony-sip.provider 2017-03-21 18:15:49 +0000
837@@ -0,0 +1,5 @@
838+<?xml version="1.0" encoding="UTF-8" ?>
839+<provider id="telephony-sip">
840+ <name>SIP</name>
841+ <icon>sip</icon>
842+</provider>
843
844=== added directory 'accounts/sip/qml'
845=== added file 'accounts/sip/qml/AccountInfo.qml'
846=== added file 'accounts/sip/qml/CMakeLists.txt'
847--- accounts/sip/qml/CMakeLists.txt 1970-01-01 00:00:00 +0000
848+++ accounts/sip/qml/CMakeLists.txt 2017-03-21 18:15:49 +0000
849@@ -0,0 +1,13 @@
850+file(GLOB QML_PLUGIN_FILES *.qml)
851+
852+# The path (including plug-in name) where the QML files are installed
853+set(QML_PLUGIN_INSTALL_DIR share/accounts/qml-plugins/telephony-sip/)
854+
855+# Do not install symbolic links
856+set (QML_PLUGIN_RESOLVED_FILES "")
857+foreach (QML_PLUGIN_FILE ${QML_PLUGIN_FILES})
858+ get_filename_component(resolvedFile "${QML_PLUGIN_FILE}" REALPATH)
859+ list (APPEND QML_PLUGIN_RESOLVED_FILES "${resolvedFile}")
860+endforeach()
861+
862+install(FILES ${QML_PLUGIN_RESOLVED_FILES} DESTINATION ${QML_PLUGIN_INSTALL_DIR})
863
864=== added symlink 'accounts/sip/qml/DynamicField.qml'
865=== target is u'../../common/DynamicField.qml'
866=== added symlink 'accounts/sip/qml/Main.qml'
867=== target is u'../../common/Main.qml'
868=== added file 'accounts/sip/qml/NewAccount.qml'
869--- accounts/sip/qml/NewAccount.qml 1970-01-01 00:00:00 +0000
870+++ accounts/sip/qml/NewAccount.qml 2017-03-21 18:15:49 +0000
871@@ -0,0 +1,48 @@
872+/*
873+ * Copyright (C) 2017 Canonical, Ltd.
874+ *
875+ * Authors:
876+ * Renato Araujo Oliveira Filho <renato.filho@canonical.com>
877+ *
878+ * This file is part of telephony-service.
879+ *
880+ * telephony-service is free software; you can redistribute it and/or modify
881+ * it under the terms of the GNU General Public License as published by
882+ * the Free Software Foundation; version 3.
883+ *
884+ * telephony-service is distributed in the hope that it will be useful,
885+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
886+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
887+ * GNU General Public License for more details.
888+ *
889+ * You should have received a copy of the GNU General Public License
890+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
891+ */
892+
893+import QtQuick 2.0
894+
895+NewAccountInterface {
896+ id: root
897+
898+ manager: 'sofiasip'
899+ protocol: 'sip'
900+ icon: 'sip'
901+ hasCrendentials: false
902+ params: [
903+ {'name': 'account', 'inputType': 'string', 'label': i18n.tr('Sip Id. (Eg: user@my.sip.net)'), 'store': true},
904+ {'name': 'password', 'inputType': 'password', 'label': i18n.tr('Password'), 'store': true}
905+ ]
906+ advancedParams: [
907+ {'name': 'discover-stun', 'inputType': 'boolean', 'label': i18n.tr('Discover the STUN server automatically'), 'store': true, 'defaultValue' : 'false' },
908+ {'name': 'stun-server', 'inputType': 'string', 'label': i18n.tr('STUN server'), 'store': true},
909+ {'name': 'stun-port', 'inputType': 'numeric', 'label': i18n.tr('STUN port'), 'store': true},
910+ {'name': 'discover-binding', 'inputType': 'boolean', 'label': i18n.tr('Divscover Binding'), 'store': true, 'defaultValue': 'true'},
911+ {'name': 'proxy-host', 'inputType': 'string', 'label': i18n.tr('Proxy server'), 'store': true},
912+ {'name': 'port', 'inputType': 'numeric', 'label': i18n.tr('Proxy port'), 'store': true},
913+ {'name': 'keepalive-mechanism', 'inputType': 'string', 'label': i18n.tr('Keep alive mechanism'), 'store': true, 'defaultValue': 'auto'},
914+ {'name': 'keepalive-interval', 'inputType': 'numeric', 'label': i18n.tr('Keep alive interval'), 'store': true},
915+ {'name': 'auth-user', 'inputType': 'string', 'label': i18n.tr('Authentication username'), 'store': true},
916+ {'name': 'transport', 'inputType': 'string', 'label': i18n.tr('Transport'), 'store': true, 'defaultValue': 'auto'},
917+ {'name': 'loose-routing', 'inputType': 'boolean', 'label': i18n.tr('Loose Routing'), 'store': true, 'defaultValue': 'false'}
918+ ]
919+}
920
921=== added symlink 'accounts/sip/qml/NewAccountInterface.qml'
922=== target is u'../../common/NewAccountInterface.qml'
923=== added file 'debian/account-plugin-irc-unity8.install'
924--- debian/account-plugin-irc-unity8.install 1970-01-01 00:00:00 +0000
925+++ debian/account-plugin-irc-unity8.install 2017-03-21 18:15:49 +0000
926@@ -0,0 +1,3 @@
927+usr/share/accounts/qml-plugins/telephony-irc/*
928+usr/share/accounts/providers/telephony-irc.provider
929+usr/share/accounts/services/telephony-irc-im.service
930
931=== added file 'debian/account-plugin-sip-unity8.install'
932--- debian/account-plugin-sip-unity8.install 1970-01-01 00:00:00 +0000
933+++ debian/account-plugin-sip-unity8.install 2017-03-21 18:15:49 +0000
934@@ -0,0 +1,3 @@
935+usr/share/accounts/qml-plugins/telephony-sip/*
936+usr/share/accounts/providers/telephony-sip.provider
937+usr/share/accounts/services/telephony-sip-im.service
938
939=== modified file 'debian/control'
940--- debian/control 2016-12-05 15:14:33 +0000
941+++ debian/control 2017-03-21 18:15:49 +0000
942@@ -92,3 +92,22 @@
943 This package contains the QML plugin providing the features from the telephony
944 PhoneNumber to applications.
945
946+Package: account-plugin-sip-unity8
947+Architecture: all
948+Pre-Depends: dpkg (>= 1.15.6~)
949+Depends: mcp-account-manager-uoa-common,
950+ telepathy-accounts-signon
951+Description: Online account plugin for unity8
952+ Online account plugin for unity8.
953+ .
954+ This package contains the online account plugin providing sip account.
955+
956+Package: account-plugin-irc-unity8
957+Architecture: all
958+Pre-Depends: dpkg (>= 1.15.6~)
959+Depends: mcp-account-manager-uoa-common
960+Description: Online account plugin for unity8
961+ Online account plugin for unity8.
962+ .
963+ This package contains the online account plugin providing irc account.
964+

Subscribers

People subscribed via source and target branches

to all changes: